@gientech/modual 1.3.1 → 1.3.2

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,1289 @@
1
+ import*as d from"react";import oe,{forwardRef as fn,useState as xt,useRef as qe,useCallback as mt,useEffect as Bt,version as Hw,createElement as Ss,useContext as Rr,createContext as An,useMemo as Ct,Children as Ww,useImperativeHandle as ni,useLayoutEffect as Nb,isValidElement as Kw,cloneElement as qw,useReducer as Vw,Component as Xw,memo as Uw}from"react";import*as Gw from"react-dom";import Wi,{flushSync as cd,unstable_batchedUpdates as jb,createPortal as Ib}from"react-dom";import{s as ou,I as jl}from"./index-CEK88UzR.js";var bn={},Yw=Object.defineProperty,Zw=(e,t,r)=>t in e?Yw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,or=(e,t,r)=>Zw(e,typeof t!="symbol"?t+"":t,r),Il=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jm={exports:{}},gi={};/**
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 Im;function Jw(){if(Im)return gi;Im=1;var e=oe,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,u,s){var c,p={},f=null,h=null;s!==void 0&&(f=""+s),u.key!==void 0&&(f=""+u.key),u.ref!==void 0&&(h=u.ref);for(c in u)n.call(u,c)&&!a.hasOwnProperty(c)&&(p[c]=u[c]);if(l&&l.defaultProps)for(c in u=l.defaultProps,u)p[c]===void 0&&(p[c]=u[c]);return{$$typeof:t,type:l,key:f,ref:h,props:p,_owner:o.current}}return gi.Fragment=r,gi.jsx=i,gi.jsxs=i,gi}var Rm;function Qw(){return Rm||(Rm=1,jm.exports=Jw()),jm.exports}var Q=Qw();/*!
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 Tm(e){return Object.prototype.toString.call(e)==="[object Object]"}function qr(e){var t,r;return Tm(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Tm(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Rb=Symbol.for("immer-nothing"),Mm=Symbol.for("immer-draftable"),xn=Symbol.for("immer-state");function In(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var za=Object.getPrototypeOf;function Jo(e){return!!e&&!!e[xn]}function Qo(e){var t;return e?Tb(e)||Array.isArray(e)||!!e[Mm]||!!((t=e.constructor)!=null&&t[Mm])||yl(e)||iu(e):!1}var eE=Object.prototype.constructor.toString();function Tb(e){if(!e||typeof e!="object")return!1;const t=za(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)===eE}function $s(e,t){au(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function au(e){const t=e[xn];return t?t.type_:Array.isArray(e)?1:yl(e)?2:iu(e)?3:0}function dd(e,t){return au(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Mb(e,t,r){const n=au(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function tE(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function yl(e){return e instanceof Map}function iu(e){return e instanceof Set}function _o(e){return e.copy_||e.base_}function fd(e,t){if(yl(e))return new Map(e);if(iu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=Tb(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[xn];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(za(e),n)}else{const n=za(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function tp(e,t=!1){return lu(e)||Jo(e)||!Qo(e)||(au(e)>1&&Object.defineProperties(e,{set:{value:Rl},add:{value:Rl},clear:{value:Rl},delete:{value:Rl}}),Object.freeze(e),t&&Object.values(e).forEach(r=>tp(r,!0))),e}function Rl(){In(2)}function lu(e){return Object.isFrozen(e)}var rE={};function ea(e){const t=rE[e];return t||In(0,e),t}var Ki;function zb(){return Ki}function nE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function zm(e,t){t&&(ea("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function pd(e){md(e),e.drafts_.forEach(oE),e.drafts_=null}function md(e){e===Ki&&(Ki=e.parent_)}function _m(e){return Ki=nE(Ki,e)}function oE(e){const t=e[xn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Lm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[xn].modified_&&(pd(t),In(4)),Qo(e)&&(e=Bs(t,e),t.parent_||Os(t,e)),t.patches_&&ea("Patches").generateReplacementPatches_(r[xn].base_,e,t.patches_,t.inversePatches_)):e=Bs(t,r,[]),pd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Rb?e:void 0}function Bs(e,t,r){if(lu(t))return t;const n=t[xn];if(!n)return $s(t,(o,a)=>Hm(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Os(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),$s(a,(l,u)=>Hm(e,n,o,l,u,r,i)),Os(e,o,!1),r&&e.patches_&&ea("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Hm(e,t,r,n,o,a,i){if(Jo(o)){const l=a&&t&&t.type_!==3&&!dd(t.assigned_,n)?a.concat(n):void 0,u=Bs(e,o,l);if(Mb(r,n,u),Jo(u))e.canAutoFreeze_=!1;else return}else i&&r.add(o);if(Qo(o)&&!lu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bs(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(yl(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Os(e,o)}}function Os(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tp(t,r)}function aE(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:zb(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=rp;r&&(o=[n],a=qi);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return n.draft_=l,n.revoke_=i,l}var rp={get(e,t){if(t===xn)return e;const r=_o(e);if(!dd(r,t))return iE(e,r,t);const n=r[t];return e.finalized_||!Qo(n)?n:n===Yu(e.base_,t)?(Zu(e),e.copy_[t]=gd(n,e)):n},has(e,t){return t in _o(e)},ownKeys(e){return Reflect.ownKeys(_o(e))},set(e,t,r){const n=_b(_o(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Yu(_o(e),t),a=o==null?void 0:o[xn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(tE(r,o)&&(r!==void 0||dd(e.base_,t)))return!0;Zu(e),hd(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 Yu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zu(e),hd(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(){In(11)},getPrototypeOf(e){return za(e.base_)},setPrototypeOf(){In(12)}},qi={};$s(rp,(e,t)=>{qi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qi.deleteProperty=function(e,t){return qi.set.call(this,e,t,void 0)};qi.set=function(e,t,r){return rp.set.call(this,e[0],t,r,e[0])};function Yu(e,t){const r=e[xn];return(r?_o(r):e)[t]}function iE(e,t,r){var o;const n=_b(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function _b(e,t){if(!(t in e))return;let r=za(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=za(r)}}function hd(e){e.modified_||(e.modified_=!0,e.parent_&&hd(e.parent_))}function Zu(e){e.copy_||(e.copy_=fd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lE=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,...u){return i.produce(l,s=>r.call(this,s,...u))}}typeof r!="function"&&In(6),n!==void 0&&typeof n!="function"&&In(7);let o;if(Qo(t)){const a=_m(this),i=gd(t,void 0);let l=!0;try{o=r(i),l=!1}finally{l?pd(a):md(a)}return zm(a,n),Lm(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Rb&&(o=void 0),this.autoFreeze_&&tp(o,!0),n){const a=[],i=[];ea("Patches").generateReplacementPatches_(t,o,a,i),n(a,i)}return o}else In(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)||In(8),Jo(e)&&(e=sE(e));const t=_m(this),r=gd(e,void 0);return r[xn].isManual_=!0,md(t),r}finishDraft(e,t){const r=e&&e[xn];(!r||!r.isManual_)&&In(9);const{scope_:n}=r;return zm(n,t),Lm(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 gd(e,t){const r=yl(e)?ea("MapSet").proxyMap_(e,t):iu(e)?ea("MapSet").proxySet_(e,t):aE(e,t);return(t?t.scope_:zb()).drafts_.push(r),r}function sE(e){return Jo(e)||In(10,e),Lb(e)}function Lb(e){if(!Qo(e)||lu(e))return e;const t=e[xn];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=fd(e,t.scope_.immer_.useStrictShallowCopy_)}else r=fd(e,!0);return $s(r,(n,o)=>{Mb(r,n,Lb(o))}),t&&(t.finalized_=!1),r}var Vi=new lE,np=Vi.produce,Wm=Vi.createDraft.bind(Vi),Km=Vi.finishDraft.bind(Vi),uE={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=ie.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=Tt.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},dE={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()}}},As=new WeakMap,Fs=new WeakMap,Pi=new WeakMap,Hb=new WeakMap,qm=new WeakMap,Vm=new WeakMap,Xm=new WeakMap,ie={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=ie.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 ie.equals(n,o)&&a>i},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return ie.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 ie.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 ie.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&ie.compare(e,t)===0},isBefore(e,t){return ie.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&ie.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&ie.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&ie.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&ie.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&&ie.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(!ie.isAncestor(t,e)&&!ie.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;(ie.equals(a,n)||ie.endsBefore(a,n)||ie.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:i}=t;if(ie.equals(i,n)||ie.isAncestor(i,n))return null;ie.endsBefore(i,n)&&(n[i.length-1]-=1);break}case"merge_node":{var{path:l,position:u}=t;ie.equals(l,n)||ie.endsBefore(l,n)?n[l.length-1]-=1:ie.isAncestor(l,n)&&(n[l.length-1]-=1,n[l.length]+=u);break}case"split_node":{var{path:s,position:c}=t;if(ie.equals(s,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else ie.endsBefore(s,n)?n[s.length-1]+=1:ie.isAncestor(s,n)&&e[s.length]>=c&&(n[s.length-1]+=1,n[s.length]-=c);break}case"move_node":{var{path:p,newPath:f}=t;if(ie.equals(p,f))return n;if(ie.isAncestor(p,n)||ie.equals(p,n)){var h=f.slice();return ie.endsBefore(p,f)&&p.length<f.length&&(h[p.length-1]-=1),h.concat(n.slice(p.length))}else ie.isSibling(p,f)&&(ie.isAncestor(f,n)||ie.equals(f,n))?ie.endsBefore(p,n)?n[p.length-1]-=1:n[p.length-1]+=1:ie.endsBefore(f,n)||ie.equals(f,n)||ie.isAncestor(f,n)?(ie.endsBefore(p,n)&&(n[p.length-1]-=1),n[f.length-1]+=1):ie.endsBefore(p,n)&&(ie.equals(f,n)&&(n[f.length-1]+=1),n[p.length-1]-=1);break}}return n}};function Xi(e){"@babel/helpers - typeof";return Xi=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},Xi(e)}function fE(e,t){if(Xi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pE(e){var t=fE(e,"string");return Xi(t)==="symbol"?t:String(t)}function nn(e,t,r){return t=pE(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 vi(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){nn(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 mE=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Ve.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,u]of De.points(t))t[u]=Tt.transform(l,r);break}case"insert_text":{var{path:s,offset:c,text:p}=r;if(p.length===0)break;var f=Ve.leaf(e,s),h=f.text.slice(0,c),v=f.text.slice(c);if(f.text=h+p+v,t)for(var[g,m]of De.points(t))t[m]=Tt.transform(g,r);break}case"merge_node":{var{path:b}=r,y=Ve.get(e,b),C=ie.previous(b),w=Ve.get(e,C),E=Ve.parent(e,b),D=b[b.length-1];if(at.isText(y)&&at.isText(w))w.text+=y.text;else if(!at.isText(y)&&!at.isText(w))w.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(w)));if(E.children.splice(D,1),t)for(var[k,x]of De.points(t))t[x]=Tt.transform(k,r);break}case"move_node":{var{path:O,newPath:j}=r;if(ie.isAncestor(O,j))throw new Error("Cannot move a path [".concat(O,"] to new path [").concat(j,"] because the destination is inside itself."));var B=Ve.get(e,O),N=Ve.parent(e,O),A=O[O.length-1];N.children.splice(A,1);var S=ie.transform(O,r),$=Ve.get(e,ie.parent(S)),P=S[S.length-1];if($.children.splice(P,0,B),t)for(var[F,I]of De.points(t))t[I]=Tt.transform(F,r);break}case"remove_node":{var{path:T}=r,q=T[T.length-1],L=Ve.parent(e,T);if(L.children.splice(q,1),t)for(var[_,V]of De.points(t)){var Z=Tt.transform(_,r);if(t!=null&&Z!=null)t[V]=Z;else{var J=void 0,z=void 0;for(var[Y,G]of Ve.texts(e))if(ie.compare(G,T)===-1)J=[Y,G];else{z=[Y,G];break}var X=!1;J&&z&&(ie.equals(z[1],T)?X=!ie.hasPrevious(z[1]):X=ie.common(J[1],T).length<ie.common(z[1],T).length),J&&!X?(_.path=J[1],_.offset=J[0].text.length):z?(_.path=z[1],_.offset=0):t=null}}break}case"remove_text":{var{path:W,offset:H,text:ne}=r;if(ne.length===0)break;var U=Ve.leaf(e,W),ae=U.text.slice(0,H),re=U.text.slice(H+ne.length);if(U.text=ae+re,t)for(var[de,ge]of De.points(t))t[ge]=Tt.transform(de,r);break}case"set_node":{var{path:ye,properties:Ne,newProperties:xe}=r;if(ye.length===0)throw new Error("Cannot set properties on the root node!");var be=Ve.get(e,ye);for(var Ae in xe){if(Ae==="children"||Ae==="text")throw new Error('Cannot set the "'.concat(Ae,'" property of nodes!'));var me=xe[Ae];me==null?delete be[Ae]:be[Ae]=me}for(var Ee in Ne)xe.hasOwnProperty(Ee)||delete be[Ee];break}case"set_selection":{var{newProperties:je}=r;if(je==null)t=je;else{if(t==null){if(!De.isRange(je))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ir.stringify(je)," when there is no current selection."));t=vi({},je)}for(var Be in je){var Ye=je[Be];if(Ye==null){if(Be==="anchor"||Be==="focus")throw new Error('Cannot remove the "'.concat(Be,'" selection property'));delete t[Be]}else t[Be]=Ye}}break}case"split_node":{var{path:Re,position:Te,properties:ue}=r;if(Re.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Re,"] because the root node cannot be split."));var ke=Ve.get(e,Re),Ke=Ve.parent(e,Re),Ze=Re[Re.length-1],We;if(at.isText(ke)){var _e=ke.text.slice(0,Te),nt=ke.text.slice(Te);ke.text=_e,We=vi(vi({},ue),{},{text:nt})}else{var Ue=ke.children.slice(0,Te),et=ke.children.slice(Te);ke.children=Ue,We=vi(vi({},ue),{},{children:et})}if(Ke.children.splice(Ze+1,0,We),t)for(var[yt,kt]of De.points(t))t[kt]=Tt.transform(yt,r);break}}return t},hE={transform(e,t){e.children=Wm(e.children);var r=e.selection&&Wm(e.selection);try{r=mE(e,r,t)}finally{e.children=Km(e.children),r?e.selection=Jo(r)?Km(r):r:e.selection=null}}},gE={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)}},vE={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)}},Wb=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(qr(n)&&qr(o)){if(!Wb(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 bE(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 ho(e,t){if(e==null)return{};var r=bE(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 yE=["anchor","focus"];function Gm(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 CE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gm(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gm(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 Tt.equals(e.anchor,t.anchor)&&Tt.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 Tt.isBefore(r,o)&&Tt.isAfter(n,a)}var[i,l]=De.edges(e),u=!1,s=!1;return Tt.isPoint(t)?(u=Tt.compare(t,i)>=0,s=Tt.compare(t,l)<=0):(u=ie.compare(t,i.path)>=0,s=ie.compare(t,l.path)<=0),u&&s},intersection(e,t){var r=ho(e,yE),[n,o]=De.edges(e),[a,i]=De.edges(t),l=Tt.isBefore(n,a)?a:n,u=Tt.isBefore(o,i)?o:i;return Tt.isBefore(u,l)?null:CE({anchor:l,focus:u},r)},isBackward(e){var{anchor:t,focus:r}=e;return Tt.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Tt.equals(t,r)},isExpanded(e){return!De.isCollapsed(e)},isForward(e){return!De.isBackward(e)},isRange(e){return qr(e)&&Tt.isPoint(e.anchor)&&Tt.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 np(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 u=Tt.transform(n.anchor,t,{affinity:a}),s=Tt.transform(n.focus,t,{affinity:i});if(!u||!s)return null;n.anchor=u,n.focus=s})}},Ym=e=>qr(e)&&Ve.isNodeList(e.children)&&!R.isEditor(e),st={isAncestor(e){return qr(e)&&Ve.isNodeList(e.children)},isElement:Ym,isElementList(e){return Array.isArray(e)&&e.every(t=>st.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 Ym(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},xE=["children"],wE=["text"],Zm=new WeakMap,Ve={ancestor(e,t){var r=Ve.get(e,t);if(at.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 ie.ancestors(t,r)){var o=Ve.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(at.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=Ve.ancestor(e,t),{children:a}=o,i=n?a.length-1:0;n?i>=0:i<a.length;){var l=Ve.child(o,i),u=t.concat(i);yield[l,u],i=n?i-1:i+1}})()},common(e,t,r){var n=ie.common(t,r),o=Ve.get(e,n);return[o,n]},descendant(e,t){var r=Ve.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 Ve.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 Ve.nodes(e,t))st.isElement(r)&&(yield[r,n])})()},extractProps(e){if(st.isAncestor(e)){var t=ho(e,xE);return t}else{var t=ho(e,wE);return t}},first(e,t){for(var r=t.slice(),n=Ve.get(e,r);n&&!(at.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(at.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ir.stringify(e)));var r=np({children:e.children},n=>{var[o,a]=De.edges(t),i=Ve.nodes(n,{reverse:!0,pass:f=>{var[,h]=f;return!De.includes(t,h)}});for(var[,l]of i){if(!De.includes(t,l)){var u=Ve.parent(n,l),s=l[l.length-1];u.children.splice(s,1)}if(ie.equals(l,a.path)){var c=Ve.leaf(n,l);c.text=c.text.slice(0,a.offset)}if(ie.equals(l,o.path)){var p=Ve.leaf(n,l);p.text=p.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(at.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(at.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return at.isText(e)||st.isElement(e)||R.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Zm.get(e);if(t!==void 0)return t;var r=e.every(n=>Ve.isNode(n));return Zm.set(e,r),r},last(e,t){for(var r=t.slice(),n=Ve.get(e,r);n&&!(at.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=Ve.get(e,t);if(!at.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 ie.levels(t,r)){var o=Ve.get(e,n);yield[o,n]}})()},matches(e,t){return st.isElement(e)&&st.isElementProps(t)&&st.matches(e,t)||at.isText(e)&&at.isTextProps(t)&&at.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=[],u=e;!(a&&(n?ie.isBefore(l,a):ie.isAfter(l,a)));){if(i.has(u)||(yield[u,l]),!i.has(u)&&!at.isText(u)&&u.children.length!==0&&(r==null||r([u,l])===!1)){i.add(u);var s=n?u.children.length-1:0;ie.isAncestor(l,o)&&(s=o[l.length]),l=l.concat(s),u=Ve.get(e,l);continue}if(l.length===0)break;if(!n){var c=ie.next(l);if(Ve.has(e,c)){l=c,u=Ve.get(e,l);continue}}if(n&&l[l.length-1]!==0){var p=ie.previous(l);l=p,u=Ve.get(e,l);continue}l=ie.parent(l),u=Ve.get(e,l),i.add(u)}})()},parent(e,t){var r=ie.parent(t),n=Ve.get(e,r);if(at.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 at.isText(e)?e.text:e.children.map(Ve.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ve.nodes(e,t))at.isText(r)&&(yield[r,n])})()}};function Jm(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 lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jm(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Si={isNodeOperation(e){return Si.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!qr(e))return!1;switch(e.type){case"insert_node":return ie.isPath(e.path)&&Ve.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ie.isPath(e.path);case"merge_node":return typeof e.position=="number"&&ie.isPath(e.path)&&qr(e.properties);case"move_node":return ie.isPath(e.path)&&ie.isPath(e.newPath);case"remove_node":return ie.isPath(e.path)&&Ve.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ie.isPath(e.path);case"set_node":return ie.isPath(e.path)&&qr(e.properties)&&qr(e.newProperties);case"set_selection":return e.properties===null&&De.isRange(e.newProperties)||e.newProperties===null&&De.isRange(e.properties)||qr(e.properties)&&qr(e.newProperties);case"split_node":return ie.isPath(e.path)&&typeof e.position=="number"&&qr(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Si.isOperation(t))},isSelectionOperation(e){return Si.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Si.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return lr(lr({},e),{},{type:"remove_node"});case"insert_text":return lr(lr({},e),{},{type:"remove_text"});case"merge_node":return lr(lr({},e),{},{type:"split_node",path:ie.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(ie.equals(t,r))return e;if(ie.isSibling(r,t))return lr(lr({},e),{},{path:t,newPath:r});var n=ie.transform(r,e),o=ie.transform(ie.next(r),e);return lr(lr({},e),{},{path:n,newPath:o})}case"remove_node":return lr(lr({},e),{},{type:"insert_node"});case"remove_text":return lr(lr({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:i}=e;return lr(lr({},e),{},{properties:i,newProperties:a})}case"set_selection":{var{properties:l,newProperties:u}=e;return l==null?lr(lr({},e),{},{properties:u,newProperties:null}):u==null?lr(lr({},e),{},{properties:null,newProperties:l}):lr(lr({},e),{},{properties:u,newProperties:l})}case"split_node":return lr(lr({},e),{},{type:"merge_node",path:ie.next(e.path)})}}},Qm=new WeakMap,EE=e=>{var t=Qm.get(e);if(t!==void 0)return t;if(!qr(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||qr(e.marks))&&(e.selection===null||De.isRange(e.selection))&&Ve.isNodeList(e.children)&&Si.isOperationList(e.operations);return Qm.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 EE(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)},kE={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(ie.isPath)}};function eh(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 th(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eh(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tt={compare(e,t){var r=ie.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Tt.compare(e,t)===1},isBefore(e,t){return Tt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&ie.equals(e.path,t.path)},isPoint(e){return qr(e)&&typeof e.offset=="number"&&ie.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return np(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=ie.transform(a,t,r);break}case"insert_text":{ie.equals(t.path,a)&&(t.offset<i||t.offset===i&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{ie.equals(t.path,a)&&(n.offset+=t.position),n.path=ie.transform(a,t,r);break}case"remove_text":{ie.equals(t.path,a)&&t.offset<=i&&(n.offset-=Math.min(i-t.offset,t.text.length));break}case"remove_node":{if(ie.equals(t.path,a)||ie.isAncestor(t.path,a))return null;n.path=ie.transform(a,t,r);break}case"split_node":{if(ie.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=ie.transform(a,t,th(th({},r),{},{affinity:"forward"})))}else n.path=ie.transform(a,t,r);break}}})}},rh=void 0,Ir={setScrubber(e){rh=e},stringify(e){return JSON.stringify(e,rh)}},DE=["text"],SE=["anchor","focus"];function nh(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 io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nh(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var at={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var i=ho(a,DE);return i}return Wb(n?o(e):e,n?o(t):t)},isText(e){return qr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>at.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=[io({},e)];for(var n of t){var o=ho(n,SE),[a,i]=De.edges(n),l=[],u=0,s=a.offset,c=i.offset;for(var p of r){var{length:f}=p.text,h=u;if(u+=f,s<=h&&u<=c){Object.assign(p,o),l.push(p);continue}if(s!==c&&(s===u||c===h)||s>u||c<h||c===h&&h!==0){l.push(p);continue}var v=p,g=void 0,m=void 0;if(c<u){var b=c-h;m=io(io({},v),{},{text:v.text.slice(b)}),v=io(io({},v),{},{text:v.text.slice(0,b)})}if(s>h){var y=s-h;g=io(io({},v),{},{text:v.text.slice(0,y)}),v=io(io({},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}},op=e=>e.selection?e.selection:e.children.length>0?R.end(e,[]):[0],oi=(e,t)=>{var[r]=R.node(e,t);return n=>n===r},ap=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?PE(e):e,o=Dt.None,a=Dt.None,i=0,l=null,u=null;for(var s of n){var c=s.codePointAt(0);if(!c)break;var p=KE(s,c);if([o,a]=r?[a,p]:[p,o],Sa(o,Dt.ZWJ)&&Sa(a,Dt.ExtPict)&&(r?l=oh(e.substring(0,i)):l=oh(e.substring(0,e.length-i)),!l)||Sa(o,Dt.RI)&&Sa(a,Dt.RI)&&(u!==null?u=!u:r?u=!0:u=GE(e.substring(0,e.length-i)),!u)||o!==Dt.None&&a!==Dt.None&&VE(o,a))break;i+=s.length}return i||1},$E=/\s/,BE=/[\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]/,OE=/['\u2018\u2019]/,AE=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=ap(e,t),[a,i]=ip(e,o,t);if(FE(a,i,t))n=!0,r+=o;else if(!n)r+=o;else break;e=i}return r},ip=(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)]},FE=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if($E.test(t))return!1;if(OE.test(t)){var o=ap(r,n),[a,i]=ip(r,o,n);if(e(a,i,n))return!0}return!BE.test(t)},PE=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(jE(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(NE(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},NE=e=>e>=55296&&e<=56319,jE=e=>e>=56320&&e<=57343,Dt;(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"})(Dt||(Dt={}));var IE=/^(?:[\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])$/,RE=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,TE=/^(?:[\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])$/,ME=/^[\u1100-\u115F\uA960-\uA97C]$/,zE=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,_E=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,LE=/^[\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]$/,HE=/^[\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]$/,WE=/^(?:[\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])$/,KE=(e,t)=>{var r=Dt.Any;return e.search(IE)!==-1&&(r|=Dt.Extend),t===8205&&(r|=Dt.ZWJ),t>=127462&&t<=127487&&(r|=Dt.RI),e.search(RE)!==-1&&(r|=Dt.Prepend),e.search(TE)!==-1&&(r|=Dt.SpacingMark),e.search(ME)!==-1&&(r|=Dt.L),e.search(zE)!==-1&&(r|=Dt.V),e.search(_E)!==-1&&(r|=Dt.T),e.search(LE)!==-1&&(r|=Dt.LV),e.search(HE)!==-1&&(r|=Dt.LVT),e.search(WE)!==-1&&(r|=Dt.ExtPict),r};function Sa(e,t){return(e&t)!==0}var qE=[[Dt.L,Dt.L|Dt.V|Dt.LV|Dt.LVT],[Dt.LV|Dt.V,Dt.V|Dt.T],[Dt.LVT|Dt.T,Dt.T],[Dt.Any,Dt.Extend|Dt.ZWJ],[Dt.Any,Dt.SpacingMark],[Dt.Prepend,Dt.Any],[Dt.ZWJ,Dt.ExtPict],[Dt.RI,Dt.RI]];function VE(e,t){return qE.findIndex(r=>Sa(e,r[0])&&Sa(t,r[1]))===-1}var XE=/(?:[\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$/,oh=e=>e.search(XE)!==-1,UE=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,GE=e=>{var t=e.match(UE);if(t===null)return!1;var r=t[0].length/2;return r%2===1},YE={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=op(e)}=r;if(ie.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),u=R.pointRef(e,a);Me.delete(e,{at:o,voids:n});var s=l.unref(),c=u.unref();o=s||c,Me.setSelection(e,{anchor:o,focus:o})}if(!(!n&&R.void(e,{at:o})||R.elementReadOnly(e,{at:o}))){var{path:p,offset:f}=o;t.length>0&&e.apply({type:"insert_text",path:p,offset:f,text:t})}})}};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 Tl(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){nn(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 Me=Tl(Tl(Tl(Tl({},hE),gE),vE),YE),as=new WeakMap,ZE=e=>as.get(e)||!1,JE=(e,t,r)=>{var n=as.get(e)||!1;as.set(e,!0);try{t(),r()}finally{as.set(e,n)}};function Kb(e,t,r){var n=As.get(e)||[],o=Fs.get(e)||new Set,a,i,l=p=>{if(p){var f=p.join(",");i.has(f)||(i.add(f),a.push(p))}};if(r){a=[],i=new Set;for(var u of n){var s=r(u);l(s)}}else a=n,i=o;for(var c of t)l(c);As.set(e,a),Fs.set(e,i)}var QE=(e,t)=>{for(var r of R.pathRefs(e))uE.transform(r,t);for(var n of R.pointRefs(e))cE.transform(n,t);for(var o of R.rangeRefs(e))dE.transform(o,t);if(!ZE(e)){var a=ie.operationCanTransformPath(t)?i=>ie.transform(i,t):void 0;Kb(e,e.getDirtyPaths(t),a)}Me.transform(e,t),e.operations.push(t),R.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Pi.get(e)||(Pi.set(e,!0),Promise.resolve().then(()=>{Pi.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},ek=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return ie.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=ie.levels(o),i=at.isText(n)?[]:Array.from(Ve.nodes(n),j=>{var[,B]=j;return o.concat(B)});return[...a,...i]}case"merge_node":{var{path:l}=t,u=ie.ancestors(l),s=ie.previous(l);return[...u,s]}case"move_node":{var{path:c,newPath:p}=t;if(ie.equals(c,p))return[];var f=[],h=[];for(var v of ie.ancestors(c)){var g=ie.transform(v,t);f.push(g)}for(var m of ie.ancestors(p)){var b=ie.transform(m,t);h.push(b)}var y=h[h.length-1],C=p[p.length-1],w=y.concat(C);return[...f,...h,w]}case"remove_node":{var{path:E}=t,D=ie.ancestors(E);return[...D]}case"split_node":{var{path:k}=t,x=ie.levels(k),O=ie.next(k);return[...x,O]}default:return[]}},tk=e=>{var{selection:t}=e;return t?Ve.fragment(e,t):[]},rk=(e,t)=>{var[r,n]=t;if(!at.isText(r)){if(st.isElement(r)&&r.children.length===0){var o={text:""};Me.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=R.isEditor(r)?!1:st.isElement(r)&&(e.isInline(r)||r.children.length===0||at.isText(r.children[0])||e.isInline(r.children[0])),i=0,l=0;l<r.children.length;l++,i++){var u=Ve.get(e,n);if(!at.isText(u)){var s=u.children[i],c=u.children[i-1],p=l===r.children.length-1,f=at.isText(s)||st.isElement(s)&&e.isInline(s);if(f!==a)Me.removeNodes(e,{at:n.concat(i),voids:!0}),i--;else if(st.isElement(s)){if(e.isInline(s)){if(c==null||!at.isText(c)){var h={text:""};Me.insertNodes(e,h,{at:n.concat(i),voids:!0}),i++}else if(p){var v={text:""};Me.insertNodes(e,v,{at:n.concat(i+1),voids:!0}),i++}}}else{if(!at.isText(s)&&!("children"in s)){var g=s;g.children=[]}c!=null&&at.isText(c)&&(at.equals(s,c,{loose:!0})?(Me.mergeNodes(e,{at:n.concat(i),voids:!0}),i--):c.text===""?(Me.removeNodes(e,{at:n.concat(i-1),voids:!0}),i--):s.text===""&&(Me.removeNodes(e,{at:n.concat(i),voids:!0}),i--))}}}}},nk=(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},ok=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[u,s]of R.levels(e,{at:i,voids:r,match:a,reverse:l}))if(!at.isText(u)){if(De.isRange(o)){if(ie.isAncestor(s,o.anchor.path)&&ie.isAncestor(s,o.focus.path))return[u,s]}else if(!ie.equals(i,s))return[u,s]}}};function ih(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 lh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ih(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ih(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ak=(e,t,r)=>{var{selection:n}=e;if(n){var o=(p,f)=>{if(!at.isText(p))return!1;var[h,v]=R.parent(e,f);return!e.isVoid(h)||e.markableVoid(h)},a=De.isExpanded(n),i=!1;if(!a){var[l,u]=R.node(e,n);if(l&&o(l,u)){var[s]=R.parent(e,u);i=s&&e.markableVoid(s)}}if(a||i)Me.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var c=lh(lh({},R.marks(e)||{}),{},{[t]:r});e.marks=c,Pi.get(e)||e.onChange()}}};function sh(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 uh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sh(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(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.point(e,t,{edge:"end"}),o=R.end(e,[]),a={anchor:n,focus:o},{distance:i=1}=r,l=0,u;for(var s of R.positions(e,uh(uh({},r),{},{at:a}))){if(l>i)break;l!==0&&(u=s),l++}return u};function ch(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 dh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ch(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var lk=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,u;for(var s of R.positions(e,dh(dh({},r),{},{at:a,reverse:!0}))){if(l>i)break;l!==0&&(u=s),l++}return u},sk=(e,t)=>{var{selection:r}=e;r&&De.isCollapsed(r)&&Me.delete(e,{unit:t,reverse:!0})},uk=(e,t)=>{var{selection:r}=e;r&&De.isCollapsed(r)&&Me.delete(e,{unit:t})},ck=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&De.isExpanded(r)&&Me.delete(e,{reverse:t==="backward"})},dk=(e,t)=>[R.start(e,t),R.end(e,t)];function fh(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 ph(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return R.above(e,ph(ph({},t),{},{match:r=>st.isElement(r)&&R.isElementReadOnly(e,r)}))},pk=(e,t)=>R.point(e,t,{edge:"end"}),mk=(e,t)=>{var r=R.path(e,t,{edge:"start"});return R.node(e,r)},hk=(e,t)=>{var r=R.range(e,t);return Ve.fragment(e,r)};function mh(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 hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mh(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return R.above(e,hh(hh({},t),{},{match:r=>st.isElement(r)&&R.isVoid(e,r)}))},vk=(e,t)=>t.children.some(r=>st.isElement(r)&&R.isBlock(e,r)),bk=(e,t)=>t.children.some(r=>at.isText(r)||R.isInline(e,r)),yk=(e,t)=>Ve.has(e,t),Ck=(e,t)=>t.children.every(r=>at.isText(r)),xk=e=>{Me.splitNodes(e,{always:!0})},wk=(e,t,r)=>{Me.insertNodes(e,t,r)},Ek=e=>{Me.splitNodes(e,{always:!0})};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 kk(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){nn(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 Dk=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=kk({text:t},o);Me.insertNodes(e,a,{at:r.at,voids:r.voids})}else Me.insertText(e,t,r);e.marks=null}},Sk=(e,t)=>!e.isInline(t),$k=(e,t,r)=>R.isStart(e,t,r)||R.isEnd(e,t,r),Bk=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&at.isText(n)&&n.text===""&&!e.isVoid(t)},Ok=(e,t,r)=>{var n=R.end(e,r);return Tt.equals(t,n)},Ak=e=>{var t=Hb.get(e);return t===void 0?!0:t},Fk=(e,t,r)=>{if(t.offset!==0)return!1;var n=R.start(e,r);return Tt.equals(t,n)},Pk=(e,t)=>{var r=R.path(e,t,{edge:"end"});return R.node(e,r)},Nk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=Ve.leaf(e,n);return[o,n]};function jk(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[u,s]of Ve.levels(e,l))if(a(u,s)&&(i.push([u,s]),!o&&st.isElement(u)&&R.isVoid(e,u)))break;n&&i.reverse(),yield*i}})()}var Ik=["text"],Rk=["text"],Tk=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:at.isText,at:{anchor:n,focus:o}});if(l){var[u]=l,s=ho(u,Ik);return s}else return{}}var{path:c}=n,[p]=R.leaf(e,c);if(n.offset===0){var f=R.previous(e,{at:c,match:at.isText}),h=R.above(e,{match:C=>st.isElement(C)&&R.isVoid(e,C)&&e.markableVoid(C)});if(!h){var v=R.above(e,{match:C=>st.isElement(C)&&R.isBlock(e,C)});if(f&&v){var[g,m]=f,[,b]=v;ie.isAncestor(b,m)&&(p=g)}}}var y=ho(p,Rk);return y},Mk=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,[]),u=[i.path,l];if(ie.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(ie.isPath(a)){var[s]=R.parent(e,a);o=p=>s.children.includes(p)}else o=()=>!0;var[c]=R.nodes(e,{at:u,match:o,mode:r,voids:n});return c}}},zk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=Ve.get(e,n);return[o,n]};function _k(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:u}=t;if(u||(u=()=>!0),!!r){var s,c;if(kE.isSpan(r))s=r[0],c=r[1];else{var p=R.path(e,r,{edge:"start"}),f=R.path(e,r,{edge:"end"});s=a?f:p,c=a?p:f}var h=Ve.nodes(e,{reverse:a,from:s,to:c,pass:w=>{var[E]=w;return st.isElement(E)?!!(!i&&(R.isVoid(e,E)||R.isElementReadOnly(e,E))||l&&!R.isSelectable(e,E)):!1}}),v=[],g;for(var[m,b]of h)if(!(l&&st.isElement(m)&&!R.isSelectable(e,m))){var y=g&&ie.compare(b,g[1])===0;if(!(n==="highest"&&y)){if(!u(m,b)){if(o&&!y&&at.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 Lk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=s=>As.get(s)||[],a=s=>Fs.get(s)||new Set,i=s=>{var c=o(s).pop(),p=c.join(",");return a(s).delete(p),c};if(R.isNormalizing(e)){if(r){var l=Array.from(Ve.nodes(e),s=>{var[,c]=s;return c}),u=new Set(l.map(s=>s.join(",")));As.set(e,l),Fs.set(e,u)}o(e).length!==0&&R.withoutNormalizing(e,()=>{for(var s of o(e))if(Ve.has(e,s)){var c=R.node(e,s),[p,f]=c;st.isElement(p)&&p.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(Ve.has(e,m)){var b=R.node(e,m);e.normalizeNode(b,{operation:n})}g++,h=o(e)}})}},Hk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=ie.parent(n),a=R.node(e,o);return a},Wk=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},Kk=e=>{var t=qm.get(e);return t||(t=new Set,qm.set(e,t)),t},qk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(ie.isPath(t)){if(o==="start"){var[,a]=Ve.first(e,t);t=a}else if(o==="end"){var[,i]=Ve.last(e,t);t=i}}return De.isRange(t)&&(o==="start"?t=De.start(t):o==="end"?t=De.end(t):t=ie.common(t.anchor.path,t.focus.path)),Tt.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},Vk=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},Xk=e=>{var t=Vm.get(e);return t||(t=new Set,Vm.set(e,t)),t},Uk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(ie.isPath(t)){var o;if(n==="end"){var[,a]=Ve.last(e,t);o=a}else{var[,i]=Ve.first(e,t);o=i}var l=Ve.get(e,o);if(!at.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[u,s]=De.edges(t);return n==="start"?u:s}return t};function Gk(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),[u,s]=De.edges(l),c=o?s:u,p=!1,f="",h=0,v=0,g=0;for(var[m,b]of R.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:i})){if(st.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=ie.isAncestor(b,s.path)?s:R.end(e,b),C=ie.isAncestor(b,u.path)?u:R.start(e,b);f=R.string(e,{anchor:C,focus:y},{voids:a}),p=!0}}if(at.isText(m)){var w=ie.equals(b,c.path);for(w?(v=o?c.offset:m.text.length-c.offset,g=c.offset):(v=m.text.length,g=o?v:0),(w||p||n==="offset")&&(yield{path:b,offset:g},p=!1);;){if(h===0){if(f==="")break;h=E(f,n,o),f=ip(f,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 E(D,k,x){return k==="character"?ap(D,x):k==="word"?AE(D,x):k==="line"||k==="block"?D.length:1}})()}var Yk=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,[]),u=[i.path,l];if(ie.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(ie.isPath(a)){var[s]=R.parent(e,a);o=p=>s.children.includes(p)}else o=()=>!0;var[c]=R.nodes(e,{reverse:!0,at:u,match:o,mode:r,voids:n});return c}}},Zk=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},Jk=e=>{var t=Xm.get(e);return t||(t=new Set,Xm.set(e,t)),t},Qk=(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 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 eD(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){nn(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 tD=(e,t)=>{var{selection:r}=e;if(r){var n=(c,p)=>{if(!at.isText(c))return!1;var[f,h]=R.parent(e,p);return!e.isVoid(f)||e.markableVoid(f)},o=De.isExpanded(r),a=!1;if(!o){var[i,l]=R.node(e,r);if(i&&n(i,l)){var[u]=R.parent(e,l);a=u&&e.markableVoid(u)}}if(o||a)Me.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var s=eD({},R.marks(e)||{});delete s[t],e.marks=s,Pi.get(e)||e.onChange()}}},rD=(e,t)=>{Hb.set(e,t)},nD=(e,t)=>R.point(e,t,{edge:"start"}),oD=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[u,s]of R.nodes(e,{at:o,match:at.isText,voids:n})){var c=u.text;ie.equals(s,i.path)&&(c=c.slice(0,i.offset)),ie.equals(s,a.path)&&(c=c.slice(a.offset)),l+=c}return l},aD=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)||ie.hasPrevious(a.path))return t;var i=R.above(e,{at:a,match:h=>st.isElement(h)&&R.isBlock(e,h),voids:n}),l=i?i[1]:[],u=R.start(e,o),s={anchor:u,focus:a},c=!0;for(var[p,f]of R.nodes(e,{at:s,match:at.isText,reverse:!0,voids:n})){if(c){c=!1;continue}if(p.text!==""||ie.isBefore(f,l)){a={path:f,offset:p.text.length};break}}return{anchor:o,focus:a}},iD=(e,t)=>{var r=R.isNormalizing(e);R.setNormalizing(e,!1);try{t()}finally{R.setNormalizing(e,r)}R.normalize(e)},lD=(e,t,r)=>{var[n,o]=t;return st.isElement(n)&&R.isEmpty(e,n)||at.isText(n)&&n.text===""&&o[o.length-1]!==0},sD=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:u=e.selection,hanging:s=!1}=t;if(u){var c=!1;if(De.isRange(u)&&De.isCollapsed(u)&&(c=!0,u=u.anchor),Tt.isPoint(u)){var p=R.void(e,{at:u,mode:"highest"});if(!l&&p){var[,f]=p;u=f}else{var h={unit:a,distance:i},v=o?R.before(e,u,h)||R.start(e,[]):R.after(e,u,h)||R.end(e,[]);u={anchor:u,focus:v},s=!0}}if(ie.isPath(u)){Me.removeNodes(e,{at:u,voids:l});return}if(!De.isCollapsed(u)){if(!s){var[,g]=De.edges(u),m=R.end(e,[]);Tt.equals(g,m)||(u=R.unhangRange(e,u,{voids:l}))}var[b,y]=De.edges(u),C=R.above(e,{match:U=>st.isElement(U)&&R.isBlock(e,U),at:b,voids:l}),w=R.above(e,{match:U=>st.isElement(U)&&R.isBlock(e,U),at:y,voids:l}),E=C&&w&&!ie.equals(C[1],w[1]),D=ie.equals(b.path,y.path),k=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(k){var O=R.before(e,b);O&&C&&ie.isAncestor(C[1],O.path)&&(b=O)}if(x){var j=R.after(e,y);j&&w&&ie.isAncestor(w[1],j.path)&&(y=j)}var B=[],N;for(var A of R.nodes(e,{at:u,voids:l})){var[S,$]=A;N&&ie.compare($,N)===0||(!l&&st.isElement(S)&&(R.isVoid(e,S)||R.isElementReadOnly(e,S))||!ie.isCommon($,b.path)&&!ie.isCommon($,y.path))&&(B.push(A),N=$)}var P=Array.from(B,U=>{var[,ae]=U;return R.pathRef(e,ae)}),F=R.pointRef(e,b),I=R.pointRef(e,y),T="";if(!D&&!k){var q=F.current,[L]=R.leaf(e,q),{path:_}=q,{offset:V}=b,Z=L.text.slice(V);Z.length>0&&(e.apply({type:"remove_text",path:_,offset:V,text:Z}),T=Z)}if(P.reverse().map(U=>U.unref()).filter(U=>U!==null).forEach(U=>Me.removeNodes(e,{at:U,voids:l})),!x){var J=I.current,[z]=R.leaf(e,J),{path:Y}=J,G=D?b.offset:0,X=z.text.slice(G,y.offset);X.length>0&&(e.apply({type:"remove_text",path:Y,offset:G,text:X}),T=X)}!D&&E&&I.current&&F.current&&Me.mergeNodes(e,{at:I.current,hanging:!0,voids:l}),c&&o&&a==="character"&&T.length>1&&T.match(/[\u0E00-\u0E7F]+/)&&Me.insertText(e,T.slice(0,T.length-i));var W=F.unref(),H=I.unref(),ne=o?W||H:H||W;t.at==null&&ne&&Me.select(e,ne)}}})},uD=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=op(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 u=R.pointRef(e,l);Me.delete(e,{at:a}),a=u.unref()}else ie.isPath(a)&&(a=R.start(e,a));if(!(!o&&R.void(e,{at:a}))){var s=R.above(e,{at:a,match:Z=>st.isElement(Z)&&R.isInline(e,Z),mode:"highest",voids:o});if(s){var[,c]=s;if(R.isEnd(e,a,c)){var p=R.after(e,c);a=p}else if(R.isStart(e,a,c)){var f=R.before(e,c);a=f}}var h=R.above(e,{match:Z=>st.isElement(Z)&&R.isBlock(e,Z),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,[,w]=Ve.first({children:t},[]),[,E]=Ve.last({children:t},[]),D=[],k=Z=>{var[J,z]=Z,Y=z.length===0;return Y?!1:b?!0:!(y&&ie.isAncestor(z,w)&&st.isElement(J)&&!e.isVoid(J)&&!e.isInline(J)||C&&ie.isAncestor(z,E)&&st.isElement(J)&&!e.isVoid(J)&&!e.isInline(J))};for(var x of Ve.nodes({children:t},{pass:k}))k(x)&&D.push(x);var O=[],j=[],B=[],N=!0,A=!1;for(var[S]of D)st.isElement(S)&&!e.isInline(S)?(N=!1,A=!0,j.push(S)):N?O.push(S):B.push(S);var[$]=R.nodes(e,{at:a,match:Z=>at.isText(Z)||R.isInline(e,Z),mode:"highest",voids:o}),[,P]=$,F=R.isStart(e,a,P),I=R.isEnd(e,a,P),T=R.pathRef(e,m&&!B.length?ie.next(v):v),q=R.pathRef(e,I?ie.next(P):P);Me.splitNodes(e,{at:a,match:Z=>A?st.isElement(Z)&&R.isBlock(e,Z):at.isText(Z)||R.isInline(e,Z),mode:A?"lowest":"highest",always:A&&(!g||O.length>0)&&(!m||B.length>0),voids:o});var L=R.pathRef(e,!F||F&&I?ie.next(P):P);if(Me.insertNodes(e,O,{at:L.current,match:Z=>at.isText(Z)||R.isInline(e,Z),mode:"highest",voids:o,batchDirty:i}),b&&!O.length&&j.length&&!B.length&&Me.delete(e,{at:v,voids:o}),Me.insertNodes(e,j,{at:T.current,match:Z=>st.isElement(Z)&&R.isBlock(e,Z),mode:"lowest",voids:o,batchDirty:i}),Me.insertNodes(e,B,{at:q.current,match:Z=>at.isText(Z)||R.isInline(e,Z),mode:"highest",voids:o,batchDirty:i}),!r.at){var _;if(B.length>0&&q.current?_=ie.previous(q.current):j.length>0&&T.current?_=ie.previous(T.current):L.current&&(_=ie.previous(L.current)),_){var V=R.end(e,_);Me.select(e,V)}}L.unref(),T.unref(),q.unref()}}})},cD=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")Me.select(e,n.anchor);else if(r==="focus")Me.select(e,n.focus);else if(r==="start"){var[o]=De.edges(n);Me.select(e,o)}else if(r==="end"){var[,a]=De.edges(n);Me.select(e,a)}}else return},dD=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},fD=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:u}=r,s={distance:n,unit:o,ignoreNonSelectable:!0},c={};if(i==null||i==="anchor"){var p=a?R.before(e,l,s):R.after(e,l,s);p&&(c.anchor=p)}if(i==null||i==="focus"){var f=a?R.before(e,u,s):R.after(e,u,s);f&&(c.focus=f)}Me.setSelection(e,c)}},pD=(e,t)=>{var{selection:r}=e;if(t=R.range(e,t),r){Me.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 bh(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 yh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bh(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mD=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;Me.setSelection(e,{[o==="anchor"?"anchor":"focus"]:yh(yh({},l),t)})}},hD=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!Tt.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!Tt.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})}},gD=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:u,select:s}=r;if(Ve.isNode(t)&&(t=[t]),t.length!==0){var[c]=t;if(l||(l=op(e),s!==!1&&(s=!0)),s==null&&(s=!1),De.isRange(l))if(n||(l=R.unhangRange(e,l,{voids:o})),De.isCollapsed(l))l=l.anchor;else{var[,p]=De.edges(l),f=R.pointRef(e,p);Me.delete(e,{at:l}),l=f.unref()}if(Tt.isPoint(l)){u==null&&(at.isText(c)?u=O=>at.isText(O):e.isInline(c)?u=O=>at.isText(O)||R.isInline(e,O):u=O=>st.isElement(O)&&R.isBlock(e,O));var[h]=R.nodes(e,{at:l.path,match:u,mode:a,voids:o});if(h){var[,v]=h,g=R.pathRef(e,v),m=R.isEnd(e,l,v);Me.splitNodes(e,{at:l,match:u,mode:a,voids:o});var b=g.unref();l=m?ie.next(b):b}else return}var y=ie.parent(l),C=l[l.length-1];if(!(!o&&R.void(e,{at:y}))){if(i){var w=[],E=ie.levels(y);JE(e,()=>{var O=function(){var B=y.concat(C);C++;var N={type:"insert_node",path:B,node:j};e.apply(N),l=ie.next(l),w.push(N),at.isText?E.push(...Array.from(Ve.nodes(j),A=>{var[,S]=A;return B.concat(S)})):E.push(B)};for(var j of t)O()},()=>{Kb(e,E,O=>{var j=O;for(var B of w)if(ie.operationCanTransformPath(B)&&(j=ie.transform(j,B),!j))return null;return j})})}else for(var D of t){var k=y.concat(C);C++,e.apply({type:"insert_node",path:k,node:D}),l=ie.next(l)}if(l=ie.previous(l),s){var x=R.end(e,l);x&&Me.select(e,x)}}}})},vD=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=ie.isPath(r)?oi(e,r):C=>st.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[,w]=C;return R.pathRef(e,w)});for(var u of l){var s=u.unref();if(s.length<2)throw new Error("Cannot lift node at a path [".concat(s,"] because it has a depth of less than `2`."));var c=R.node(e,ie.parent(s)),[p,f]=c,h=s[s.length-1],{length:v}=p.children;if(v===1){var g=ie.next(f);Me.moveNodes(e,{at:s,to:g,voids:o}),Me.removeNodes(e,{at:f,voids:o})}else if(h===0)Me.moveNodes(e,{at:s,to:f,voids:o});else if(h===v-1){var m=ie.next(f);Me.moveNodes(e,{at:s,to:m,voids:o})}else{var b=ie.next(s),y=ie.next(f);Me.splitNodes(e,{at:b,voids:o}),Me.moveNodes(e,{at:s,to:y,voids:o})}}}})},bD=["text"],yD=["children"],qb=(e,t)=>{if(st.isElement(t)){var r=t;return R.isVoid(e,t)?!0:r.children.length===1?qb(e,r.children[0]):!1}else return!R.isEditor(t)},CD=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(ie.isPath(n)){var[l]=R.parent(e,n);r=O=>l.children.includes(O)}else r=O=>st.isElement(O)&&R.isBlock(e,O);if(!o&&De.isRange(n)&&(n=R.unhangRange(e,n,{voids:a})),De.isRange(n))if(De.isCollapsed(n))n=n.anchor;else{var[,u]=De.edges(n),s=R.pointRef(e,u);Me.delete(e,{at:n}),n=s.unref(),t.at==null&&Me.select(e,n)}var[c]=R.nodes(e,{at:n,match:r,voids:a,mode:i}),p=R.previous(e,{at:n,match:r,voids:a,mode:i});if(!(!c||!p)){var[f,h]=c,[v,g]=p;if(!(h.length===0||g.length===0)){var m=ie.next(g),b=ie.common(h,g),y=ie.isSibling(h,g),C=Array.from(R.levels(e,{at:h}),O=>{var[j]=O;return j}).slice(b.length).slice(0,-1),w=R.above(e,{at:h,mode:"highest",match:O=>C.includes(O)&&qb(e,O)}),E=w&&R.pathRef(e,w[1]),D,k;if(at.isText(f)&&at.isText(v)){var x=ho(f,bD);k=v.text.length,D=x}else if(st.isElement(f)&&st.isElement(v)){var x=ho(f,yD);k=v.children.length,D=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(f)," ").concat(Ir.stringify(v)));y||Me.moveNodes(e,{at:h,to:m,voids:a}),E&&Me.removeNodes(e,{at:E.current,voids:a}),R.shouldMergeNodesRemovePrevNode(e,p,c)?Me.removeNodes(e,{at:g,voids:a}):e.apply({type:"merge_node",path:m,position:k,properties:D}),E&&E.unref()}}}})},xD=(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=ie.isPath(n)?oi(e,n):h=>st.isElement(h)&&R.isBlock(e,h));var l=R.pathRef(e,r),u=R.nodes(e,{at:n,match:i,mode:o,voids:a}),s=Array.from(u,h=>{var[,v]=h;return R.pathRef(e,v)});for(var c of s){var p=c.unref(),f=l.current;p.length!==0&&e.apply({type:"move_node",path:p,newPath:f}),l.current&&ie.isSibling(f,p)&&ie.isAfter(f,p)&&(l.current=ie.next(l.current))}l.unref()}})},wD=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=ie.isPath(a)?oi(e,a):f=>st.isElement(f)&&R.isBlock(e,f)),!r&&De.isRange(a)&&(a=R.unhangRange(e,a,{voids:n}));var l=R.nodes(e,{at:a,match:i,mode:o,voids:n}),u=Array.from(l,f=>{var[,h]=f;return R.pathRef(e,h)});for(var s of u){var c=s.unref();if(c){var[p]=R.node(e,c);e.apply({type:"remove_node",path:c,node:p})}}}})},ED=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:u="lowest",split:s=!1,voids:c=!1}=r;if(o){if(n==null&&(n=ie.isPath(o)?oi(e,o):k=>st.isElement(k)&&R.isBlock(e,k)),!l&&De.isRange(o)&&(o=R.unhangRange(e,o,{voids:c})),s&&De.isRange(o)){if(De.isCollapsed(o)&&R.leaf(e,o.anchor)[0].text.length>0)return;var p=R.rangeRef(e,o,{affinity:"inward"}),[f,h]=De.edges(o),v=u==="lowest"?"lowest":"highest",g=R.isEnd(e,h,h.path);Me.splitNodes(e,{at:h,match:n,mode:v,voids:c,always:!g});var m=R.isStart(e,f,f.path);Me.splitNodes(e,{at:f,match:n,mode:v,voids:c,always:!m}),o=p.unref(),r.at==null&&Me.select(e,o)}a||(a=(k,x)=>k!==x);for(var[b,y]of R.nodes(e,{at:o,match:n,mode:u,voids:c})){var C={},w={};if(y.length!==0){var E=!1;for(var D in t)D==="children"||D==="text"||a(t[D],b[D])&&(E=!0,b.hasOwnProperty(D)&&(C[D]=b[D]),i?t[D]!=null&&(w[D]=i(b[D],t[D])):t[D]!=null&&(w[D]=t[D]));E&&e.apply({type:"set_node",path:y,properties:C,newProperties:w})}}}})},kD=(e,t)=>{if(De.isCollapsed(t))return t.anchor;var[,r]=De.edges(t),n=R.pointRef(e,r);return Me.delete(e,{at:t}),n.unref()},DD=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=I=>st.isElement(I)&&R.isBlock(e,I)),De.isRange(a)&&(a=kD(e,a)),ie.isPath(a)){var u=a,s=R.point(e,u),[c]=R.parent(e,u);o=I=>I===c,i=s.path.length-u.length+1,a=s,l=!0}if(a){var p=R.pointRef(e,a,{affinity:"backward"}),f;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(st.isElement(m)&&e.isInline(m)){var y=R.after(e,b);if(!y){var C={text:""},w=ie.next(b);Me.insertNodes(e,C,{at:w,voids:n}),y=R.point(e,w)}a=y,l=!0}var E=a.path.length-b.length;i=E+1,l=!0}f=R.pointRef(e,a);var D=a.path.length-i,[,k]=h,x=a.path.slice(0,D),O=i===0?a.offset:a.path[D]+g;for(var[j,B]of R.levels(e,{at:x,reverse:!0,voids:n})){var N=!1;if(B.length<k.length||B.length===0||!n&&st.isElement(j)&&R.isVoid(e,j))break;var A=p.current,S=R.isEnd(e,A,B);if(l||!p||!R.isEdge(e,A,B)){N=!0;var $=Ve.extractProps(j);e.apply({type:"split_node",path:B,position:O,properties:$})}O=B[B.length-1]+(N||S?1:0)}if(t.at==null){var P=f.current||R.end(e,[]);Me.select(e,P)}}finally{var F;p.unref(),(F=f)===null||F===void 0||F.unref()}}})},SD=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;Me.setNodes(e,n,r)},$D=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=ie.isPath(a)?oi(e,a):f=>st.isElement(f)&&R.isBlock(e,f)),ie.isPath(a)&&(a=R.range(e,a));var l=De.isRange(a)?R.rangeRef(e,a):null,u=R.nodes(e,{at:a,match:i,mode:r,voids:o}),s=Array.from(u,f=>{var[,h]=f;return R.pathRef(e,h)}).reverse(),c=function(){var f=p.unref(),[h]=R.node(e,f),v=R.range(e,f);n&&l&&(v=De.intersection(l.current,v)),Me.liftNodes(e,{at:v,match:g=>st.isAncestor(h)&&h.children.includes(g),voids:o})};for(var p of s)c();l&&l.unref()}})};function Ch(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 xh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ch(Object(r),!0).forEach(function(n){nn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var BD=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&&(ie.isPath(l)?i=oi(e,l):e.isInline(t)?i=v=>st.isElement(v)&&R.isInline(e,v)||at.isText(v):i=v=>st.isElement(v)&&R.isBlock(e,v)),o&&De.isRange(l)){var[u,s]=De.edges(l),c=R.rangeRef(e,l,{affinity:"inward"});Me.splitNodes(e,{at:s,match:i,voids:a}),Me.splitNodes(e,{at:u,match:i,voids:a}),l=c.unref(),r.at==null&&Me.select(e,l)}var p=Array.from(R.nodes(e,{at:l,match:e.isInline(t)?v=>st.isElement(v)&&R.isBlock(e,v):v=>R.isEditor(v),mode:"lowest",voids:a})),f=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 w=ie.equals(y,C)?ie.parent(y):ie.common(y,C),E=R.range(e,y,C),D=R.node(e,w),[k]=D,x=w.length+1,O=ie.next(C.slice(0,x)),j=xh(xh({},t),{},{children:[]});Me.insertNodes(e,j,{at:O,voids:a}),Me.moveNodes(e,{at:E,match:B=>st.isAncestor(k)&&k.children.includes(B),to:O.concat(0),voids:a})}};for(var[,h]of p)f()}})},OD=()=>{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 QE(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ak(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sk(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uk(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ck(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tk(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xk(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ek(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uD(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wk(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dk(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rk(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tD(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ek(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nk(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ok(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ik(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lk(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cD(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sD(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dD(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dk(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fk(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pk(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mk(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hk(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tk(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vk(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bk(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yk(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ck(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gD(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sk(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $k(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bk(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ok(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ak(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fk(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pk(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Nk(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jk(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vD(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return CD(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fD(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xD(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mk(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zk(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _k(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lk(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hk(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qk(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wk(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kk(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 Vk(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xk(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gk(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yk(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qk(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zk(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jk(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wD(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pD(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ED(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rD(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mD(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hD(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return DD(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nD(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return oD(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return aD(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return SD(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $D(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gk(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return iD(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return BD(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lD(e,...r)}};return e},Ju,wh;function AD(){if(wh)return Ju;wh=1,Ju=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 Ju}var FD=AD();const Vb=bl(FD);var Qu,Eh;function lp(){if(Eh)return Qu;Eh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Qu=e,Qu}var ec,kh;function PD(){if(kh)return ec;kh=1;var e=typeof Il=="object"&&Il&&Il.Object===Object&&Il;return ec=e,ec}var tc,Dh;function Xb(){if(Dh)return tc;Dh=1;var e=PD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return tc=r,tc}var rc,Sh;function ND(){if(Sh)return rc;Sh=1;var e=Xb(),t=function(){return e.Date.now()};return rc=t,rc}var nc,$h;function jD(){if($h)return nc;$h=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return nc=t,nc}var oc,Bh;function ID(){if(Bh)return oc;Bh=1;var e=jD(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return oc=r,oc}var ac,Oh;function Ub(){if(Oh)return ac;Oh=1;var e=Xb(),t=e.Symbol;return ac=t,ac}var ic,Ah;function RD(){if(Ah)return ic;Ah=1;var e=Ub(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(i){var l=r.call(i,o),u=i[o];try{i[o]=void 0;var s=!0}catch{}var c=n.call(i);return s&&(l?i[o]=u:delete i[o]),c}return ic=a,ic}var lc,Fh;function TD(){if(Fh)return lc;Fh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return lc=r,lc}var sc,Ph;function MD(){if(Ph)return sc;Ph=1;var e=Ub(),t=RD(),r=TD(),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 sc=i,sc}var uc,Nh;function zD(){if(Nh)return uc;Nh=1;function e(t){return t!=null&&typeof t=="object"}return uc=e,uc}var cc,jh;function _D(){if(jh)return cc;jh=1;var e=MD(),t=zD(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return cc=n,cc}var dc,Ih;function LD(){if(Ih)return dc;Ih=1;var e=ID(),t=lp(),r=_D(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,l=parseInt;function u(s){if(typeof s=="number")return s;if(r(s))return n;if(t(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=t(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=e(s);var p=a.test(s);return p||i.test(s)?l(s.slice(2),p?2:8):o.test(s)?n:+s}return dc=u,dc}var fc,Rh;function Gb(){if(Rh)return fc;Rh=1;var e=lp(),t=ND(),r=LD(),n="Expected a function",o=Math.max,a=Math.min;function i(l,u,s){var c,p,f,h,v,g,m=0,b=!1,y=!1,C=!0;if(typeof l!="function")throw new TypeError(n);u=r(u)||0,e(s)&&(b=!!s.leading,y="maxWait"in s,f=y?o(r(s.maxWait)||0,u):f,C="trailing"in s?!!s.trailing:C);function w(A){var S=c,$=p;return c=p=void 0,m=A,h=l.apply($,S),h}function E(A){return m=A,v=setTimeout(x,u),b?w(A):h}function D(A){var S=A-g,$=A-m,P=u-S;return y?a(P,f-$):P}function k(A){var S=A-g,$=A-m;return g===void 0||S>=u||S<0||y&&$>=f}function x(){var A=t();if(k(A))return O(A);v=setTimeout(x,D(A))}function O(A){return v=void 0,C&&c?w(A):(c=p=void 0,h)}function j(){v!==void 0&&clearTimeout(v),m=0,c=g=p=v=void 0}function B(){return v===void 0?h:O(t())}function N(){var A=t(),S=k(A);if(c=arguments,p=this,g=A,S){if(v===void 0)return E(g);if(y)return clearTimeout(v),v=setTimeout(x,u),w(g)}return v===void 0&&(v=setTimeout(x,u)),h}return N.cancel=j,N.flush=B,N}return fc=i,fc}var HD=Gb();const WD=bl(HD);var pc,Th;function KD(){if(Th)return pc;Th=1;var e=Gb(),t=lp(),r="Expected a function";function n(o,a,i){var l=!0,u=!0;if(typeof o!="function")throw new TypeError(r);return t(i)&&(l="leading"in i?!!i.leading:l,u="trailing"in i?!!i.trailing:u),e(o,a,{leading:l,maxWait:a,trailing:u})}return pc=n,pc}var qD=KD();const VD=bl(qD),Mh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,zh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Ml=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return zh(r.overflowY,t)||zh(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},zl=(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,XD=e=>e.parentElement??(e.getRootNode().host||null),_h=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:i,block:l,inline:u,boundary:s,skipOverflowHiddenElements:c}=t,p=typeof s=="function"?s:P=>P!==s;if(!Mh(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let v=e;for(;Mh(v)&&p(v);){if(v=XD(v),v===f){h.push(v);break}v!=null&&v===document.body&&Ml(v)&&!Ml(document.documentElement)||v!=null&&Ml(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:w,top:E,right:D,bottom:k,left:x}=e.getBoundingClientRect(),{top:O,right:j,bottom:B,left:N}=(P=>{const F=window.getComputedStyle(P);return{top:parseFloat(F.scrollMarginTop)||0,right:parseFloat(F.scrollMarginRight)||0,bottom:parseFloat(F.scrollMarginBottom)||0,left:parseFloat(F.scrollMarginLeft)||0}})(e);let A=l==="start"||l==="nearest"?E-O:l==="end"?k+B:E+C/2-O+B,S=u==="center"?x+w/2-N+j:u==="end"?D+j:x-N;const $=[];for(let P=0;P<h.length;P++){const F=h[P],{height:I,width:T,top:q,right:L,bottom:_,left:V}=F.getBoundingClientRect();if(i==="if-needed"&&E>=0&&x>=0&&k<=m&&D<=g&&(F===f&&!Ml(F)||E>=q&&k<=_&&x>=V&&D<=L))return $;const Z=getComputedStyle(F),J=parseInt(Z.borderLeftWidth,10),z=parseInt(Z.borderTopWidth,10),Y=parseInt(Z.borderRightWidth,10),G=parseInt(Z.borderBottomWidth,10);let X=0,W=0;const H="offsetWidth"in F?F.offsetWidth-F.clientWidth-J-Y:0,ne="offsetHeight"in F?F.offsetHeight-F.clientHeight-z-G:0,U="offsetWidth"in F?F.offsetWidth===0?0:T/F.offsetWidth:0,ae="offsetHeight"in F?F.offsetHeight===0?0:I/F.offsetHeight:0;if(f===F)X=l==="start"?A:l==="end"?A-m:l==="nearest"?zl(y,y+m,m,z,G,y+A,y+A+C,C):A-m/2,W=u==="start"?S:u==="center"?S-g/2:u==="end"?S-g:zl(b,b+g,g,J,Y,b+S,b+S+w,w),X=Math.max(0,X+y),W=Math.max(0,W+b);else{X=l==="start"?A-q-z:l==="end"?A-_+G+ne:l==="nearest"?zl(q,_,I,z,G+ne,A,A+C,C):A-(q+I/2)+ne/2,W=u==="start"?S-V-J:u==="center"?S-(V+T/2)+H/2:u==="end"?S-L+Y+H:zl(V,L,T,J,Y+H,S,S+w,w);const{scrollLeft:re,scrollTop:de}=F;X=ae===0?0:Math.max(0,Math.min(de+X/ae,F.scrollHeight-I/ae+ne)),W=U===0?0:Math.max(0,Math.min(re+W/U,F.scrollWidth-T/U+H)),A+=de-X,S+=re-W}$.push({el:F,top:X,left:W})}return $},UD=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function GD(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(_h(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:i}of _h(e,UD(t))){const l=a-r.top+r.bottom,u=i-r.left+r.right;o.scroll({top:l,left:u,behavior:n})}}var Vo=[],YD=function(){return Vo.some(function(e){return e.activeTargets.length>0})},ZD=function(){return Vo.some(function(e){return e.skippedTargets.length>0})},Lh="ResizeObserver loop completed with undelivered notifications.",JD=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Lh}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Lh),window.dispatchEvent(e)},Ui;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ui||(Ui={}));var Xo=function(e){return Object.freeze(e)},QD=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Xo(this)}return e})(),Yb=(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,Xo(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,u=t.width,s=t.height;return{x:r,y:n,top:o,right:a,bottom:i,left:l,width:u,height:s}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),sp=function(e){return e instanceof SVGElement&&"getBBox"in e},Zb=function(e){if(sp(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)},Hh=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)},eS=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},Ni=typeof window<"u"?window:{},_l=new WeakMap,Wh=/auto|scroll/,tS=/^tb|vertical/,rS=/msie|trident/i.test(Ni.navigator&&Ni.navigator.userAgent),Wn=function(e){return parseFloat(e||"0")},Na=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new QD((r?t:e)||0,(r?e:t)||0)},Kh=Xo({devicePixelContentBoxSize:Na(),borderBoxSize:Na(),contentBoxSize:Na(),contentRect:new Yb(0,0,0,0)}),Jb=function(e,t){if(t===void 0&&(t=!1),_l.has(e)&&!t)return _l.get(e);if(Zb(e))return _l.set(e,Kh),Kh;var r=getComputedStyle(e),n=sp(e)&&e.ownerSVGElement&&e.getBBox(),o=!rS&&r.boxSizing==="border-box",a=tS.test(r.writingMode||""),i=!n&&Wh.test(r.overflowY||""),l=!n&&Wh.test(r.overflowX||""),u=n?0:Wn(r.paddingTop),s=n?0:Wn(r.paddingRight),c=n?0:Wn(r.paddingBottom),p=n?0:Wn(r.paddingLeft),f=n?0:Wn(r.borderTopWidth),h=n?0:Wn(r.borderRightWidth),v=n?0:Wn(r.borderBottomWidth),g=n?0:Wn(r.borderLeftWidth),m=p+s,b=u+c,y=g+h,C=f+v,w=l?e.offsetHeight-C-e.clientHeight:0,E=i?e.offsetWidth-y-e.clientWidth:0,D=o?m+y:0,k=o?b+C:0,x=n?n.width:Wn(r.width)-D-E,O=n?n.height:Wn(r.height)-k-w,j=x+m+E+y,B=O+b+w+C,N=Xo({devicePixelContentBoxSize:Na(Math.round(x*devicePixelRatio),Math.round(O*devicePixelRatio),a),borderBoxSize:Na(j,B,a),contentBoxSize:Na(x,O,a),contentRect:new Yb(p,u,x,O)});return _l.set(e,N),N},Qb=function(e,t,r){var n=Jb(e,r),o=n.borderBoxSize,a=n.contentBoxSize,i=n.devicePixelContentBoxSize;switch(t){case Ui.DEVICE_PIXEL_CONTENT_BOX:return i;case Ui.BORDER_BOX:return o;default:return a}},nS=(function(){function e(t){var r=Jb(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Xo([r.borderBoxSize]),this.contentBoxSize=Xo([r.contentBoxSize]),this.devicePixelContentBoxSize=Xo([r.devicePixelContentBoxSize])}return e})(),ey=function(e){if(Zb(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},oS=function(){var e=1/0,t=[];Vo.forEach(function(a){if(a.activeTargets.length!==0){var i=[];a.activeTargets.forEach(function(l){var u=new nS(l.target),s=ey(l.target);i.push(u),l.lastReportedSize=Qb(l.target,l.observedBox),s<e&&(e=s)}),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},qh=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()&&(ey(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},aS=function(){var e=0;for(qh(e);YD();)e=oS(),qh(e);return ZD()&&JD(),e>0},mc,ty=[],iS=function(){return ty.splice(0).forEach(function(e){return e()})},lS=function(e){if(!mc){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return iS()}).observe(r,n),mc=function(){r.textContent="".concat(t?t--:t++)}}ty.push(e),mc()},sS=function(e){lS(function(){requestAnimationFrame(e)})},is=0,uS=function(){return!!is},cS=250,dS={attributes:!0,characterData:!0,childList:!0,subtree:!0},Vh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Xh=function(e){return e===void 0&&(e=0),Date.now()+e},hc=!1,fS=(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=cS),!hc){hc=!0;var n=Xh(t);sS(function(){var o=!1;try{o=aS()}finally{if(hc=!1,t=n-Xh(),!uS())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,dS)};document.body?r():Ni.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Vh.forEach(function(r){return Ni.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Vh.forEach(function(r){return Ni.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),vd=new fS,Uh=function(e){!is&&e>0&&vd.start(),is+=e,!is&&vd.stop()},pS=function(e){return!sp(e)&&!eS(e)&&getComputedStyle(e).display==="inline"},mS=(function(){function e(t,r){this.target=t,this.observedBox=r||Ui.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Qb(this.target,this.observedBox,!0);return pS(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),hS=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ll=new WeakMap,Gh=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Hl=(function(){function e(){}return e.connect=function(t,r){var n=new hS(t,r);Ll.set(t,n)},e.observe=function(t,r,n){var o=Ll.get(t),a=o.observationTargets.length===0;Gh(o.observationTargets,r)<0&&(a&&Vo.push(o),o.observationTargets.push(new mS(r,n&&n.box)),Uh(1),vd.schedule())},e.unobserve=function(t,r){var n=Ll.get(t),o=Gh(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=Ll.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),gS=(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.");Hl.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(!Hh(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Hl.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(!Hh(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Hl.unobserve(this,t)},e.prototype.disconnect=function(){Hl.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Pn={},Yh;function vS(){if(Yh)return Pn;Yh=1,Object.defineProperty(Pn,"__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(f,h,v){h&&!("byKey"in h)&&(v=h,h=null),Array.isArray(f)||(f=[f]);var g=f.map(function(y){return u(y,h)}),m=function(y){return g.some(function(C){return s(C,y)})},b=v==null?m:m(v);return b}function i(f,h){return a(f,h)}function l(f,h){return a(f,{byKey:!0},h)}function u(f,h){var v=h&&h.byKey,g={};f=f.replace("++","+add");var m=f.split("+"),b=m.length;for(var y in t)g[t[y]]=!1;var C=!0,w=!1,E=void 0;try{for(var D=m[Symbol.iterator](),k;!(C=(k=D.next()).done);C=!0){var x=k.value,O=x.endsWith("?")&&x.length>1;O&&(x=x.slice(0,-1));var j=p(x),B=t[j];if(x.length>1&&!B&&!r[x]&&!n[j])throw new TypeError('Unknown modifier: "'+x+'"');(b===1||!B)&&(v?g.key=j:g.which=c(x)),B&&(g[B]=O?null:!0)}}catch(N){w=!0,E=N}finally{try{!C&&D.return&&D.return()}finally{if(w)throw E}}return g}function s(f,h){for(var v in f){var g=f[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(f){f=p(f);var h=n[f]||f.toUpperCase().charCodeAt(0);return h}function p(f){return f=f.toLowerCase(),f=r[f]||f,f}return Pn.default=a,Pn.isHotkey=a,Pn.isCodeHotkey=i,Pn.isKeyHotkey=l,Pn.parseHotkey=u,Pn.compareHotkey=s,Pn.toKeyCode=c,Pn.toKeyName=p,Pn}var gc=vS();function bS(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 _a(e,t){if(e==null)return{};var r=bS(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 Gi(e){"@babel/helpers - typeof";return Gi=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},Gi(e)}function yS(e,t){if(Gi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CS(e){var t=yS(e,"string");return Gi(t)==="symbol"?t:String(t)}function $n(e,t,r){return t=CS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var up=An(null),Io=()=>{var e=Rr(up);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},vc,bc,ry=parseInt(oe.version.split(".")[0],10),ny=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Zh=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),tn=typeof navigator<"u"&&/Android/.test(navigator.userAgent),$a=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Lo=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),xS=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),oy=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),wS=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),ES=tn&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),kS=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),DS=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),SS=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),ls=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(vc=navigator.userAgent.match(/Version\/(\d+)/))!==null&&vc!==void 0&&vc[1]&&parseInt((bc=navigator.userAgent.match(/Version\/(\d+)/))===null||bc===void 0?void 0:bc[1],10)<17;var yo=(!wS||!ES)&&!xS&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",ja=new WeakMap,cp=new WeakMap,dp=new WeakMap,ay=new WeakMap,ss=new WeakMap,bd=new WeakMap,Yi=new WeakMap,Uo=new WeakMap,Ps=new WeakMap,su=new WeakMap,yd=new WeakMap,$o=new WeakMap,Wo=new WeakMap,ji=new WeakMap,Cd=new WeakMap,fp=new WeakMap,Rn=new WeakMap,co=new WeakMap,un=new WeakMap,ko=new WeakMap,Do=new WeakMap,iy=new WeakMap,La=Symbol("placeholder"),ly=Symbol("mark-placeholder"),sy=globalThis.Node,$S=globalThis.Text,pp=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,BS=e=>Fo(e)&&e.nodeType===8,Sn=e=>Fo(e)&&e.nodeType===1,Fo=e=>{var t=pp(e);return!!t&&e instanceof t.Node},xd=e=>{var t=e&&e.anchorNode&&pp(e.anchorNode);return!!t&&e instanceof t.Selection},uy=e=>Fo(e)&&e.nodeType===3,OS=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,AS=e=>{var[t,r]=e;if(Sn(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=cy(t,o,n?"backward":"forward"),n=o<r;Sn(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=PS(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},FS=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},cy=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,i=!1,l=!1;(BS(o)||Sn(o)&&o.childNodes.length===0||Sn(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]},PS=(e,t,r)=>{var[n]=cy(e,t,r);return n},dy=e=>{var t="";if(uy(e)&&e.nodeValue)return e.nodeValue;if(Sn(e)){for(var r of Array.from(e.childNodes))t+=dy(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
15
+ `)}return t},NS=/data-slate-fragment="(.+?)"/m,jS=e=>{var t=e.getData("text/html"),[,r]=t.match(NS)||[];return r},Ii=e=>e.getSelection!=null?e.getSelection():document.getSelection(),mp=(e,t,r)=>{var{target:n}=t;if(Sn(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=Fe.getWindow(e);if(o.contains(n))return Fe.hasDOMNode(e,n,{editable:!0});var a=r.find(i=>{var{addedNodes:l,removedNodes:u}=i;for(var s of l)if(s===n||s.contains(n))return!0;for(var c of u)if(c===n||c.contains(n))return!0});return!a||a===t?!1:mp(e,a,r)},IS=()=>{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},Jh=(e,t)=>!!(e.compareDocumentPosition(t)&sy.DOCUMENT_POSITION_PRECEDING),RS=(e,t)=>!!(e.compareDocumentPosition(t)&sy.DOCUMENT_POSITION_FOLLOWING),TS=0;class MS{constructor(){$n(this,"id",void 0),this.id="".concat(TS++)}}var Fe={androidPendingDiffs:e=>un.get(e),androidScheduleFlush:e=>{var t;(t=fp.get(e))===null||t===void 0||t()},blur:e=>{var t=Fe.toDOMNode(e,e),r=Fe.findDocumentOrShadowRoot(e);$o.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=Fe.findDocumentOrShadowRoot(e),n=Ii(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&Me.deselect(e)},findDocumentOrShadowRoot:e=>{var t=Fe.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=Fe.toSlateNode(e,t.target),i=Fe.findPath(e,a);if(st.isElement(a)&&R.isVoid(e,a)){var l=o.getBoundingClientRect(),u=e.isInline(a)?r-l.left<l.left+l.width-r:n-l.top<l.top+l.height-n,s=R.point(e,i,{edge:u?"start":"end"}),c=u?R.before(e,s):R.after(e,s);if(c){var p=R.range(e,c);return p}}var f,{document:h}=Fe.getWindow(e);if(h.caretRangeFromPoint)f=h.caretRangeFromPoint(r,n);else{var v=h.caretPositionFromPoint(r,n);v&&(f=h.createRange(),f.setStart(v.offsetNode,v.offset),f.setEnd(v.offsetNode,v.offset))}if(!f)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var g=Fe.toSlateRange(e,f,{exactMatch:!1,suppressThrow:!1});return g},findKey:(e,t)=>{var r=Ps.get(t);return r||(r=new MS,Ps.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=dp.get(n);if(o==null){if(R.isEditor(n))return r;break}var a=cp.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(()=>{Fe.focus(e,{retries:t.retries-1})},10);return}var r=Fe.toDOMNode(e,e),n=Fe.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Ii(n),a=Fe.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||Me.select(e,R.start(e,[])),$o.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=ay.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=Fe.toDOMNode(e,e),a;try{a=Sn(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)&&Fe.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)=>Fe.hasEditableTarget(e,t)||Fe.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Fo(t)&&Fe.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=>!!yd.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(yd.get(e))return!1;var r=Fe.hasTarget(e,t)&&Fe.toSlateNode(e,t);return st.isElement(r)&&R.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=su.get(e),n=R.isEditor(t)?ss.get(e):r==null?void 0:r.get(Fe.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=Fe.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,u=0;u<i.length;u++){var s=i[u],c=s.childNodes[0];if(!(c==null||c.textContent==null)){var{length:p}=c.textContent,f=s.getAttribute("data-slate-length"),h=f==null?p:parseInt(f,10),v=l+h,g=i[u+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 $S?b:g,(m=g.textContent)!==null&&m!==void 0&&m.startsWith("\uFEFF")?1:0];break}if(t.offset<=v){var y=Math.min(p,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=Fe.toDOMPoint(e,r),i=De.isCollapsed(t)?a:Fe.toDOMPoint(e,n),l=Fe.getWindow(e),u=l.document.createRange(),[s,c]=o?i:a,[p,f]=o?a:i,h=Sn(s)?s:s.parentElement,v=!!h.getAttribute("data-slate-zero-width"),g=Sn(p)?p:p.parentElement,m=!!g.getAttribute("data-slate-zero-width");return u.setStart(s,v?1:c),u.setEnd(p,m?1:f),u},toSlateNode:(e,t)=>{var r=Sn(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Yi.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:AS(t),u=i.parentNode,s=null,c=0;if(u){var p,f,h=Fe.toDOMNode(e,e),v=u.closest('[data-slate-void="true"]'),g=v&&h.contains(v)?v:null,m=u.closest('[contenteditable="false"]'),b=m&&h.contains(m)?m:null,y=u.closest("[data-slate-leaf]"),C=null;if(y){if(s=y.closest('[data-slate-node="text"]'),s){var w=Fe.getWindow(e),E=w.document.createRange();E.setStart(s,0),E.setEnd(i,l);var D=E.cloneContents(),k=[...Array.prototype.slice.call(D.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(D.querySelectorAll("[contenteditable=false]"))];k.forEach(V=>{if(tn&&!n&&V.hasAttribute("data-slate-zero-width")&&V.textContent.length>0&&V.textContext!=="\uFEFF"){V.textContent.startsWith("\uFEFF")&&(V.textContent=V.textContent.slice(1));return}V.parentNode.removeChild(V)}),c=D.textContent.length,C=s}}else if(g){for(var x=g.querySelectorAll("[data-slate-leaf]"),O=0;O<x.length;O++){var j=x[O];if(Fe.hasDOMNode(e,j)){y=j;break}}y?(s=y.closest('[data-slate-node="text"]'),C=y,c=C.textContent.length,C.querySelectorAll("[data-slate-zero-width]").forEach(V=>{c-=V.textContent.length})):c=1}else if(b){var B=V=>V?V.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],N=b.closest('[data-slate-node="element"]');if(a==="forward"){var A,S=[...B(N),...B(N==null?void 0:N.nextElementSibling)];y=(A=S.find(V=>RS(b,V)))!==null&&A!==void 0?A:null}else{var $,P=[...B(N==null?void 0:N.previousElementSibling),...B(N)];y=($=P.findLast(V=>Jh(b,V)))!==null&&$!==void 0?$:null}y&&(s=y.closest('[data-slate-node="text"]'),C=y,a==="forward"?c=0:(c=C.textContent.length,C.querySelectorAll("[data-slate-zero-width]").forEach(V=>{c-=V.textContent.length})))}C&&c===C.textContent.length&&tn&&C.getAttribute("data-slate-zero-width")==="z"&&(p=C.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||$a&&(f=C.textContent)!==null&&f!==void 0&&f.endsWith(`
16
+
17
+ `))&&c--}if(tn&&!s&&!n){var F=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(F&&Fe.hasDOMNode(e,F,{editable:!0})){var I=Fe.toSlateNode(e,F),{path:T,offset:q}=R.start(e,Fe.findPath(e,I));return F.querySelector("[data-slate-leaf]")||(q=l),{path:T,offset:q}}}if(!s){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var L=Fe.toSlateNode(e,s),_=Fe.findPath(e,L);return{path:_,offset:c}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,i=xd(t)?t.anchorNode:t.startContainer,l,u,s,c,p;if(i)if(xd(t)){if($a&&t.rangeCount>1){s=t.focusNode;var f=t.getRangeAt(0),h=t.getRangeAt(t.rangeCount-1);if(s instanceof HTMLTableRowElement&&f.startContainer instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement){let D=function(k){return k.childElementCount>0?D(k.children[0]):k};var v=f.startContainer,g=h.startContainer,m=D(v.children[f.startOffset]),b=D(g.children[h.startOffset]);c=0,b.childNodes.length>0?l=b.childNodes[0]:l=b,m.childNodes.length>0?s=m.childNodes[0]:s=m,b instanceof HTMLElement?u=b.innerHTML.length:u=0}else f.startContainer===s?(l=h.endContainer,u=h.endOffset,c=f.startOffset):(l=f.startContainer,u=f.endOffset,c=h.startOffset)}else l=t.anchorNode,u=t.anchorOffset,s=t.focusNode,c=t.focusOffset;oy&&FS(l)||$a?p=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:p=t.isCollapsed}else l=t.startContainer,u=t.startOffset,s=t.endContainer,c=t.endOffset,p=t.collapsed;if(l==null||s==null||u==null||c==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));$a&&(n=s.textContent)!==null&&n!==void 0&&n.endsWith(`
18
+
19
+ `)&&c===s.textContent.length&&c--;var y=Fe.toSlatePoint(e,[l,u],{exactMatch:o,suppressThrow:a});if(!y)return null;var C=Jh(l,s)||l===s&&c<u,w=p?y:Fe.toSlatePoint(e,[s,c],{exactMatch:o,suppressThrow:a,searchDirection:C?"forward":"backward"});if(!w)return null;var E={anchor:y,focus:w};return De.isExpanded(E)&&De.isForward(E)&&Sn(s)&&R.void(e,{at:E.focus,mode:"highest"})&&(E=R.unhangRange(e,E,{voids:!0})),E}};function zS(e,t){var{path:r,diff:n}=t;if(!R.hasPath(e,r))return!1;var o=Ve.get(e,r);if(!at.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=ie.next(r);if(!R.hasPath(e,a))return!1;var i=Ve.get(e,a);return at.isText(i)&&i.text.startsWith(n.text)}function fy(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 _S(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 LS(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 py(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),i=_S(a,o),l=Math.min(a.length-i,o.length-i),u=LS(a,o,l),s={start:r+i,end:n-u,text:o.slice(i,o.length-u)};return s.start===s.end&&s.text.length===0?null:s}function HS(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=fy(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),u=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return py(e,{start:n,end:u,text:l})}function WS(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function wd(e,t){var{path:r,offset:n}=t;if(!R.hasPath(e,r))return null;var o=Ve.get(e,r);if(!at.isText(o))return null;var a=R.above(e,{match:l=>st.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:at.isText});if(!i||!ie.isDescendant(i[1],a[1]))return null;n-=o.text.length,o=i[0],r=i[1]}return{path:r,offset:n}}function Qh(e,t){var r=wd(e,t.anchor);if(!r)return null;if(De.isCollapsed(t))return{anchor:r,focus:r};var n=wd(e,t.focus);return n?{anchor:r,focus:n}:null}function Ed(e,t,r){var n=un.get(e),o=n==null?void 0:n.find(c=>{var{path:p}=c;return ie.equals(p,t.path)});if(!o||t.offset<=o.diff.start)return Tt.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=Tt.transform(i,r,{affinity:"backward"});return l?{path:l.path,offset:l.offset+t.offset-a.start}:null}var u={path:t.path,offset:t.offset-a.text.length+a.end-a.start},s=Tt.transform(u,r,{affinity:"backward"});return s?r.type==="split_node"&&ie.equals(r.path,t.path)&&u.offset<r.position&&a.start<r.position?s:{path:s.path,offset:s.offset+a.text.length-a.end+a.start}:null}function eg(e,t,r){var n=Ed(e,t.anchor,r);if(!n)return null;if(De.isCollapsed(t))return{anchor:n,focus:n};var o=Ed(e,t.focus,r);return o?{anchor:n,focus:o}:null}function KS(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!ie.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!ie.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!ie.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:ie.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:ie.transform(r,t,{affinity:"forward"})};case"merge_node":return ie.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:ie.transform(r,t)}:{diff:n,id:o,path:ie.transform(r,t)}}var a=ie.transform(r,t);return a?{diff:n,path:a,id:o}:null}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 Wl(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){$n(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=25,VS=200,XS=function(){},US=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function GS(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,i=null,l=null,u=0,s=!1,c=()=>{var N=Do.get(t);if(Do.delete(t),N){var{selection:A}=t,S=Qh(t,N);S&&(!A||!De.equals(S,A))&&Me.select(t,S)}},p=()=>{var N=ko.get(t);if(ko.delete(t),!!N){if(N.at){var A=Tt.isPoint(N.at)?wd(t,N.at):Qh(t,N.at);if(!A)return;var S=R.range(t,A);(!t.selection||!De.equals(t.selection,S))&&Me.select(t,A)}N.run()}},f=()=>{if(i&&(clearTimeout(i),i=null),l&&(clearTimeout(l),l=null),!w()&&!C()){c();return}o||(o=!0,setTimeout(()=>o=!1)),C()&&(o="action");var N=t.selection&&R.rangeRef(t,t.selection,{affinity:"forward"});co.set(t,t.marks),XS("flush",ko.get(t),un.get(t));for(var A=w(),S;S=($=un.get(t))===null||$===void 0?void 0:$[0];){var $,P,F=Rn.get(t);F!==void 0&&(Rn.delete(t),t.marks=F),F&&s===!1&&(s=null);var I=WS(S);(!t.selection||!De.equals(t.selection,I))&&Me.select(t,I),S.diff.text?R.insertText(t,S.diff.text):R.deleteFragment(t),un.set(t,(P=un.get(t))===null||P===void 0?void 0:P.filter(L=>{var{id:_}=L;return _!==S.id})),zS(t,S)||(A=!1,ko.delete(t),co.delete(t),o="action",Do.delete(t),r.cancel(),n.cancel(),N==null||N.unref())}var T=N==null?void 0:N.unref();if(T&&!Do.get(t)&&(!t.selection||!De.equals(T,t.selection))&&Me.select(t,T),C()){p();return}A&&r(),r.flush(),n.flush(),c();var q=co.get(t);co.delete(t),q!==void 0&&(t.marks=q,t.onChange())},h=N=>{a&&clearTimeout(a),a=setTimeout(()=>{Wo.set(t,!1),f()},qS)},v=N=>{Wo.set(t,!0),a&&(clearTimeout(a),a=null)},g=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,A=bd.get(t);if(A){if(w()||N){A.style.display="none";return}A.style.removeProperty("display")}},m=(N,A)=>{var S,$=(S=un.get(t))!==null&&S!==void 0?S:[];un.set(t,$);var P=Ve.leaf(t,N),F=$.findIndex(q=>ie.equals(q.path,N));if(F<0){var I=py(P.text,A);I&&$.push({path:N,diff:A,id:u++}),g();return}var T=HS(P.text,$[F].diff,A);if(!T){$.splice(F,1),g();return}$[F]=Wl(Wl({},$[F]),{},{diff:T})},b=function(N){var{at:A}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s=!1,Do.delete(t),r.cancel(),n.cancel(),C()&&f(),ko.set(t,{at:A,run:N}),l=setTimeout(f)},y=N=>{var A;if(i&&(clearTimeout(i),i=null),!ja.get(t)){var{inputType:S}=N,$=null,P=N.dataTransfer||N.data||void 0;s!==!1&&S!=="insertText"&&S!=="insertCompositionText"&&(s=!1);var[F]=N.getTargetRanges();F&&($=Fe.toSlateRange(t,F,{exactMatch:!1,suppressThrow:!0}));var I=Fe.getWindow(t),T=I.getSelection();if(!$&&T&&(F=T,$=Fe.toSlateRange(t,T,{exactMatch:!1,suppressThrow:!0})),$=(A=$)!==null&&A!==void 0?A:t.selection,!!$){var q=!0;if(S.startsWith("delete")){if(De.isExpanded($)){var[L,_]=De.edges($),V=Ve.leaf(t,L.path);if(V.text.length===L.offset&&_.offset===0){var Z=R.next(t,{at:L.path,match:at.isText});Z&&ie.equals(Z[1],_.path)&&($={anchor:_,focus:_})}}var J=S.endsWith("Backward")?"backward":"forward",[z,Y]=De.edges($),[G,X]=R.leaf(t,z.path),W={text:"",start:z.offset,end:Y.offset},H=un.get(t),ne=H==null?void 0:H.find(Re=>ie.equals(Re.path,X)),U=ne?[ne.diff,W]:[W],ae=fy(G.text,...U);if(ae.length===0&&(q=!1),De.isExpanded($)){if(q&&ie.equals($.anchor.path,$.focus.path)){var re={path:$.anchor.path,offset:z.offset},de=R.range(t,re,re);return k(de),m($.anchor.path,{text:"",end:Y.offset,start:z.offset})}return b(()=>R.deleteFragment(t,{direction:J}),{at:$})}}switch(S){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return b(()=>R.deleteFragment(t),{at:$});case"deleteContent":case"deleteContentForward":{var{anchor:ge}=$;if(q&&De.isCollapsed($)){var ye=Ve.leaf(t,ge.path);if(ge.offset<ye.text.length)return m(ge.path,{text:"",start:ge.offset,end:ge.offset+1})}return b(()=>R.deleteForward(t),{at:$})}case"deleteContentBackward":{var Ne,{anchor:xe}=$,be=xd(F)?F.isCollapsed:!!((Ne=F)!==null&&Ne!==void 0&&Ne.collapsed);return q&&be&&De.isCollapsed($)&&xe.offset>0?m(xe.path,{text:"",start:xe.offset-1,end:xe.offset}):b(()=>R.deleteBackward(t),{at:$})}case"deleteEntireSoftLine":return b(()=>{R.deleteBackward(t,{unit:"line"}),R.deleteForward(t,{unit:"line"})},{at:$});case"deleteHardLineBackward":return b(()=>R.deleteBackward(t,{unit:"block"}),{at:$});case"deleteSoftLineBackward":return b(()=>R.deleteBackward(t,{unit:"line"}),{at:$});case"deleteHardLineForward":return b(()=>R.deleteForward(t,{unit:"block"}),{at:$});case"deleteSoftLineForward":return b(()=>R.deleteForward(t,{unit:"line"}),{at:$});case"deleteWordBackward":return b(()=>R.deleteBackward(t,{unit:"word"}),{at:$});case"deleteWordForward":return b(()=>R.deleteForward(t,{unit:"word"}),{at:$});case"insertLineBreak":return b(()=>R.insertSoftBreak(t),{at:$});case"insertParagraph":return b(()=>R.insertBreak(t),{at:$});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(US(P))return b(()=>Fe.insertData(t,P),{at:$});var Ae=P??"";if(Rn.get(t)&&(Ae=Ae.replace("\uFEFF","")),S==="insertText"&&/.*\n.*\n$/.test(Ae)&&(Ae=Ae.slice(0,-1)),Ae.includes(`
20
+ `))return b(()=>{var Re=Ae.split(`
21
+ `);Re.forEach((Te,ue)=>{Te&&R.insertText(t,Te),ue!==Re.length-1&&R.insertSoftBreak(t)})},{at:$});if(ie.equals($.anchor.path,$.focus.path)){var[me,Ee]=De.edges($),je={start:me.offset,end:Ee.offset,text:Ae};if(Ae&&s&&S==="insertCompositionText"){var Be=s.start+s.text.search(/\S|$/),Ye=je.start+je.text.search(/\S|$/);Ye===Be+1&&je.end===s.start+s.text.length?(je.start-=1,s=null,j()):s=!1}else S==="insertText"?s===null?s=je:s&&De.isCollapsed($)&&s.end+s.text.length===me.offset?s=Wl(Wl({},s),{},{text:s.text+Ae}):s=!1:s=!1;if(q){m(me.path,je);return}}return b(()=>R.insertText(t,Ae),{at:$})}}}}},C=()=>!!ko.get(t),w=()=>{var N;return!!((N=un.get(t))!==null&&N!==void 0&&N.length)},E=()=>C()||w(),D=()=>o,k=N=>{Do.set(t,N),i&&(clearTimeout(i),i=null);var{selection:A}=t;if(N){var S=!A||!ie.equals(A.anchor.path,N.anchor.path),$=!A||!ie.equals(A.anchor.path.slice(0,-1),N.anchor.path.slice(0,-1));(S&&s||$)&&(s=!1),(S||w())&&(i=setTimeout(f,VS))}},x=()=>{(C()||!w())&&f()},O=N=>{w()||(g(!0),setTimeout(g))},j=()=>{C()||(l=setTimeout(f))},B=N=>{if(!(w()||C())&&N.some(S=>mp(t,S,N))){var A;(A=iy.get(t))===null||A===void 0||A()}};return{flush:f,scheduleFlush:j,hasPendingDiffs:w,hasPendingAction:C,hasPendingChanges:E,isFlushing:D,handleUserSelect:k,handleCompositionEnd:h,handleCompositionStart:v,handleDOMBeforeInput:y,handleKeyDown:O,handleDomMutations:B,handleInput:x}}function YS(){var e=qe(!1);return Bt(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var Zi=ls?Nb:Bt;function ZS(e,t,r){var[n]=xt(()=>new MutationObserver(t));Zi(()=>{n.takeRecords()}),Bt(()=>{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 JS=["node"];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 QS(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){$n(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 e$={subtree:!0,childList:!0,characterData:!0},t$=tn?e=>{var{node:t}=e,r=_a(e,JS);if(!tn)return null;var n=Io(),o=YS(),[a]=xt(()=>GS(QS({editor:n},r)));return ZS(t,a.handleDomMutations,e$),fp.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,r$=["anchor","focus"],n$=["anchor","focus"],o$=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),my=(e,t)=>{var r=_a(e,r$),n=_a(t,n$);return e[La]===t[La]&&o$(r,n)},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(!De.equals(n,o)||!my(n,o))return!1}return!0},i$=(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||!my(n,o))return!1}return!0};function ng(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?ng(Object(r),!0).forEach(function(n){$n(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ng(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var s$=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=Io(),i=Fe.findPath(a,o),l=ie.parent(i),u=!!r[ly];return a.isVoid(n)?oe.createElement(yc,{length:Ve.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&R.string(a,l)===""?oe.createElement(yc,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?oe.createElement(yc,{isMarkPlaceholder:u}):t&&r.text.slice(-1)===`
22
+ `?oe.createElement(og,{isTrailing:!0,text:r.text}):oe.createElement(og,{text:r.text})},og=e=>{var{text:t,isTrailing:r=!1}=e,n=qe(null),o=()=>"".concat(t??"").concat(r?`
23
+ `:""),[a]=xt(o);return Zi(()=>{var i=o();n.current&&n.current.textContent!==i&&(n.current.textContent=i)}),oe.createElement(u$,{ref:n},a)},u$=Uw(fn((e,t)=>oe.createElement("span",{"data-slate-string":!0,ref:t},e.children))),yc=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),oe.createElement("span",l$({},o),!(tn||ny)||!r?"\uFEFF":null,r?oe.createElement("br",null):null)};function ag(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 hy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ag(Object(r),!0).forEach(function(n){$n(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ag(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var c$=tn?300:0;function d$(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function ig(e){e.current&&(clearTimeout(e.current),e.current=null)}var f$=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:i=y=>oe.createElement(m$,hy({},y))}=e,l=Io(),u=qe(null),s=qe(null),[c,p]=xt(!1),f=qe(null),h=mt(y=>{if(d$(u,y==null),y==null){var C;bd.delete(l),(C=t.onPlaceholderResize)===null||C===void 0||C.call(t,null)}else{if(bd.set(l,y),!u.current){var w=window.ResizeObserver||gS;u.current=new w(()=>{var E;(E=t.onPlaceholderResize)===null||E===void 0||E.call(t,y)})}u.current.observe(y),s.current=y}},[s,t,l]),v=oe.createElement(s$,{isLast:r,leaf:t,parent:o,text:n}),g=!!t[La];if(Bt(()=>(g?f.current||(f.current=setTimeout(()=>{p(!0),f.current=null},c$)):(ig(f),p(!1)),()=>ig(f)),[g,p]),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=oe.createElement(oe.Fragment,null,a(m),v)}var b={"data-slate-leaf":!0};return i({attributes:b,children:v,leaf:t,text:n})},p$=oe.memo(f$,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&at.equals(t.leaf,e.leaf)&&t.leaf[La]===e.leaf[La]),m$=e=>{var{attributes:t,children:r}=e;return oe.createElement("span",hy({},t),r)},h$=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:i}=e,l=Io(),u=qe(null),s=at.decorations(i,t),c=Fe.findKey(l,i),p=[],f=0;f<s.length;f++){var h=s[f];p.push(oe.createElement(p$,{isLast:r&&f===s.length-1,key:"".concat(c.id,"-").concat(f),renderPlaceholder:o,leaf:h,text:i,parent:n,renderLeaf:a}))}var v=mt(g=>{var m=su.get(l);g?(m==null||m.set(c,g),Uo.set(i,g),Yi.set(g,i)):(m==null||m.delete(c),Uo.delete(i),u.current&&Yi.delete(u.current)),u.current=g},[u,l,c,i]);return oe.createElement("span",{"data-slate-node":"text",ref:v},p)},gy=oe.memo(h$,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&i$(t.decorations,e.decorations));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 kd(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){$n(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 g$=e=>{var{decorations:t,element:r,renderElement:n=y=>oe.createElement(b$,kd({},y)),renderPlaceholder:o,renderLeaf:a,selection:i}=e,l=Io(),u=x$(),s=l.isInline(r),c=Fe.findKey(l,r),p=mt(y=>{var C=su.get(l);y?(C==null||C.set(c,y),Uo.set(r,y),Yi.set(y,r)):(C==null||C.delete(c),Uo.delete(r))},[l,c,r]),f=by({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:i}),h={"data-slate-node":"element",ref:p};if(s&&(h["data-slate-inline"]=!0),!s&&R.hasInlines(l,r)){var v=Ve.string(r),g=Vb(v);g==="rtl"&&(h.dir=g)}if(R.isVoid(l,r)){h["data-slate-void"]=!0,!u&&s&&(h.contentEditable=!1);var m=s?"span":"div",[[b]]=Ve.texts(r);f=oe.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},oe.createElement(gy,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:b})),cp.set(b,0),dp.set(b,r)}return n({attributes:h,children:f,element:r})},v$=oe.memo(g$,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&a$(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&De.equals(e.selection,t.selection))),b$=e=>{var{attributes:t,children:r,element:n}=e,o=Io(),a=o.isInline(n)?"span":"div";return oe.createElement(a,kd(kd({},t),{},{style:{position:"relative"}}),r)},vy=An(()=>[]),y$=()=>Rr(vy),C$=An(!1),by=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:i}=e,l=y$(),u=Io();ja.set(u,!1);for(var s=Fe.findPath(u,r),c=[],p=st.isElement(r)&&!u.isInline(r)&&R.hasInlines(u,r),f=0;f<r.children.length;f++){var h=s.concat(f),v=r.children[f],g=Fe.findKey(u,v),m=R.range(u,h),b=i&&De.intersection(m,i),y=l([v,h]);for(var C of t){var w=De.intersection(C,m);w&&y.push(w)}st.isElement(v)?c.push(oe.createElement(C$.Provider,{key:"provider-".concat(g.id),value:!!b},oe.createElement(v$,{decorations:y,element:v,key:g.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:b}))):c.push(oe.createElement(gy,{decorations:y,key:g.id,isLast:p&&f===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:v})),cp.set(v,f),dp.set(v,r)}return c},yy=An(!1),x$=()=>Rr(yy),Cy=An(null),xy=()=>{var e=Rr(Cy);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function w$(){var e=Io(),t=qe(!1),r=qe(0),n=mt(()=>{if(!t.current){t.current=!0;var o=Fe.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Bt(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var E$=3,k$={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"},D$={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"},S$={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},sr=e=>{var t=k$[e],r=D$[e],n=S$[e],o=t&&gc.isHotkey(t),a=r&&gc.isHotkey(r),i=n&&gc.isHotkey(n);return l=>!!(o&&o(l)||Zh&&a&&a(l)||!Zh&&i&&i(l))},dr={isBold:sr("bold"),isCompose:sr("compose"),isMoveBackward:sr("moveBackward"),isMoveForward:sr("moveForward"),isDeleteBackward:sr("deleteBackward"),isDeleteForward:sr("deleteForward"),isDeleteLineBackward:sr("deleteLineBackward"),isDeleteLineForward:sr("deleteLineForward"),isDeleteWordBackward:sr("deleteWordBackward"),isDeleteWordForward:sr("deleteWordForward"),isExtendBackward:sr("extendBackward"),isExtendForward:sr("extendForward"),isExtendLineBackward:sr("extendLineBackward"),isExtendLineForward:sr("extendLineForward"),isItalic:sr("italic"),isMoveLineBackward:sr("moveLineBackward"),isMoveLineForward:sr("moveLineForward"),isMoveWordBackward:sr("moveWordBackward"),isMoveWordForward:sr("moveWordForward"),isRedo:sr("redo"),isSoftBreak:sr("insertSoftBreak"),isSplitBlock:sr("splitBlock"),isTransposeCharacter:sr("transposeCharacter"),isUndo:sr("undo")},$$=(e,t)=>{var r=[],n=()=>{r=[]},o=i=>{if(t.current){var l=i.filter(u=>mp(e,u,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}},B$={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class wy extends Xw{constructor(){super(...arguments),$n(this,"context",null),$n(this,"manager",null),$n(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,B$)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=$$(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}}$n(wy,"contextType",up);var O$=tn?wy:e=>{var{children:t}=e;return oe.createElement(oe.Fragment,null,t)},A$=An(!1),F$=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],P$=["text"];function sg(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 Kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sg(Object(r),!0).forEach(function(n){$n(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var N$=e=>oe.createElement(oe.Fragment,null,by(e)),Cc=fn((e,t)=>{var r=mt(z=>oe.createElement(j$,Kn({},z)),[]),{autoFocus:n,decorate:o=I$,onDOMBeforeInput:a,placeholder:i,readOnly:l=!1,renderElement:u,renderLeaf:s,renderPlaceholder:c=r,scrollSelectionIntoView:p=R$,style:f={},as:h="div",disableDefaultStyles:v=!1}=e,g=_a(e,F$),m=xy(),[b,y]=xt(!1),C=qe(null),w=qe([]),[E,D]=xt(),k=qe(!1),{onUserInput:x,receivedUserInput:O}=w$(),[,j]=Vw(z=>z+1,0);iy.set(m,j),yd.set(m,l);var B=Ct(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Bt(()=>{C.current&&n&&C.current.focus()},[n]);var N=qe(),A=Ct(()=>VD(()=>{if(ja.get(m)){A();return}var z=Fe.toDOMNode(m,m),Y=z.getRootNode();if(!k.current&&Lo&&Y instanceof ShadowRoot){k.current=!0;var G=IS();G?document.execCommand("indent"):Me.deselect(m),k.current=!1;return}var X=N.current;if((tn||!Fe.isComposing(m))&&(!B.isUpdatingSelection||X!=null&&X.isFlushing())&&!B.isDraggingInternally){var W=Fe.findDocumentOrShadowRoot(m),{activeElement:H}=W,ne=Fe.toDOMNode(m,m),U=Ii(W);if(H===ne?(B.latestElement=H,$o.set(m,!0)):$o.delete(m),!U)return Me.deselect(m);var{anchorNode:ae,focusNode:re}=U,de=Fe.hasEditableTarget(m,ae)||Fe.isTargetInsideNonReadonlyVoid(m,ae),ge=Fe.hasTarget(m,re);if(de&&ge){var ye=Fe.toSlateRange(m,U,{exactMatch:!1,suppressThrow:!0});ye&&(!Fe.isComposing(m)&&!(X!=null&&X.hasPendingChanges())&&!(X!=null&&X.isFlushing())?Me.select(m,ye):X==null||X.handleUserSelect(ye))}l&&(!de||!ge)&&Me.deselect(m)}},100),[m,l,B]),S=Ct(()=>WD(A,0),[A]);N.current=t$({node:C,onDOMSelectionChange:A,scheduleOnDOMSelectionChange:S}),Zi(()=>{var z,Y,G;C.current&&(G=pp(C.current))?(ay.set(m,G),ss.set(m,C.current),Uo.set(m,C.current),Yi.set(C.current,m)):Uo.delete(m);var{selection:X}=m,W=Fe.findDocumentOrShadowRoot(m),H=Ii(W);if(!(!H||!Fe.isFocused(m)||(z=N.current)!==null&&z!==void 0&&z.hasPendingAction())){var ne=de=>{var ge=H.type!=="None";if(!(!X&&!ge)){var ye=H.focusNode,Ne;if($a&&H.rangeCount>1){var xe=H.getRangeAt(0),be=H.getRangeAt(H.rangeCount-1);xe.startContainer===ye?Ne=be.endContainer:Ne=xe.startContainer}else Ne=H.anchorNode;var Ae=ss.get(m),me=!1;if(Ae.contains(Ne)&&Ae.contains(ye)&&(me=!0),ge&&me&&X&&!de){var Ee=Fe.toSlateRange(m,H,{exactMatch:!0,suppressThrow:!0});if(Ee&&De.equals(Ee,X)){var je;if(!B.hasMarkPlaceholder||(je=Ne)!==null&&je!==void 0&&(je=je.parentElement)!==null&&je!==void 0&&je.hasAttribute("data-slate-mark-placeholder"))return}}if(X&&!Fe.hasRange(m,X)){m.selection=Fe.toSlateRange(m,H,{exactMatch:!1,suppressThrow:!0});return}B.isUpdatingSelection=!0;var Be=X&&Fe.toDOMRange(m,X);return Be?(Fe.isComposing(m)&&!tn?H.collapseToEnd():De.isBackward(X)?H.setBaseAndExtent(Be.endContainer,Be.endOffset,Be.startContainer,Be.startOffset):H.setBaseAndExtent(Be.startContainer,Be.startOffset,Be.endContainer,Be.endOffset),p(m,Be)):H.removeAllRanges(),Be}};H.rangeCount<=1&&ne();var U=((Y=N.current)===null||Y===void 0?void 0:Y.isFlushing())==="action";if(!tn||!U){setTimeout(()=>{B.isUpdatingSelection=!1});return}var ae=null,re=requestAnimationFrame(()=>{if(U){var de=ge=>{try{var ye=Fe.toDOMNode(m,m);ye.focus(),ne(ge)}catch{}};de(),ae=setTimeout(()=>{de(!0),B.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(re),ae&&clearTimeout(ae)}}});var $=mt(z=>{var Y=Fe.toDOMNode(m,m),G=Y.getRootNode();if(k!=null&&k.current&&Lo&&G instanceof ShadowRoot){var X=z.getTargetRanges(),W=X[0],H=new window.Range;H.setStart(W.startContainer,W.startOffset),H.setEnd(W.endContainer,W.endOffset);var ne=Fe.toSlateRange(m,H,{exactMatch:!1,suppressThrow:!1});Me.select(m,ne),z.preventDefault(),z.stopImmediatePropagation();return}if(x(),!l&&Fe.hasEditableTarget(m,z.target)&&!T$(z,a)){var U;if(N.current)return N.current.handleDOMBeforeInput(z);S.flush(),A.flush();var{selection:ae}=m,{inputType:re}=z,de=z.dataTransfer||z.data||void 0,ge=re==="insertCompositionText"||re==="deleteCompositionText";if(ge&&Fe.isComposing(m))return;var ye=!1;if(re==="insertText"&&ae&&De.isCollapsed(ae)&&z.data&&z.data.length===1&&/[a-z ]/i.test(z.data)&&ae.anchor.offset!==0&&(ye=!0,m.marks&&(ye=!1),!ja.get(m))){var Ne,xe,{anchor:be}=ae,[Ae,me]=Fe.toDOMPoint(m,be),Ee=(Ne=Ae.parentElement)===null||Ne===void 0?void 0:Ne.closest("a"),je=Fe.getWindow(m);if(ye&&Ee&&Fe.hasDOMNode(m,Ee)){var Be,Ye=je==null?void 0:je.document.createTreeWalker(Ee,NodeFilter.SHOW_TEXT).lastChild();Ye===Ae&&((Be=Ye.textContent)===null||Be===void 0?void 0:Be.length)===me&&(ye=!1)}if(ye&&Ae.parentElement&&(je==null||(xe=je.getComputedStyle(Ae.parentElement))===null||xe===void 0?void 0:xe.whiteSpace)==="pre"){var Re=R.above(m,{at:be.path,match:We=>st.isElement(We)&&R.isBlock(m,We)});Re&&Ve.string(Re[0]).includes(" ")&&(ye=!1)}}if((!re.startsWith("delete")||re.startsWith("deleteBy"))&&!ja.get(m)){var[Te]=z.getTargetRanges();if(Te){var ue=Fe.toSlateRange(m,Te,{exactMatch:!1,suppressThrow:!1});if(!ae||!De.equals(ae,ue)){ye=!1;var ke=!ge&&m.selection&&R.rangeRef(m,m.selection);Me.select(m,ue),ke&&ji.set(m,ke)}}}if(ge)return;if(ye||z.preventDefault(),ae&&De.isExpanded(ae)&&re.startsWith("delete")){var Ke=re.endsWith("Backward")?"backward":"forward";R.deleteFragment(m,{direction:Ke});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"&&Fe.isComposing(m)&&(y(!1),Wo.set(m,!1)),(de==null?void 0:de.constructor.name)==="DataTransfer"?Fe.insertData(m,de):typeof de=="string"&&(ye?w.current.push(()=>R.insertText(m,de)):R.insertText(m,de));break}}var Ze=(U=ji.get(m))===null||U===void 0?void 0:U.unref();ji.delete(m),Ze&&(!m.selection||!De.equals(m.selection,Ze))&&Me.select(m,Ze)}},[m,A,x,a,l,S]),P=mt(z=>{z==null?(A.cancel(),S.cancel(),ss.delete(m),Uo.delete(m),C.current&&yo&&C.current.removeEventListener("beforeinput",$)):yo&&z.addEventListener("beforeinput",$),C.current=z,typeof t=="function"?t(z):t&&(t.current=z)},[A,S,m,$,t]);Zi(()=>{var z=Fe.getWindow(m);z.document.addEventListener("selectionchange",S);var Y=()=>{B.isDraggingInternally=!1};return z.document.addEventListener("dragend",Y),z.document.addEventListener("drop",Y),()=>{z.document.removeEventListener("selectionchange",S),z.document.removeEventListener("dragend",Y),z.document.removeEventListener("drop",Y)}},[S,B]);var F=o([m,[]]),I=i&&m.children.length===1&&Array.from(Ve.texts(m)).length===1&&Ve.string(m)===""&&!b,T=mt(z=>{if(z&&I){var Y;D((Y=z.getBoundingClientRect())===null||Y===void 0?void 0:Y.height)}else D(void 0)},[I]);if(I){var q=R.start(m,[]);F.push({[La]:!0,placeholder:i,onPlaceholderResize:T,anchor:q,focus:q})}var{marks:L}=m;if(B.hasMarkPlaceholder=!1,m.selection&&De.isCollapsed(m.selection)&&L){var{anchor:_}=m.selection,V=Ve.leaf(m,_.path),Z=_a(V,P$);if(!at.equals(V,L,{loose:!0})){B.hasMarkPlaceholder=!0;var J=Object.fromEntries(Object.keys(Z).map(z=>[z,null]));F.push(Kn(Kn(Kn({[ly]:!0},J),L),{},{anchor:_,focus:_}))}}return Bt(()=>{setTimeout(()=>{var{selection:z}=m;if(z){var{anchor:Y}=z,G=Ve.leaf(m,Y.path);if(L&&!at.equals(G,L,{loose:!0})){Rn.set(m,L);return}}Rn.delete(m)})}),oe.createElement(yy.Provider,{value:l},oe.createElement(A$.Provider,{value:b},oe.createElement(vy.Provider,{value:o},oe.createElement(O$,{node:C,receivedUserInput:O},oe.createElement(h,Kn(Kn({role:l?void 0:"textbox","aria-multiline":l?void 0:!0},g),{},{spellCheck:yo||!ls?g.spellCheck:!1,autoCorrect:yo||!ls?g.autoCorrect:"false",autoCapitalize:yo||!ls?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!l,zindex:-1,suppressContentEditableWarning:!0,ref:P,style:Kn(Kn({},v?{}:Kn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),f),onBeforeInput:mt(z=>{if(!yo&&!l&&!en(z,g.onBeforeInput)&&Fe.hasSelectableTarget(m,z.target)&&(z.preventDefault(),!Fe.isComposing(m))){var Y=z.data;R.insertText(m,Y)}},[g.onBeforeInput,m,l]),onInput:mt(z=>{if(!en(z,g.onInput)){if(N.current){N.current.handleInput();return}for(var Y of w.current)Y();if(w.current=[],!Fe.isFocused(m)){var G=z.nativeEvent,X=m;if(G.inputType==="historyUndo"&&typeof X.undo=="function"){X.undo();return}if(G.inputType==="historyRedo"&&typeof X.redo=="function"){X.redo();return}}}},[g.onInput,m]),onBlur:mt(z=>{if(!(l||B.isUpdatingSelection||!Fe.hasSelectableTarget(m,z.target)||en(z,g.onBlur))){var Y=Fe.findDocumentOrShadowRoot(m);if(B.latestElement!==Y.activeElement){var{relatedTarget:G}=z,X=Fe.toDOMNode(m,m);if(G!==X&&!(Sn(G)&&G.hasAttribute("data-slate-spacer"))){if(G!=null&&Fo(G)&&Fe.hasDOMNode(m,G)){var W=Fe.toSlateNode(m,G);if(st.isElement(W)&&!m.isVoid(W))return}if(Lo){var H=Ii(Y);H==null||H.removeAllRanges()}$o.delete(m)}}}},[l,B.isUpdatingSelection,B.latestElement,m,g.onBlur]),onClick:mt(z=>{if(Fe.hasTarget(m,z.target)&&!en(z,g.onClick)&&Fo(z.target)){var Y=Fe.toSlateNode(m,z.target),G=Fe.findPath(m,Y);if(!R.hasPath(m,G)||Ve.get(m,G)!==Y)return;if(z.detail===E$&&G.length>=1){var X=G;if(!(st.isElement(Y)&&R.isBlock(m,Y))){var W,H=R.above(m,{match:ye=>st.isElement(ye)&&R.isBlock(m,ye),at:G});X=(W=H==null?void 0:H[1])!==null&&W!==void 0?W:G.slice(0,1)}var ne=R.range(m,X);Me.select(m,ne);return}if(l)return;var U=R.start(m,G),ae=R.end(m,G),re=R.void(m,{at:U}),de=R.void(m,{at:ae});if(re&&de&&ie.equals(re[1],de[1])){var ge=R.range(m,U);Me.select(m,ge)}}},[m,g.onClick,l]),onCompositionEnd:mt(z=>{if(Fe.hasSelectableTarget(m,z.target)){var Y;if(Fe.isComposing(m)&&Promise.resolve().then(()=>{y(!1),Wo.set(m,!1)}),(Y=N.current)===null||Y===void 0||Y.handleCompositionEnd(z),en(z,g.onCompositionEnd)||tn)return;if(!Lo&&!kS&&!ny&&!SS&&!DS&&z.data){var G=Rn.get(m);Rn.delete(m),G!==void 0&&(co.set(m,m.marks),m.marks=G),R.insertText(m,z.data);var X=co.get(m);co.delete(m),X!==void 0&&(m.marks=X)}}},[g.onCompositionEnd,m]),onCompositionUpdate:mt(z=>{Fe.hasSelectableTarget(m,z.target)&&!en(z,g.onCompositionUpdate)&&(Fe.isComposing(m)||(y(!0),Wo.set(m,!0)))},[g.onCompositionUpdate,m]),onCompositionStart:mt(z=>{if(Fe.hasSelectableTarget(m,z.target)){var Y;if((Y=N.current)===null||Y===void 0||Y.handleCompositionStart(z),en(z,g.onCompositionStart)||tn)return;y(!0);var{selection:G}=m;if(G&&De.isExpanded(G)){R.deleteFragment(m);return}}},[g.onCompositionStart,m]),onCopy:mt(z=>{Fe.hasSelectableTarget(m,z.target)&&!en(z,g.onCopy)&&!ug(z)&&(z.preventDefault(),Fe.setFragmentData(m,z.clipboardData,"copy"))},[g.onCopy,m]),onCut:mt(z=>{if(!l&&Fe.hasSelectableTarget(m,z.target)&&!en(z,g.onCut)&&!ug(z)){z.preventDefault(),Fe.setFragmentData(m,z.clipboardData,"cut");var{selection:Y}=m;if(Y)if(De.isExpanded(Y))R.deleteFragment(m);else{var G=Ve.parent(m,Y.anchor.path);R.isVoid(m,G)&&Me.delete(m)}}},[l,m,g.onCut]),onDragOver:mt(z=>{if(Fe.hasTarget(m,z.target)&&!en(z,g.onDragOver)){var Y=Fe.toSlateNode(m,z.target);st.isElement(Y)&&R.isVoid(m,Y)&&z.preventDefault()}},[g.onDragOver,m]),onDragStart:mt(z=>{if(!l&&Fe.hasTarget(m,z.target)&&!en(z,g.onDragStart)){var Y=Fe.toSlateNode(m,z.target),G=Fe.findPath(m,Y),X=st.isElement(Y)&&R.isVoid(m,Y)||R.void(m,{at:G,voids:!0});if(X){var W=R.range(m,G);Me.select(m,W)}B.isDraggingInternally=!0,Fe.setFragmentData(m,z.dataTransfer,"drag")}},[l,m,g.onDragStart,B]),onDrop:mt(z=>{if(!l&&Fe.hasTarget(m,z.target)&&!en(z,g.onDrop)){z.preventDefault();var Y=m.selection,G=Fe.findEventRange(m,z),X=z.dataTransfer;Me.select(m,G),B.isDraggingInternally&&Y&&!De.equals(Y,G)&&!R.void(m,{at:G,voids:!0})&&Me.delete(m,{at:Y}),Fe.insertData(m,X),Fe.isFocused(m)||Fe.focus(m)}},[l,m,g.onDrop,B]),onDragEnd:mt(z=>{!l&&B.isDraggingInternally&&g.onDragEnd&&Fe.hasTarget(m,z.target)&&g.onDragEnd(z)},[l,B,g,m]),onFocus:mt(z=>{if(!l&&!B.isUpdatingSelection&&Fe.hasEditableTarget(m,z.target)&&!en(z,g.onFocus)){var Y=Fe.toDOMNode(m,m),G=Fe.findDocumentOrShadowRoot(m);if(B.latestElement=G.activeElement,$a&&z.target!==Y){Y.focus();return}$o.set(m,!0)}},[l,B,m,g.onFocus]),onKeyDown:mt(z=>{if(!l&&Fe.hasEditableTarget(m,z.target)){var Y;(Y=N.current)===null||Y===void 0||Y.handleKeyDown(z);var{nativeEvent:G}=z;if(Fe.isComposing(m)&&G.isComposing===!1&&(Wo.set(m,!1),y(!1)),en(z,g.onKeyDown)||Fe.isComposing(m))return;var{selection:X}=m,W=m.children[X!==null?X.focus.path[0]:0],H=Vb(Ve.string(W))==="rtl";if(dr.isRedo(G)){z.preventDefault();var ne=m;typeof ne.redo=="function"&&ne.redo();return}if(dr.isUndo(G)){z.preventDefault();var U=m;typeof U.undo=="function"&&U.undo();return}if(dr.isMoveLineBackward(G)){z.preventDefault(),Me.move(m,{unit:"line",reverse:!0});return}if(dr.isMoveLineForward(G)){z.preventDefault(),Me.move(m,{unit:"line"});return}if(dr.isExtendLineBackward(G)){z.preventDefault(),Me.move(m,{unit:"line",edge:"focus",reverse:!0});return}if(dr.isExtendLineForward(G)){z.preventDefault(),Me.move(m,{unit:"line",edge:"focus"});return}if(dr.isMoveBackward(G)){z.preventDefault(),X&&De.isCollapsed(X)?Me.move(m,{reverse:!H}):Me.collapse(m,{edge:H?"end":"start"});return}if(dr.isMoveForward(G)){z.preventDefault(),X&&De.isCollapsed(X)?Me.move(m,{reverse:H}):Me.collapse(m,{edge:H?"start":"end"});return}if(dr.isMoveWordBackward(G)){z.preventDefault(),X&&De.isExpanded(X)&&Me.collapse(m,{edge:"focus"}),Me.move(m,{unit:"word",reverse:!H});return}if(dr.isMoveWordForward(G)){z.preventDefault(),X&&De.isExpanded(X)&&Me.collapse(m,{edge:"focus"}),Me.move(m,{unit:"word",reverse:H});return}if(yo){if((oy||Lo)&&X&&(dr.isDeleteBackward(G)||dr.isDeleteForward(G))&&De.isCollapsed(X)){var ae=Ve.parent(m,X.anchor.path);if(st.isElement(ae)&&R.isVoid(m,ae)&&(R.isInline(m,ae)||R.isBlock(m,ae))){z.preventDefault(),R.deleteBackward(m,{unit:"block"});return}}}else{if(dr.isBold(G)||dr.isItalic(G)||dr.isTransposeCharacter(G)){z.preventDefault();return}if(dr.isSoftBreak(G)){z.preventDefault(),R.insertSoftBreak(m);return}if(dr.isSplitBlock(G)){z.preventDefault(),R.insertBreak(m);return}if(dr.isDeleteBackward(G)){z.preventDefault(),X&&De.isExpanded(X)?R.deleteFragment(m,{direction:"backward"}):R.deleteBackward(m);return}if(dr.isDeleteForward(G)){z.preventDefault(),X&&De.isExpanded(X)?R.deleteFragment(m,{direction:"forward"}):R.deleteForward(m);return}if(dr.isDeleteLineBackward(G)){z.preventDefault(),X&&De.isExpanded(X)?R.deleteFragment(m,{direction:"backward"}):R.deleteBackward(m,{unit:"line"});return}if(dr.isDeleteLineForward(G)){z.preventDefault(),X&&De.isExpanded(X)?R.deleteFragment(m,{direction:"forward"}):R.deleteForward(m,{unit:"line"});return}if(dr.isDeleteWordBackward(G)){z.preventDefault(),X&&De.isExpanded(X)?R.deleteFragment(m,{direction:"backward"}):R.deleteBackward(m,{unit:"word"});return}if(dr.isDeleteWordForward(G)){z.preventDefault(),X&&De.isExpanded(X)?R.deleteFragment(m,{direction:"forward"}):R.deleteForward(m,{unit:"word"});return}}}},[l,m,g.onKeyDown]),onPaste:mt(z=>{!l&&Fe.hasEditableTarget(m,z.target)&&!en(z,g.onPaste)&&(!yo||OS(z.nativeEvent)||Lo)&&(z.preventDefault(),Fe.insertData(m,z.clipboardData))},[l,m,g.onPaste])}),oe.createElement(N$,{decorations:F,node:m,renderElement:u,renderPlaceholder:c,renderLeaf:s,selection:m.selection}))))))}),j$=e=>{var{attributes:t,children:r}=e;return oe.createElement("span",Kn({},t),r,tn&&oe.createElement("br",null))},I$=()=>[],R$=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&De.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),GD(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},en=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},ug=e=>Fo(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),T$=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},M$=An(!1),z$=An({});function _$(e){var t=qe([]).current,r=qe({editor:e}).current,n=mt(a=>{r.editor=a,t.forEach(i=>i(a))},[t,r]),o=Ct(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var L$=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],xc=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:i}=e,l=_a(e,L$),[u,s]=oe.useState(()=>{if(!Ve.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:p}=_$(t),f=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)}s(b=>({v:b.v+1,editor:t})),p(t)},[t,p,n,o,a]);Bt(()=>(Cd.set(t,f),()=>{Cd.set(t,()=>{})}),[t,f]);var[h,v]=xt(Fe.isFocused(t));return Bt(()=>{v(Fe.isFocused(t))},[t]),Zi(()=>{var g=()=>v(Fe.isFocused(t));return ry>=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)})},[]),oe.createElement(z$.Provider,{value:c},oe.createElement(Cy.Provider,{value:u},oe.createElement(up.Provider,{value:u.editor},oe.createElement(M$.Provider,{value:h},r))))},cg=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},dg=(e,t,r)=>{var n=Fe.toDOMRange(e,t).getBoundingClientRect(),o=Fe.toDOMRange(e,r).getBoundingClientRect();return cg(n,o)&&cg(o,n)},H$=(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(dg(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;)dg(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 fg(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 pg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fg(Object(r),!0).forEach(function(n){$n(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var W$=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 su.set(r,new WeakMap),r.addMark=(u,s)=>{var c,p;(c=fp.get(r))===null||c===void 0||c(),!Rn.get(r)&&(p=un.get(r))!==null&&p!==void 0&&p.length&&Rn.set(r,null),co.delete(r),i(u,s)},r.removeMark=u=>{var s;!Rn.get(r)&&(s=un.get(r))!==null&&s!==void 0&&s.length&&Rn.set(r,null),co.delete(r),l(u)},r.deleteBackward=u=>{if(u!=="line")return a(u);if(r.selection&&De.isCollapsed(r.selection)){var s=R.above(r,{match:h=>st.isElement(h)&&R.isBlock(r,h),at:r.selection});if(s){var[,c]=s,p=R.range(r,c,r.selection.anchor),f=H$(r,p);De.isCollapsed(f)||Me.delete(r,{at:f})}}},r.apply=u=>{var s=[],c=[],p=un.get(r);if(p!=null&&p.length){var f=p.map(A=>KS(A,u)).filter(Boolean);un.set(r,f)}var h=Do.get(r);h&&Do.set(r,eg(r,h,u));var v=ko.get(r);if(v!=null&&v.at){var g=Tt.isPoint(v==null?void 0:v.at)?Ed(r,v.at,u):eg(r,v.at,u);ko.set(r,g?pg(pg({},v),{},{at:g}):null)}switch(u.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{s.push(...ma(r,u.path));break}case"set_selection":{var m;(m=ji.get(r))===null||m===void 0||m.unref(),ji.delete(r);break}case"insert_node":case"remove_node":{s.push(...ma(r,ie.parent(u.path)));break}case"merge_node":{var b=ie.previous(u.path);s.push(...ma(r,b));break}case"move_node":{var y=ie.common(ie.parent(u.path),ie.parent(u.newPath));s.push(...ma(r,y));var C;ie.isBefore(u.path,u.newPath)?(s.push(...ma(r,ie.parent(u.path))),C=u.newPath):(s.push(...ma(r,ie.parent(u.newPath))),C=u.path);var w=Ve.get(e,ie.parent(C)),E=Fe.findKey(r,w),D=R.pathRef(r,ie.parent(C));c.push([D,E]);break}}switch(n(u),u.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":ja.set(r,!0)}for(var[k,x]of s){var[O]=R.node(r,k);Ps.set(O,x)}for(var[j,B]of c){if(j.current){var[N]=R.node(r,j.current);Ps.set(N,B)}j.unref()}},r.setFragmentData=u=>{var{selection:s}=r;if(s){var[c,p]=De.edges(s),f=R.void(r,{at:c.path}),h=R.void(r,{at:p.path});if(!(De.isCollapsed(s)&&!f)){var v=Fe.toDOMRange(r,s),g=v.cloneContents(),m=g.childNodes[0];if(g.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(m=O)}),h){var[b]=h,y=v.cloneRange(),C=Fe.toDOMNode(r,b);y.setEndAfter(C),g=y.cloneContents()}if(f&&(m=g.querySelector("[data-slate-spacer]")),Array.from(g.querySelectorAll("[data-slate-zero-width]")).forEach(O=>{var j=O.getAttribute("data-slate-zero-width")==="n";O.textContent=j?`
24
+ `:""}),uy(m)){var w=m.ownerDocument.createElement("span");w.style.whiteSpace="pre",w.appendChild(m),g.appendChild(w),m=w}var E=r.getFragment(),D=JSON.stringify(E),k=window.btoa(encodeURIComponent(D));m.setAttribute("data-slate-fragment",k),u.setData("application/".concat(t),k);var x=g.ownerDocument.createElement("div");return x.appendChild(g),x.setAttribute("hidden","true"),g.ownerDocument.body.appendChild(x),u.setData("text/html",x.innerHTML),u.setData("text/plain",dy(x)),g.ownerDocument.body.removeChild(x),u}}},r.insertData=u=>{r.insertFragmentData(u)||r.insertTextData(u)},r.insertFragmentData=u=>{var s=u.getData("application/".concat(t))||jS(u);if(s){var c=decodeURIComponent(window.atob(s)),p=JSON.parse(c);return r.insertFragment(p),!0}return!1},r.insertTextData=u=>{var s=u.getData("text/plain");if(s){var c=s.split(/\r\n|\r|\n/),p=!1;for(var f of c)p&&Me.splitNodes(r,{always:!0}),r.insertText(f),p=!0;return!0}return!1},r.onChange=u=>{var s=ry<18?Wi.unstable_batchedUpdates:c=>c();s(()=>{var c=Cd.get(r);c&&c(u),o(u)})},r},ma=(e,t)=>{var r=[];for(var[n,o]of R.levels(e,{at:t})){var a=Fe.findKey(e,n);r.push([o,a])}return r};function hp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ia=hp();function Ey(e){ia=e}var Ri={exec:()=>null};function Jt(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(rn.caret,"$1"),r=r.replace(o,i),n},getRegex:()=>new RegExp(r,t)};return n}var rn={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")},K$=/^(?:[ \t]*(?:\n|$))+/,q$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,V$=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Cl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,X$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,gp=/(?:[*+-]|\d{1,9}[.)])/,ky=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Dy=Jt(ky).replace(/bull/g,gp).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$=Jt(ky).replace(/bull/g,gp).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(),vp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,G$=/^[^\n]+/,bp=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Y$=Jt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bp).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Z$=Jt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,gp).getRegex(),uu="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",yp=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,J$=Jt("^ {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",yp).replace("tag",uu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Sy=Jt(vp).replace("hr",Cl).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",uu).getRegex(),Q$=Jt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Sy).getRegex(),Cp={blockquote:Q$,code:q$,def:Y$,fences:V$,heading:X$,hr:Cl,html:J$,lheading:Dy,list:Z$,newline:K$,paragraph:Sy,table:Ri,text:G$},mg=Jt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cl).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",uu).getRegex(),e2={...Cp,lheading:U$,table:mg,paragraph:Jt(vp).replace("hr",Cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",mg).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",uu).getRegex()},t2={...Cp,html:Jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yp).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:Ri,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jt(vp).replace("hr",Cl).replace("heading",` *#{1,6} *[^
25
+ ]`).replace("lheading",Dy).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},r2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,n2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$y=/^( {2,}|\\)\n(?!\s*$)/,o2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,cu=/[\p{P}\p{S}]/u,xp=/[\s\p{P}\p{S}]/u,By=/[^\s\p{P}\p{S}]/u,a2=Jt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,xp).getRegex(),Oy=/(?!~)[\p{P}\p{S}]/u,i2=/(?!~)[\s\p{P}\p{S}]/u,l2=/(?:[^\s\p{P}\p{S}]|~)/u,s2=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Ay=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,u2=Jt(Ay,"u").replace(/punct/g,cu).getRegex(),c2=Jt(Ay,"u").replace(/punct/g,Oy).getRegex(),Fy="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",d2=Jt(Fy,"gu").replace(/notPunctSpace/g,By).replace(/punctSpace/g,xp).replace(/punct/g,cu).getRegex(),f2=Jt(Fy,"gu").replace(/notPunctSpace/g,l2).replace(/punctSpace/g,i2).replace(/punct/g,Oy).getRegex(),p2=Jt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,By).replace(/punctSpace/g,xp).replace(/punct/g,cu).getRegex(),m2=Jt(/\\(punct)/,"gu").replace(/punct/g,cu).getRegex(),h2=Jt(/^<(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(),g2=Jt(yp).replace("(?:-->|$)","-->").getRegex(),v2=Jt("^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",g2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ns=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,b2=Jt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ns).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Py=Jt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ns).replace("ref",bp).getRegex(),Ny=Jt(/^!?\[(ref)\](?:\[\])?/).replace("ref",bp).getRegex(),y2=Jt("reflink|nolink(?!\\()","g").replace("reflink",Py).replace("nolink",Ny).getRegex(),wp={_backpedal:Ri,anyPunctuation:m2,autolink:h2,blockSkip:s2,br:$y,code:n2,del:Ri,emStrongLDelim:u2,emStrongRDelimAst:d2,emStrongRDelimUnd:p2,escape:r2,link:b2,nolink:Ny,punctuation:a2,reflink:Py,reflinkSearch:y2,tag:v2,text:o2,url:Ri},C2={...wp,link:Jt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ns).getRegex(),reflink:Jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ns).getRegex()},Dd={...wp,emStrongRDelimAst:f2,emStrongLDelim:c2,url:Jt(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},x2={...Dd,br:Jt($y).replace("{2,}","*").getRegex(),text:Jt(Dd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Kl={normal:Cp,gfm:e2,pedantic:t2},bi={normal:wp,gfm:Dd,breaks:x2,pedantic:C2},w2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},hg=e=>w2[e];function qn(e,t){if(t){if(rn.escapeTest.test(e))return e.replace(rn.escapeReplace,hg)}else if(rn.escapeTestNoEncode.test(e))return e.replace(rn.escapeReplaceNoEncode,hg);return e}function gg(e){try{e=encodeURI(e).replace(rn.percentDecode,"%")}catch{return null}return e}function vg(e,t){var a;const r=e.replace(rn.findPipe,(i,l,u)=>{let s=!1,c=l;for(;--c>=0&&u[c]==="\\";)s=!s;return s?"|":" |"}),n=r.split(rn.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(rn.slashPipe,"|");return n}function yi(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 E2(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 bg(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 u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:i,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u}function k2(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 js=class{constructor(e){or(this,"options"),or(this,"rules"),or(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:yi(r,`
28
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=k2(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=yi(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:yi(t[0],`
29
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=yi(t[0],`
30
+ `).split(`
31
+ `),n="",o="";const a=[];for(;r.length>0;){let i=!1;const l=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))l.push(r[u]),i=!0;else if(!i)l.push(r[u]);else break;r=r.slice(u);const s=l.join(`
32
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
33
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
34
+ ${s}`:s,o=o?`${o}
35
+ ${c}`:c;const p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=p,r.length===0)break;const f=a.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){const h=f,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((f==null?void 0:f.type)==="list"){const h=f,v=h.raw+`
38
+ `+r.join(`
39
+ `),g=this.list(v);a[a.length-1]=g,n=n.substring(0,n.length-f.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 u=!1,s="",c="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let p=t[2].split(`
41
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=e.split(`
42
+ `,1)[0],h=!p.trim(),v=0;if(this.options.pedantic?(v=2,c=p.trimStart()):h?v=t[1].length+1:(v=t[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,c=p.slice(v),v+=t[1].length),h&&this.rules.other.blankLine.test(f)&&(s+=f+`
43
+ `,e=e.substring(f.length+1),u=!0),!u){const b=this.rules.other.nextBulletRegex(v),y=this.rules.other.hrRegex(v),C=this.rules.other.fencesBeginRegex(v),w=this.rules.other.headingBeginRegex(v),E=this.rules.other.htmlBeginRegex(v);for(;e;){const D=e.split(`
44
+ `,1)[0];let k;if(f=D,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),k=f):k=f.replace(this.rules.other.tabCharGlobal," "),C.test(f)||w.test(f)||E.test(f)||b.test(f)||y.test(f))break;if(k.search(this.rules.other.nonSpaceChar)>=v||!f.trim())c+=`
45
+ `+k.slice(v);else{if(h||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(p)||w.test(p)||y.test(p))break;c+=`
46
+ `+f}!h&&!f.trim()&&(h=!0),s+=D+`
47
+ `,e=e.substring(D.length+1),p=k.slice(v)}}o.loose||(i?o.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(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:s,task:!!g,checked:m,loose:!1,text:c,tokens:[]}),o.raw+=s}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 u=0;u<o.items.length;u++)if(this.lexer.state.top=!1,o.items[u].tokens=this.lexer.blockTokens(o.items[u].text,[]),!o.loose){const s=o.items[u].tokens.filter(p=>p.type==="space"),c=s.length>0&&s.some(p=>this.rules.other.anyLine.test(p.raw));o.loose=c}if(o.loose)for(let u=0;u<o.items.length;u++)o.items[u].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=vg(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(vg(l,a.header.length).map((u,s)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[s]})));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=yi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=E2(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)),bg(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 bg(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,u=0;const s=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+o);(n=s.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)){u+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+u);const c=[...n[0]][0].length,p=e.slice(0,o+n.index+c+i);if(Math.min(o,i)%2){const h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}const f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}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}}}},fo=class Sd{constructor(t){or(this,"tokens"),or(this,"options"),or(this,"state"),or(this,"tokenizer"),or(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ia,this.options.tokenizer=this.options.tokenizer||new js,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:rn,block:Kl.normal,inline:bi.normal};this.options.pedantic?(r.block=Kl.pedantic,r.inline=bi.pedantic):this.options.gfm&&(r.block=Kl.gfm,this.options.breaks?r.inline=bi.breaks:r.inline=bi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Kl,inline:bi}}static lex(t,r){return new Sd(r).lex(t)}static lexInline(t,r){return new Sd(r).inlineTokens(t)}lex(t){t=t.replace(rn.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(rn.tabCharGlobal," ").replace(rn.spaceLine,""));t;){let l;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(s=>(l=s.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 s=r.at(-1);l.raw.length===1&&s!==void 0?s.raw+=`
51
+ `:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="paragraph"||(s==null?void 0:s.type)==="text"?(s.raw+=`
52
+ `+l.raw,s.text+=`
53
+ `+l.text,this.inlineQueue.at(-1).src=s.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 s=r.at(-1);(s==null?void 0:s.type)==="paragraph"||(s==null?void 0:s.type)==="text"?(s.raw+=`
54
+ `+l.raw,s.text+=`
55
+ `+l.raw,this.inlineQueue.at(-1).src=s.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 u=t;if((i=this.options.extensions)!=null&&i.startBlock){let s=1/0;const c=t.slice(1);let p;this.options.extensions.startBlock.forEach(f=>{p=f.call({lexer:this},c),typeof p=="number"&&p>=0&&(s=Math.min(s,p))}),s<1/0&&s>=0&&(u=t.substring(0,s+1))}if(this.state.top&&(l=this.tokenizer.paragraph(u))){const s=r.at(-1);n&&(s==null?void 0:s.type)==="paragraph"?(s.raw+=`
56
+ `+l.raw,s.text+=`
57
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(l),n=u.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="text"?(s.raw+=`
58
+ `+l.raw,s.text+=`
59
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(l);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,u,s;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((u=(l=this.options.extensions)==null?void 0:l.inline)!=null&&u.some(f=>(c=f.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 f=r.at(-1);c.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.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 p=t;if((s=this.options.extensions)!=null&&s.startInline){let f=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&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(p=t.substring(0,f+1))}if(c=this.tokenizer.inlineText(p)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(i=c.raw.slice(-1)),a=!0;const f=r.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):r.push(c);continue}if(t){const f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},Is=class{constructor(e){or(this,"options"),or(this,"parser"),this.options=e||ia}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(rn.notSpaceStart))==null?void 0:a[0],o=e.replace(rn.endingNewline,"")+`
60
+ `;return n?'<pre><code class="language-'+qn(n)+'">'+(r?o:qn(o,!0))+`</code></pre>
61
+ `:"<pre><code>"+(r?o:qn(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+" "+qn(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>${qn(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=gg(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+qn(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=gg(e);if(o===null)return qn(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${qn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:qn(e.text)}},Ep=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""}},po=class $d{constructor(t){or(this,"options"),or(this,"renderer"),or(this,"textRenderer"),this.options=t||ia,this.options.renderer=this.options.renderer||new Is,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ep}static parse(t,r){return new $d(r).parse(t)}static parseInline(t,r){return new $d(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 s=l,c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){n+=c||"";continue}}const u=l;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let s=u,c=this.renderer.text(s);for(;i+1<t.length&&t[i+1].type==="text";)s=t[++i],c+=`
78
+ `+this.renderer.text(s);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 s='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}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 s=this.options.extensions.renderers[l.type].call({parser:this},l);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=s||"";continue}}const u=l;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{const s='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}},wc,us=(wc=class{constructor(e){or(this,"options"),or(this,"block"),this.options=e||ia}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?fo.lex:fo.lexInline}provideParser(){return this.block?po.parse:po.parseInline}},or(wc,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),wc),D2=class{constructor(...e){or(this,"defaults",hp()),or(this,"options",this.setOptions),or(this,"parse",this.parseMarkdown(!0)),or(this,"parseInline",this.parseMarkdown(!1)),or(this,"Parser",po),or(this,"Renderer",Is),or(this,"TextRenderer",Ep),or(this,"Lexer",fo),or(this,"Tokenizer",js),or(this,"Hooks",us),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 u of l)r=r.concat(this.walkTokens(u.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 u=i[l].flat(1/0);r=r.concat(this.walkTokens(u,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 Is(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],u=o[i];o[i]=(...s)=>{let c=l.apply(o,s);return c===!1&&(c=u.apply(o,s)),c||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new js(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],u=o[i];o[i]=(...s)=>{let c=l.apply(o,s);return c===!1&&(c=u.apply(o,s)),c}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new us;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],u=o[i];us.passThroughHooks.has(a)?o[i]=s=>{if(this.defaults.async)return Promise.resolve(l.call(o,s)).then(p=>u.call(o,p));const c=l.call(o,s);return u.call(o,c)}:o[i]=(...s)=>{let c=l.apply(o,s);return c===!1&&(c=u.apply(o,s)),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 fo.lex(e,t??this.defaults)}parser(e,t){return po.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?fo.lex:fo.lexInline,l=o.hooks?o.hooks.provideParser():e?po.parse:po.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(u=>i(u,o)).then(u=>o.hooks?o.hooks.processAllTokens(u):u).then(u=>o.walkTokens?Promise.all(this.walkTokens(u,o.walkTokens)).then(()=>u):u).then(u=>l(u,o)).then(u=>o.hooks?o.hooks.postprocess(u):u).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let u=i(t,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let s=l(u,o);return o.hooks&&(s=o.hooks.postprocess(s)),s}catch(u){return a(u)}}}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>"+qn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},ta=new D2;function Vt(e,t){return ta.parse(e,t)}Vt.options=Vt.setOptions=function(e){return ta.setOptions(e),Vt.defaults=ta.defaults,Ey(Vt.defaults),Vt};Vt.getDefaults=hp;Vt.defaults=ia;Vt.use=function(...e){return ta.use(...e),Vt.defaults=ta.defaults,Ey(Vt.defaults),Vt};Vt.walkTokens=function(e,t){return ta.walkTokens(e,t)};Vt.parseInline=ta.parseInline;Vt.Parser=po;Vt.parser=po.parse;Vt.Renderer=Is;Vt.TextRenderer=Ep;Vt.Lexer=fo;Vt.lexer=fo.lex;Vt.Tokenizer=js;Vt.Hooks=us;Vt.parse=Vt;Vt.options;Vt.setOptions;Vt.use;Vt.walkTokens;Vt.parseInline;po.parse;fo.lex;var dn=function(){return dn=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},dn.apply(this,arguments)};function Rs(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 ir="-ms-",Ti="-moz-",Zt="-webkit-",jy="comm",du="rule",kp="decl",S2="@import",Iy="@keyframes",$2="@layer",Ry=Math.abs,Dp=String.fromCharCode,Bd=Object.assign;function B2(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 Ty(e){return e.trim()}function so(e,t){return(e=t.exec(e))?e[0]:e}function Rt(e,t,r){return e.replace(t,r)}function cs(e,t,r){return e.indexOf(t,r)}function jr(e,t){return e.charCodeAt(t)|0}function Ha(e,t,r){return e.slice(t,r)}function Un(e){return e.length}function My(e){return e.length}function $i(e,t){return t.push(e),e}function O2(e,t){return e.map(t).join("")}function yg(e,t){return e.filter(function(r){return!so(r,t)})}var fu=1,Wa=1,zy=0,Bn=0,Cr=0,ai="";function pu(e,t,r,n,o,a,i,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:fu,column:Wa,length:i,return:"",siblings:l}}function xo(e,t){return Bd(pu("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ha(e){for(;e.root;)e=xo(e.root,{children:[e]});$i(e,e.siblings)}function A2(){return Cr}function F2(){return Cr=Bn>0?jr(ai,--Bn):0,Wa--,Cr===10&&(Wa=1,fu--),Cr}function Tn(){return Cr=Bn<zy?jr(ai,Bn++):0,Wa++,Cr===10&&(Wa=1,fu++),Cr}function Go(){return jr(ai,Bn)}function ds(){return Bn}function mu(e,t){return Ha(ai,e,t)}function Od(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 P2(e){return fu=Wa=1,zy=Un(ai=e),Bn=0,[]}function N2(e){return ai="",e}function Ec(e){return Ty(mu(Bn-1,Ad(e===91?e+2:e===40?e+1:e)))}function j2(e){for(;(Cr=Go())&&Cr<33;)Tn();return Od(e)>2||Od(Cr)>3?"":" "}function I2(e,t){for(;--t&&Tn()&&!(Cr<48||Cr>102||Cr>57&&Cr<65||Cr>70&&Cr<97););return mu(e,ds()+(t<6&&Go()==32&&Tn()==32))}function Ad(e){for(;Tn();)switch(Cr){case e:return Bn;case 34:case 39:e!==34&&e!==39&&Ad(Cr);break;case 40:e===41&&Ad(e);break;case 92:Tn();break}return Bn}function R2(e,t){for(;Tn()&&e+Cr!==57&&!(e+Cr===84&&Go()===47););return"/*"+mu(t,Bn-1)+"*"+Dp(e===47?e:Tn())}function T2(e){for(;!Od(Go());)Tn();return mu(e,Bn)}function M2(e){return N2(fs("",null,null,null,[""],e=P2(e),0,[0],e))}function fs(e,t,r,n,o,a,i,l,u){for(var s=0,c=0,p=i,f=0,h=0,v=0,g=1,m=1,b=1,y=0,C="",w=o,E=a,D=n,k=C;m;)switch(v=y,y=Tn()){case 40:if(v!=108&&jr(k,p-1)==58){cs(k+=Rt(Ec(y),"&","&\f"),"&\f",Ry(s?l[s-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Ec(y);break;case 9:case 10:case 13:case 32:k+=j2(v);break;case 92:k+=I2(ds()-1,7);continue;case 47:switch(Go()){case 42:case 47:$i(z2(R2(Tn(),ds()),t,r,u),u);break;default:k+="/"}break;case 123*g:l[s++]=Un(k)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:b==-1&&(k=Rt(k,/\f/g,"")),h>0&&Un(k)-p&&$i(h>32?xg(k+";",n,r,p-1,u):xg(Rt(k," ","")+";",n,r,p-2,u),u);break;case 59:k+=";";default:if($i(D=Cg(k,t,r,s,c,o,l,C,w=[],E=[],p,a),a),y===123)if(c===0)fs(k,t,D,D,w,a,p,l,E);else switch(f===99&&jr(k,3)===110?100:f){case 100:case 108:case 109:case 115:fs(e,D,D,n&&$i(Cg(e,D,D,0,0,o,l,C,o,w=[],p,E),E),o,E,p,l,n?w:E);break;default:fs(k,D,D,D,[""],E,0,l,E)}}s=c=h=0,g=b=1,C=k="",p=i;break;case 58:p=1+Un(k),h=v;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&F2()==125)continue}switch(k+=Dp(y),y*g){case 38:b=c>0?1:(k+="\f",-1);break;case 44:l[s++]=(Un(k)-1)*b,b=1;break;case 64:Go()===45&&(k+=Ec(Tn())),f=Go(),c=p=Un(C=k+=T2(ds())),y++;break;case 45:v===45&&Un(k)==2&&(g=0)}}return a}function Cg(e,t,r,n,o,a,i,l,u,s,c,p){for(var f=o-1,h=o===0?a:[""],v=My(h),g=0,m=0,b=0;g<n;++g)for(var y=0,C=Ha(e,f+1,f=Ry(m=i[g])),w=e;y<v;++y)(w=Ty(m>0?h[y]+" "+C:Rt(C,/&\f/g,h[y])))&&(u[b++]=w);return pu(e,t,r,o===0?du:l,u,s,c,p)}function z2(e,t,r,n){return pu(e,t,r,jy,Dp(A2()),Ha(e,2,-2),0,n)}function xg(e,t,r,n,o){return pu(e,t,r,kp,Ha(e,0,n),Ha(e,n+1,-1),n,o)}function _y(e,t,r){switch(B2(e,t)){case 5103:return Zt+"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 Zt+e+e;case 4789:return Ti+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Zt+e+Ti+e+ir+e+e;case 5936:switch(jr(e,t+11)){case 114:return Zt+e+ir+Rt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Zt+e+ir+Rt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Zt+e+ir+Rt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Zt+e+ir+e+e;case 6165:return Zt+e+ir+"flex-"+e+e;case 5187:return Zt+e+Rt(e,/(\w+).+(:[^]+)/,Zt+"box-$1$2"+ir+"flex-$1$2")+e;case 5443:return Zt+e+ir+"flex-item-"+Rt(e,/flex-|-self/g,"")+(so(e,/flex-|baseline/)?"":ir+"grid-row-"+Rt(e,/flex-|-self/g,""))+e;case 4675:return Zt+e+ir+"flex-line-pack"+Rt(e,/align-content|flex-|-self/g,"")+e;case 5548:return Zt+e+ir+Rt(e,"shrink","negative")+e;case 5292:return Zt+e+ir+Rt(e,"basis","preferred-size")+e;case 6060:return Zt+"box-"+Rt(e,"-grow","")+Zt+e+ir+Rt(e,"grow","positive")+e;case 4554:return Zt+Rt(e,/([^-])(transform)/g,"$1"+Zt+"$2")+e;case 6187:return Rt(Rt(Rt(e,/(zoom-|grab)/,Zt+"$1"),/(image-set)/,Zt+"$1"),e,"")+e;case 5495:case 3959:return Rt(e,/(image-set\([^]*)/,Zt+"$1$`$1");case 4968:return Rt(Rt(e,/(.+:)(flex-)?(.*)/,Zt+"box-pack:$3"+ir+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Zt+e+e;case 4200:if(!so(e,/flex-|baseline/))return ir+"grid-column-align"+Ha(e,t)+e;break;case 2592:case 3360:return ir+Rt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,so(n.props,/grid-\w+-end/)})?~cs(e+(r=r[t].value),"span",0)?e:ir+Rt(e,"-start","")+e+ir+"grid-row-span:"+(~cs(r,"span",0)?so(r,/\d+/):+so(r,/\d+/)-+so(e,/\d+/))+";":ir+Rt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return so(n.props,/grid-\w+-start/)})?e:ir+Rt(Rt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Rt(e,/(.+)-inline(.+)/,Zt+"$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(Un(e)-1-t>6)switch(jr(e,t+1)){case 109:if(jr(e,t+4)!==45)break;case 102:return Rt(e,/(.+:)(.+)-([^]+)/,"$1"+Zt+"$2-$3$1"+Ti+(jr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~cs(e,"stretch",0)?_y(Rt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Rt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,i,l,u,s){return ir+o+":"+a+s+(i?ir+o+"-span:"+(l?u:+u-+a)+s:"")+e});case 4949:if(jr(e,t+6)===121)return Rt(e,":",":"+Zt)+e;break;case 6444:switch(jr(e,jr(e,14)===45?18:11)){case 120:return Rt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Zt+(jr(e,14)===45?"inline-":"")+"box$3$1"+Zt+"$2$3$1"+ir+"$2box$3")+e;case 100:return Rt(e,":",":"+ir)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Rt(e,"scroll-","scroll-snap-")+e}return e}function Ts(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function _2(e,t,r,n){switch(e.type){case $2:if(e.children.length)break;case S2:case kp:return e.return=e.return||e.value;case jy:return"";case Iy:return e.return=e.value+"{"+Ts(e.children,n)+"}";case du:if(!Un(e.value=e.props.join(",")))return""}return Un(r=Ts(e.children,n))?e.return=e.value+"{"+r+"}":""}function L2(e){var t=My(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 H2(e){return function(t){t.root||(t=t.return)&&e(t)}}function W2(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case kp:e.return=_y(e.value,e.length,r);return;case Iy:return Ts([xo(e,{value:Rt(e.value,"@","@"+Zt)})],n);case du:if(e.length)return O2(r=e.props,function(o){switch(so(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ha(xo(e,{props:[Rt(o,/:(read-\w+)/,":"+Ti+"$1")]})),ha(xo(e,{props:[o]})),Bd(e,{props:yg(r,n)});break;case"::placeholder":ha(xo(e,{props:[Rt(o,/:(plac\w+)/,":"+Zt+"input-$1")]})),ha(xo(e,{props:[Rt(o,/:(plac\w+)/,":"+Ti+"$1")]})),ha(xo(e,{props:[Rt(o,/:(plac\w+)/,ir+"input-$1")]})),ha(xo(e,{props:[o]})),Bd(e,{props:yg(r,n)});break}return""})}}var K2={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},Ka=typeof process<"u"&&bn!==void 0&&(bn.REACT_APP_SC_ATTR||bn.SC_ATTR)||"data-styled",Ly="active",Hy="data-styled-version",hu="6.1.19",Sp=`/*!sc*/
80
+ `,Ms=typeof window<"u"&&typeof document<"u",q2=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&bn!==void 0&&bn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&bn.REACT_APP_SC_DISABLE_SPEEDY!==""?bn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&bn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&bn!==void 0&&bn.SC_DISABLE_SPEEDY!==void 0&&bn.SC_DISABLE_SPEEDY!==""&&bn.SC_DISABLE_SPEEDY!=="false"&&bn.SC_DISABLE_SPEEDY),gu=Object.freeze([]),qa=Object.freeze({});function V2(e,t,r){return r===void 0&&(r=qa),e.theme!==r.theme&&e.theme||t||r.theme}var Wy=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"]),X2=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,U2=/(^-|-$)/g;function wg(e){return e.replace(X2,"-").replace(U2,"")}var G2=/(a)(d)/gi,ql=52,Eg=function(e){return String.fromCharCode(e+(e>25?39:97))};function Fd(e){var t,r="";for(t=Math.abs(e);t>ql;t=t/ql|0)r=Eg(t%ql)+r;return(Eg(t%ql)+r).replace(G2,"$1-$2")}var kc,Ky=5381,Ba=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},qy=function(e){return Ba(Ky,e)};function Y2(e){return Fd(qy(e)>>>0)}function Z2(e){return e.displayName||e.name||"Component"}function Dc(e){return typeof e=="string"&&!0}var Vy=typeof Symbol=="function"&&Symbol.for,Xy=Vy?Symbol.for("react.memo"):60115,J2=Vy?Symbol.for("react.forward_ref"):60112,Q2={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},eB={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Uy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tB=((kc={})[J2]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},kc[Xy]=Uy,kc);function kg(e){return("type"in(t=e)&&t.type.$$typeof)===Xy?Uy:"$$typeof"in e?tB[e.$$typeof]:Q2;var t}var rB=Object.defineProperty,nB=Object.getOwnPropertyNames,Dg=Object.getOwnPropertySymbols,oB=Object.getOwnPropertyDescriptor,aB=Object.getPrototypeOf,Sg=Object.prototype;function Gy(e,t,r){if(typeof t!="string"){if(Sg){var n=aB(t);n&&n!==Sg&&Gy(e,n,r)}var o=nB(t);Dg&&(o=o.concat(Dg(t)));for(var a=kg(e),i=kg(t),l=0;l<o.length;++l){var u=o[l];if(!(u in eB||r&&r[u]||i&&u in i||a&&u in a)){var s=oB(t,u);try{rB(e,u,s)}catch{}}}}return e}function Va(e){return typeof e=="function"}function $p(e){return typeof e=="object"&&"styledComponentId"in e}function Ko(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function $g(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Ji(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Pd(e,t,r){if(r===void 0&&(r=!1),!r&&!Ji(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Pd(e[n],t[n]);else if(Ji(t))for(var n in t)e[n]=Pd(e[n],t[n]);return e}function Bp(e,t){Object.defineProperty(e,"toString",{value:t})}function xl(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 iB=(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 xl(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),u=(i=0,r.length);i<u;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(Sp);return r},e})(),ps=new Map,zs=new Map,ms=1,Vl=function(e){if(ps.has(e))return ps.get(e);for(;zs.has(ms);)ms++;var t=ms++;return ps.set(e,t),zs.set(t,e),t},lB=function(e,t){ms=t+1,ps.set(e,t),zs.set(t,e)},sB="style[".concat(Ka,"][").concat(Hy,'="').concat(hu,'"]'),uB=new RegExp("^".concat(Ka,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),cB=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)},dB=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(Sp),o=[],a=0,i=n.length;a<i;a++){var l=n[a].trim();if(l){var u=l.match(uB);if(u){var s=0|parseInt(u[1],10),c=u[2];s!==0&&(lB(c,s),cB(e,c,u[3]),e.getTag().insertRules(s,o)),o.length=0}else o.push(l)}}},Bg=function(e){for(var t=document.querySelectorAll(sB),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(Ka)!==Ly&&(dB(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function fB(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Yy=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(l){var u=Array.from(l.querySelectorAll("style[".concat(Ka,"]")));return u[u.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(Ka,Ly),n.setAttribute(Hy,hu);var i=fB();return i&&n.setAttribute("nonce",i),r.insertBefore(n,a),n},pB=(function(){function e(t){this.element=Yy(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 xl(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})(),mB=(function(){function e(t){this.element=Yy(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})(),hB=(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})(),Og=Ms,gB={isServer:!Ms,useCSSOMInjection:!q2},Zy=(function(){function e(t,r,n){t===void 0&&(t=qa),r===void 0&&(r={});var o=this;this.options=dn(dn({},gB),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&Ms&&Og&&(Og=!1,Bg(this)),Bp(this,function(){return(function(a){for(var i=a.getTag(),l=i.length,u="",s=function(p){var f=(function(b){return zs.get(b)})(p);if(f===void 0)return"continue";var h=a.names.get(f),v=i.getGroup(p);if(h===void 0||!h.size||v.length===0)return"continue";var g="".concat(Ka,".g").concat(p,'[id="').concat(f,'"]'),m="";h!==void 0&&h.forEach(function(b){b.length>0&&(m+="".concat(b,","))}),u+="".concat(v).concat(g,'{content:"').concat(m,'"}').concat(Sp)},c=0;c<l;c++)s(c);return u})(o)})}return e.registerId=function(t){return Vl(t)},e.prototype.rehydrate=function(){!this.server&&Ms&&Bg(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(dn(dn({},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 hB(o):n?new pB(o):new mB(o)})(this.options),new iB(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(Vl(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(Vl(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Vl(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),vB=/&/g,bB=/^\s*\/\/.*$/gm;function Jy(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=Jy(r.children,t)),r})}function yB(e){var t,r,n,o=qa,a=o.options,i=a===void 0?qa:a,l=o.plugins,u=l===void 0?gu:l,s=function(f,h,v){return v.startsWith(r)&&v.endsWith(r)&&v.replaceAll(r,"").length>0?".".concat(t):f},c=u.slice();c.push(function(f){f.type===du&&f.value.includes("&")&&(f.props[0]=f.props[0].replace(vB,r).replace(n,s))}),i.prefix&&c.push(W2),c.push(_2);var p=function(f,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=f.replace(bB,""),b=M2(v||h?"".concat(v," ").concat(h," { ").concat(m," }"):m);i.namespace&&(b=Jy(b,i.namespace));var y=[];return Ts(b,L2(c.concat(H2(function(C){return y.push(C)})))),y};return p.hash=u.length?u.reduce(function(f,h){return h.name||xl(15),Ba(f,h.name)},Ky).toString():"",p}var CB=new Zy,Nd=yB(),Qy=oe.createContext({shouldForwardProp:void 0,styleSheet:CB,stylis:Nd});Qy.Consumer;oe.createContext(void 0);function Ag(){return Rr(Qy)}var xB=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=Nd);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,Bp(this,function(){throw xl(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Nd),this.name+t.hash},e})(),wB=function(e){return e>="A"&&e<="Z"};function Fg(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;wB(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var e1=function(e){return e==null||e===!1||e===""},t1=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!e1(a)&&(Array.isArray(a)&&a.isCss||Va(a)?n.push("".concat(Fg(o),":"),a,";"):Ji(a)?n.push.apply(n,Rs(Rs(["".concat(o," {")],t1(a),!1),["}"],!1)):n.push("".concat(Fg(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in K2||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Yo(e,t,r,n){if(e1(e))return[];if($p(e))return[".".concat(e.styledComponentId)];if(Va(e)){if(!Va(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 xB?r?(e.inject(r,n),[e.getName(n)]):[e]:Ji(e)?t1(e):Array.isArray(e)?Array.prototype.concat.apply(gu,e.map(function(i){return Yo(i,t,r,n)})):[e.toString()]}function EB(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Va(r)&&!$p(r))return!1}return!0}var kB=qy(hu),DB=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&EB(t),this.componentId=r,this.baseHash=Ba(kB,r),this.baseStyle=n,Zy.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=$g(Yo(this.rules,t,r,n)),i=Fd(Ba(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 u=Ba(this.baseHash,n.hash),s="",c=0;c<this.rules.length;c++){var p=this.rules[c];if(typeof p=="string")s+=p;else if(p){var f=$g(Yo(p,t,r,n));u=Ba(u,f+c),s+=f}}if(s){var h=Fd(u>>>0);r.hasNameForId(this.componentId,h)||r.insertRules(this.componentId,h,n(s,".".concat(h),void 0,this.componentId)),o=Ko(o,h)}}return o},e})(),r1=oe.createContext(void 0);r1.Consumer;var Sc={};function SB(e,t,r){var n=$p(e),o=e,a=!Dc(e),i=t.attrs,l=i===void 0?gu:i,u=t.componentId,s=u===void 0?(function(w,E){var D=typeof w!="string"?"sc":wg(w);Sc[D]=(Sc[D]||0)+1;var k="".concat(D,"-").concat(Y2(hu+D+Sc[D]));return E?"".concat(E,"-").concat(k):k})(t.displayName,t.parentComponentId):u,c=t.displayName,p=c===void 0?(function(w){return Dc(w)?"styled.".concat(w):"Styled(".concat(Z2(w),")")})(e):c,f=t.displayName&&t.componentId?"".concat(wg(t.displayName),"-").concat(t.componentId):t.componentId||s,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(w,E){return g(w,E)&&m(w,E)}}else v=g}var b=new DB(r,f,n?o.componentStyle:void 0);function y(w,E){return(function(D,k,x){var O=D.attrs,j=D.componentStyle,B=D.defaultProps,N=D.foldedComponentIds,A=D.styledComponentId,S=D.target,$=oe.useContext(r1),P=Ag(),F=D.shouldForwardProp||P.shouldForwardProp,I=V2(k,$,B)||qa,T=(function(J,z,Y){for(var G,X=dn(dn({},z),{className:void 0,theme:Y}),W=0;W<J.length;W+=1){var H=Va(G=J[W])?G(X):G;for(var ne in H)X[ne]=ne==="className"?Ko(X[ne],H[ne]):ne==="style"?dn(dn({},X[ne]),H[ne]):H[ne]}return z.className&&(X.className=Ko(X.className,z.className)),X})(O,k,I),q=T.as||S,L={};for(var _ in T)T[_]===void 0||_[0]==="$"||_==="as"||_==="theme"&&T.theme===I||(_==="forwardedAs"?L.as=T.forwardedAs:F&&!F(_,q)||(L[_]=T[_]));var V=(function(J,z){var Y=Ag(),G=J.generateAndInjectStyles(z,Y.styleSheet,Y.stylis);return G})(j,T),Z=Ko(N,A);return V&&(Z+=" "+V),T.className&&(Z+=" "+T.className),L[Dc(q)&&!Wy.has(q)?"class":"className"]=Z,x&&(L.ref=x),Ss(q,L)})(C,w,E)}y.displayName=p;var C=oe.forwardRef(y);return C.attrs=h,C.componentStyle=b,C.displayName=p,C.shouldForwardProp=v,C.foldedComponentIds=n?Ko(o.foldedComponentIds,o.styledComponentId):"",C.styledComponentId=f,C.target=n?o.target:e,Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(w){this._foldedDefaultProps=n?(function(E){for(var D=[],k=1;k<arguments.length;k++)D[k-1]=arguments[k];for(var x=0,O=D;x<O.length;x++)Pd(E,O[x],!0);return E})({},o.defaultProps,w):w}}),Bp(C,function(){return".".concat(C.styledComponentId)}),a&&Gy(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function Pg(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 Ng=function(e){return Object.assign(e,{isCss:!0})};function $B(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Va(e)||Ji(e))return Ng(Yo(Pg(gu,Rs([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Yo(n):Ng(Yo(Pg(n,t)))}function jd(e,t,r){if(r===void 0&&(r=qa),!t)throw xl(1,t);var n=function(o){for(var a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];return e(t,r,$B.apply(void 0,Rs([o],a,!1)))};return n.attrs=function(o){return jd(e,t,dn(dn({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return jd(e,t,dn(dn({},r),o))},n}var n1=function(e){return jd(SB,e)},pr=n1;Wy.forEach(function(e){pr[e]=n1(e)});const BB=pr.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,u,s;const t=((l=(i=e.$styles)==null?void 0:i.templateField)==null?void 0:l.padding)||"2px 6px",r=((s=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:s.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
+ `,OB=pr.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 s,c,p,f;const t=e.$value.length;if(t===0)return((c=(s=e.$styles)==null?void 0:s.templateField)==null?void 0:c.minWidth)||"120px";const r=((f=(p=e.$styles)==null?void 0:p.templateField)==null?void 0:f.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,u=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:u,inputValue:e.$value}),u+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
129
+ height: ${e=>{var i,l,u,s;const t=((l=(i=e.$styles)==null?void 0:i.templateField)==null?void 0:l.padding)||"2px 6px",r=((s=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:s.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
+ `,o1=fn(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var D,k,x,O,j,B,N,A,S,$,P,F;const i=xy(),[l,u]=xt(!1),[s,c]=xt(e.value||""),[p,f]=xt(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[h,v]=xt(600),g=qe(null),m=mt(()=>{try{const I=document.querySelector('[data-slate-editor="true"]');if(I){const T=I.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||I.parentElement;if(T){const q=T.clientWidth,L=q-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",q,"\u53EF\u7528\u5BBD\u5EA6:",L),Math.max(L,200)}}return 600}catch(I){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",I),600}},[]);Bt(()=>{f(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const I=m();v(I)},[e.value,e.placeholder,m]);const b=mt(()=>{u(!0),c(e.value||""),setTimeout(()=>{g.current&&(g.current.focus(),g.current.select())},0)},[e.value]),y=mt(I=>{const T=I.target.value;c(T)},[]),C=mt(()=>{const I=Fe.findPath(i,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",I),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",s),Me.setNodes(i,{value:s},{at:I});const T=s.trim()!==""?s:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";f(T);const q=i.children[I[0]];if(q&&"children"in q){const L=q.children[I[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",L)}u(!1)},[i,e,s]),w=mt(()=>{C()},[C]),E=mt(I=>{I.key==="Enter"?(I.preventDefault(),C()):I.key==="Escape"&&(I.preventDefault(),c(e.value||""),u(!1))},[C,e.value]);return l?Q.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[Q.jsx(OB,{ref:g,value:s,onChange:y,onBlur:w,onKeyDown:E,placeholder:"",$styles:n,$value:s,$maxWidth:h,style:{backgroundColor:"white",color:((D=n==null?void 0:n.templateField)==null?void 0:D.textColor)||"#055AFF",border:`2px solid ${((k=n==null?void 0:n.templateField)==null?void 0:k.borderColor)||"#84ADFF"}`,minWidth:((x=n==null?void 0:n.templateField)==null?void 0:x.minWidth)||"120px"}}),r]}):Q.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[Q.jsxs(BB,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:p.length,onClick:b,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(O=n==null?void 0:n.templateField)==null?void 0:O.backgroundColor,borderColor:(j=n==null?void 0:n.templateField)==null?void 0:j.borderColor,borderRadius:(B=n==null?void 0:n.templateField)==null?void 0:B.borderRadius,padding:(N=n==null?void 0:n.templateField)==null?void 0:N.padding,margin:(A=n==null?void 0:n.templateField)==null?void 0:A.margin,fontSize:(S=n==null?void 0:n.templateField)==null?void 0:S.fontSize,fontWeight:($=n==null?void 0:n.templateField)==null?void 0:$.fontWeight,minWidth:(P=n==null?void 0:n.templateField)==null?void 0:P.minWidth,color:(F=n==null?void 0:n.templateField)==null?void 0:F.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:p,displayValueLength:p.length,contentLength:p.length}),null),p]}),Q.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});o1.displayName="TemplateField";const AB=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return Q.jsxs("div",{...t,className:"think-container",children:[Q.jsx("div",{className:"think-indicator"}),Q.jsx("div",{className:"think-content",children:Q.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 jg={exports:{}};/*!
145
+ Copyright (c) 2018 Jed Watson.
146
+ Licensed under the MIT License (MIT), see
147
+ http://jedwatson.github.io/classnames
148
+ */var Ig;function FB(){return Ig||(Ig=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})()})(jg)),jg.exports}var PB=FB();const ve=bl(PB);function ze(){return ze=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},ze.apply(null,arguments)}function it(e){"@babel/helpers - typeof";return it=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},it(e)}var NB=Symbol.for("react.element"),jB=Symbol.for("react.transitional.element"),IB=Symbol.for("react.fragment");function a1(e){return e&&it(e)==="object"&&(e.$$typeof===NB||e.$$typeof===jB)&&e.type===IB}function _n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return oe.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(_n(n)):a1(n)&&n.props?r=r.concat(_n(n.props.children,t)):r.push(n))}),r}var Id={},RB=function(e){};function TB(e,t){}function MB(e,t){}function zB(){Id={}}function i1(e,t,r){!t&&!Id[r]&&(e(!1,r),Id[r]=!0)}function ur(e,t){i1(TB,e,t)}function _B(e,t){i1(MB,e,t)}ur.preMessage=RB;ur.resetWarned=zB;ur.noteOnce=_B;function LB(e,t){if(it(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(it(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l1(e){var t=LB(e,"string");return it(t)=="symbol"?t:t+""}function M(e,t,r){return(t=l1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}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 K(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){M(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}function Qi(e){return e instanceof HTMLElement||e instanceof SVGElement}function vu(e){return e&&it(e)==="object"&&Qi(e.nativeElement)?e.nativeElement:Qi(e)?e:null}function hs(e){var t=vu(e);if(t)return t;if(e instanceof oe.Component){var r;return(r=Wi.findDOMNode)===null||r===void 0?void 0:r.call(Wi,e)}return null}var Tg={exports:{}},Yt={};/**
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 Mg;function HB(){if(Mg)return Yt;Mg=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"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=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 s:case c:return m;default:switch(m=m&&m.$$typeof,m){case l:case i:case u:case f:case p:case a:return m;default:return b}}case t:return b}}}return Yt.ContextConsumer=i,Yt.ContextProvider=a,Yt.Element=e,Yt.ForwardRef=u,Yt.Fragment=r,Yt.Lazy=f,Yt.Memo=p,Yt.Portal=t,Yt.Profiler=o,Yt.StrictMode=n,Yt.Suspense=s,Yt.SuspenseList=c,Yt.isAsyncMode=function(){return!1},Yt.isConcurrentMode=function(){return!1},Yt.isContextConsumer=function(m){return g(m)===i},Yt.isContextProvider=function(m){return g(m)===a},Yt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Yt.isForwardRef=function(m){return g(m)===u},Yt.isFragment=function(m){return g(m)===r},Yt.isLazy=function(m){return g(m)===f},Yt.isMemo=function(m){return g(m)===p},Yt.isPortal=function(m){return g(m)===t},Yt.isProfiler=function(m){return g(m)===o},Yt.isStrictMode=function(m){return g(m)===n},Yt.isSuspense=function(m){return g(m)===s},Yt.isSuspenseList=function(m){return g(m)===c},Yt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===o||m===n||m===s||m===c||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===p||m.$$typeof===a||m.$$typeof===i||m.$$typeof===u||m.$$typeof===v||m.getModuleId!==void 0)},Yt.typeOf=g,Yt}var zg;function WB(){return zg||(zg=1,Tg.exports=HB()),Tg.exports}var $c=WB();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 KB=Number(Hw.split(".")[0]),el=function(e,t){typeof e=="function"?e(t):it(e)==="object"&&e&&"current"in e&&(e.current=t)},to=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){el(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 to.apply(void 0,t)},t,function(n,o){return n.length!==o.length||n.every(function(a,i){return a!==o[i]})})},Yn=function(e){var t,r;if(!e)return!1;if(Op(e)&&KB>=19)return!0;var n=$c.isMemo(e)?e.type.type:e.type;return!(typeof n=="function"&&!((t=n.prototype)!==null&&t!==void 0&&t.render)&&n.$$typeof!==$c.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==$c.ForwardRef)};function Op(e){return Kw(e)&&!a1(e)}var qB=function(e){return Op(e)&&Yn(e)},ua=function(e){if(e&&Op(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null},Rd=d.createContext(null);function VB(e){var t=e.children,r=e.onBatchResize,n=d.useRef(0),o=d.useRef([]),a=d.useContext(Rd),i=d.useCallback(function(l,u,s){n.current+=1;var c=n.current;o.current.push({size:l,element:u,data:s}),Promise.resolve().then(function(){c===n.current&&(r==null||r(o.current),o.current=[])}),a==null||a(l,u,s)},[r,a]);return d.createElement(Rd.Provider,{value:i},t)}var s1=(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})()})(),Td=typeof window<"u"&&typeof document<"u"&&window.document===document,_s=(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")()})(),XB=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(_s):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),UB=2;function GB(e,t){var r=!1,n=!1,o=0;function a(){r&&(r=!1,e()),n&&l()}function i(){XB(a)}function l(){var u=Date.now();if(r){if(u-o<UB)return;n=!0}else r=!0,n=!1,setTimeout(i,t);o=u}return l}var YB=20,ZB=["top","right","bottom","left","width","height","size","weight"],JB=typeof MutationObserver<"u",QB=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=GB(this.refresh.bind(this),YB)}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(){!Td||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),JB?(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(){!Td||!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=ZB.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})(),u1=(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}),Xa=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||_s}),c1=bu(0,0,0,0);function Ls(e){return parseFloat(e)||0}function _g(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+Ls(a)},0)}function eO(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]=Ls(i)}return r}function tO(e){var t=e.getBBox();return bu(0,0,t.width,t.height)}function rO(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return c1;var n=Xa(e).getComputedStyle(e),o=eO(n),a=o.left+o.right,i=o.top+o.bottom,l=Ls(n.width),u=Ls(n.height);if(n.boxSizing==="border-box"&&(Math.round(l+a)!==t&&(l-=_g(n,"left","right")+a),Math.round(u+i)!==r&&(u-=_g(n,"top","bottom")+i)),!oO(e)){var s=Math.round(l+a)-t,c=Math.round(u+i)-r;Math.abs(s)!==1&&(l-=s),Math.abs(c)!==1&&(u-=c)}return bu(o.left,o.top,l,u)}var nO=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Xa(e).SVGGraphicsElement}:function(e){return e instanceof Xa(e).SVGElement&&typeof e.getBBox=="function"}})();function oO(e){return e===Xa(e).document.documentElement}function aO(e){return Td?nO(e)?tO(e):rO(e):c1}function iO(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 u1(i,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),i}function bu(e,t,r,n){return{x:e,y:t,width:r,height:n}}var lO=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=bu(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=aO(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})(),sO=(function(){function e(t,r){var n=iO(r);u1(this,{target:t,contentRect:n})}return e})(),uO=(function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new s1,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 Xa(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new lO(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 Xa(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 sO(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})(),d1=typeof WeakMap<"u"?new WeakMap:new s1,f1=(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=QB.getInstance(),n=new uO(t,r,this);d1.set(this,n)}return e})();["observe","unobserve","disconnect"].forEach(function(e){f1.prototype[e]=function(){var t;return(t=d1.get(this))[e].apply(t,arguments)}});var cO=(function(){return typeof _s.ResizeObserver<"u"?_s.ResizeObserver:f1})(),Bo=new Map;function dO(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 p1=new cO(dO);function fO(e,t){Bo.has(e)||(Bo.set(e,new Set),p1.observe(e)),Bo.get(e).add(t)}function pO(e,t){Bo.has(e)&&(Bo.get(e).delete(t),Bo.get(e).size||(p1.unobserve(e),Bo.delete(e)))}function gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lg(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,l1(n.key),n)}}function vr(e,t,r){return t&&Lg(e.prototype,t),r&&Lg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tl(e,t){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},tl(e,t)}function ro(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&&tl(e,t)}function rl(e){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rl(e)}function Ap(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ap=function(){return!!e})()}function Qe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mO(e,t){if(t&&(it(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qe(e)}function no(e){var t=Ap();return function(){var r,n=rl(e);if(t){var o=rl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mO(this,r)}}var hO=(function(e){ro(r,e);var t=no(r);function r(){return gr(this,r),t.apply(this,arguments)}return vr(r,[{key:"render",value:function(){return this.props.children}}]),r})(d.Component);function gO(e,t){var r=e.children,n=e.disabled,o=d.useRef(null),a=d.useRef(null),i=d.useContext(Rd),l=typeof r=="function",u=l?r(o):r,s=d.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),c=!l&&d.isValidElement(u)&&Yn(u),p=c?ua(u):null,f=sa(p,o),h=function(){var m;return hs(o.current)||(o.current&&it(o.current)==="object"?hs((m=o.current)===null||m===void 0?void 0:m.nativeElement):null)||hs(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,w=m.getBoundingClientRect(),E=w.width,D=w.height,k=m.offsetWidth,x=m.offsetHeight,O=Math.floor(E),j=Math.floor(D);if(s.current.width!==O||s.current.height!==j||s.current.offsetWidth!==k||s.current.offsetHeight!==x){var B={width:O,height:j,offsetWidth:k,offsetHeight:x};s.current=B;var N=k===Math.round(E)?E:k,A=x===Math.round(D)?D:x,S=K(K({},B),{},{offsetWidth:N,offsetHeight:A});i==null||i(S,m,C),y&&Promise.resolve().then(function(){y(S,m)})}},[]);return d.useEffect(function(){var m=h();return m&&!n&&fO(m,g),function(){return pO(m,g)}},[o.current,n]),d.createElement(hO,{ref:a},c?d.cloneElement(u,{ref:f}):u)}var vO=d.forwardRef(gO),bO="rc-observer-key";function yO(e,t){var r=e.children,n=typeof r=="function"?[r]:_n(r);return n.map(function(o,a){var i=(o==null?void 0:o.key)||"".concat(bO,"-").concat(a);return d.createElement(vO,ze({},e,{key:i,ref:a===0?t:void 0}),o)})}var oo=d.forwardRef(yO);oo.Collection=VB;function Md(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 CO(e){if(Array.isArray(e))return Md(e)}function m1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fp(e,t){if(e){if(typeof e=="string")return Md(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)?Md(e,t):void 0}}function xO(){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 Ie(e){return CO(e)||m1(e)||Fp(e)||xO()}var h1=function(e){return+setTimeout(e,16)},g1=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(h1=function(e){return window.requestAnimationFrame(e)},g1=function(e){return window.cancelAnimationFrame(e)});var Hg=0,Pp=new Map;function v1(e){Pp.delete(e)}var Xt=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Hg+=1;var r=Hg;function n(o){if(o===0)v1(r),e();else{var a=h1(function(){n(o-1)});Pp.set(r,a)}}return n(t),r};Xt.cancel=function(e){var t=Pp.get(e);return v1(e),g1(t)};function b1(e){if(Array.isArray(e))return e}function wO(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,a,i,l=[],u=!0,s=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(c){s=!0,o=c}finally{try{if(!u&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}function y1(){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 he(e,t){return b1(e)||wO(e,t)||Fp(e,t)||y1()}function nl(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 EO(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 Wg="data-rc-order",Kg="data-rc-priority",kO="rc-util-key",zd=new Map;function C1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):kO}function yu(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function DO(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Np(e){return Array.from((zd.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function x1(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=DO(n),l=i==="prependQueue",u=document.createElement("style");u.setAttribute(Wg,i),l&&a&&u.setAttribute(Kg,"".concat(a)),r!=null&&r.nonce&&(u.nonce=r==null?void 0:r.nonce),u.innerHTML=e;var s=yu(t),c=s.firstChild;if(n){if(l){var p=(t.styles||Np(s)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(Wg)))return!1;var h=Number(f.getAttribute(Kg)||0);return a>=h});if(p.length)return s.insertBefore(u,p[p.length-1].nextSibling),u}s.insertBefore(u,c)}else s.appendChild(u);return u}function w1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=yu(t);return(t.styles||Np(r)).find(function(n){return n.getAttribute(C1(t))===e})}function ol(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=w1(e,t);if(r){var n=yu(t);n.removeChild(r)}}function SO(e,t){var r=zd.get(e);if(!r||!EO(document,r)){var n=x1("",t),o=n.parentNode;zd.set(e,o),e.removeChild(n)}}function mo(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=yu(r),o=Np(n),a=K(K({},r),{},{styles:o});SO(n,a);var i=w1(t,a);if(i){var l,u;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&i.nonce!==((u=a.csp)===null||u===void 0?void 0:u.nonce)){var s;i.nonce=(s=a.csp)===null||s===void 0?void 0:s.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var c=x1(e,a);return c.setAttribute(C1(a),t),c}function $O(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 bt(e,t){if(e==null)return{};var r,n,o=$O(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 Zn(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,u=n.has(a);if(ur(!u,"Warning: There may be circular references"),u)return!1;if(a===i)return!0;if(r&&l>1)return!1;n.add(a);var s=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],s))return!1;return!0}if(a&&i&&it(a)==="object"&&it(i)==="object"){var p=Object.keys(a);return p.length!==Object.keys(i).length?!1:p.every(function(f){return o(a[f],i[f],s)})}return!1}return o(e,t)}var BO="%";function _d(e){return e.join(BO)}var OO=(function(){function e(t){gr(this,e),M(this,"instanceId",void 0),M(this,"cache",new Map),M(this,"extracted",new Set),this.instanceId=t}return vr(e,[{key:"get",value:function(t){return this.opGet(_d(t))}},{key:"opGet",value:function(t){return this.cache.get(t)||null}},{key:"update",value:function(t,r){return this.opUpdate(_d(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})(),Ua="data-token-hash",Mn="data-css-hash",Oo="__cssinjs_instance__";function AO(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Mn,"]"))||[],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(Mn,"]"))).forEach(function(o){var a=o.getAttribute(Mn);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 OO(e)}var wl=d.createContext({hashPriority:"low",cache:AO(),defaultCache:!0});function FO(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 jp=(function(){function e(){gr(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 vr(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(u,s){var c=he(u,2),p=c[1];return n.internalGet(s)[1]<p?[s,n.internalGet(s)[1]]:u},[this.keys[0],this.cacheCallTimes]),a=he(o,1),i=a[0];this.delete(i)}this.keys.push(t)}var l=this.cache;t.forEach(function(u,s){if(s===t.length-1)l.set(u,{value:[r,n.cacheCallTimes++]});else{var c=l.get(u);c?c.map||(c.map=new Map):l.set(u,{map:new Map}),l=l.get(u).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!FO(r,t)}),this.deleteByPath(this.cache,t)}}]),e})();M(jp,"MAX_CACHE_SIZE",20);M(jp,"MAX_CACHE_OFFSET",5);var qg=0,E1=(function(){function e(t){gr(this,e),M(this,"derivatives",void 0),M(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=qg,t.length===0&&(t.length>0,void 0),qg+=1}return vr(e,[{key:"getDerivativeToken",value:function(t){return this.derivatives.reduce(function(r,n){return n(t,r)},void 0)}}]),e})(),Bc=new jp;function Ld(e){var t=Array.isArray(e)?e:[e];return Bc.has(t)||Bc.set(t,new E1(t)),Bc.get(t)}var PO=new WeakMap,Oc={};function NO(e,t){for(var r=PO,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(Oc)||r.set(Oc,e()),r.get(Oc)}var Vg=new WeakMap;function Mi(e){var t=Vg.get(e)||"";return t||(Object.keys(e).forEach(function(r){var n=e[r];t+=r,n instanceof E1?t+=n.id:n&&it(n)==="object"?t+=Mi(n):t+=n}),t=nl(t),Vg.set(e,t)),t}function Xg(e,t){return nl("".concat(t,"_").concat(Mi(e)))}var Hd=Xr();function ce(e){return typeof e=="number"?"".concat(e,"px"):e}function Hs(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=K(K({},n),{},M(M({},Ua,t),Mn,r)),i=Object.keys(a).map(function(l){var u=a[l];return u?"".concat(l,'="').concat(u,'"'):null}).filter(function(l){return l}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}var gs=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()},jO=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=he(n,2),a=o[0],i=o[1];return"".concat(a,":").concat(i,";")}).join(""),"}"):""},k1=function(e,t,r){var n={},o={};return Object.entries(e).forEach(function(a){var i,l,u=he(a,2),s=u[0],c=u[1];if(r!=null&&(i=r.preserve)!==null&&i!==void 0&&i[s])o[s]=c;else if((typeof c=="string"||typeof c=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[s])){var p,f=gs(s,r==null?void 0:r.prefix);n[f]=typeof c=="number"&&!(r!=null&&(p=r.unitless)!==null&&p!==void 0&&p[s])?"".concat(c,"px"):String(c),o[s]="var(".concat(f,")")}}),[o,jO(n,t,{scope:r==null?void 0:r.scope})]},Ug=Xr()?d.useLayoutEffect:d.useEffect,Kt=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}},[])},Gg=function(e,t){Kt(function(r){if(!r)return e()},t)},IO=K({},d),Yg=IO.useInsertionEffect,RO=function(e,t,r){d.useMemo(e,r),Kt(function(){return t(!0)},r)},TO=Yg?function(e,t,r){return Yg(function(){return e(),t()},r)}:RO,MO=K({},d),zO=MO.useInsertionEffect,_O=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},LO=function(){return function(e){e()}},HO=typeof zO<"u"?_O:LO;function Ip(e,t,r,n,o){var a=d.useContext(wl),i=a.cache,l=[e].concat(Ie(t)),u=_d(l),s=HO([u]),c=function(h){i.opUpdate(u,function(v){var g=v||[void 0,void 0],m=he(g,2),b=m[0],y=b===void 0?0:b,C=m[1],w=C,E=w||r(),D=[y,E];return h?h(D):D})};d.useMemo(function(){c()},[u]);var p=i.opGet(u),f=p[1];return TO(function(){o==null||o(f)},function(h){return c(function(v){var g=he(v,2),m=g[0],b=g[1];return h&&m===0&&(o==null||o(f)),[m+1,b]}),function(){i.opUpdate(u,function(v){var g=v||[],m=he(g,2),b=m[0],y=b===void 0?0:b,C=m[1],w=y-1;return w===0?(s(function(){(h||!i.opGet(u))&&(n==null||n(C,!1))}),null):[y-1,C]})}},[u]),f}var WO={},KO="css",Ho=new Map;function qO(e){Ho.set(e,(Ho.get(e)||0)+1)}function VO(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(Ua,'="').concat(e,'"]'));r.forEach(function(n){if(n[Oo]===t){var o;(o=n.parentNode)===null||o===void 0||o.removeChild(n)}})}}var XO=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>XO&&r.forEach(function(n){VO(n,t),Ho.delete(n)})}var GO=function(e,t,r,n){var o=r.getDerivativeToken(e),a=K(K({},o),t);return n&&(a=n(a)),a},D1="token";function YO(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Rr(wl),o=n.cache.instanceId,a=n.container,i=r.salt,l=i===void 0?"":i,u=r.override,s=u===void 0?WO:u,c=r.formatToken,p=r.getComputedToken,f=r.cssVar,h=NO(function(){return Object.assign.apply(Object,[{}].concat(Ie(t)))},t),v=Mi(h),g=Mi(s),m=f?Mi(f):"",b=Ip(D1,[l,e.id,v,g,m],function(){var y,C=p?p(h,s,e):GO(h,s,e,c),w=K({},C),E="";if(f){var D=k1(C,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),k=he(D,2);C=k[0],E=k[1]}var x=Xg(C,l);C._tokenKey=x,w._tokenKey=Xg(w,l);var O=(y=f==null?void 0:f.key)!==null&&y!==void 0?y:x;C._themeKey=O,qO(O);var j="".concat(KO,"-").concat(nl(x));return C._hashId=j,[C,j,w,E,(f==null?void 0:f.key)||""]},function(y){UO(y[0]._themeKey,o)},function(y){var C=he(y,4),w=C[0],E=C[3];if(f&&E){var D=mo(E,nl("css-variables-".concat(w._themeKey)),{mark:Mn,prepend:"queue",attachTo:a,priority:-999});D[Oo]=o,D.setAttribute(Ua,w._themeKey)}});return b}var ZO=function(e,t,r){var n=he(e,5),o=n[2],a=n[3],i=n[4],l=r||{},u=l.plain;if(!a)return null;var s=o._tokenKey,c=-999,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)},f=Hs(a,i,s,p,u);return[c,s,f]},JO={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},S1="comm",$1="rule",B1="decl",QO="@import",eA="@namespace",tA="@keyframes",rA="@layer",O1=Math.abs,Rp=String.fromCharCode;function A1(e){return e.trim()}function vs(e,t,r){return e.replace(t,r)}function nA(e,t,r){return e.indexOf(t,r)}function Ia(e,t){return e.charCodeAt(t)|0}function Ga(e,t,r){return e.slice(t,r)}function Xn(e){return e.length}function oA(e){return e.length}function Xl(e,t){return t.push(e),e}var Cu=1,Ya=1,F1=0,On=0,xr=0,ii="";function Tp(e,t,r,n,o,a,i,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Cu,column:Ya,length:i,return:"",siblings:l}}function aA(){return xr}function iA(){return xr=On>0?Ia(ii,--On):0,Ya--,xr===10&&(Ya=1,Cu--),xr}function zn(){return xr=On<F1?Ia(ii,On++):0,Ya++,xr===10&&(Ya=1,Cu++),xr}function Ao(){return Ia(ii,On)}function bs(){return On}function xu(e,t){return Ga(ii,e,t)}function al(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 lA(e){return Cu=Ya=1,F1=Xn(ii=e),On=0,[]}function sA(e){return ii="",e}function Ac(e){return A1(xu(On-1,Wd(e===91?e+2:e===40?e+1:e)))}function uA(e){for(;(xr=Ao())&&xr<33;)zn();return al(e)>2||al(xr)>3?"":" "}function cA(e,t){for(;--t&&zn()&&!(xr<48||xr>102||xr>57&&xr<65||xr>70&&xr<97););return xu(e,bs()+(t<6&&Ao()==32&&zn()==32))}function Wd(e){for(;zn();)switch(xr){case e:return On;case 34:case 39:e!==34&&e!==39&&Wd(xr);break;case 40:e===41&&Wd(e);break;case 92:zn();break}return On}function dA(e,t){for(;zn()&&e+xr!==57&&!(e+xr===84&&Ao()===47););return"/*"+xu(t,On-1)+"*"+Rp(e===47?e:zn())}function fA(e){for(;!al(Ao());)zn();return xu(e,On)}function pA(e){return sA(ys("",null,null,null,[""],e=lA(e),0,[0],e))}function ys(e,t,r,n,o,a,i,l,u){for(var s=0,c=0,p=i,f=0,h=0,v=0,g=1,m=1,b=1,y=0,C="",w=o,E=a,D=n,k=C;m;)switch(v=y,y=zn()){case 40:if(v!=108&&Ia(k,p-1)==58){nA(k+=vs(Ac(y),"&","&\f"),"&\f",O1(s?l[s-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Ac(y);break;case 9:case 10:case 13:case 32:k+=uA(v);break;case 92:k+=cA(bs()-1,7);continue;case 47:switch(Ao()){case 42:case 47:Xl(mA(dA(zn(),bs()),t,r,u),u),(al(v||1)==5||al(Ao()||1)==5)&&Xn(k)&&Ga(k,-1,void 0)!==" "&&(k+=" ");break;default:k+="/"}break;case 123*g:l[s++]=Xn(k)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:b==-1&&(k=vs(k,/\f/g,"")),h>0&&(Xn(k)-p||g===0&&v===47)&&Xl(h>32?Jg(k+";",n,r,p-1,u):Jg(vs(k," ","")+";",n,r,p-2,u),u);break;case 59:k+=";";default:if(Xl(D=Zg(k,t,r,s,c,o,l,C,w=[],E=[],p,a),a),y===123)if(c===0)ys(k,t,D,D,w,a,p,l,E);else{switch(f){case 99:if(Ia(k,3)===110)break;case 108:if(Ia(k,2)===97)break;default:c=0;case 100:case 109:case 115:}c?ys(e,D,D,n&&Xl(Zg(e,D,D,0,0,o,l,C,o,w=[],p,E),E),o,E,p,l,n?w:E):ys(k,D,D,D,[""],E,0,l,E)}}s=c=h=0,g=b=1,C=k="",p=i;break;case 58:p=1+Xn(k),h=v;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&iA()==125)continue}switch(k+=Rp(y),y*g){case 38:b=c>0?1:(k+="\f",-1);break;case 44:l[s++]=(Xn(k)-1)*b,b=1;break;case 64:Ao()===45&&(k+=Ac(zn())),f=Ao(),c=p=Xn(C=k+=fA(bs())),y++;break;case 45:v===45&&Xn(k)==2&&(g=0)}}return a}function Zg(e,t,r,n,o,a,i,l,u,s,c,p){for(var f=o-1,h=o===0?a:[""],v=oA(h),g=0,m=0,b=0;g<n;++g)for(var y=0,C=Ga(e,f+1,f=O1(m=i[g])),w=e;y<v;++y)(w=A1(m>0?h[y]+" "+C:vs(C,/&\f/g,h[y])))&&(u[b++]=w);return Tp(e,t,r,o===0?$1:l,u,s,c,p)}function mA(e,t,r,n){return Tp(e,t,r,S1,Rp(aA()),Ga(e,2,-2),0,n)}function Jg(e,t,r,n,o){return Tp(e,t,r,B1,Ga(e,0,n),Ga(e,n+1,-1),n,o)}function Kd(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function hA(e,t,r,n){switch(e.type){case rA:if(e.children.length)break;case QO:case eA:case B1:return e.return=e.return||e.value;case S1:return"";case tA:return e.return=e.value+"{"+Kd(e.children,n)+"}";case $1:if(!Xn(e.value=e.props.join(",")))return""}return Xn(r=Kd(e.children,n))?e.return=e.value+"{"+r+"}":""}var Qg="data-ant-cssinjs-cache-path",P1="_FILE_STYLE__",Zo,N1=!0;function gA(){if(!Zo&&(Zo={},Xr())){var e=document.createElement("div");e.className=Qg,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=he(a,2),l=i[0],u=i[1];Zo[l]=u});var r=document.querySelector("style[".concat(Qg,"]"));if(r){var n;N1=!1,(n=r.parentNode)===null||n===void 0||n.removeChild(r)}document.body.removeChild(e)}}function vA(e){return gA(),!!Zo[e]}function bA(e){var t=Zo[e],r=null;if(t&&Xr())if(N1)r=P1;else{var n=document.querySelector("style[".concat(Mn,'="').concat(Zo[e],'"]'));n?r=n.innerHTML:delete Zo[e]}return[r,t]}var yA="_skip_check_",j1="_multi_value_";function Cs(e){var t=Kd(pA(e),hA);return t.replace(/\{%%%\:[^;];}/g,";")}function CA(e){return it(e)==="object"&&e&&(yA in e||j1 in e)}function ev(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,u=i.trim().split(/\s+/),s=u[0]||"",c=((l=s.match(/^\w+/))===null||l===void 0?void 0:l[0])||"";return s="".concat(c).concat(o).concat(s.slice(c.length)),[s].concat(Ie(u.slice(1))).join(" ")});return a.join(",")}var xA=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,u=r.layer;r.path;var s=r.hashPriority,c=r.transformers,p=c===void 0?[]:c;r.linters;var f="",h={};function v(b){var y=b.getName(l);if(!h[y]){var C=e(b.style,r,{root:!1,parentSelectors:i}),w=he(C,1),E=w[0];h[y]="@keyframes ".concat(b.getName(l)).concat(E)}}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")f+="".concat(y,`
159
+ `);else if(y._keyframe)v(y);else{var C=p.reduce(function(w,E){var D;return(E==null||(D=E.visit)===null||D===void 0?void 0:D.call(E,w))||w},y);Object.keys(C).forEach(function(w){var E=C[w];if(it(E)==="object"&&E&&(w!=="animationName"||!E._keyframe)&&!CA(E)){var D=!1,k=w.trim(),x=!1;(o||a)&&l?k.startsWith("@")?D=!0:k==="&"?k=ev("",l,s):k=ev(w,l,s):o&&!l&&(k==="&"||k==="")&&(k="",x=!0);var O=e(E,r,{root:x,injectHash:D,parentSelectors:[].concat(Ie(i),[k])}),j=he(O,2),B=j[0],N=j[1];h=K(K({},h),N),f+="".concat(k).concat(B)}else{let $=function(P,F){var I=P.replace(/[A-Z]/g,function(q){return"-".concat(q.toLowerCase())}),T=F;!JO[P]&&typeof T=="number"&&T!==0&&(T="".concat(T,"px")),P==="animationName"&&F!==null&&F!==void 0&&F._keyframe&&(v(F),T=F.getName(l)),f+="".concat(I,":").concat(T,";")};var A,S=(A=E==null?void 0:E.value)!==null&&A!==void 0?A:E;it(E)==="object"&&E!==null&&E!==void 0&&E[j1]&&Array.isArray(S)?S.forEach(function(P){$(w,P)}):$(w,S)}})}}),o?u&&(f&&(f="@layer ".concat(u.name," {").concat(f,"}")),u.dependencies&&(h["@layer ".concat(u.name)]=u.dependencies.map(function(b){return"@layer ".concat(b,", ").concat(u.name,";")}).join(`
160
+ `))):f="{".concat(f,"}"),[f,h]};function I1(e,t){return nl("".concat(e.join("%")).concat(t))}function wA(){return null}var R1="style";function qd(e,t){var r=e.token,n=e.path,o=e.hashId,a=e.layer,i=e.nonce,l=e.clientOnly,u=e.order,s=u===void 0?0:u,c=d.useContext(wl),p=c.autoClear;c.mock;var f=c.defaultCache,h=c.hashPriority,v=c.container,g=c.ssrInline,m=c.transformers,b=c.linters,y=c.cache,C=c.layer,w=r._tokenKey,E=[w];C&&E.push("layer"),E.push.apply(E,Ie(n));var D=Hd,k=Ip(R1,E,function(){var N=E.join("|");if(vA(N)){var A=bA(N),S=he(A,2),$=S[0],P=S[1];if($)return[$,w,P,{},l,s]}var F=t(),I=xA(F,{hashId:o,hashPriority:h,layer:C?a:void 0,path:n.join("-"),transformers:m,linters:b}),T=he(I,2),q=T[0],L=T[1],_=Cs(q),V=I1(E,_);return[_,w,V,L,l,s]},function(N,A){var S=he(N,3),$=S[2];(A||p)&&Hd&&ol($,{mark:Mn,attachTo:v})},function(N){var A=he(N,4),S=A[0];A[1];var $=A[2],P=A[3];if(D&&S!==P1){var F={mark:Mn,prepend:C?!1:"queue",attachTo:v,priority:s},I=typeof i=="function"?i():i;I&&(F.csp={nonce:I});var T=[],q=[];Object.keys(P).forEach(function(_){_.startsWith("@layer")?T.push(_):q.push(_)}),T.forEach(function(_){mo(Cs(P[_]),"_layer-".concat(_),K(K({},F),{},{prepend:!0}))});var L=mo(S,$,F);L[Oo]=y.instanceId,L.setAttribute(Ua,w),q.forEach(function(_){mo(Cs(P[_]),"_effect-".concat(_),F)})}}),x=he(k,3),O=x[0],j=x[1],B=x[2];return function(N){var A;return!g||D||!f?A=d.createElement(wA,null):A=d.createElement("style",ze({},M(M({},Ua,j),Mn,B),{dangerouslySetInnerHTML:{__html:O}})),d.createElement(d.Fragment,null,A,N)}}var EA=function(e,t,r){var n=he(e,6),o=n[0],a=n[1],i=n[2],l=n[3],u=n[4],s=n[5],c=r||{},p=c.plain;if(u)return null;var f=o,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(s)};return f=Hs(o,a,i,h,p),l&&Object.keys(l).forEach(function(v){if(!t[v]){t[v]=!0;var g=Cs(l[v]),m=Hs(g,a,"_effect-".concat(v),h,p);v.startsWith("@layer")?f=m+f:f+=m}}),[s,i,f]},T1="cssVar",kA=function(e,t){var r=e.key,n=e.prefix,o=e.unitless,a=e.ignore,i=e.token,l=e.scope,u=l===void 0?"":l,s=Rr(wl),c=s.cache.instanceId,p=s.container,f=i._tokenKey,h=[].concat(Ie(e.path),[r,u,f]),v=Ip(T1,h,function(){var g=t(),m=k1(g,r,{prefix:n,unitless:o,ignore:a,scope:u}),b=he(m,2),y=b[0],C=b[1],w=I1(h,C);return[y,C,w,r]},function(g){var m=he(g,3),b=m[2];Hd&&ol(b,{mark:Mn,attachTo:p})},function(g){var m=he(g,3),b=m[1],y=m[2];if(b){var C=mo(b,y,{mark:Mn,prepend:"queue",attachTo:p,priority:-999});C[Oo]=c,C.setAttribute(Ua,r)}});return v},DA=function(e,t,r){var n=he(e,4),o=n[1],a=n[2],i=n[3],l=r||{},u=l.plain;if(!o)return null;var s=-999,c={"data-rc-order":"prependQueue","data-rc-priority":"".concat(s)},p=Hs(o,i,a,c,u);return[s,a,p]};M(M(M({},R1,EA),D1,ZO),T1,DA);var Ut=(function(){function e(t,r){gr(this,e),M(this,"name",void 0),M(this,"style",void 0),M(this,"_keyframe",!0),this.name=t,this.style=r}return vr(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 ga(e){return e.notSplit=!0,e}ga(["borderTop","borderBottom"]),ga(["borderTop"]),ga(["borderBottom"]),ga(["borderLeft","borderRight"]),ga(["borderLeft"]),ga(["borderRight"]);var Mp=An({});function M1(e){return b1(e)||m1(e)||Fp(e)||y1()}function yn(e,t){for(var r=e,n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function z1(e,t,r,n){if(!t.length)return r;var o=M1(t),a=o[0],i=o.slice(1),l;return!e&&typeof a=="number"?l=[]:Array.isArray(e)?l=Ie(e):l=K({},e),n&&r===void 0&&i.length===1?delete l[a][i[0]]:l[a]=z1(l[a],i,r,n),l}function Nn(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!yn(e,t.slice(0,-1))?e:z1(e,t,r,n)}function SA(e){return it(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function tv(e){return Array.isArray(e)?[]:{}}var $A=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Oa(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=tv(t[0]);return t.forEach(function(o){function a(i,l){var u=new Set(l),s=yn(o,i),c=Array.isArray(s);if(c||SA(s)){if(!u.has(s)){u.add(s);var p=yn(n,i);c?n=Nn(n,i,[]):(!p||it(p)!=="object")&&(n=Nn(n,i,tv(s))),$A(s).forEach(function(f){a([].concat(Ie(i),[f]),u)})}}else n=Nn(n,i,s)}a([])}),n}function BA(){}const OA=d.createContext({}),li=()=>{const e=()=>{};return e.deprecated=BA,e},AA=An(void 0);var _1={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"},FA={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},PA=K(K({},FA),{},{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 L1={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},rv={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"]},PA),timePickerLocale:Object.assign({},L1)},gn="${label} is not a valid ${type}",ra={locale:"en",Pagination:_1,DatePicker:rv,TimePicker:L1,Calendar:rv,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:gn,method:gn,array:gn,object:gn,number:gn,date:gn,boolean:gn,integer:gn,float:gn,regexp:gn,email:gn,url:gn,hex:gn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},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 xs=[];const nv=()=>xs.reduce((e,t)=>Object.assign(Object.assign({},e),t),ra.Modal);function NA(e){if(e){const t=Object.assign({},e);return xs.push(t),nv(),()=>{xs=xs.filter(r=>r!==t),nv()}}Object.assign({},ra.Modal)}const zp=An(void 0),wu=(e,t)=>{const r=d.useContext(zp),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]},jA="internalMark",IA=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;d.useEffect(()=>NA(t==null?void 0:t.Modal),[t]);const o=d.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return d.createElement(zp.Provider,{value:o},r)},H1={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"},il=Object.assign(Object.assign({},H1),{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 Fc(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 ov=(e,t,r)=>r===0?e:e/100;function Ci(e,t){const r=t||255;return e>r?r:e<0?0:e}class Wt{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 Wt)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=Ci(t.r),this.g=Ci(t.g),this.b=Ci(t.b),this.a=typeof t.a=="number"?Ci(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]=Ci(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 f=Pr(n*255);this.r=f,this.g=f,this.b=f}let a=0,i=0,l=0;const u=t/60,s=(1-Math.abs(2*n-1))*r,c=s*(1-Math.abs(u%2-1));u>=0&&u<1?(a=s,i=c):u>=1&&u<2?(a=c,i=s):u>=2&&u<3?(i=s,l=c):u>=3&&u<4?(i=c,l=s):u>=4&&u<5?(a=c,l=s):u>=5&&u<6&&(a=s,l=c);const p=n-s/2;this.r=Pr((a+p)*255),this.g=Pr((i+p)*255),this.b=Pr((l+p)*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),u=i-l,s=Pr(n*(1-r)*255),c=Pr(n*(1-r*u)*255),p=Pr(n*(1-r*(1-u))*255);switch(l){case 0:this.g=p,this.b=s;break;case 1:this.r=c,this.b=s;break;case 2:this.r=s,this.b=p;break;case 3:this.r=s,this.g=c;break;case 4:this.r=p,this.g=s;break;case 5:default:this.g=s,this.b=c;break}}fromHsvString(t){const r=Fc(t,ov);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=Fc(t,ov);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=Fc(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 Ul=2,av=.16,RA=.05,TA=.05,MA=.15,W1=5,K1=4,zA=[{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 iv(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Ul*t:Math.round(e.h)+Ul*t:n=r?Math.round(e.h)+Ul*t:Math.round(e.h)-Ul*t,n<0?n+=360:n>=360&&(n-=360),n}function lv(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-av*t:t===K1?n=e.s+av:n=e.s+RA*t,n>1&&(n=1),r&&t===W1&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function sv(e,t,r){var n;return r?n=e.v+TA*t:n=e.v-MA*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function ll(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new Wt(e),o=n.toHsv(),a=W1;a>0;a-=1){var i=new Wt({h:iv(o,a,!0),s:lv(o,a,!0),v:sv(o,a,!0)});r.push(i)}r.push(n);for(var l=1;l<=K1;l+=1){var u=new Wt({h:iv(o,l),s:lv(o,l),v:sv(o,l)});r.push(u)}return t.theme==="dark"?zA.map(function(s){var c=s.index,p=s.amount;return new Wt(t.backgroundColor||"#141414").mix(r[c],p).toHexString()}):r.map(function(s){return s.toHexString()})}var Pc={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"},Vd=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Vd.primary=Vd[5];var Xd=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Xd.primary=Xd[5];var Ud=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Ud.primary=Ud[5];var Gd=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Gd.primary=Gd[5];var Yd=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Yd.primary=Yd[5];var Zd=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Zd.primary=Zd[5];var Jd=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Jd.primary=Jd[5];var Qd=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Qd.primary=Qd[5];var Ws=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ws.primary=Ws[5];var ef=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];ef.primary=ef[5];var tf=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];tf.primary=tf[5];var rf=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];rf.primary=rf[5];var nf=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];nf.primary=nf[5];var Nc={red:Vd,volcano:Xd,orange:Ud,gold:Gd,yellow:Yd,lime:Zd,green:Jd,cyan:Qd,blue:Ws,geekblue:ef,purple:tf,magenta:rf,grey:nf};function _A(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){const{colorSuccess:n,colorWarning:o,colorError:a,colorInfo:i,colorPrimary:l,colorBgBase:u,colorTextBase:s}=e,c=t(l),p=t(n),f=t(o),h=t(a),v=t(i),g=r(u,s),m=e.colorLink||e.colorInfo,b=t(m),y=new Wt(h[1]).mix(new Wt(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:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[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:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg: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 Wt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const LA=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 HA(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},LA(n))}const WA=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function ws(e){return(e+8)/e}function KA(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:ws(r)}))}const qA=e=>{const t=KA(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],u=n[0],s=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:s,lineHeightSM:u,fontHeight:Math.round(l*o),fontHeightLG:Math.round(s*i),fontHeightSM:Math.round(u*a),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function VA(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 En=(e,t)=>new Wt(e).setA(t).toRgbString(),xi=(e,t)=>new Wt(e).darken(t).toHexString(),XA=e=>{const t=ll(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:En(n,.88),colorTextSecondary:En(n,.65),colorTextTertiary:En(n,.45),colorTextQuaternary:En(n,.25),colorFill:En(n,.15),colorFillSecondary:En(n,.06),colorFillTertiary:En(n,.04),colorFillQuaternary:En(n,.02),colorBgSolid:En(n,1),colorBgSolidHover:En(n,.75),colorBgSolidActive:En(n,.95),colorBgLayout:xi(r,4),colorBgContainer:xi(r,0),colorBgElevated:xi(r,0),colorBgSpotlight:En(n,.85),colorBgBlur:"transparent",colorBorder:xi(r,15),colorBorderSecondary:xi(r,6)}};function GA(e){Pc.pink=Pc.magenta,Nc.pink=Nc.magenta;const t=Object.keys(H1).map(r=>{const n=e[r]===Pc[r]?Nc[r]:ll(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),_A(e,{generateColorPalettes:XA,generateNeutralColorPalettes:UA})),qA(e.fontSize)),VA(e)),WA(e)),HA(e))}const q1=Ld(GA),of={token:il,override:{override:il},hashed:!0},V1=oe.createContext(of),sl="ant",_p="anticon",YA=["outlined","borderless","filled","underlined"],ZA=(e,t)=>t||(e?`${sl}-${e}`:sl),Qt=d.createContext({getPrefixCls:ZA,iconPrefixCls:_p}),{Consumer:iz}=Qt,uv={};function Ro(e){const t=d.useContext(Qt),{getPrefixCls:r,direction:n,getPopupContainer:o}=t,a=t[e];return Object.assign(Object.assign({classNames:uv,styles:uv},a),{getPrefixCls:r,direction:n,getPopupContainer:o})}const JA=`-ant-${Date.now()}-${Math.random()}`;function QA(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 Wt(a),u=ll(l.toRgbString());r[`${i}-color`]=n(l),r[`${i}-color-disabled`]=u[1],r[`${i}-color-hover`]=u[4],r[`${i}-color-active`]=u[6],r[`${i}-color-outline`]=l.clone().setA(.2).toRgbString(),r[`${i}-color-deprecated-bg`]=u[0],r[`${i}-color-deprecated-border`]=u[2]};if(t.primaryColor){o(t.primaryColor,"primary");const a=new Wt(t.primaryColor),i=ll(a.toRgbString());i.forEach((u,s)=>{r[`primary-${s+1}`]=u}),r["primary-color-deprecated-l-35"]=n(a,u=>u.lighten(35)),r["primary-color-deprecated-l-20"]=n(a,u=>u.lighten(20)),r["primary-color-deprecated-t-20"]=n(a,u=>u.tint(20)),r["primary-color-deprecated-t-50"]=n(a,u=>u.tint(50)),r["primary-color-deprecated-f-12"]=n(a,u=>u.setA(u.a*.12));const l=new Wt(i[0]);r["primary-color-active-deprecated-f-30"]=n(l,u=>u.setA(u.a*.3)),r["primary-color-active-deprecated-d-02"]=n(l,u=>u.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 e5(e,t){const r=QA(e,t);Xr()&&mo(r,`${JA}-dynamic-theme`)}const Po=d.createContext(!1),t5=({children:e,disabled:t})=>{const r=d.useContext(Po);return d.createElement(Po.Provider,{value:t??r},e)},Za=d.createContext(void 0),r5=({children:e,size:t})=>{const r=d.useContext(Za);return d.createElement(Za.Provider,{value:t||r},e)};function n5(){const e=Rr(Po),t=Rr(Za);return{componentDisabled:e,componentSize:t}}var X1=vr(function e(){gr(this,e)}),U1="CALC_UNIT",o5=new RegExp(U1,"g");function jc(e){return typeof e=="number"?"".concat(e).concat(U1):e}var a5=(function(e){ro(r,e);var t=no(r);function r(n,o){var a;gr(this,r),a=t.call(this),M(Qe(a),"result",""),M(Qe(a),"unitlessCssVar",void 0),M(Qe(a),"lowPriority",void 0);var i=it(n);return a.unitlessCssVar=o,n instanceof r?a.result="(".concat(n.result,")"):i==="number"?a.result=jc(n):i==="string"&&(a.result=n),a}return vr(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(jc(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(jc(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(u){return o.result.includes(u)})&&(l=!1),this.result=this.result.replace(o5,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r})(X1),i5=(function(e){ro(r,e);var t=no(r);function r(n){var o;return gr(this,r),o=t.call(this),M(Qe(o),"result",0),n instanceof r?o.result=n.result:typeof n=="number"&&(o.result=n),o}return vr(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})(X1),l5=function(e,t){var r=e==="css"?a5:i5;return function(n){return new r(n,t)}},cv=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 ul(e){var t=d.useRef(!1),r=d.useState(e),n=he(r,2),o=n[0],a=n[1];d.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(l,u){u&&t.current||a(l)}return[o,i]}function Ic(e){return e!==void 0}function Vr(e,t){var r=t||{},n=r.defaultValue,o=r.value,a=r.onChange,i=r.postState,l=ul(function(){return Ic(o)?o:Ic(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),u=he(l,2),s=u[0],c=u[1],p=o!==void 0?o:s,f=i?i(p):p,h=nr(a),v=ul([p]),g=he(v,2),m=g[0],b=g[1];Gg(function(){var C=m[0];s!==C&&h(s,C)},[m]),Gg(function(){Ic(o)||c(o)},[o]);var y=nr(function(C,w){c(C,w),b([p],w)});return[f,y]}function dv(e,t,r,n){var o=K({},t[e]);if(n!=null&&n.deprecatedTokens){var a=n.deprecatedTokens;a.forEach(function(l){var u=he(l,2),s=u[0],c=u[1];if(o!=null&&o[s]||o!=null&&o[c]){var p;(p=o[c])!==null&&p!==void 0||(o[c]=o==null?void 0:o[s])}})}var i=K(K({},r),o);return Object.keys(i).forEach(function(l){i[l]===t[l]&&delete i[l]}),i}var G1=typeof CSSINJS_STATISTIC<"u",af=!0;function tr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!G1)return Object.assign.apply(Object,[{}].concat(t));af=!1;var n={};return t.forEach(function(o){if(it(o)==="object"){var a=Object.keys(o);a.forEach(function(i){Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){return o[i]}})})}}),af=!0,n}var fv={};function s5(){}var u5=function(e){var t,r=e,n=s5;return G1&&typeof Proxy<"u"&&(t=new Set,r=new Proxy(e,{get:function(o,a){if(af){var i;(i=t)===null||i===void 0||i.add(a)}return o[a]}}),n=function(o,a){var i;fv[o]={global:Array.from(t),component:K(K({},(i=fv[o])===null||i===void 0?void 0:i.component),a)}}),{token:r,keys:t,flush:n}};function pv(e,t,r){if(typeof r=="function"){var n;return r(tr(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}function c5(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 ce(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 ce(o)}).join(","),")")}}}var d5=1e3*60*10,f5=(function(){function e(){gr(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 vr(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&&it(o)==="object"?"obj_".concat(r.getObjectID(o)):"".concat(it(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>d5&&(t.map.delete(o),t.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),e})(),mv=new f5;function p5(e,t){return oe.useMemo(function(){var r=mv.get(t);if(r)return r;var n=e();return mv.set(t,n),n},t)}var m5=function(){return{}};function h5(e){var t=e.useCSP,r=t===void 0?m5:t,n=e.useToken,o=e.usePrefix,a=e.getResetStyles,i=e.getCommonStyle,l=e.getCompUnitless;function u(f,h,v,g){var m=Array.isArray(f)?f[0]:f;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(f):{},w=K(K({},C),{},M({},b("zIndexPopup"),!0));Object.keys(y).forEach(function(x){w[b(x)]=y[x]});var E=K(K({},g),{},{unitless:w,prefixToken:b}),D=c(f,h,v,E),k=s(m,v,E);return function(x){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x,j=D(x,O),B=he(j,2),N=B[1],A=k(O),S=he(A,2),$=S[0],P=S[1];return[$,N,P]}}function s(f,h,v){var g=v.unitless,m=v.injectStyle,b=m===void 0?!0:m,y=v.prefixToken,C=v.ignore,w=function(D){var k=D.rootCls,x=D.cssVar,O=x===void 0?{}:x,j=n(),B=j.realToken;return kA({path:[f],prefix:O.prefix,key:O.key,unitless:g,ignore:C,token:B,scope:k},function(){var N=pv(f,B,h),A=dv(f,B,N,{deprecatedTokens:v==null?void 0:v.deprecatedTokens});return Object.keys(N).forEach(function(S){A[y(S)]=A[S],delete A[S]}),A}),null},E=function(D){var k=n(),x=k.cssVar;return[function(O){return b&&x?oe.createElement(oe.Fragment,null,oe.createElement(w,{rootCls:D,cssVar:x,component:f}),O):O},x==null?void 0:x.key]};return E}function c(f,h,v){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=Array.isArray(f)?f:[f,f],b=he(m,1),y=b[0],C=m.join("-"),w=e.layer||{name:"antd"};return function(E){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E,k=n(),x=k.theme,O=k.realToken,j=k.hashId,B=k.token,N=k.cssVar,A=o(),S=A.rootPrefixCls,$=A.iconPrefixCls,P=r(),F=N?"css":"js",I=p5(function(){var Z=new Set;return N&&Object.keys(g.unitless||{}).forEach(function(J){Z.add(gs(J,N.prefix)),Z.add(gs(J,cv(y,N.prefix)))}),l5(F,Z)},[F,y,N==null?void 0:N.prefix]),T=c5(F),q=T.max,L=T.min,_={theme:x,token:B,hashId:j,nonce:function(){return P.nonce},clientOnly:g.clientOnly,layer:w,order:g.order||-999};typeof a=="function"&&qd(K(K({},_),{},{clientOnly:!1,path:["Shared",S]}),function(){return a(B,{prefix:{rootPrefixCls:S,iconPrefixCls:$},csp:P})});var V=qd(K(K({},_),{},{path:[C,E,$]}),function(){if(g.injectStyle===!1)return[];var Z=u5(B),J=Z.token,z=Z.flush,Y=pv(y,O,v),G=".".concat(E),X=dv(y,O,Y,{deprecatedTokens:g.deprecatedTokens});N&&Y&&it(Y)==="object"&&Object.keys(Y).forEach(function(U){Y[U]="var(".concat(gs(U,cv(y,N.prefix)),")")});var W=tr(J,{componentCls:G,prefixCls:E,iconCls:".".concat($),antCls:".".concat(S),calc:I,max:q,min:L},N?Y:X),H=h(W,{hashId:j,prefixCls:E,rootPrefixCls:S,iconPrefixCls:$});z(y,X);var ne=typeof i=="function"?i(W,E,D,g.resetFont):null;return[g.resetStyle===!1?null:ne,H]});return[V,j]}}function p(f,h,v){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=c(f,h,v,K({resetStyle:!1,order:-998},g)),b=function(y){var C=y.prefixCls,w=y.rootCls,E=w===void 0?C:w;return m(C,E),null};return b}return{genStyleHooks:u,genSubStyleComponent:p,genComponentStyleHook:c}}const na=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],g5="5.27.6";function Rc(e){return e>=0&&e<=255}function Bi(e,t){const{r,g:n,b:o,a}=new Wt(e).toRgb();if(a<1)return e;const{r:i,g:l,b:u}=new Wt(t).toRgb();for(let s=.01;s<=1;s+=.01){const c=Math.round((r-i*(1-s))/s),p=Math.round((n-l*(1-s))/s),f=Math.round((o-u*(1-s))/s);if(Rc(c)&&Rc(p)&&Rc(f))return new Wt({r:c,g:p,b:f,a:Math.round(s*100)/100}).toRgbString()}return new Wt({r,g:n,b:o,a:1}).toRgbString()}var v5=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 Y1(e){const{override:t}=e,r=v5(e,["override"]),n=Object.assign({},t);Object.keys(il).forEach(p=>{delete n[p]});const o=Object.assign(Object.assign({},r),n),a=480,i=576,l=768,u=992,s=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:Bi(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:Bi(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Bi(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:Bi(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:u-1,screenLG:u,screenLGMin:u,screenLGMax:s-1,screenXL:s,screenXLMin:s,screenXLMax:c-1,screenXXL:c,screenXXLMin:c,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
180
+ 0 1px 2px -2px ${new Wt("rgba(0, 0, 0, 0.16)").toRgbString()},
181
+ 0 3px 6px 0 ${new Wt("rgba(0, 0, 0, 0.12)").toRgbString()},
182
+ 0 5px 12px 4px ${new Wt("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 hv=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 Z1={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},b5={motionBase:!0,motionUnit:!0},y5={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},J1=(e,t,r)=>{const n=r.getDerivativeToken(e),{override:o}=t,a=hv(t,["override"]);let i=Object.assign(Object.assign({},n),{override:o});return i=Y1(i),a&&Object.entries(a).forEach(([l,u])=>{const{theme:s}=u,c=hv(u,["theme"]);let p=c;s&&(p=J1(Object.assign(Object.assign({},i),c),{override:c},s)),i[l]=p}),i};function Gr(){const{token:e,hashed:t,theme:r,override:n,cssVar:o}=oe.useContext(V1),a=`${g5}-${t||""}`,i=r||q1,[l,u,s]=YO(i,[il,e],{salt:a,override:n,getComputedToken:J1,formatToken:Y1,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:Z1,ignore:b5,preserve:y5}});return[i,s,t?u:"",l,o]}const cl={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Sr=(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}),El=()=>({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"}}),Ks=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),C5=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"}}}),x5=(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:`${ce(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),dl=(e,t)=>({"&:focus-visible":No(e)}),Q1=e=>({[`.${e}`]:Object.assign(Object.assign({},El()),{[`.${e} .${e}-icon`]:{display:"block"}})}),w5=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"},dl(e)),{"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:Lr,genComponentStyleHook:E5,genSubStyleComponent:eC}=h5({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=Rr(Qt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,r,n,o]=Gr();return{theme:e,realToken:t,hashId:r,token:n,cssVar:o}},useCSP:()=>{const{csp:e}=Rr(Qt);return e??{}},getResetStyles:(e,t)=>{var r;const n=C5(e);return[n,{"&":n},Q1((r=t==null?void 0:t.prefix.iconPrefixCls)!==null&&r!==void 0?r:_p)]},getCommonStyle:x5,getCompUnitless:()=>Z1});function k5(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 D5=(e,t)=>{const[r,n]=Gr();return qd({token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>Q1(e))},S5=Object.assign({},d),{useId:gv}=S5,$5=()=>"",B5=typeof gv>"u"?$5:gv;function O5(e,t,r){var n;li();const o=e||{},a=o.inherit===!1||!t?Object.assign(Object.assign({},of),{hashed:(n=t==null?void 0:t.hashed)!==null&&n!==void 0?n:of.hashed,cssVar:t==null?void 0:t.cssVar}):t,i=B5();return la(()=>{var l,u;if(!e)return t;const s=Object.assign({},a.components);Object.keys(e.components||{}).forEach(f=>{s[f]=Object.assign(Object.assign({},s[f]),e.components[f])});const c=`css-var-${i.replace(/:/g,"")}`,p=((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"&&((u=o.cssVar)===null||u===void 0?void 0:u.key)||c});return Object.assign(Object.assign(Object.assign({},a),o),{token:Object.assign(Object.assign({},a.token),o.token),components:s,cssVar:p})},[o,a],(l,u)=>l.some((s,c)=>{const p=u[c];return!Zn(s,p,!0)}))}var A5=["children"],tC=d.createContext({});function F5(e){var t=e.children,r=bt(e,A5);return d.createElement(tC.Provider,{value:r},t)}var P5=(function(e){ro(r,e);var t=no(r);function r(){return gr(this,r),t.apply(this,arguments)}return vr(r,[{key:"render",value:function(){return this.props.children}}]),r})(d.Component);function N5(e){var t=d.useReducer(function(l){return l+1},0),r=he(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 wo="none",Gl="appear",Yl="enter",Zl="leave",vv="none",jn="prepare",Aa="start",Fa="active",Lp="end",rC="prepared";function bv(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 j5(e,t){var r={animationend:bv("Animation","AnimationEnd"),transitionend:bv("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var I5=j5(Xr(),typeof window<"u"?window:{}),nC={};if(Xr()){var R5=document.createElement("div");nC=R5.style}var Jl={};function oC(e){if(Jl[e])return Jl[e];var t=I5[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 nC)return Jl[e]=t[a],Jl[e]}return""}var aC=oC("animationend"),iC=oC("transitionend"),lC=!!(aC&&iC),yv=aC||"animationend",Cv=iC||"transitionend";function xv(e,t){if(!e)return null;if(it(e)==="object"){var r=t.replace(/-\w/g,function(n){return n[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}const T5=(function(e){var t=qe();function r(o){o&&(o.removeEventListener(Cv,e),o.removeEventListener(yv,e))}function n(o){t.current&&t.current!==o&&r(t.current),o&&o!==t.current&&(o.addEventListener(Cv,e),o.addEventListener(yv,e),t.current=o)}return d.useEffect(function(){return function(){r(t.current)}},[]),[n,r]});var sC=Xr()?Nb:Bt;const M5=(function(){var e=d.useRef(null);function t(){Xt.cancel(e.current)}function r(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=Xt(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 z5=[jn,Aa,Fa,Lp],_5=[jn,rC],uC=!1,L5=!0;function cC(e){return e===Fa||e===Lp}const H5=(function(e,t,r){var n=ul(vv),o=he(n,2),a=o[0],i=o[1],l=M5(),u=he(l,2),s=u[0],c=u[1];function p(){i(jn,!0)}var f=t?_5:z5;return sC(function(){if(a!==vv&&a!==Lp){var h=f.indexOf(a),v=f[h+1],g=r(a);g===uC?i(v,!0):v&&s(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()}},[]),[p,a]});function W5(e,t,r,n){var o=n.motionEnter,a=o===void 0?!0:o,i=n.motionAppear,l=i===void 0?!0:i,u=n.motionLeave,s=u===void 0?!0:u,c=n.motionDeadline,p=n.motionLeaveImmediately,f=n.onAppearPrepare,h=n.onEnterPrepare,v=n.onLeavePrepare,g=n.onAppearStart,m=n.onEnterStart,b=n.onLeaveStart,y=n.onAppearActive,C=n.onEnterActive,w=n.onLeaveActive,E=n.onAppearEnd,D=n.onEnterEnd,k=n.onLeaveEnd,x=n.onVisibleChanged,O=ul(),j=he(O,2),B=j[0],N=j[1],A=N5(wo),S=he(A,2),$=S[0],P=S[1],F=ul(null),I=he(F,2),T=I[0],q=I[1],L=$(),_=qe(!1),V=qe(null);function Z(){return r()}var J=qe(!1);function z(){P(wo),q(null,!0)}var Y=nr(function(be){var Ae=$();if(Ae!==wo){var me=Z();if(!(be&&!be.deadline&&be.target!==me)){var Ee=J.current,je;Ae===Gl&&Ee?je=E==null?void 0:E(me,be):Ae===Yl&&Ee?je=D==null?void 0:D(me,be):Ae===Zl&&Ee&&(je=k==null?void 0:k(me,be)),Ee&&je!==!1&&z()}}}),G=T5(Y),X=he(G,1),W=X[0],H=function(be){switch(be){case Gl:return M(M(M({},jn,f),Aa,g),Fa,y);case Yl:return M(M(M({},jn,h),Aa,m),Fa,C);case Zl:return M(M(M({},jn,v),Aa,b),Fa,w);default:return{}}},ne=d.useMemo(function(){return H(L)},[L]),U=H5(L,!e,function(be){if(be===jn){var Ae=ne[jn];return Ae?Ae(Z()):uC}if(de in ne){var me;q(((me=ne[de])===null||me===void 0?void 0:me.call(ne,Z(),null))||null)}return de===Fa&&L!==wo&&(W(Z()),c>0&&(clearTimeout(V.current),V.current=setTimeout(function(){Y({deadline:!0})},c))),de===rC&&z(),L5}),ae=he(U,2),re=ae[0],de=ae[1],ge=cC(de);J.current=ge;var ye=qe(null);sC(function(){if(!(_.current&&ye.current===t)){N(t);var be=_.current;_.current=!0;var Ae;!be&&t&&l&&(Ae=Gl),be&&t&&a&&(Ae=Yl),(be&&!t&&s||!be&&p&&!t&&s)&&(Ae=Zl);var me=H(Ae);Ae&&(e||me[jn])?(P(Ae),re()):P(wo),ye.current=t}},[t]),Bt(function(){(L===Gl&&!l||L===Yl&&!a||L===Zl&&!s)&&P(wo)},[l,a,s]),Bt(function(){return function(){_.current=!1,clearTimeout(V.current)}},[]);var Ne=d.useRef(!1);Bt(function(){B&&(Ne.current=!0),B!==void 0&&L===wo&&((Ne.current||B)&&(x==null||x(B)),Ne.current=!0)},[B,L]);var xe=T;return ne[jn]&&de===Aa&&(xe=K({transition:"none"},xe)),[L,de,xe,B??t]}function K5(e){var t=e;it(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,u=o.removeOnLeave,s=u===void 0?!0:u,c=o.forceRender,p=o.children,f=o.motionName,h=o.leavedClassName,v=o.eventProps,g=d.useContext(tC),m=g.motion,b=r(o,m),y=qe(),C=qe();function w(){try{return y.current instanceof HTMLElement?y.current:hs(C.current)}catch{return null}}var E=W5(b,l,w,o),D=he(E,4),k=D[0],x=D[1],O=D[2],j=D[3],B=d.useRef(j);j&&(B.current=!0);var N=d.useCallback(function(I){y.current=I,el(a,I)},[a]),A,S=K(K({},v),{},{visible:l});if(!p)A=null;else if(k===wo)j?A=p(K({},S),N):!s&&B.current&&h?A=p(K(K({},S),{},{className:h}),N):c||!s&&!h?A=p(K(K({},S),{},{style:{display:"none"}}),N):A=null;else{var $;x===jn?$="prepare":cC(x)?$="active":x===Aa&&($="start");var P=xv(f,"".concat(k,"-").concat($));A=p(K(K({},S),{},{className:ve(xv(f,k),M(M({},P,P&&$),f,typeof f=="string")),style:O}),N)}if(d.isValidElement(A)&&Yn(A)){var F=ua(A);F||(A=d.cloneElement(A,{ref:N}))}return d.createElement(P5,{ref:C},A)});return n.displayName="CSSMotion",n}const ca=K5(lC);var lf="add",sf="keep",uf="remove",Tc="removed";function q5(e){var t;return e&&it(e)==="object"&&"key"in e?t=e:t={key:e},K(K({},t),{},{key:String(t.key)})}function cf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(q5)}function V5(){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=cf(e),i=cf(t);a.forEach(function(s){for(var c=!1,p=n;p<o;p+=1){var f=i[p];if(f.key===s.key){n<p&&(r=r.concat(i.slice(n,p).map(function(h){return K(K({},h),{},{status:lf})})),n=p),r.push(K(K({},f),{},{status:sf})),n+=1,c=!0;break}}c||r.push(K(K({},s),{},{status:uf}))}),n<o&&(r=r.concat(i.slice(n).map(function(s){return K(K({},s),{},{status:lf})})));var l={};r.forEach(function(s){var c=s.key;l[c]=(l[c]||0)+1});var u=Object.keys(l).filter(function(s){return l[s]>1});return u.forEach(function(s){r=r.filter(function(c){var p=c.key,f=c.status;return p!==s||f!==uf}),r.forEach(function(c){c.key===s&&(c.status=sf)})}),r}var X5=["component","children","onVisibleChanged","onAllRemoved"],U5=["status"],G5=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Y5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ca,r=(function(n){ro(a,n);var o=no(a);function a(){var i;gr(this,a);for(var l=arguments.length,u=new Array(l),s=0;s<l;s++)u[s]=arguments[s];return i=o.call.apply(o,[this].concat(u)),M(Qe(i),"state",{keyEntities:[]}),M(Qe(i),"removeKey",function(c){i.setState(function(p){var f=p.keyEntities.map(function(h){return h.key!==c?h:K(K({},h),{},{status:Tc})});return{keyEntities:f}},function(){var p=i.state.keyEntities,f=p.filter(function(h){var v=h.status;return v!==Tc}).length;f===0&&i.props.onAllRemoved&&i.props.onAllRemoved()})}),i}return vr(a,[{key:"render",value:function(){var i=this,l=this.state.keyEntities,u=this.props,s=u.component,c=u.children,p=u.onVisibleChanged;u.onAllRemoved;var f=bt(u,X5),h=s||d.Fragment,v={};return G5.forEach(function(g){v[g]=f[g],delete f[g]}),delete f.keys,d.createElement(h,f,l.map(function(g,m){var b=g.status,y=bt(g,U5),C=b===lf||b===sf;return d.createElement(t,ze({},v,{key:y.key,visible:C,eventProps:y,onVisibleChanged:function(w){p==null||p(w,{key:y.key}),w||i.removeKey(y.key)}}),function(w,E){return c(K(K({},w),{},{index:m}),E)})}))}}],[{key:"getDerivedStateFromProps",value:function(i,l){var u=i.keys,s=l.keyEntities,c=cf(u),p=V5(s,c);return{keyEntities:p.filter(function(f){var h=s.find(function(v){var g=v.key;return f.key===g});return!(h&&h.status===Tc&&f.status===uf)})}}}]),a})(d.Component);return M(r,"defaultProps",{component:"div"}),r}Y5(lC);const wv=d.createContext(!0);function Z5(e){const t=d.useContext(wv),{children:r}=e,[,n]=Gr(),{motion:o}=n,a=d.useRef(!1);return a.current||(a.current=t!==o),a.current?d.createElement(wv.Provider,{value:o},d.createElement(F5,{motion:o},r)):r}const J5=()=>null;var Q5=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 eF=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let dC;function tF(){return dC||sl}function rF(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const nF=e=>{const{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:o}=e;t!==void 0&&(dC=t),n&&rF(n)&&e5(tF(),n)},oF=e=>{const{children:t,csp:r,autoInsertSpaceInButton:n,alert:o,anchor:a,form:i,locale:l,componentSize:u,direction:s,space:c,splitter:p,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:v,popupOverflow:g,legacyLocale:m,parentContext:b,iconPrefixCls:y,theme:C,componentDisabled:w,segmented:E,statistic:D,spin:k,calendar:x,carousel:O,cascader:j,collapse:B,typography:N,checkbox:A,descriptions:S,divider:$,drawer:P,skeleton:F,steps:I,image:T,layout:q,list:L,mentions:_,modal:V,progress:Z,result:J,slider:z,breadcrumb:Y,menu:G,pagination:X,input:W,textArea:H,empty:ne,badge:U,radio:ae,rate:re,switch:de,transfer:ge,avatar:ye,message:Ne,tag:xe,table:be,card:Ae,tabs:me,timeline:Ee,timePicker:je,upload:Be,notification:Ye,tree:Re,colorPicker:Te,datePicker:ue,rangePicker:ke,flex:Ke,wave:Ze,dropdown:We,warning:_e,tour:nt,tooltip:Ue,popover:et,popconfirm:yt,floatButton:kt,floatButtonGroup:dt,variant:ht,inputNumber:Mt,treeSelect:Pt}=e,ft=d.useCallback((Pe,ot)=>{const{prefixCls:He}=e;if(ot)return ot;const $e=He||b.getPrefixCls("");return Pe?`${$e}-${Pe}`:$e},[b.getPrefixCls,e.prefixCls]),ut=y||b.iconPrefixCls||_p,pe=r||b.csp;D5(ut,pe);const Oe=O5(C,b.theme,{prefixCls:ft("")}),Se={csp:pe,autoInsertSpaceInButton:n,alert:o,anchor:a,locale:l||m,direction:s,space:c,splitter:p,virtual:f,popupMatchSelectWidth:v??h,popupOverflow:g,getPrefixCls:ft,iconPrefixCls:ut,theme:Oe,segmented:E,statistic:D,spin:k,calendar:x,carousel:O,cascader:j,collapse:B,typography:N,checkbox:A,descriptions:S,divider:$,drawer:P,skeleton:F,steps:I,image:T,input:W,textArea:H,layout:q,list:L,mentions:_,modal:V,progress:Z,result:J,slider:z,breadcrumb:Y,menu:G,pagination:X,empty:ne,badge:U,radio:ae,rate:re,switch:de,transfer:ge,avatar:ye,message:Ne,tag:xe,table:be,card:Ae,tabs:me,timeline:Ee,timePicker:je,upload:Be,notification:Ye,tree:Re,colorPicker:Te,datePicker:ue,rangePicker:ke,flex:Ke,wave:Ze,dropdown:We,warning:_e,tour:nt,tooltip:Ue,popover:et,popconfirm:yt,floatButton:kt,floatButtonGroup:dt,variant:ht,inputNumber:Mt,treeSelect:Pt},Ce=Object.assign({},b);Object.keys(Se).forEach(Pe=>{Se[Pe]!==void 0&&(Ce[Pe]=Se[Pe])}),eF.forEach(Pe=>{const ot=e[Pe];ot&&(Ce[Pe]=ot)}),typeof n<"u"&&(Ce.button=Object.assign({autoInsertSpace:n},Ce.button));const we=la(()=>Ce,Ce,(Pe,ot)=>{const He=Object.keys(Pe),$e=Object.keys(ot);return He.length!==$e.length||He.some(Xe=>Pe[Xe]!==ot[Xe])}),{layer:fe}=d.useContext(wl),le=d.useMemo(()=>({prefixCls:ut,csp:pe,layer:fe?"antd":void 0}),[ut,pe,fe]);let ee=d.createElement(d.Fragment,null,d.createElement(J5,{dropdownMatchSelectWidth:h}),t);const te=d.useMemo(()=>{var Pe,ot,He,$e;return Oa(((Pe=ra.Form)===null||Pe===void 0?void 0:Pe.defaultValidateMessages)||{},((He=(ot=we.locale)===null||ot===void 0?void 0:ot.Form)===null||He===void 0?void 0:He.defaultValidateMessages)||{},(($e=we.form)===null||$e===void 0?void 0:$e.validateMessages)||{},(i==null?void 0:i.validateMessages)||{})},[we,i==null?void 0:i.validateMessages]);Object.keys(te).length>0&&(ee=d.createElement(AA.Provider,{value:te},ee)),l&&(ee=d.createElement(IA,{locale:l,_ANT_MARK__:jA},ee)),ee=d.createElement(Mp.Provider,{value:le},ee),u&&(ee=d.createElement(r5,{size:u},ee)),ee=d.createElement(Z5,null,ee);const se=d.useMemo(()=>{const Pe=Oe||{},{algorithm:ot,token:He,components:$e,cssVar:Xe}=Pe,wt=Q5(Pe,["algorithm","token","components","cssVar"]),St=ot&&(!Array.isArray(ot)||ot.length>0)?Ld(ot):q1,Nt={};Object.entries($e||{}).forEach(([jt,ar])=>{const Le=Object.assign({},ar);"algorithm"in Le&&(Le.algorithm===!0?Le.theme=St:(Array.isArray(Le.algorithm)||typeof Le.algorithm=="function")&&(Le.theme=Ld(Le.algorithm)),delete Le.algorithm),Nt[jt]=Le});const Ot=Object.assign(Object.assign({},il),He);return Object.assign(Object.assign({},wt),{theme:St,token:Ot,components:Nt,override:Object.assign({override:Ot},Nt),cssVar:Xe})},[Oe]);return C&&(ee=d.createElement(V1.Provider,{value:se},ee)),we.warning&&(ee=d.createElement(OA.Provider,{value:we.warning},ee)),w!==void 0&&(ee=d.createElement(t5,{disabled:w},ee)),d.createElement(Qt.Provider,{value:we},ee)},da=e=>{const t=d.useContext(Qt),r=d.useContext(zp);return d.createElement(oF,Object.assign({parentContext:t,legacyLocale:r},e))};da.ConfigContext=Qt;da.SizeContext=Za;da.config=nF;da.useConfig=n5;Object.defineProperty(da,"SizeContext",{get:()=>Za});function fC(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function aF(e){return fC(e)instanceof ShadowRoot}function qs(e){return aF(e)?fC(e):null}function iF(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function lF(e,t){ur(e,"[@ant-design/icons] ".concat(t))}function Ev(e){return it(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(it(e.icon)==="object"||typeof e.icon=="function")}function kv(){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[iF(r)]=n}return t},{})}function df(e,t,r){return r?oe.createElement(e.tag,K(K({key:t},kv(e.attrs)),r),(e.children||[]).map(function(n,o){return df(n,"".concat(t,"-").concat(e.tag,"-").concat(o))})):oe.createElement(e.tag,K({key:t},kv(e.attrs)),(e.children||[]).map(function(n,o){return df(n,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function pC(e){return ll(e)[0]}function mC(e){return e?Array.isArray(e)?e:[e]:[]}var sF=`
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
+ `,uF=function(e){var t=Rr(Mp),r=t.csp,n=t.prefixCls,o=t.layer,a=sF;n&&(a=a.replace(/anticon/g,n)),o&&(a="@layer ".concat(o,` {
255
+ `).concat(a,`
256
+ }`)),Bt(function(){var i=e.current,l=qs(i);mo(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:l})},[])},cF=["icon","className","onClick","style","primaryColor","secondaryColor"],zi={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function dF(e){var t=e.primaryColor,r=e.secondaryColor;zi.primaryColor=t,zi.secondaryColor=r||pC(t),zi.calculated=!!r}function fF(){return K({},zi)}var si=function(e){var t=e.icon,r=e.className,n=e.onClick,o=e.style,a=e.primaryColor,i=e.secondaryColor,l=bt(e,cF),u=d.useRef(),s=zi;if(a&&(s={primaryColor:a,secondaryColor:i||pC(a)}),uF(u),lF(Ev(t),"icon should be icon definiton, but got ".concat(t)),!Ev(t))return null;var c=t;return c&&typeof c.icon=="function"&&(c=K(K({},c),{},{icon:c.icon(s.primaryColor,s.secondaryColor)})),df(c.icon,"svg-".concat(c.name),K(K({className:r,onClick:n,style:o,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:u}))};si.displayName="IconReact";si.getTwoToneColors=fF;si.setTwoToneColors=dF;function hC(e){var t=mC(e),r=he(t,2),n=r[0],o=r[1];return si.setTwoToneColors({primaryColor:n,secondaryColor:o})}function pF(){var e=si.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var mF=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];hC(Ws.primary);var cr=d.forwardRef(function(e,t){var r=e.className,n=e.icon,o=e.spin,a=e.rotate,i=e.tabIndex,l=e.onClick,u=e.twoToneColor,s=bt(e,mF),c=d.useContext(Mp),p=c.prefixCls,f=p===void 0?"anticon":p,h=c.rootClassName,v=ve(h,f,M(M({},"".concat(f,"-").concat(n.name),!!n.name),"".concat(f,"-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=mC(u),y=he(b,2),C=y[0],w=y[1];return d.createElement("span",ze({role:"img","aria-label":n.name},s,{ref:t,tabIndex:g,onClick:l,className:v}),d.createElement(si,{icon:n,primaryColor:C,secondaryColor:w,style:m}))});cr.displayName="AntdIcon";cr.getTwoToneColor=pF;cr.setTwoToneColor=hC;var hF={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"},gF=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:hF}))},gC=d.forwardRef(gF),vF={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"},bF=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:vF}))},yF=d.forwardRef(bF),CF=`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`,xF=`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`,wF="".concat(CF," ").concat(xF).split(/[\s\n]+/),EF="aria-",kF="data-";function Dv(e,t){return e.indexOf(t)===0}function Jn(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=K({},t);var n={};return Object.keys(e).forEach(function(o){(r.aria&&(o==="role"||Dv(o,EF))||r.data&&Dv(o,kF)||r.attr&&wF.includes(o))&&(n[o]=e[o])}),n}function vC(e){return e&&oe.isValidElement(e)&&e.type===oe.Fragment}const DF=(e,t,r)=>oe.isValidElement(e)?oe.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function Qn(e,t){return DF(e,e,t)}function ff(e){return e!=null&&e===e.window}const SF=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return ff(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!ff(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 $F(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 BF(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),i=SF(a),l=Date.now(),u=()=>{const s=Date.now()-l,c=$F(s>o?o:s,i,e,o);ff(a)?a.scrollTo(window.pageXOffset,c):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=c:a.scrollTop=c,s<o?Xt(u):typeof n=="function"&&n()};Xt(u)}const go=e=>{const[,,,,t]=Gr();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},OF={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"},AF=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:OF}))},Hp=d.forwardRef(AF);const Wp=oe.createContext(void 0),To=100,bC={Modal:To,Drawer:To,Popover:To,Popconfirm:To,Tooltip:To,Tour:To,FloatButton:To},FF={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function PF(e){return e in bC}const Eu=(e,t)=>{const[,r]=Gr(),n=oe.useContext(Wp),o=PF(e);let a;if(t!==void 0)a=[t,t];else{let i=n??0;o?i+=(n?0:r.zIndexPopupBase)+bC[e]:i+=FF[e],a=[n===void 0?t:i,i]}return a};function yC(e,t){this.v=e,this.k=t}function Wr(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch{o=0}Wr=function(a,i,l,u){function s(c,p){Wr(a,c,function(f){return this._invoke(c,p,f)})}i?o?o(a,i,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[i]=l:(s("next",0),s("throw",1),s("return",2))},Wr(e,t,r,n)}function Kp(){/*! 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 Wr(y,"_invoke",(function(C,w,E){var D,k,x,O=0,j=E||[],B=!1,N={p:0,n:0,v:e,a:A,f:A.bind(e,4),d:function(S,$){return D=S,k=0,x=e,N.n=$,i}};function A(S,$){for(k=S,x=$,t=0;!B&&O&&!P&&t<j.length;t++){var P,F=j[t],I=N.p,T=F[2];S>3?(P=T===$)&&(x=F[(k=F[4])?5:(k=3,3)],F[4]=F[5]=e):F[0]<=I&&((P=S<2&&I<F[1])?(k=0,N.v=$,N.n=F[1]):I<T&&(P=S<3||F[0]>$||$>T)&&(F[4]=S,F[5]=$,N.n=T,k=0))}if(P||S>1)return i;throw B=!0,$}return function(S,$,P){if(O>1)throw TypeError("Generator is already running");for(B&&$===1&&A($,P),k=$,x=P;(t=k<2?e:x)||!B;){D||(k?k<3?(k>1&&(N.n=-1),A(k,x)):N.n=x:N.v=x);try{if(O=2,D){if(k||(S="next"),t=D[S]){if(!(t=t.call(D,x)))throw TypeError("iterator result is not an object");if(!t.done)return t;x=t.value,k<2&&(k=0)}else k===1&&(t=D.return)&&t.call(D),k<2&&(x=TypeError("The iterator does not provide a '"+S+"' method"),k=1);D=e}else if((t=(B=N.n<0)?x:C.call(w,N))!==i)break}catch(F){D=e,k=1,x=F}finally{O=1}}return{value:t,done:B}}})(h,g,m),!0),y}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(Wr(t={},n,function(){return this}),t),p=s.prototype=l.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,s):(h.__proto__=s,Wr(h,o,"GeneratorFunction")),h.prototype=Object.create(p),h}return u.prototype=s,Wr(p,"constructor",s),Wr(s,"constructor",u),u.displayName="GeneratorFunction",Wr(s,o,"GeneratorFunction"),Wr(p),Wr(p,o,"Generator"),Wr(p,n,function(){return this}),Wr(p,"toString",function(){return"[object Generator]"}),(Kp=function(){return{w:a,m:f}})()}function Vs(e,t){function r(o,a,i,l){try{var u=e[o](a),s=u.value;return s instanceof yC?t.resolve(s.v).then(function(c){r("next",c,i,l)},function(c){r("throw",c,i,l)}):t.resolve(s).then(function(c){u.value=c,i(u)},function(c){return r("throw",c,i,l)})}catch(c){l(c)}}var n;this.next||(Wr(Vs.prototype),Wr(Vs.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Wr(this,"_invoke",function(o,a,i){function l(){return new t(function(u,s){r(o,i,u,s)})}return n=n?n.then(l,l):l()},!0)}function CC(e,t,r,n,o){return new Vs(Kp().w(e,t,r,n),o||Promise)}function NF(e,t,r,n,o){var a=CC(e,t,r,n,o);return a.next().then(function(i){return i.done?i.value:a.next()})}function jF(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 Sv(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(it(e)+" is not iterable")}function Ur(){var e=Kp(),t=e.m(Ur),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,u;return function(s){l||(l={stop:function(){return u(s.a,2)},catch:function(){return s.v},abrupt:function(c,p){return u(s.a,o[c],p)},delegateYield:function(c,p,f){return l.resultName=p,u(s.d,Sv(c),f)},finish:function(c){return u(s.f,c)}},u=function(c,p,f){s.p=l.prev,s.n=l.next;try{return c(p,f)}finally{l.next=s.n}}),l.resultName&&(l[l.resultName]=s.v,l.resultName=void 0),l.sent=s.v,l.next=s.n;try{return i.call(this,l)}finally{s.p=l.prev,s.n=l.next}}}return(Ur=function(){return{wrap:function(i,l,u,s){return e.w(a(i),l,u,s&&s.reverse())},isGeneratorFunction:n,mark:e.m,awrap:function(i,l){return new yC(i,l)},AsyncIterator:Vs,async:function(i,l,u,s,c){return(n(l)?CC:NF)(a(i),l,u,s,c)},keys:jF,values:Sv}})()}function $v(e,t,r,n,o,a,i){try{var l=e[a](i),u=l.value}catch(s){return void r(s)}l.done?t(u):Promise.resolve(u).then(n,o)}function fa(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(u){$v(a,n,o,i,l,"next",u)}function l(u){$v(a,n,o,i,l,"throw",u)}i(void 0)})}}var kl=K({},Gw),IF=kl.version,Mc=kl.render,RF=kl.unmountComponentAtNode,ku;try{var TF=Number((IF||"").split(".")[0]);TF>=18&&(ku=kl.createRoot)}catch{}function Bv(e){var t=kl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&it(t)==="object"&&(t.usingClientEntryPoint=e)}var Xs="__rc_react_root__";function MF(e,t){Bv(!0);var r=t[Xs]||ku(t);Bv(!1),r.render(e),t[Xs]=r}function zF(e,t){Mc==null||Mc(e,t)}function _F(e,t){if(ku){MF(e,t);return}zF(e,t)}function LF(e){return pf.apply(this,arguments)}function pf(){return pf=fa(Ur().mark(function e(t){return Ur().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var n;(n=t[Xs])===null||n===void 0||n.unmount(),delete t[Xs]}));case 1:case"end":return r.stop()}},e)})),pf.apply(this,arguments)}function HF(e){RF(e)}function WF(e){return mf.apply(this,arguments)}function mf(){return mf=fa(Ur().mark(function e(t){return Ur().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(ku===void 0){r.next=2;break}return r.abrupt("return",LF(t));case 2:HF(t);case 3:case"end":return r.stop()}},e)})),mf.apply(this,arguments)}const KF=(e,t)=>(_F(e,t),()=>WF(t));let qF=KF;function VF(e){return qF}const zc=()=>({height:0,opacity:0}),Ov=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},XF=e=>({height:e?e.offsetHeight:0}),_c=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",xC=(e=sl)=>({motionName:`${e}-motion-collapse`,onAppearStart:zc,onEnterStart:zc,onAppearActive:Ov,onEnterActive:Ov,onLeaveStart:XF,onLeaveActive:zc,onAppearEnd:_c,onEnterEnd:_c,onLeaveEnd:_c,motionDeadline:500}),wC=(e,t,r)=>r!==void 0?r:`${e}-${t}`;function pn(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}const Du=(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}),UF=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(",")}}}}},GF=E5("Wave",UF),Su=`${sl}-wave-target`;function YF(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 ZF(e){var t;const{borderTopColor:r,borderColor:n,backgroundColor:o}=getComputedStyle(e);return(t=[r,n,o].find(YF))!==null&&t!==void 0?t:null}function Lc(e){return Number.isNaN(e)?0:e}const JF=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,u]=d.useState(null),[s,c]=d.useState([]),[p,f]=d.useState(0),[h,v]=d.useState(0),[g,m]=d.useState(0),[b,y]=d.useState(0),[C,w]=d.useState(!1),E={left:p,top:h,width:g,height:b,borderRadius:s.map(x=>`${x}px`).join(" ")};l&&(E["--wave-color"]=l);function D(){const x=getComputedStyle(r);u(ZF(r));const O=x.position==="static",{borderLeftWidth:j,borderTopWidth:B}=x;f(O?r.offsetLeft:Lc(-Number.parseFloat(j))),v(O?r.offsetTop:Lc(-Number.parseFloat(B))),m(r.offsetWidth),y(r.offsetHeight);const{borderTopLeftRadius:N,borderTopRightRadius:A,borderBottomLeftRadius:S,borderBottomRightRadius:$}=x;c([N,A,$,S].map(P=>Lc(Number.parseFloat(P))))}if(d.useEffect(()=>{if(r){const x=Xt(()=>{D(),w(!0)});let O;return typeof ResizeObserver<"u"&&(O=new ResizeObserver(D),O.observe(r)),()=>{Xt.cancel(x),O==null||O.disconnect()}}},[r]),!C)return null;const k=(n==="Checkbox"||n==="Radio")&&(r==null?void 0:r.classList.contains(Su));return d.createElement(ca,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(x,O)=>{var j,B;if(O.deadline||O.propertyName==="opacity"){const N=(j=a.current)===null||j===void 0?void 0:j.parentElement;(B=i.current)===null||B===void 0||B.call(i).then(()=>{N==null||N.remove()})}return!1}},({className:x},O)=>d.createElement("div",{ref:to(a,O),className:ve(t,x,{"wave-quick":k}),style:E}))},QF=(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=VF();let i=null;function l(){return i}i=a(d.createElement(JF,Object.assign({},t,{target:e,registerUnmount:l})),o)},e3=(e,t,r)=>{const{wave:n}=d.useContext(Qt),[,o,a]=Gr(),i=nr(u=>{const s=e.current;if(n!=null&&n.disabled||!s)return;const c=s.querySelector(`.${Su}`)||s,{showEffect:p}=n||{};(p||QF)(c,{className:t,token:o,component:r,event:u,hashId:a})}),l=d.useRef(null);return u=>{Xt.cancel(l.current),l.current=Xt(()=>{i(u)})}},qp=e=>{const{children:t,disabled:r,component:n}=e,{getPrefixCls:o}=Rr(Qt),a=qe(null),i=o("wave"),[,l]=GF(i),u=e3(a,ve(i,l),n);if(oe.useEffect(()=>{const c=a.current;if(!c||c.nodeType!==window.Node.ELEMENT_NODE||r)return;const p=f=>{!Du(f.target)||!c.getAttribute||c.getAttribute("disabled")||c.disabled||c.className.includes("disabled")&&!c.className.includes("disabled:")||c.getAttribute("aria-disabled")==="true"||c.className.includes("-leave")||u(f)};return c.addEventListener("click",p,!0),()=>{c.removeEventListener("click",p,!0)}},[r]),!oe.isValidElement(t))return t??null;const s=Yn(t)?to(ua(t),a):a;return Qn(t,{ref:s})},pa=e=>{const t=oe.useContext(Za);return oe.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},t3=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},r3=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"}}}},n3=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}}}},EC=Lr("Space",e=>{const t=tr(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[r3(t),n3(t),t3(t)]},()=>({}),{resetStyle:!1});var kC=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 $u=d.createContext(null),Bu=(e,t)=>{const r=d.useContext($u),n=d.useMemo(()=>{if(!r)return"";const{compactDirection:o,isFirstItem:a,isLastItem:i}=r,l=o==="vertical"?"-vertical-":"-";return ve(`${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}},o3=e=>{const{children:t}=e;return d.createElement($u.Provider,{value:null},t)},a3=e=>{const{children:t}=e,r=kC(e,["children"]);return d.createElement($u.Provider,{value:d.useMemo(()=>r,[r])},t)},i3=e=>{const{getPrefixCls:t,direction:r}=d.useContext(Qt),{size:n,direction:o,block:a,prefixCls:i,className:l,rootClassName:u,children:s}=e,c=kC(e,["size","direction","block","prefixCls","className","rootClassName","children"]),p=pa(C=>n??C),f=t("space-compact",i),[h,v]=EC(f),g=ve(f,v,{[`${f}-rtl`]:r==="rtl",[`${f}-block`]:a,[`${f}-vertical`]:o==="vertical"},l,u),m=d.useContext($u),b=_n(s),y=d.useMemo(()=>b.map((C,w)=>{const E=(C==null?void 0:C.key)||`${f}-item-${w}`;return d.createElement(a3,{key:E,compactSize:p,compactDirection:o,isFirstItem:w===0&&(!m||(m==null?void 0:m.isFirstItem)),isLastItem:w===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 l3=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 DC=d.createContext(void 0),s3=e=>{const{getPrefixCls:t,direction:r}=d.useContext(Qt),{prefixCls:n,size:o,className:a}=e,i=l3(e,["prefixCls","size","className"]),l=t("btn-group",n),[,,u]=Gr(),s=d.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]),c=ve(l,{[`${l}-${s}`]:s,[`${l}-rtl`]:r==="rtl"},a,u);return d.createElement(DC.Provider,{value:o},d.createElement("div",Object.assign({},i,{className:c})))},Av=/^[\u4E00-\u9FA5]{2}$/,hf=Av.test.bind(Av);function Fv(e){return typeof e=="string"}function Hc(e){return e==="text"||e==="link"}function u3(e,t){if(e==null)return;const r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&Fv(e.type)&&hf(e.props.children)?Qn(e,{children:e.props.children.split("").join(r)}):Fv(e)?hf(e)?oe.createElement("span",null,e.split("").join(r)):oe.createElement("span",null,e):vC(e)?oe.createElement("span",null,e):e}function c3(e,t){let r=!1;const n=[];return oe.Children.forEach(e,o=>{const a=typeof o,i=a==="string"||a==="number";if(r&&i){const l=n.length-1,u=n[l];n[l]=`${u}${o}`}else n.push(o);r=i}),oe.Children.map(n,o=>u3(o,t))}["default","primary","danger"].concat(Ie(na));const gf=fn((e,t)=>{const{className:r,style:n,children:o,prefixCls:a}=e,i=ve(`${a}-icon`,r);return oe.createElement("span",{ref:t,className:i,style:n},o)}),Pv=fn((e,t)=>{const{prefixCls:r,className:n,style:o,iconClassName:a}=e,i=ve(`${r}-loading-icon`,n);return oe.createElement(gf,{prefixCls:r,className:i,style:o,ref:t},oe.createElement(Hp,{className:a}))}),Wc=()=>({width:0,opacity:0,transform:"scale(0)"}),Kc=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),d3=e=>{const{prefixCls:t,loading:r,existIcon:n,className:o,style:a,mount:i}=e,l=!!r;return n?oe.createElement(Pv,{prefixCls:t,className:o,style:a}):oe.createElement(ca,{visible:l,motionName:`${t}-loading-icon-motion`,motionAppear:!i,motionEnter:!i,motionLeave:!i,removeOnLeave:!0,onAppearStart:Wc,onAppearActive:Kc,onEnterStart:Wc,onEnterActive:Kc,onLeaveStart:Kc,onLeaveActive:Wc},({className:u,style:s},c)=>{const p=Object.assign(Object.assign({},a),s);return oe.createElement(Pv,{prefixCls:t,className:ve(o,u),style:p,ref:c})})},Nv=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),f3=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}},Nv(`${t}-primary`,o),Nv(`${t}-danger`,a)]}};var p3=["b"],m3=["v"],qc=function(e){return Math.round(Number(e||0))},h3=function(e){if(e instanceof Wt)return e;if(e&&it(e)==="object"&&"h"in e&&"b"in e){var t=e,r=t.b,n=bt(t,p3);return K(K({},n),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},fl=(function(e){ro(r,e);var t=no(r);function r(n){return gr(this,r),t.call(this,h3(n))}return vr(r,[{key:"toHsbString",value:function(){var n=this.toHsb(),o=qc(n.s*100),a=qc(n.b*100),i=qc(n.h),l=n.a,u="hsb(".concat(i,", ").concat(o,"%, ").concat(a,"%)"),s="hsba(".concat(i,", ").concat(o,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?u:s}},{key:"toHsb",value:function(){var n=this.toHsv(),o=n.v,a=bt(n,m3);return K(K({},a),{},{b:o,a:this.a})}}]),r})(Wt),g3=function(e){return e instanceof fl?e:new fl(e)};g3("#1677ff");const v3=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",b3=(e,t)=>e?v3(e,t):"";let vf=(function(){function e(t){gr(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 fl(this.colors[0].color.metaColor)):this.metaColor=new fl(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return vr(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return b3(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 y3={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"},C3=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:y3}))},bf=d.forwardRef(C3);const SC=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`}}}),x3=e=>({animationDuration:e,animationFillMode:"both"}),w3=e=>({animationDuration:e,animationFillMode:"both"}),Vp=(e,t,r,n,o=!1)=>{const a=o?"&":"";return{[`
276
+ ${a}${e}-enter,
277
+ ${a}${e}-appear
278
+ `]:Object.assign(Object.assign({},x3(n)),{animationPlayState:"paused"}),[`${a}${e}-leave`]:Object.assign(Object.assign({},w3(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"}}},E3=new Ut("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),k3=new Ut("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),D3=new Ut("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),S3=new Ut("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),$3=new Ut("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),B3=new Ut("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),O3=new Ut("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),A3=new Ut("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),F3={"move-up":{inKeyframes:O3,outKeyframes:A3},"move-down":{inKeyframes:E3,outKeyframes:k3},"move-left":{inKeyframes:D3,outKeyframes:S3},"move-right":{inKeyframes:$3,outKeyframes:B3}},Us=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=F3[t];return[Vp(n,o,a,e.motionDurationMid),{[`
282
+ ${n}-enter,
283
+ ${n}-appear
284
+ `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Xp=new Ut("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Up=new Ut("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Gp=new Ut("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Yp=new Ut("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),P3=new Ut("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),N3=new Ut("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),j3=new Ut("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),I3=new Ut("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),R3={"slide-up":{inKeyframes:Xp,outKeyframes:Up},"slide-down":{inKeyframes:Gp,outKeyframes:Yp},"slide-left":{inKeyframes:P3,outKeyframes:N3},"slide-right":{inKeyframes:j3,outKeyframes:I3}},Ja=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=R3[t];return[Vp(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}}]},T3=new Ut("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),M3=new Ut("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),jv=new Ut("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Iv=new Ut("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),z3=new Ut("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),_3=new Ut("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),L3=new Ut("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),H3=new Ut("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),W3=new Ut("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),K3=new Ut("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),q3=new Ut("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),V3=new Ut("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),X3={zoom:{inKeyframes:T3,outKeyframes:M3},"zoom-big":{inKeyframes:jv,outKeyframes:Iv},"zoom-big-fast":{inKeyframes:jv,outKeyframes:Iv},"zoom-left":{inKeyframes:L3,outKeyframes:H3},"zoom-right":{inKeyframes:W3,outKeyframes:K3},"zoom-up":{inKeyframes:z3,outKeyframes:_3},"zoom-down":{inKeyframes:q3,outKeyframes:V3}},Zp=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=X3[t];return[Vp(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}}]},U3=e=>e instanceof vf?e:new vf(e),G3=(e,t)=>{const{r,g:n,b:o,a}=e.toRgb(),i=new fl(e.toRgbString()).onBackground(t).toHsv();return a<=.5?i.v>.5:r*.299+n*.587+o*.114>192},$C=e=>{const{paddingInline:t,onlyIconSize:r}=e;return tr(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r})},BC=e=>{var t,r,n,o,a,i;const l=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,u=(r=e.contentFontSizeSM)!==null&&r!==void 0?r:e.fontSize,s=(n=e.contentFontSizeLG)!==null&&n!==void 0?n:e.fontSizeLG,c=(o=e.contentLineHeight)!==null&&o!==void 0?o:ws(l),p=(a=e.contentLineHeightSM)!==null&&a!==void 0?a:ws(u),f=(i=e.contentLineHeightLG)!==null&&i!==void 0?i:ws(s),h=G3(new vf(e.colorBgSolid),"#fff")?"#000":"#fff",v=na.reduce((g,m)=>Object.assign(Object.assign({},g),{[`${m}ShadowColor`]:`0 ${ce(e.controlOutlineWidth)} 0 ${Bi(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:u,contentFontSizeLG:s,contentLineHeight:c,contentLineHeightSM:p,contentLineHeightLG:f,paddingBlock:Math.max((e.controlHeight-l*c)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-u*p)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-s*f)/2-e.lineWidth,0)})},Y3=e=>{const{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:o,motionDurationSlow:a,motionEaseInOut:i,iconGap:l,calc:u}=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:`${ce(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`]:El(),"> a":{color:"currentColor"},"&:not(:disabled)":dl(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}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(s=>`${s} ${a} ${i}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:u(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:u(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:u(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:u(l).mul(-1).equal()}}}}}},OC=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":r}}),Z3=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),J3=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Ou=(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"},OC(e,Object.assign({background:t},i),Object.assign({background:t},l))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:a||void 0}})}),Q3=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},J3(e))}),e6=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Au=(e,t,r,n)=>{const o=n&&["link","text"].includes(n)?e6:Q3;return Object.assign(Object.assign({},o(e)),OC(e.componentCls,t,r))},Fu=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:r},Au(e,n,o))}),Pu=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:r},Au(e,n,o))}),Nu=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),ju=(e,t,r,n)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Au(e,r,n))}),eo=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-${r}`]:Object.assign({color:t,boxShadow:"none"},Au(e,n,o,r))}),t6=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`],u=e[`${n}3`],s=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`]},Fu(e,e.colorTextLightSolid,o,{background:i},{background:s})),Pu(e,o,e.colorBgContainer,{color:i,borderColor:i,background:e.colorBgContainer},{color:s,borderColor:s,background:e.colorBgContainer})),Nu(e)),ju(e,a,{color:o,background:l},{color:o,background:u})),eo(e,o,"link",{color:i},{color:s})),eo(e,o,"text",{color:i,background:a},{color:s,background:u}))})},{})},r6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},Fu(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),Nu(e)),ju(e,e.colorFillTertiary,{color:e.defaultColor,background:e.colorFillSecondary},{color:e.defaultColor,background:e.colorFill})),Ou(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),eo(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),n6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Pu(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),Nu(e)),ju(e,e.colorPrimaryBg,{color:e.colorPrimary,background:e.colorPrimaryBgHover},{color:e.colorPrimary,background:e.colorPrimaryBorder})),eo(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),eo(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),Ou(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),o6=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},Fu(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Pu(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Nu(e)),ju(e,e.colorErrorBg,{color:e.colorError,background:e.colorErrorBgFilledHover},{color:e.colorError,background:e.colorErrorBgActive})),eo(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),eo(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),Ou(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),a6=e=>Object.assign(Object.assign({},eo(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),Ou(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),i6=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:r6(e),[`${t}-color-primary`]:n6(e),[`${t}-color-dangerous`]:o6(e),[`${t}-color-link`]:a6(e)},t6(e))},l6=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Pu(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),eo(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),Fu(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),eo(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Jp=(e,t="")=>{const{componentCls:r,controlHeight:n,fontSize:o,borderRadius:a,buttonPaddingHorizontal:i,iconCls:l,buttonPaddingVertical:u,buttonIconOnlyFontSize:s}=e;return[{[t]:{fontSize:o,height:n,padding:`${ce(u)} ${ce(i)}`,borderRadius:a,[`&${r}-icon-only`]:{width:n,[l]:{fontSize:s}}}},{[`${r}${r}-circle${t}`]:Z3(e)},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},s6=e=>{const t=tr(e,{fontSize:e.contentFontSize});return Jp(t,e.componentCls)},u6=e=>{const t=tr(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Jp(t,`${e.componentCls}-sm`)},c6=e=>{const t=tr(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Jp(t,`${e.componentCls}-lg`)},d6=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},f6=Lr("Button",e=>{const t=$C(e);return[Y3(t),s6(t),u6(t),c6(t),d6(t),i6(t),l6(t),f3(t)]},BC,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function p6(e,t,r,n){const{focusElCls:o,focus:a,borderElCls:i}=r,l=i?"> *":"",u=["hover",a?"focus":null,"active"].filter(Boolean).map(s=>`&:${s} ${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({[u]:{zIndex:3}},o?{[`&${o}`]:{zIndex:3}}:{}),{[`&[disabled] ${l}`]:{zIndex:0}})}}function m6(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 Qp(e,t={focus:!0}){const{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},p6(e,n,t,r)),m6(r,n,t))}}function h6(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 g6(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 v6(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},h6(e,t,e.componentCls)),g6(e.componentCls,t))}}const b6=e=>{const{componentCls:t,colorPrimaryHover:r,lineWidth:n,calc:o}=e,a=o(n).mul(-1).equal(),i=l=>{const u=`${t}-compact${l?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${u} + ${u}::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))},y6=eC(["Button","compact"],e=>{const t=$C(e);return[Qp(t),v6(t),b6(t)]},BC);var C6=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 x6(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 w6={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},E6=oe.forwardRef((e,t)=>{var r,n;const{loading:o=!1,prefixCls:a,color:i,variant:l,type:u,danger:s=!1,shape:c,size:p,styles:f,disabled:h,className:v,rootClassName:g,children:m,icon:b,iconPosition:y="start",ghost:C=!1,block:w=!1,htmlType:E="button",classNames:D,style:k={},autoInsertSpace:x,autoFocus:O}=e,j=C6(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),B=u||"default",{button:N}=oe.useContext(Qt),A=c||(N==null?void 0:N.shape)||"default",[S,$]=Ct(()=>{if(i&&l)return[i,l];if(u||s){const nt=w6[B]||[];return s?["danger",nt[1]]:nt}return N!=null&&N.color&&(N!=null&&N.variant)?[N.color,N.variant]:["default","outlined"]},[u,i,l,s,N==null?void 0:N.variant,N==null?void 0:N.color]),P=S==="danger"?"dangerous":S,{getPrefixCls:F,direction:I,autoInsertSpace:T,className:q,style:L,classNames:_,styles:V}=Ro("button"),Z=(r=x??T)!==null&&r!==void 0?r:!0,J=F("btn",a),[z,Y,G]=f6(J),X=Rr(Po),W=h??X,H=Rr(DC),ne=Ct(()=>x6(o),[o]),[U,ae]=xt(ne.loading),[re,de]=xt(!1),ge=qe(null),ye=sa(t,ge),Ne=Ww.count(m)===1&&!b&&!Hc($),xe=qe(!0);oe.useEffect(()=>(xe.current=!1,()=>{xe.current=!0}),[]),Kt(()=>{let nt=null;ne.delay>0?nt=setTimeout(()=>{nt=null,ae(!0)},ne.delay):ae(ne.loading);function Ue(){nt&&(clearTimeout(nt),nt=null)}return Ue},[ne.delay,ne.loading]),Bt(()=>{if(!ge.current||!Z)return;const nt=ge.current.textContent||"";Ne&&hf(nt)?re||de(!0):re&&de(!1)}),Bt(()=>{O&&ge.current&&ge.current.focus()},[]);const be=oe.useCallback(nt=>{var Ue;if(U||W){nt.preventDefault();return}(Ue=e.onClick)===null||Ue===void 0||Ue.call(e,nt)},[e.onClick,U,W]),{compactSize:Ae,compactItemClassnames:me}=Bu(J,I),Ee={large:"lg",small:"sm",middle:void 0},je=pa(nt=>{var Ue,et;return(et=(Ue=p??Ae)!==null&&Ue!==void 0?Ue:H)!==null&&et!==void 0?et:nt}),Be=je&&(n=Ee[je])!==null&&n!==void 0?n:"",Ye=U?"loading":b,Re=pn(j,["navigate"]),Te=ve(J,Y,G,{[`${J}-${A}`]:A!=="default"&&A,[`${J}-${B}`]:B,[`${J}-dangerous`]:s,[`${J}-color-${P}`]:P,[`${J}-variant-${$}`]:$,[`${J}-${Be}`]:Be,[`${J}-icon-only`]:!m&&m!==0&&!!Ye,[`${J}-background-ghost`]:C&&!Hc($),[`${J}-loading`]:U,[`${J}-two-chinese-chars`]:re&&Z&&!U,[`${J}-block`]:w,[`${J}-rtl`]:I==="rtl",[`${J}-icon-end`]:y==="end"},me,v,g,q),ue=Object.assign(Object.assign({},L),k),ke=ve(D==null?void 0:D.icon,_.icon),Ke=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),V.icon||{}),Ze=b&&!U?oe.createElement(gf,{prefixCls:J,className:ke,style:Ke},b):o&&typeof o=="object"&&o.icon?oe.createElement(gf,{prefixCls:J,className:ke,style:Ke},o.icon):oe.createElement(d3,{existIcon:!!b,prefixCls:J,loading:U,mount:xe.current}),We=m||m===0?c3(m,Ne&&Z):null;if(Re.href!==void 0)return z(oe.createElement("a",Object.assign({},Re,{className:ve(Te,{[`${J}-disabled`]:W}),href:W?void 0:Re.href,style:ue,onClick:be,ref:ye,tabIndex:W?-1:0,"aria-disabled":W}),Ze,We));let _e=oe.createElement("button",Object.assign({},j,{type:E,className:Te,style:ue,onClick:be,disabled:W,ref:ye}),Ze,We,me&&oe.createElement(y6,{prefixCls:J}));return Hc($)||(_e=oe.createElement(qp,{component:"Button",disabled:U},_e)),z(_e)}),Qa=E6;Qa.Group=s3;Qa.__ANT_BUTTON=!0;var AC=d.createContext(null),Rv=[];function k6(e,t){var r=d.useState(function(){if(!Xr())return null;var v=document.createElement("div");return v}),n=he(r,1),o=n[0],a=d.useRef(!1),i=d.useContext(AC),l=d.useState(Rv),u=he(l,2),s=u[0],c=u[1],p=i||(a.current?void 0:function(v){c(function(g){var m=[v].concat(Ie(g));return m})});function f(){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 Kt(function(){return e?i?i(f):f():h(),h},[e]),Kt(function(){s.length&&(s.forEach(function(v){return v()}),c(Rv))},[s]),[o,p]}var Vc;function FC(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"),u=parseInt(l.width,10),s=parseInt(l.height,10);try{var c=u?"width: ".concat(l.width,";"):"",p=s?"height: ".concat(l.height,";"):"";mo(`
291
+ #`.concat(t,`::-webkit-scrollbar {
292
+ `).concat(c,`
293
+ `).concat(p,`
294
+ }`),t)}catch(v){console.error(v),o=u,a=s}}document.body.appendChild(r);var f=e&&o&&!isNaN(o)?o:r.offsetWidth-r.clientWidth,h=e&&a&&!isNaN(a)?a:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),ol(t),{width:f,height:h}}function Tv(e){return typeof document>"u"?0:(Vc===void 0&&(Vc=FC()),Vc.width)}function yf(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:FC(e)}function D6(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var S6="rc-util-locker-".concat(Date.now()),Mv=0;function $6(e){var t=!!e,r=d.useState(function(){return Mv+=1,"".concat(S6,"_").concat(Mv)}),n=he(r,1),o=n[0];Kt(function(){if(t){var a=yf(document.body).width,i=D6();mo(`
295
+ html body {
296
+ overflow-y: hidden;
297
+ `.concat(i?"width: calc(100% - ".concat(a,"px);"):"",`
298
+ }`),o)}else ol(o);return function(){ol(o)}},[t,o])}var B6=!1;function O6(e){return B6}var zv=function(e){return e===!1?!1:!Xr()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},PC=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,u=d.useState(r),s=he(u,2),c=s[0],p=s[1],f=c||r;d.useEffect(function(){(i||r)&&p(r)},[r,i]);var h=d.useState(function(){return zv(o)}),v=he(h,2),g=v[0],m=v[1];d.useEffect(function(){var B=zv(o);m(B??null)});var b=k6(f&&!g),y=he(b,2),C=y[0],w=y[1],E=g??C;$6(n&&r&&Xr()&&(E===C||E===document.body));var D=null;if(l&&Yn(l)&&t){var k=l;D=k.ref}var x=sa(D,t);if(!f||!Xr()||g===void 0)return null;var O=E===!1||O6(),j=l;return t&&(j=d.cloneElement(l,{ref:x})),d.createElement(AC.Provider,{value:w},O?j:Ib(j,E))});function A6(){var e=K({},d);return e.useId}var _v=0,Lv=A6();const em=Lv?(function(e){var t=Lv();return e||t}):(function(e){var t=d.useState("ssr-id"),r=he(t,2),n=r[0],o=r[1];return d.useEffect(function(){var a=_v;_v+=1,o("rc_unique_".concat(a))},[]),e||n});var qo="RC_FORM_INTERNAL_HOOKS",er=function(){ur(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},ei=d.createContext({getFieldValue:er,getFieldsValue:er,getFieldError:er,getFieldWarning:er,getFieldsError:er,isFieldsTouched:er,isFieldTouched:er,isFieldValidating:er,isFieldsValidating:er,resetFields:er,setFields:er,setFieldValue:er,setFieldsValue:er,validateFields:er,submit:er,getInternalHooks:function(){return er(),{dispatch:er,initEntityValue:er,registerField:er,useSubscribe:er,setInitialValues:er,destroyForm:er,setCallbacks:er,registerWatch:er,getFields:er,setValidateMessages:er,setPreserve:er,getInitialValue:er}}}),Gs=d.createContext(null);function Cf(e){return e==null?[]:Array.isArray(e)?e:[e]}function F6(e){return e&&!!e._init}function xf(){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 wf=xf();function P6(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function N6(e,t,r){if(Ap())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&tl(o,r.prototype),o}function Ef(e){var t=typeof Map=="function"?new Map:void 0;return Ef=function(r){if(r===null||!P6(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 N6(r,arguments,rl(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),tl(n,r)},Ef(e)}var j6=/%[sdj%]/g,I6=function(){};function kf(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 Cn(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(j6,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 R6(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function $r(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||R6(t)&&typeof e=="string"&&!e)}function T6(e,t,r){var n=[],o=0,a=e.length;function i(l){n.push.apply(n,Ie(l||[])),o++,o===a&&r(n)}e.forEach(function(l){t(l,i)})}function Hv(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 M6(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,Ie(e[r]||[]))}),t}var Wv=(function(e){ro(r,e);var t=no(r);function r(n,o){var a;return gr(this,r),a=t.call(this,"Async Validation Error"),M(Qe(a),"errors",void 0),M(Qe(a),"fields",void 0),a.errors=n,a.fields=o,a}return vr(r)})(Ef(Error));function z6(e,t,r,n,o){if(t.first){var a=new Promise(function(f,h){var v=function(m){return n(m),m.length?h(new Wv(m,kf(m))):f(o)},g=M6(e);Hv(g,r,v)});return a.catch(function(f){return f}),a}var i=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),u=l.length,s=0,c=[],p=new Promise(function(f,h){var v=function(g){if(c.push.apply(c,g),s++,s===u)return n(c),c.length?h(new Wv(c,kf(c))):f(o)};l.length||(n(c),f(o)),l.forEach(function(g){var m=e[g];i.indexOf(g)!==-1?Hv(m,r,v):T6(m,r,v)})});return p.catch(function(f){return f}),p}function _6(e){return!!(e&&e.message!==void 0)}function L6(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function Kv(e,t){return function(r){var n;return e.fullFields?n=L6(t,e.fullFields):n=t[r.field||e.fullField],_6(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 qv(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];it(n)==="object"&&it(e[r])==="object"?e[r]=K(K({},e[r]),n):e[r]=n}}return e}var va="enum",H6=function(e,t,r,n,o){e[va]=Array.isArray(e[va])?e[va]:[],e[va].indexOf(t)===-1&&n.push(Cn(o.messages[va],e.fullField,e[va].join(", ")))},W6=function(e,t,r,n,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(Cn(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(Cn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},K6=function(e,t,r,n,o){var a=typeof e.len=="number",i=typeof e.min=="number",l=typeof e.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=t,c=null,p=typeof t=="number",f=typeof t=="string",h=Array.isArray(t);if(p?c="number":f?c="string":h&&(c="array"),!c)return!1;h&&(s=t.length),f&&(s=t.replace(u,"_").length),a?s!==e.len&&n.push(Cn(o.messages[c].len,e.fullField,e.len)):i&&!l&&s<e.min?n.push(Cn(o.messages[c].min,e.fullField,e.min)):l&&!i&&s>e.max?n.push(Cn(o.messages[c].max,e.fullField,e.max)):i&&l&&(s<e.min||s>e.max)&&n.push(Cn(o.messages[c].range,e.fullField,e.min,e.max))},NC=function(e,t,r,n,o,a){e.required&&(!r.hasOwnProperty(e.field)||$r(t,a||e.type))&&n.push(Cn(o.messages.required,e.fullField))},Ql;const q6=(function(){if(Ql)return Ql;var e="[a-fA-F\\d:]",t=function(E){return E&&E.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,"$)")),u=new RegExp("^".concat(r,"$")),s=new RegExp("^".concat(i,"$")),c=function(E){return E&&E.exact?l:new RegExp("(?:".concat(t(E)).concat(r).concat(t(E),")|(?:").concat(t(E)).concat(i).concat(t(E),")"),"g")};c.v4=function(E){return E&&E.exact?u:new RegExp("".concat(t(E)).concat(r).concat(t(E)),"g")},c.v6=function(E){return E&&E.exact?s:new RegExp("".concat(t(E)).concat(i).concat(t(E)),"g")};var p="(?:(?:[a-z]+:)?//)",f="(?:\\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"]*)?',w="(?:".concat(p,"|www\\.)").concat(f,"(?:localhost|").concat(h,"|").concat(v,"|").concat(g).concat(m).concat(b,")").concat(y).concat(C);return Ql=new RegExp("(?:^".concat(w,"$)"),"i"),Ql});var Vv={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},Oi={integer:function(e){return Oi.number(e)&&parseInt(e,10)===e},float:function(e){return Oi.number(e)&&!Oi.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 it(e)==="object"&&!Oi.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Vv.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(q6())},hex:function(e){return typeof e=="string"&&!!e.match(Vv.hex)}},V6=function(e,t,r,n,o){if(e.required&&t===void 0){NC(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?Oi[i](t)||n.push(Cn(o.messages.types[i],e.fullField,e.type)):i&&it(t)!==e.type&&n.push(Cn(o.messages.types[i],e.fullField,e.type))},X6=function(e,t,r,n,o){(/^\s+$/.test(t)||t==="")&&n.push(Cn(o.messages.whitespace,e.fullField))};const Lt={required:NC,whitespace:X6,type:V6,range:K6,enum:H6,pattern:W6};var U6=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t)&&!e.required)return r();Lt.required(e,t,n,a,o)}r(a)},G6=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();Lt.required(e,t,n,a,o,"array"),t!=null&&(Lt.type(e,t,n,a,o),Lt.range(e,t,n,a,o))}r(a)},Y6=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t)&&!e.required)return r();Lt.required(e,t,n,a,o),t!==void 0&&Lt.type(e,t,n,a,o)}r(a)},Z6=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t,"date")&&!e.required)return r();if(Lt.required(e,t,n,a,o),!$r(t,"date")){var l;t instanceof Date?l=t:l=new Date(t),Lt.type(e,l,n,a,o),l&&Lt.range(e,l.getTime(),n,a,o)}}r(a)},J6="enum",Q6=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t)&&!e.required)return r();Lt.required(e,t,n,a,o),t!==void 0&&Lt[J6](e,t,n,a,o)}r(a)},eP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t)&&!e.required)return r();Lt.required(e,t,n,a,o),t!==void 0&&(Lt.type(e,t,n,a,o),Lt.range(e,t,n,a,o))}r(a)},tP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t)&&!e.required)return r();Lt.required(e,t,n,a,o),t!==void 0&&(Lt.type(e,t,n,a,o),Lt.range(e,t,n,a,o))}r(a)},rP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t)&&!e.required)return r();Lt.required(e,t,n,a,o),t!==void 0&&Lt.type(e,t,n,a,o)}r(a)},nP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(t===""&&(t=void 0),$r(t)&&!e.required)return r();Lt.required(e,t,n,a,o),t!==void 0&&(Lt.type(e,t,n,a,o),Lt.range(e,t,n,a,o))}r(a)},oP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t)&&!e.required)return r();Lt.required(e,t,n,a,o),t!==void 0&&Lt.type(e,t,n,a,o)}r(a)},aP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t,"string")&&!e.required)return r();Lt.required(e,t,n,a,o),$r(t,"string")||Lt.pattern(e,t,n,a,o)}r(a)},iP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t)&&!e.required)return r();Lt.required(e,t,n,a,o),$r(t)||Lt.type(e,t,n,a,o)}r(a)},lP=function(e,t,r,n,o){var a=[],i=Array.isArray(t)?"array":it(t);Lt.required(e,t,n,a,o,i),r(a)},sP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if($r(t,"string")&&!e.required)return r();Lt.required(e,t,n,a,o,"string"),$r(t,"string")||(Lt.type(e,t,n,a,o),Lt.range(e,t,n,a,o),Lt.pattern(e,t,n,a,o),e.whitespace===!0&&Lt.whitespace(e,t,n,a,o))}r(a)},Xc=function(e,t,r,n,o){var a=e.type,i=[],l=e.required||!e.required&&n.hasOwnProperty(e.field);if(l){if($r(t,a)&&!e.required)return r();Lt.required(e,t,n,i,o,a),$r(t,a)||Lt.type(e,t,n,i,o)}r(i)};const _i={string:sP,method:rP,number:nP,boolean:Y6,regexp:iP,integer:tP,float:eP,array:G6,object:oP,enum:Q6,pattern:aP,date:Z6,url:Xc,hex:Xc,email:Xc,required:lP,any:U6};var Dl=(function(){function e(t){gr(this,e),M(this,"rules",null),M(this,"_messages",wf),this.define(t)}return vr(e,[{key:"define",value:function(t){var r=this;if(!t)throw new Error("Cannot configure a schema with no rules");if(it(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=qv(xf(),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 u(h){var v=[],g={};function m(y){if(Array.isArray(y)){var C;v=(C=v).concat.apply(C,Ie(y))}else v.push(y)}for(var b=0;b<h.length;b++)m(h[b]);v.length?(g=kf(v),l(v,g)):l(null,a)}if(i.messages){var s=this.messages();s===wf&&(s=xf()),qv(s,i.messages),i.messages=s}else i.messages=this.messages();var c={},p=i.keys||Object.keys(this.rules);p.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=K({},a)),g=a[h]=b.transform(g),g!=null&&(b.type=b.type||(Array.isArray(g)?"array":it(g)))),typeof b=="function"?b={validator:b}:b=K({},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 f={};return z6(c,i,function(h,v){var g=h.rule,m=(g.type==="object"||g.type==="array")&&(it(g.fields)==="object"||it(g.defaultField)==="object");m=m&&(g.required||!g.required&&h.value),g.field=h.field;function b(D,k){return K(K({},k),{},{fullField:"".concat(g.fullField,".").concat(D),fullFields:g.fullFields?[].concat(Ie(g.fullFields),[D]):[D]})}function y(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],k=Array.isArray(D)?D:[D];!i.suppressWarning&&k.length&&e.warning("async-validator:",k),k.length&&g.message!==void 0&&(k=[].concat(g.message));var x=k.map(Kv(g,a));if(i.first&&x.length)return f[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(Kv(g,a)):i.error&&(x=[i.error(g,Cn(i.messages.required,g.field))]),v(x);var O={};g.defaultField&&Object.keys(h.value).map(function(N){O[N]=g.defaultField}),O=K(K({},O),h.rule.fields);var j={};Object.keys(O).forEach(function(N){var A=O[N],S=Array.isArray(A)?A:[A];j[N]=S.map(b.bind(null,N))});var B=new e(j);B.messages(i.messages),h.rule.options&&(h.rule.options.messages=i.messages,h.rule.options.error=i.error),B.validate(h.value,h.rule.options||i,function(N){var A=[];x&&x.length&&A.push.apply(A,Ie(x)),N&&N.length&&A.push.apply(A,Ie(N)),v(A.length?A: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(D){var w,E;(w=(E=console).error)===null||w===void 0||w.call(E,D),i.suppressValidatorError||setTimeout(function(){throw D},0),y(D.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(D){return y(D)})},function(h){u(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&&!_i.hasOwnProperty(t.type))throw new Error(Cn("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"?_i.required:_i[this.getType(t)]||void 0}}]),e})();M(Dl,"register",function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");_i[e]=t});M(Dl,"warning",I6);M(Dl,"messages",wf);M(Dl,"validators",_i);var vn="'${name}' is not a valid ${type}",jC={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:vn,method:vn,array:vn,object:vn,number:vn,date:vn,boolean:vn,integer:vn,float:vn,regexp:vn,email:vn,url:vn,hex:vn},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}"}},Xv=Dl;function uP(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 Df(e,t,r,n,o){return Sf.apply(this,arguments)}function Sf(){return Sf=fa(Ur().mark(function e(t,r,n,o,a){var i,l,u,s,c,p,f,h,v;return Ur().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return i=K({},n),delete i.ruleIndex,Xv.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)}}),u=null,i&&i.type==="array"&&i.defaultField&&(u=i.defaultField,delete i.defaultField),s=new Xv(M({},t,[i])),c=Oa(jC,o.validateMessages),s.messages(c),p=[],g.prev=10,g.next=13,Promise.resolve(s.validate(M({},t,r),K({},o)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(p=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(!(!p.length&&u)){g.next=23;break}return g.next=21,Promise.all(r.map(function(m,b){return Df("".concat(t,".").concat(b),m,u,o,a)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(m,b){return[].concat(Ie(m),Ie(b))},[]));case 23:return h=K(K({},n),{},{name:t,enum:(n.enum||[]).join(", ")},a),v=p.map(function(m){return typeof m=="string"?uP(m,h):m}),g.abrupt("return",v);case 26:case"end":return g.stop()}},e,null,[[10,15]])})),Sf.apply(this,arguments)}function cP(e,t,r,n,o,a){var i=e.join("."),l=r.map(function(c,p){var f=c.validator,h=K(K({},c),{},{ruleIndex:p});return f&&(h.validator=function(v,g,m){var b=!1,y=function(){for(var w=arguments.length,E=new Array(w),D=0;D<w;D++)E[D]=arguments[D];Promise.resolve().then(function(){ur(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||m.apply(void 0,E)})},C=f(v,g,y);b=C&&typeof C.then=="function"&&typeof C.catch=="function",ur(b,"`callback` is deprecated. Please return a promise instead."),b&&C.then(function(){m()}).catch(function(w){m(w||" ")})}),h}).sort(function(c,p){var f=c.warningOnly,h=c.ruleIndex,v=p.warningOnly,g=p.ruleIndex;return!!f==!!v?h-g:f?1:-1}),u;if(o===!0)u=new Promise((function(){var c=fa(Ur().mark(function p(f,h){var v,g,m;return Ur().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,Df(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:f([]);case 13:case"end":return b.stop()}},p)}));return function(p,f){return c.apply(this,arguments)}})());else{var s=l.map(function(c){return Df(i,t,c,n,a).then(function(p){return{errors:p,rule:c}})});u=(o?fP(s):dP(s)).then(function(c){return Promise.reject(c)})}return u.catch(function(c){return c}),u}function dP(e){return $f.apply(this,arguments)}function $f(){return $f=fa(Ur().mark(function e(t){return Ur().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,Ie(n));return a}));case 1:case"end":return r.stop()}},e)})),$f.apply(this,arguments)}function fP(e){return Bf.apply(this,arguments)}function Bf(){return Bf=fa(Ur().mark(function e(t){var r;return Ur().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)})),Bf.apply(this,arguments)}function hr(e){return Cf(e)}function Gv(e,t){var r={};return t.forEach(function(n){var o=yn(e,n);r=Nn(r,n,o)}),r}function Ra(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(n){return IC(t,n,r)})}function IC(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 pP(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||it(e)!=="object"||it(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),o=new Set([].concat(r,n));return Ie(o).every(function(a){var i=e[a],l=t[a];return typeof i=="function"&&typeof l=="function"?!0:i===l})}function mP(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&it(t.target)==="object"&&e in t.target?t.target[e]:t}function Yv(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(Ie(e.slice(0,r)),[o],Ie(e.slice(r,t)),Ie(e.slice(t+1,n))):a<0?[].concat(Ie(e.slice(0,t)),Ie(e.slice(t+1,r+1)),[o],Ie(e.slice(r+1,n))):e}var hP=["name"],kn=[];function Uc(e,t,r,n,o,a){return typeof e=="function"?e(t,r,"source"in a?{source:a.source}:{}):n!==o}var tm=(function(e){ro(r,e);var t=no(r);function r(n){var o;if(gr(this,r),o=t.call(this,n),M(Qe(o),"state",{resetCount:0}),M(Qe(o),"cancelRegisterFunc",null),M(Qe(o),"mounted",!1),M(Qe(o),"touched",!1),M(Qe(o),"dirty",!1),M(Qe(o),"validatePromise",void 0),M(Qe(o),"prevValidating",void 0),M(Qe(o),"errors",kn),M(Qe(o),"warnings",kn),M(Qe(o),"cancelRegister",function(){var u=o.props,s=u.preserve,c=u.isListField,p=u.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(c,s,hr(p)),o.cancelRegisterFunc=null}),M(Qe(o),"getNamePath",function(){var u=o.props,s=u.name,c=u.fieldContext,p=c.prefixName,f=p===void 0?[]:p;return s!==void 0?[].concat(Ie(f),Ie(s)):[]}),M(Qe(o),"getRules",function(){var u=o.props,s=u.rules,c=s===void 0?[]:s,p=u.fieldContext;return c.map(function(f){return typeof f=="function"?f(p):f})}),M(Qe(o),"refresh",function(){o.mounted&&o.setState(function(u){var s=u.resetCount;return{resetCount:s+1}})}),M(Qe(o),"metaCache",null),M(Qe(o),"triggerMetaEvent",function(u){var s=o.props.onMetaChange;if(s){var c=K(K({},o.getMeta()),{},{destroy:u});Zn(o.metaCache,c)||s(c),o.metaCache=c}else o.metaCache=null}),M(Qe(o),"onStoreChange",function(u,s,c){var p=o.props,f=p.shouldUpdate,h=p.dependencies,v=h===void 0?[]:h,g=p.onReset,m=c.store,b=o.getNamePath(),y=o.getValue(u),C=o.getValue(m),w=s&&Ra(s,b);switch(c.type==="valueUpdate"&&c.source==="external"&&!Zn(y,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=kn,o.warnings=kn,o.triggerMetaEvent()),c.type){case"reset":if(!s||w){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=kn,o.warnings=kn,o.triggerMetaEvent(),g==null||g(),o.refresh();return}break;case"remove":{if(f&&Uc(f,u,m,y,C,c)){o.reRender();return}break}case"setField":{var E=c.data;if(w){"touched"in E&&(o.touched=E.touched),"validating"in E&&!("originRCField"in E)&&(o.validatePromise=E.validating?Promise.resolve([]):null),"errors"in E&&(o.errors=E.errors||kn),"warnings"in E&&(o.warnings=E.warnings||kn),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in E&&Ra(s,b,!0)){o.reRender();return}if(f&&!b.length&&Uc(f,u,m,y,C,c)){o.reRender();return}break}case"dependenciesUpdate":{var D=v.map(hr);if(D.some(function(k){return Ra(c.relatedFields,k)})){o.reRender();return}break}default:if(w||(!v.length||b.length||f)&&Uc(f,u,m,y,C,c)){o.reRender();return}break}f===!0&&o.reRender()}),M(Qe(o),"validateRules",function(u){var s=o.getNamePath(),c=o.getValue(),p=u||{},f=p.triggerName,h=p.validateOnly,v=h===void 0?!1:h,g=Promise.resolve().then(fa(Ur().mark(function m(){var b,y,C,w,E,D,k;return Ur().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,w=b.messageVariables,E=b.validateDebounce,D=o.getRules(),f&&(D=D.filter(function(O){return O}).filter(function(O){var j=O.validateTrigger;if(!j)return!0;var B=Cf(j);return B.includes(f)})),!(E&&f)){x.next=10;break}return x.next=8,new Promise(function(O){setTimeout(O,E)});case 8:if(o.validatePromise===g){x.next=10;break}return x.abrupt("return",[]);case 10:return k=cP(s,c,D,u,C,w),k.catch(function(O){return O}).then(function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kn;if(o.validatePromise===g){var j;o.validatePromise=null;var B=[],N=[];(j=O.forEach)===null||j===void 0||j.call(O,function(A){var S=A.rule.warningOnly,$=A.errors,P=$===void 0?kn:$;S?N.push.apply(N,Ie(P)):B.push.apply(B,Ie(P))}),o.errors=B,o.warnings=N,o.triggerMetaEvent(),o.reRender()}}),x.abrupt("return",k);case 13:case"end":return x.stop()}},m)})));return v||(o.validatePromise=g,o.dirty=!0,o.errors=kn,o.warnings=kn,o.triggerMetaEvent(),o.reRender()),g}),M(Qe(o),"isFieldValidating",function(){return!!o.validatePromise}),M(Qe(o),"isFieldTouched",function(){return o.touched}),M(Qe(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var u=o.props.fieldContext,s=u.getInternalHooks(qo),c=s.getInitialValue;return c(o.getNamePath())!==void 0}),M(Qe(o),"getErrors",function(){return o.errors}),M(Qe(o),"getWarnings",function(){return o.warnings}),M(Qe(o),"isListField",function(){return o.props.isListField}),M(Qe(o),"isList",function(){return o.props.isList}),M(Qe(o),"isPreserve",function(){return o.props.preserve}),M(Qe(o),"getMeta",function(){o.prevValidating=o.isFieldValidating();var u={touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:o.validatePromise===null};return u}),M(Qe(o),"getOnlyChild",function(u){if(typeof u=="function"){var s=o.getMeta();return K(K({},o.getOnlyChild(u(o.getControlled(),s,o.props.fieldContext))),{},{isFunction:!0})}var c=_n(u);return c.length!==1||!d.isValidElement(c[0])?{child:c,isFunction:!1}:{child:c[0],isFunction:!1}}),M(Qe(o),"getValue",function(u){var s=o.props.fieldContext.getFieldsValue,c=o.getNamePath();return yn(u||s(!0),c)}),M(Qe(o),"getControlled",function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=o.props,c=s.name,p=s.trigger,f=s.validateTrigger,h=s.getValueFromEvent,v=s.normalize,g=s.valuePropName,m=s.getValueProps,b=s.fieldContext,y=f!==void 0?f:b.validateTrigger,C=o.getNamePath(),w=b.getInternalHooks,E=b.getFieldsValue,D=w(qo),k=D.dispatch,x=o.getValue(),O=m||function(S){return M({},g,S)},j=u[p],B=c!==void 0?O(x):{},N=K(K({},u),B);N[p]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var S,$=arguments.length,P=new Array($),F=0;F<$;F++)P[F]=arguments[F];h?S=h.apply(void 0,P):S=mP.apply(void 0,[g].concat(P)),v&&(S=v(S,x,E(!0))),S!==x&&k({type:"updateValue",namePath:C,value:S}),j&&j.apply(void 0,P)};var A=Cf(y||[]);return A.forEach(function(S){var $=N[S];N[S]=function(){$&&$.apply(void 0,arguments);var P=o.props.rules;P&&P.length&&k({type:"validateField",namePath:C,triggerName:S})}}),N}),n.fieldContext){var a=n.fieldContext.getInternalHooks,i=a(qo),l=i.initEntityValue;l(Qe(o))}return o}return vr(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),u=l.registerField;this.cancelRegisterFunc=u(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,u;return l?u=i:d.isValidElement(i)?u=d.cloneElement(i,this.getControlled(i.props)):(ur(!i,"`children` of Field is not validate ReactElement."),u=i),d.createElement(d.Fragment,{key:n},u)}}]),r})(d.Component);M(tm,"contextType",ei);M(tm,"defaultProps",{trigger:"onChange",valuePropName:"value"});function RC(e){var t,r=e.name,n=bt(e,hP),o=d.useContext(ei),a=d.useContext(Gs),i=r!==void 0?hr(r):void 0,l=(t=n.isListField)!==null&&t!==void 0?t:!!a,u="keep";return l||(u="_".concat((i||[]).join("_"))),d.createElement(tm,ze({key:u,name:i,isListField:l},n,{fieldContext:o}))}function gP(e){var t=e.name,r=e.initialValue,n=e.children,o=e.rules,a=e.validateTrigger,i=e.isListField,l=d.useContext(ei),u=d.useContext(Gs),s=d.useRef({keys:[],id:0}),c=s.current,p=d.useMemo(function(){var g=hr(l.prefixName)||[];return[].concat(Ie(g),Ie(hr(t)))},[l.prefixName,t]),f=d.useMemo(function(){return K(K({},l),{},{prefixName:p})},[l,p]),h=d.useMemo(function(){return{getKey:function(g){var m=p.length,b=g[m];return[c.keys[b],g.slice(m+1)]}}},[p]);if(typeof n!="function")return ur(!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(Gs.Provider,{value:h},d.createElement(ei.Provider,{value:f},d.createElement(RC,{name:[],shouldUpdate:v,rules:o,validateTrigger:a,initialValue:r,isList:!0,isListField:i??!!u},function(g,m){var b=g.value,y=b===void 0?[]:b,C=g.onChange,w=l.getFieldValue,E=function(){var x=w(p||[]);return x||[]},D={add:function(x,O){var j=E();O>=0&&O<=j.length?(c.keys=[].concat(Ie(c.keys.slice(0,O)),[c.id],Ie(c.keys.slice(O))),C([].concat(Ie(j.slice(0,O)),[x],Ie(j.slice(O))))):(c.keys=[].concat(Ie(c.keys),[c.id]),C([].concat(Ie(j),[x]))),c.id+=1},remove:function(x){var O=E(),j=new Set(Array.isArray(x)?x:[x]);j.size<=0||(c.keys=c.keys.filter(function(B,N){return!j.has(N)}),C(O.filter(function(B,N){return!j.has(N)})))},move:function(x,O){if(x!==O){var j=E();x<0||x>=j.length||O<0||O>=j.length||(c.keys=Yv(c.keys,x,O),C(Yv(j,x,O)))}}},k=y||[];return Array.isArray(k)||(k=[]),n(k.map(function(x,O){var j=c.keys[O];return j===void 0&&(c.keys[O]=c.id,j=c.keys[O],c.id+=1),{name:O,key:j,isListField:!0}}),D,m)})))}function vP(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(o,a){e.forEach(function(i,l){i.catch(function(u){return t=!0,u}).then(function(u){r-=1,n[l]=u,!(r>0)&&(t&&a(n),o(n))})})}):Promise.resolve([])}var TC="__@field_split__";function Gc(e){return e.map(function(t){return"".concat(it(t),":").concat(t)}).join(TC)}var ba=(function(){function e(){gr(this,e),M(this,"kvs",new Map)}return vr(e,[{key:"set",value:function(t,r){this.kvs.set(Gc(t),r)}},{key:"get",value:function(t){return this.kvs.get(Gc(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(Gc(t))}},{key:"map",value:function(t){return Ie(this.kvs.entries()).map(function(r){var n=he(r,2),o=n[0],a=n[1],i=o.split(TC);return t({key:i.map(function(l){var u=l.match(/^([^:]*):(.*)$/),s=he(u,3),c=s[1],p=s[2];return c==="number"?Number(p):p}),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})(),bP=["name"],yP=vr(function e(t){var r=this;gr(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}):(ur(!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=Oa(n,r.store);(a=r.prevWithoutPreserves)===null||a===void 0||a.map(function(l){var u=l.key;i=Nn(i,u,yn(n,u))}),r.prevWithoutPreserves=null,r.updateStore(i)}}),M(this,"destroyForm",function(n){if(n)r.updateStore({});else{var o=new ba;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=yn(r.initialValues,n);return n.length?Oa(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 ba;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=hr(a);return o.get(i)||{INVALIDATE_NAME_PATH:hr(a)}})}),M(this,"getFieldsValue",function(n,o){r.warningUnhooked();var a,i,l;if(n===!0||Array.isArray(n)?(a=n,i=o):n&&it(n)==="object"&&(l=n.strict,i=n.filter),a===!0&&!i)return r.store;var u=r.getFieldEntitiesForNamePathList(Array.isArray(a)?a:null),s=[];return u.forEach(function(c){var p,f,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&&(p=(f=c).isListField)!==null&&p!==void 0&&p.call(f))return;if(!i)s.push(h);else{var m="getMeta"in c?c.getMeta():null;i(m)&&s.push(h)}}),Gv(r.store,s.map(hr))}),M(this,"getFieldValue",function(n){r.warningUnhooked();var o=hr(n);return yn(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:hr(n[i]),errors:[],warnings:[]}})}),M(this,"getFieldError",function(n){r.warningUnhooked();var o=hr(n),a=r.getFieldsError([o])[0];return a.errors}),M(this,"getFieldWarning",function(n){r.warningUnhooked();var o=hr(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],u,s=!1;o.length===0?u=null:o.length===1?Array.isArray(i)?(u=i.map(hr),s=!1):(u=null,s=i):(u=i.map(hr),s=l);var c=r.getFieldEntities(!0),p=function(g){return g.isFieldTouched()};if(!u)return s?c.every(function(g){return p(g)||g.isList()}):c.some(p);var f=new ba;u.forEach(function(g){f.set(g,[])}),c.forEach(function(g){var m=g.getNamePath();u.forEach(function(b){b.every(function(y,C){return m[C]===y})&&f.update(b,function(y){return[].concat(Ie(y),[g])})})});var h=function(g){return g.some(p)},v=f.map(function(g){var m=g.value;return m});return s?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(hr);return o.some(function(i){var l=i.getNamePath();return Ra(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 ba,a=r.getFieldEntities(!0);a.forEach(function(u){var s=u.props.initialValue,c=u.getNamePath();if(s!==void 0){var p=o.get(c)||new Set;p.add({entity:u,value:s}),o.set(c,p)}});var i=function(u){u.forEach(function(s){var c=s.props.initialValue;if(c!==void 0){var p=s.getNamePath(),f=r.getInitialValue(p);if(f!==void 0)ur(!1,"Form already set 'initialValues' with path '".concat(p.join("."),"'. Field can not overwrite it."));else{var h=o.get(p);if(h&&h.size>1)ur(!1,"Multiple Field with path '".concat(p.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=r.getFieldValue(p),g=s.isListField();!g&&(!n.skipExist||v===void 0)&&r.updateStore(Nn(r.store,p,Ie(h)[0].value))}}}})},l;n.entities?l=n.entities:n.namePathList?(l=[],n.namePathList.forEach(function(u){var s=o.get(u);if(s){var c;(c=l).push.apply(c,Ie(Ie(s).map(function(p){return p.entity})))}})):l=a,i(l)}),M(this,"resetFields",function(n){r.warningUnhooked();var o=r.store;if(!n){r.updateStore(Oa(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(o,null,{type:"reset"}),r.notifyWatch();return}var a=n.map(hr);a.forEach(function(i){var l=r.getInitialValue(i);r.updateStore(Nn(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,u=bt(i,bP),s=hr(l);a.push(s),"value"in u&&r.updateStore(Nn(r.store,s,u.value)),r.notifyObservers(o,[s],{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(),u=K(K({},l),{},{name:i,value:r.getFieldValue(i)});return Object.defineProperty(u,"originRCField",{value:!0}),u});return o}),M(this,"initEntityValue",function(n){var o=n.props.initialValue;if(o!==void 0){var a=n.getNamePath(),i=yn(r.store,a);i===void 0&&r.updateStore(Nn(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 u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(p){return p!==n}),!r.isMergedPreserve(l)&&(!i||u.length>1)){var s=i?void 0:r.getInitialValue(o);if(o.length&&r.getFieldValue(o)!==s&&r.fieldEntities.every(function(p){return!IC(p.getNamePath(),o)})){var c=r.store;r.updateStore(Nn(c,o,s,!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=K(K({},a),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(l){var u=l.onStoreChange;u(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(Ie(a))}),a}),M(this,"updateValue",function(n,o){var a=hr(n),i=r.store;r.updateStore(Nn(r.store,a,o)),r.notifyObservers(i,[a],{type:"valueUpdate",source:"internal"}),r.notifyWatch([a]);var l=r.triggerDependenciesUpdate(i,a),u=r.callbacks.onValuesChange;if(u){var s=Gv(r.store,[a]);u(s,r.getFieldsValue())}r.triggerOnFieldsChange([a].concat(Ie(l)))}),M(this,"setFieldsValue",function(n){r.warningUnhooked();var o=r.store;if(n){var a=Oa(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 ba;r.getFieldEntities().forEach(function(u){var s=u.props.dependencies;(s||[]).forEach(function(c){var p=hr(c);i.update(p,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(u),f})})});var l=function u(s){var c=i.get(s)||new Set;c.forEach(function(p){if(!o.has(p)){o.add(p);var f=p.getNamePath();p.isFieldDirty()&&f.length&&(a.push(f),u(f))}})};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 ba;o.forEach(function(s){var c=s.name,p=s.errors;l.set(c,p)}),i.forEach(function(s){s.errors=l.get(s.name)||s.errors})}var u=i.filter(function(s){var c=s.name;return Ra(n,c)});u.length&&a(u,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,u=l?a.map(hr):[],s=[],c=String(Date.now()),p=new Set,f=i||{},h=f.recursive,v=f.dirty;r.getFieldEntities(!0).forEach(function(y){if(l||u.push(y.getNamePath()),!(!y.props.rules||!y.props.rules.length)&&!(v&&!y.isFieldDirty())){var C=y.getNamePath();if(p.add(C.join(c)),!l||Ra(u,C,h)){var w=y.validateRules(K({validateMessages:K(K({},jC),r.validateMessages)},i));s.push(w.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(E){var D,k=[],x=[];return(D=E.forEach)===null||D===void 0||D.call(E,function(O){var j=O.rule.warningOnly,B=O.errors;j?x.push.apply(x,Ie(B)):k.push.apply(k,Ie(B))}),k.length?Promise.reject({name:C,errors:k,warnings:x}):{name:C,errors:k,warnings:x}}))}}});var g=vP(s);r.lastValidatePromise=g,g.catch(function(y){return y}).then(function(y){var C=y.map(function(w){var E=w.name;return E});r.notifyObservers(r.store,C,{type:"validateFinish"}),r.triggerOnFieldsChange(C,y)});var m=g.then(function(){return r.lastValidatePromise===g?Promise.resolve(r.getFieldsValue(u)):Promise.reject([])}).catch(function(y){var C=y.filter(function(w){return w&&w.errors.length});return Promise.reject({values:r.getFieldsValue(u),errorFields:C,outOfDate:r.lastValidatePromise!==g})});m.catch(function(y){return y});var b=u.filter(function(y){return p.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 MC(e){var t=d.useRef(),r=d.useState({}),n=he(r,2),o=n[1];if(!t.current)if(e)t.current=e;else{var a=function(){o({})},i=new yP(a);t.current=i.getForm()}return[t.current]}var Of=d.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),CP=function(e){var t=e.validateMessages,r=e.onFormChange,n=e.onFormFinish,o=e.children,a=d.useContext(Of),i=d.useRef({});return d.createElement(Of.Provider,{value:K(K({},a),{},{validateMessages:K(K({},a.validateMessages),t),triggerFormChange:function(l,u){r&&r(l,{changedFields:u,forms:i.current}),a.triggerFormChange(l,u)},triggerFormFinish:function(l,u){n&&n(l,{values:u,forms:i.current}),a.triggerFormFinish(l,u)},registerForm:function(l,u){l&&(i.current=K(K({},i.current),{},M({},l,u))),a.registerForm(l,u)},unregisterForm:function(l){var u=K({},i.current);delete u[l],i.current=u,a.unregisterForm(l)}})},o)},xP=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],wP=function(e,t){var r=e.name,n=e.initialValues,o=e.fields,a=e.form,i=e.preserve,l=e.children,u=e.component,s=u===void 0?"form":u,c=e.validateMessages,p=e.validateTrigger,f=p===void 0?"onChange":p,h=e.onValuesChange,v=e.onFieldsChange,g=e.onFinish,m=e.onFinishFailed,b=e.clearOnDestroy,y=bt(e,xP),C=d.useRef(null),w=d.useContext(Of),E=MC(a),D=he(E,1),k=D[0],x=k.getInternalHooks(qo),O=x.useSubscribe,j=x.setInitialValues,B=x.setCallbacks,N=x.setValidateMessages,A=x.setPreserve,S=x.destroyForm;d.useImperativeHandle(t,function(){return K(K({},k),{},{nativeElement:C.current})}),d.useEffect(function(){return w.registerForm(r,k),function(){w.unregisterForm(r)}},[w,k,r]),N(K(K({},w.validateMessages),c)),B({onValuesChange:h,onFieldsChange:function(_){if(w.triggerFormChange(r,_),v){for(var V=arguments.length,Z=new Array(V>1?V-1:0),J=1;J<V;J++)Z[J-1]=arguments[J];v.apply(void 0,[_].concat(Z))}},onFinish:function(_){w.triggerFormFinish(r,_),g&&g(_)},onFinishFailed:m}),A(i);var $=d.useRef(null);j(n,!$.current),$.current||($.current=!0),d.useEffect(function(){return function(){return S(b)}},[]);var P,F=typeof l=="function";if(F){var I=k.getFieldsValue(!0);P=l(I,k)}else P=l;O(!F);var T=d.useRef();d.useEffect(function(){pP(T.current||[],o||[])||k.setFields(o||[]),T.current=o},[o,k]);var q=d.useMemo(function(){return K(K({},k),{},{validateTrigger:f})},[k,f]),L=d.createElement(Gs.Provider,{value:null},d.createElement(ei.Provider,{value:q},P));return s===!1?L:d.createElement(s,ze({},y,{ref:C,onSubmit:function(_){_.preventDefault(),_.stopPropagation(),k.submit()},onReset:function(_){var V;_.preventDefault(),k.resetFields(),(V=y.onReset)===null||V===void 0||V.call(y,_)}}),L)};function Zv(e){try{return JSON.stringify(e)}catch{return Math.random()}}function EP(){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=F6(a)?{form:a}:a,l=i.form,u=xt(),s=he(u,2),c=s[0],p=s[1],f=Ct(function(){return Zv(c)},[c]),h=qe(f);h.current=f;var v=Rr(ei),g=l||v,m=g&&g._init,b=hr(n),y=qe(b);return y.current=b,Bt(function(){if(m){var C=g.getFieldsValue,w=g.getInternalHooks,E=w(qo),D=E.registerWatch,k=function(j,B){var N=i.preserve?B:j;return typeof n=="function"?n(N):yn(N,y.current)},x=D(function(j,B){var N=k(j,B),A=Zv(N);h.current!==A&&(h.current=A,p(N))}),O=k(C(),C(!0));return c!==O&&p(O),x}},[m]),c}var kP=d.forwardRef(wP),Sl=kP;Sl.FormProvider=CP;Sl.Field=RC;Sl.List=gP;Sl.useForm=MC;Sl.useWatch=EP;const oa=d.createContext({}),DP=({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)},SP=d.createContext(void 0),pl=e=>{const{space:t,form:r,children:n}=e;if(n==null)return null;let o=n;return r&&(o=oe.createElement(DP,{override:!0,status:!0},o)),t&&(o=oe.createElement(o3,null,o)),o};function zC(...e){const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{r[n]!==void 0&&(t[n]=r[n])})}),t}var _C=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},$P=function(e,t){if(!_C(e))return!1;var r=document.createElement("div"),n=r.style[e];return r.style[e]=t,r.style[e]!==n};function BP(e,t){return!Array.isArray(e)&&t!==void 0?$P(e,t):_C(e)}function OP(e){return t=>d.createElement(da,{theme:{token:{motion:!1,zIndexPopupBase:0}}},d.createElement(e,Object.assign({},t)))}const LC=(e,t,r,n,o)=>OP(a=>{const{prefixCls:i,style:l}=a,u=d.useRef(null),[s,c]=d.useState(0),[p,f]=d.useState(0),[h,v]=Vr(!1,{value:a.open}),{getPrefixCls:g}=d.useContext(Qt),m=g(n||"select",i);d.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const C=new ResizeObserver(E=>{const D=E[0].target;c(D.offsetHeight+8),f(D.offsetWidth)}),w=setInterval(()=>{var E;const D=o?`.${o(m)}`:`.${m}-dropdown`,k=(E=u.current)===null||E===void 0?void 0:E.querySelector(D);k&&(clearInterval(w),C.observe(k))},10);return()=>{clearInterval(w),C.disconnect()}}},[]);let b=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:h,visible:h,getPopupContainer:()=>u.current});t&&Object.assign(b,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const y={paddingBottom:s,position:"relative",minWidth:p};return d.createElement("div",{ref:u,style:y},d.createElement(e,Object.assign({},b)))}),HC=(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 Iu=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(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:i,"aria-hidden":!0},l!==void 0?l:d.createElement("span",{className:ve(t.split(/\s+/).map(function(u){return"".concat(u,"-icon")}))},o))},AP=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,u=oe.useMemo(function(){if(it(n)==="object")return n.clearIcon;if(o)return o},[n,o]),s=oe.useMemo(function(){return!!(!a&&n&&(r.length||i)&&!(l==="combobox"&&i===""))},[n,a,r.length,i,l]);return{allowClear:s,clearIcon:oe.createElement(Iu,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:u},"\xD7")}},WC=d.createContext(null);function FP(){return d.useContext(WC)}function PP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=d.useState(!1),r=he(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(u,s){i(),a.current=window.setTimeout(function(){o(u),s&&s()},e)};return[n,l,i]}function KC(){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 NP(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 u=i.target;u.shadowRoot&&i.composed&&(u=i.composedPath()[0]||u),o.current.open&&e().filter(function(s){return s}).every(function(s){return!s.contains(u)&&s!==u})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",a),function(){return window.removeEventListener("mousedown",a)}},[])}function jP(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 IP=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ya=void 0;function RP(e,t){var r=e.prefixCls,n=e.invalidate,o=e.item,a=e.renderItem,i=e.responsive,l=e.responsiveDisabled,u=e.registerSize,s=e.itemKey,c=e.className,p=e.style,f=e.children,h=e.display,v=e.order,g=e.component,m=g===void 0?"div":g,b=bt(e,IP),y=i&&!h;function C(x){u(s,x)}d.useEffect(function(){return function(){C(null)}},[]);var w=a&&o!==ya?a(o,{index:v}):f,E;n||(E={opacity:y?0:1,height:y?0:ya,overflowY:y?"hidden":ya,order:i?v:ya,pointerEvents:y?"none":ya,position:y?"absolute":ya});var D={};y&&(D["aria-hidden"]=!0);var k=d.createElement(m,ze({className:ve(!n&&r,c),style:K(K({},E),p)},D,b,{ref:t}),w);return i&&(k=d.createElement(oo,{onResize:function(x){var O=x.offsetWidth;C(O)},disabled:l},k)),k}var Pa=d.forwardRef(RP);Pa.displayName="Item";function TP(e){if(typeof MessageChannel>"u")Xt(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function MP(){var e=d.useRef(null),t=function(r){e.current||(e.current=[],TP(function(){jb(function(){e.current.forEach(function(n){n()}),e.current=null})})),e.current.push(r)};return t}function Ca(e,t){var r=d.useState(t),n=he(r,2),o=n[0],a=n[1],i=nr(function(l){e(function(){a(l)})});return[o,i]}var Ys=oe.createContext(null),zP=["component"],_P=["className"],LP=["className"],HP=function(e,t){var r=d.useContext(Ys);if(!r){var n=e.component,o=n===void 0?"div":n,a=bt(e,zP);return d.createElement(o,ze({},a,{ref:t}))}var i=r.className,l=bt(r,_P),u=e.className,s=bt(e,LP);return d.createElement(Ys.Provider,{value:null},d.createElement(Pa,ze({ref:t,className:ve(i,u)},l,s)))},qC=d.forwardRef(HP);qC.displayName="RawItem";var WP=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],VC="responsive",XC="invalidate";function KP(e){return"+ ".concat(e.length," ...")}function qP(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,u=e.itemKey,s=e.itemWidth,c=s===void 0?10:s,p=e.ssr,f=e.style,h=e.className,v=e.maxCount,g=e.renderRest,m=e.renderRawRest,b=e.prefix,y=e.suffix,C=e.component,w=C===void 0?"div":C,E=e.itemComponent,D=e.onVisibleChange,k=bt(e,WP),x=p==="full",O=MP(),j=Ca(O,null),B=he(j,2),N=B[0],A=B[1],S=N||0,$=Ca(O,new Map),P=he($,2),F=P[0],I=P[1],T=Ca(O,0),q=he(T,2),L=q[0],_=q[1],V=Ca(O,0),Z=he(V,2),J=Z[0],z=Z[1],Y=Ca(O,0),G=he(Y,2),X=G[0],W=G[1],H=Ca(O,0),ne=he(H,2),U=ne[0],ae=ne[1],re=xt(null),de=he(re,2),ge=de[0],ye=de[1],Ne=xt(null),xe=he(Ne,2),be=xe[0],Ae=xe[1],me=d.useMemo(function(){return be===null&&x?Number.MAX_SAFE_INTEGER:be||0},[be,N]),Ee=xt(!1),je=he(Ee,2),Be=je[0],Ye=je[1],Re="".concat(n,"-item"),Te=Math.max(L,J),ue=v===VC,ke=a.length&&ue,Ke=v===XC,Ze=ke||typeof v=="number"&&a.length>v,We=Ct(function(){var le=a;return ke?N===null&&x?le=a:le=a.slice(0,Math.min(a.length,S/c)):typeof v=="number"&&(le=a.slice(0,v)),le},[a,c,N,v,ke]),_e=Ct(function(){return ke?a.slice(me+1):a.slice(We.length)},[a,We,ke,me]),nt=mt(function(le,ee){var te;return typeof u=="function"?u(le):(te=u&&(le==null?void 0:le[u]))!==null&&te!==void 0?te:ee},[u]),Ue=mt(i||function(le){return le},[i]);function et(le,ee,te){be===le&&(ee===void 0||ee===ge)||(Ae(le),te||(Ye(le<a.length-1),D==null||D(le)),ee!==void 0&&ye(ee))}function yt(le,ee){A(ee.clientWidth)}function kt(le,ee){I(function(te){var se=new Map(te);return ee===null?se.delete(le):se.set(le,ee),se})}function dt(le,ee){z(ee),_(J)}function ht(le,ee){W(ee)}function Mt(le,ee){ae(ee)}function Pt(le){return F.get(nt(We[le],le))}Kt(function(){if(S&&typeof Te=="number"&&We){var le=X+U,ee=We.length,te=ee-1;if(!ee){et(0,null);return}for(var se=0;se<ee;se+=1){var Pe=Pt(se);if(x&&(Pe=Pe||0),Pe===void 0){et(se-1,void 0,!0);break}if(le+=Pe,te===0&&le<=S||se===te-1&&le+Pt(te)<=S){et(te,null);break}else if(le+Te>S){et(se-1,le-Pe-U+J);break}}y&&Pt(0)+U>S&&ye(null)}},[S,F,J,X,U,nt,We]);var ft=Be&&!!_e.length,ut={};ge!==null&&ke&&(ut={position:"absolute",left:ge,top:0});var pe={prefixCls:Re,responsive:ke,component:E,invalidate:Ke},Oe=l?function(le,ee){var te=nt(le,ee);return d.createElement(Ys.Provider,{key:te,value:K(K({},pe),{},{order:ee,item:le,itemKey:te,registerSize:kt,display:ee<=me})},l(le,ee))}:function(le,ee){var te=nt(le,ee);return d.createElement(Pa,ze({},pe,{order:ee,key:te,item:le,renderItem:Ue,itemKey:te,registerSize:kt,display:ee<=me}))},Se={order:ft?me:Number.MAX_SAFE_INTEGER,className:"".concat(Re,"-rest"),registerSize:dt,display:ft},Ce=g||KP,we=m?d.createElement(Ys.Provider,{value:K(K({},pe),Se)},m(_e)):d.createElement(Pa,ze({},pe,Se),typeof Ce=="function"?Ce(_e):Ce),fe=d.createElement(w,ze({className:ve(!Ke&&n,h),style:f,ref:t},k),b&&d.createElement(Pa,ze({},pe,{responsive:ue,responsiveDisabled:!ke,order:-1,className:"".concat(Re,"-prefix"),registerSize:ht,display:!0}),b),We.map(Oe),Ze?we:null,y&&d.createElement(Pa,ze({},pe,{responsive:ue,responsiveDisabled:!ke,order:me,className:"".concat(Re,"-suffix"),registerSize:Mt,display:!0,style:ut}),y));return ue?d.createElement(oo,{onResize:yt,disabled:!ke},fe):fe}var Gn=d.forwardRef(qP);Gn.displayName="Overflow";Gn.Item=qC;Gn.RESPONSIVE=VC;Gn.INVALIDATE=XC;function VP(e,t,r){var n=K(K({},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,u=new Array(l),s=0;s<l;s++)u[s]=arguments[s];return a.apply(void 0,u),(i=e[o])===null||i===void 0?void 0:i.call.apply(i,[e].concat(u))})}),n}var XP=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],UP=function(e,t){var r=e.prefixCls,n=e.id,o=e.inputElement,a=e.autoFocus,i=e.autoComplete,l=e.editable,u=e.activeDescendantId,s=e.value,c=e.open,p=e.attrs,f=bt(e,XP),h=o||d.createElement("input",null),v=h,g=v.ref,m=v.props;return"maxLength"in h.props,h=d.cloneElement(h,K(K(K({type:"search"},VP(f,m)),{},{id:n,ref:to(t,g),autoComplete:i||"off",autoFocus:a,className:ve("".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?u:void 0},p),{},{value:l?s:"",readOnly:!l,unselectable:l?null:"on",style:K(K({},m.style),{},{opacity:l?null:0})})),h},UC=d.forwardRef(UP);function GC(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var GP=typeof window<"u"&&window.document&&window.document.documentElement,YP=GP;function ZP(e){return e!=null}function JP(e){return!e&&e!==0}function Jv(e){return["string","number"].includes(it(e))}function YC(e){var t=void 0;return e&&(Jv(e.title)?t=e.title.toString():Jv(e.label)&&(t=e.label.toString())),t}function QP(e,t){YP?d.useLayoutEffect(e,t):d.useEffect(e,t)}function eN(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var Qv=function(e){e.preventDefault(),e.stopPropagation()},tN=function(e){var t=e.id,r=e.prefixCls,n=e.values,o=e.open,a=e.searchValue,i=e.autoClearSearchValue,l=e.inputRef,u=e.placeholder,s=e.disabled,c=e.mode,p=e.showSearch,f=e.autoFocus,h=e.autoComplete,v=e.activeDescendantId,g=e.tabIndex,m=e.removeIcon,b=e.maxTagCount,y=e.maxTagTextLength,C=e.maxTagPlaceholder,w=C===void 0?function(U){return"+ ".concat(U.length," ...")}:C,E=e.tagRender,D=e.onToggleOpen,k=e.onRemove,x=e.onInputChange,O=e.onInputPaste,j=e.onInputKeyDown,B=e.onInputMouseDown,N=e.onInputCompositionStart,A=e.onInputCompositionEnd,S=e.onInputBlur,$=d.useRef(null),P=xt(0),F=he(P,2),I=F[0],T=F[1],q=xt(!1),L=he(q,2),_=L[0],V=L[1],Z="".concat(r,"-selection"),J=o||c==="multiple"&&i===!1||c==="tags"?a:"",z=c==="tags"||c==="multiple"&&i===!1||p&&(o||_);QP(function(){T($.current.scrollWidth)},[J]);var Y=function(U,ae,re,de,ge){return d.createElement("span",{title:YC(U),className:ve("".concat(Z,"-item"),M({},"".concat(Z,"-item-disabled"),re))},d.createElement("span",{className:"".concat(Z,"-item-content")},ae),de&&d.createElement(Iu,{className:"".concat(Z,"-item-remove"),onMouseDown:Qv,onClick:ge,customizeIcon:m},"\xD7"))},G=function(U,ae,re,de,ge,ye){var Ne=function(xe){Qv(xe),D(!o)};return d.createElement("span",{onMouseDown:Ne},E({label:ae,value:U,disabled:re,closable:de,onClose:ge,isMaxTag:!!ye}))},X=function(U){var ae=U.disabled,re=U.label,de=U.value,ge=!s&&!ae,ye=re;if(typeof y=="number"&&(typeof re=="string"||typeof re=="number")){var Ne=String(ye);Ne.length>y&&(ye="".concat(Ne.slice(0,y),"..."))}var xe=function(be){be&&be.stopPropagation(),k(U)};return typeof E=="function"?G(de,ye,ae,ge,xe):Y(U,ye,ae,ge,xe)},W=function(U){if(!n.length)return null;var ae=typeof w=="function"?w(U):w;return typeof E=="function"?G(void 0,ae,!1,!1,void 0,!0):Y({title:ae},ae,!1)},H=d.createElement("div",{className:"".concat(Z,"-search"),style:{width:I},onFocus:function(){V(!0)},onBlur:function(){V(!1)}},d.createElement(UC,{ref:l,open:o,prefixCls:r,id:t,inputElement:null,disabled:s,autoFocus:f,autoComplete:h,editable:z,activeDescendantId:v,value:J,onKeyDown:j,onMouseDown:B,onChange:x,onPaste:O,onCompositionStart:N,onCompositionEnd:A,onBlur:S,tabIndex:g,attrs:Jn(e,!0)}),d.createElement("span",{ref:$,className:"".concat(Z,"-search-mirror"),"aria-hidden":!0},J,"\xA0")),ne=d.createElement(Gn,{prefixCls:"".concat(Z,"-overflow"),data:n,renderItem:X,renderRest:W,suffix:H,itemKey:eN,maxCount:b});return d.createElement("span",{className:"".concat(Z,"-wrap")},ne,!n.length&&!J&&d.createElement("span",{className:"".concat(Z,"-placeholder")},u))},rN=function(e){var t=e.inputElement,r=e.prefixCls,n=e.id,o=e.inputRef,a=e.disabled,i=e.autoFocus,l=e.autoComplete,u=e.activeDescendantId,s=e.mode,c=e.open,p=e.values,f=e.placeholder,h=e.tabIndex,v=e.showSearch,g=e.searchValue,m=e.activeValue,b=e.maxLength,y=e.onInputKeyDown,C=e.onInputMouseDown,w=e.onInputChange,E=e.onInputPaste,D=e.onInputCompositionStart,k=e.onInputCompositionEnd,x=e.onInputBlur,O=e.title,j=d.useState(!1),B=he(j,2),N=B[0],A=B[1],S=s==="combobox",$=S||v,P=p[0],F=g||"";S&&m&&!N&&(F=m),d.useEffect(function(){S&&A(!1)},[S,m]);var I=s!=="combobox"&&!c&&!v?!1:!!F,T=O===void 0?YC(P):O,q=d.useMemo(function(){return P?null:d.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:I?{visibility:"hidden"}:void 0},f)},[P,I,f,r]);return d.createElement("span",{className:"".concat(r,"-selection-wrap")},d.createElement("span",{className:"".concat(r,"-selection-search")},d.createElement(UC,{ref:o,prefixCls:r,id:n,open:c,inputElement:t,disabled:a,autoFocus:i,autoComplete:l,editable:$,activeDescendantId:u,value:F,onKeyDown:y,onMouseDown:C,onChange:function(L){A(!0),w(L)},onPaste:E,onCompositionStart:D,onCompositionEnd:k,onBlur:x,tabIndex:h,attrs:Jn(e,!0),maxLength:S?b:void 0})),!S&&P?d.createElement("span",{className:"".concat(r,"-selection-item"),title:T,style:I?{visibility:"hidden"}:void 0},P.label):null,q)},nN=function(e,t){var r=qe(null),n=qe(!1),o=e.prefixCls,a=e.open,i=e.mode,l=e.showSearch,u=e.tokenWithEnter,s=e.disabled,c=e.prefix,p=e.autoClearSearchValue,f=e.onSearch,h=e.onSearchSubmit,v=e.onToggleOpen,g=e.onInputKeyDown,m=e.onInputBlur,b=e.domRef;d.useImperativeHandle(t,function(){return{focus:function(I){r.current.focus(I)},blur:function(){r.current.blur()}}});var y=KC(0),C=he(y,2),w=C[0],E=C[1],D=function(I){var T=I.which,q=r.current instanceof HTMLTextAreaElement;!q&&a&&(T===rt.UP||T===rt.DOWN)&&I.preventDefault(),g&&g(I),T===rt.ENTER&&i==="tags"&&!n.current&&!a&&(h==null||h(I.target.value)),!(q&&!a&&~[rt.UP,rt.DOWN,rt.LEFT,rt.RIGHT].indexOf(T))&&jP(T)&&v(!0)},k=function(){E(!0)},x=qe(null),O=function(I){f(I,!0,n.current)!==!1&&v(!0)},j=function(){n.current=!0},B=function(I){n.current=!1,i!=="combobox"&&O(I.target.value)},N=function(I){var T=I.target.value;if(u&&x.current&&/[\r\n]/.test(x.current)){var q=x.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");T=T.replace(q,x.current)}x.current=null,O(T)},A=function(I){var T=I.clipboardData,q=T==null?void 0:T.getData("text");x.current=q||""},S=function(I){var T=I.target;if(T!==r.current){var q=document.body.style.msTouchAction!==void 0;q?setTimeout(function(){r.current.focus()}):r.current.focus()}},$=function(I){var T=w();I.target!==r.current&&!T&&!(i==="combobox"&&s)&&I.preventDefault(),(i!=="combobox"&&(!l||!T)||!a)&&(a&&p!==!1&&f("",!0,!1),v())},P={inputRef:r,onInputKeyDown:D,onInputMouseDown:k,onInputChange:N,onInputPaste:A,onInputCompositionStart:j,onInputCompositionEnd:B,onInputBlur:m},F=i==="multiple"||i==="tags"?d.createElement(tN,ze({},e,P)):d.createElement(rN,ze({},e,P));return d.createElement("div",{ref:b,className:"".concat(o,"-selector"),onClick:S,onMouseDown:$},c&&d.createElement("div",{className:"".concat(o,"-prefix")},c),F)},oN=d.forwardRef(nN);function aN(e){var t=e.prefixCls,r=e.align,n=e.arrow,o=e.arrowPos,a=n||{},i=a.className,l=a.content,u=o.x,s=u===void 0?0:u,c=o.y,p=c===void 0?0:c,f=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=p:m==="t"?h.top=0:h.bottom=0,b===C||!["l","r"].includes(b)?h.left=s:b==="l"?h.left=0:h.right=0}return d.createElement("div",{ref:f,className:ve("".concat(t,"-arrow"),i),style:h},l)}function iN(e){var t=e.prefixCls,r=e.open,n=e.zIndex,o=e.mask,a=e.motion;return o?d.createElement(ca,ze({},a,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(i){var l=i.className;return d.createElement("div",{style:{zIndex:n},className:ve("".concat(t,"-mask"),l)})}):null}var lN=d.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),sN=d.forwardRef(function(e,t){var r=e.popup,n=e.className,o=e.prefixCls,a=e.style,i=e.target,l=e.onVisibleChanged,u=e.open,s=e.keepDom,c=e.fresh,p=e.onClick,f=e.mask,h=e.arrow,v=e.arrowPos,g=e.align,m=e.motion,b=e.maskMotion,y=e.forceRender,C=e.getPopupContainer,w=e.autoDestroy,E=e.portal,D=e.zIndex,k=e.onMouseEnter,x=e.onMouseLeave,O=e.onPointerEnter,j=e.onPointerDownCapture,B=e.ready,N=e.offsetX,A=e.offsetY,S=e.offsetR,$=e.offsetB,P=e.onAlign,F=e.onPrepare,I=e.stretch,T=e.targetWidth,q=e.targetHeight,L=typeof r=="function"?r():r,_=u||s,V=(C==null?void 0:C.length)>0,Z=d.useState(!C||!V),J=he(Z,2),z=J[0],Y=J[1];if(Kt(function(){!z&&V&&i&&Y(!0)},[z,V,i]),!z)return null;var G="auto",X={left:"-1000vw",top:"-1000vh",right:G,bottom:G};if(B||!u){var W,H=g.points,ne=g.dynamicInset||((W=g._experimental)===null||W===void 0?void 0:W.dynamicInset),U=ne&&H[0][1]==="r",ae=ne&&H[0][0]==="b";U?(X.right=S,X.left=G):(X.left=N,X.right=G),ae?(X.bottom=$,X.top=G):(X.top=A,X.bottom=G)}var re={};return I&&(I.includes("height")&&q?re.height=q:I.includes("minHeight")&&q&&(re.minHeight=q),I.includes("width")&&T?re.width=T:I.includes("minWidth")&&T&&(re.minWidth=T)),u||(re.pointerEvents="none"),d.createElement(E,{open:y||_,getContainer:C&&function(){return C(i)},autoDestroy:w},d.createElement(iN,{prefixCls:o,open:u,zIndex:D,mask:f,motion:b}),d.createElement(oo,{onResize:P,disabled:!u},function(de){return d.createElement(ca,ze({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:y,leavedClassName:"".concat(o,"-hidden")},m,{onAppearPrepare:F,onEnterPrepare:F,visible:u,onVisibleChanged:function(ge){var ye;m==null||(ye=m.onVisibleChanged)===null||ye===void 0||ye.call(m,ge),l(ge)}}),function(ge,ye){var Ne=ge.className,xe=ge.style,be=ve(o,Ne,n);return d.createElement("div",{ref:to(de,t,ye),className:be,style:K(K(K(K({"--arrow-x":"".concat(v.x||0,"px"),"--arrow-y":"".concat(v.y||0,"px")},X),re),xe),{},{boxSizing:"border-box",zIndex:D},a),onMouseEnter:k,onMouseLeave:x,onPointerEnter:O,onClick:p,onPointerDownCapture:j},h&&d.createElement(aN,{prefixCls:o,arrow:h,arrowPos:v,align:g}),d.createElement(lN,{cache:!u&&!c},L))})}))}),uN=d.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,o=Yn(r),a=d.useCallback(function(l){el(t,n?n(l):l)},[n]),i=sa(a,ua(r));return o?d.cloneElement(r,{ref:i}):r}),e0=d.createContext(null);function t0(e){return e?Array.isArray(e)?e:[e]:[]}function cN(e,t,r,n){return d.useMemo(function(){var o=t0(r??t),a=t0(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 dN(){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 fN(e,t,r,n){for(var o=r.points,a=Object.keys(e),i=0;i<a.length;i+=1){var l,u=a[i];if(dN((l=e[u])===null||l===void 0?void 0:l.points,o,n))return"".concat(t,"-placement-").concat(u)}return""}function r0(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function $l(e){return e.ownerDocument.defaultView}function Af(e){for(var t=[],r=e==null?void 0:e.parentElement,n=["hidden","scroll","clip","auto"];r;){var o=$l(r).getComputedStyle(r),a=o.overflowX,i=o.overflowY,l=o.overflow;[a,i,l].some(function(u){return n.includes(u)})&&t.push(r),r=r.parentElement}return t}function ml(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function wi(e){return ml(parseFloat(e),0)}function n0(e,t){var r=K({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var o=$l(n).getComputedStyle(n),a=o.overflow,i=o.overflowClipMargin,l=o.borderTopWidth,u=o.borderBottomWidth,s=o.borderLeftWidth,c=o.borderRightWidth,p=n.getBoundingClientRect(),f=n.offsetHeight,h=n.clientHeight,v=n.offsetWidth,g=n.clientWidth,m=wi(l),b=wi(u),y=wi(s),C=wi(c),w=ml(Math.round(p.width/v*1e3)/1e3),E=ml(Math.round(p.height/f*1e3)/1e3),D=(v-g-y-C)*w,k=(f-h-m-b)*E,x=m*E,O=b*E,j=y*w,B=C*w,N=0,A=0;if(a==="clip"){var S=wi(i);N=S*w,A=S*E}var $=p.x+j-N,P=p.y+x-A,F=$+p.width+2*N-j-B-D,I=P+p.height+2*A-x-O-k;r.left=Math.max(r.left,$),r.top=Math.max(r.top,P),r.right=Math.min(r.right,F),r.bottom=Math.min(r.bottom,I)}}),r}function o0(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 a0(e,t){var r=t||[],n=he(r,2),o=n[0],a=n[1];return[o0(e.width,o),o0(e.height,a)]}function i0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function xa(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 Co(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 pN(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]||{}}),u=he(l,2),s=u[0],c=u[1],p=d.useRef(0),f=d.useMemo(function(){return t?Af(t):[]},[t]),h=d.useRef({}),v=function(){h.current={}};e||v();var g=nr(function(){if(t&&r&&e){let Gt=function(Qr,hn){var sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:je,ao=_.x+Qr,bo=_.y+hn,Vu=ao+ae,Xu=bo+U,Uu=Math.max(ao,sn.left),tt=Math.max(bo,sn.top),_t=Math.min(Vu,sn.right),Fr=Math.min(Xu,sn.bottom);return Math.max(0,(_t-Uu)*(Fr-tt))},_r=function(){St=_.y+Ce,Nt=St+U,Ot=_.x+Se,jt=Ot+ae};var y,C,w,E,D=t,k=D.ownerDocument,x=$l(D),O=x.getComputedStyle(D),j=O.position,B=D.style.left,N=D.style.top,A=D.style.right,S=D.style.bottom,$=D.style.overflow,P=K(K({},o[n]),a),F=k.createElement("div");(y=D.parentElement)===null||y===void 0||y.appendChild(F),F.style.left="".concat(D.offsetLeft,"px"),F.style.top="".concat(D.offsetTop,"px"),F.style.position=j,F.style.height="".concat(D.offsetHeight,"px"),F.style.width="".concat(D.offsetWidth,"px"),D.style.left="0",D.style.top="0",D.style.right="auto",D.style.bottom="auto",D.style.overflow="hidden";var I;if(Array.isArray(r))I={x:r[0],y:r[1],width:0,height:0};else{var T,q,L=r.getBoundingClientRect();L.x=(T=L.x)!==null&&T!==void 0?T:L.left,L.y=(q=L.y)!==null&&q!==void 0?q:L.top,I={x:L.x,y:L.y,width:L.width,height:L.height}}var _=D.getBoundingClientRect(),V=x.getComputedStyle(D),Z=V.height,J=V.width;_.x=(C=_.x)!==null&&C!==void 0?C:_.left,_.y=(w=_.y)!==null&&w!==void 0?w:_.top;var z=k.documentElement,Y=z.clientWidth,G=z.clientHeight,X=z.scrollWidth,W=z.scrollHeight,H=z.scrollTop,ne=z.scrollLeft,U=_.height,ae=_.width,re=I.height,de=I.width,ge={left:0,top:0,right:Y,bottom:G},ye={left:-ne,top:-H,right:X-ne,bottom:W-H},Ne=P.htmlRegion,xe="visible",be="visibleFirst";Ne!=="scroll"&&Ne!==be&&(Ne=xe);var Ae=Ne===be,me=n0(ye,f),Ee=n0(ge,f),je=Ne===xe?Ee:me,Be=Ae?Ee:je;D.style.left="auto",D.style.top="auto",D.style.right="0",D.style.bottom="0";var Ye=D.getBoundingClientRect();D.style.left=B,D.style.top=N,D.style.right=A,D.style.bottom=S,D.style.overflow=$,(E=D.parentElement)===null||E===void 0||E.removeChild(F);var Re=ml(Math.round(ae/parseFloat(J)*1e3)/1e3),Te=ml(Math.round(U/parseFloat(Z)*1e3)/1e3);if(Re===0||Te===0||Qi(r)&&!Du(r))return;var ue=P.offset,ke=P.targetOffset,Ke=a0(_,ue),Ze=he(Ke,2),We=Ze[0],_e=Ze[1],nt=a0(I,ke),Ue=he(nt,2),et=Ue[0],yt=Ue[1];I.x-=et,I.y-=yt;var kt=P.points||[],dt=he(kt,2),ht=dt[0],Mt=dt[1],Pt=i0(Mt),ft=i0(ht),ut=xa(I,Pt),pe=xa(_,ft),Oe=K({},P),Se=ut.x-pe.x+We,Ce=ut.y-pe.y+_e,we=Gt(Se,Ce),fe=Gt(Se,Ce,Ee),le=xa(I,["t","l"]),ee=xa(_,["t","l"]),te=xa(I,["b","r"]),se=xa(_,["b","r"]),Pe=P.overflow||{},ot=Pe.adjustX,He=Pe.adjustY,$e=Pe.shiftX,Xe=Pe.shiftY,wt=function(Qr){return typeof Qr=="boolean"?Qr:Qr>=0},St,Nt,Ot,jt;_r();var ar=wt(He),Le=ft[0]===Pt[0];if(ar&&ft[0]==="t"&&(Nt>Be.bottom||h.current.bt)){var Je=Ce;Le?Je-=U-re:Je=le.y-se.y-_e;var gt=Gt(Se,Je),pt=Gt(Se,Je,Ee);gt>we||gt===we&&(!Ae||pt>=fe)?(h.current.bt=!0,Ce=Je,_e=-_e,Oe.points=[Co(ft,0),Co(Pt,0)]):h.current.bt=!1}if(ar&&ft[0]==="b"&&(St<Be.top||h.current.tb)){var At=Ce;Le?At+=U-re:At=te.y-ee.y-_e;var mr=Gt(Se,At),wr=Gt(Se,At,Ee);mr>we||mr===we&&(!Ae||wr>=fe)?(h.current.tb=!0,Ce=At,_e=-_e,Oe.points=[Co(ft,0),Co(Pt,0)]):h.current.tb=!1}var lt=wt(ot),$t=ft[1]===Pt[1];if(lt&&ft[1]==="l"&&(jt>Be.right||h.current.rl)){var Ft=Se;$t?Ft-=ae-de:Ft=le.x-se.x-We;var qt=Gt(Ft,Ce),Br=Gt(Ft,Ce,Ee);qt>we||qt===we&&(!Ae||Br>=fe)?(h.current.rl=!0,Se=Ft,We=-We,Oe.points=[Co(ft,1),Co(Pt,1)]):h.current.rl=!1}if(lt&&ft[1]==="r"&&(Ot<Be.left||h.current.lr)){var on=Se;$t?on+=ae-de:on=te.x-ee.x-We;var wn=Gt(on,Ce),Zr=Gt(on,Ce,Ee);wn>we||wn===we&&(!Ae||Zr>=fe)?(h.current.lr=!0,Se=on,We=-We,Oe.points=[Co(ft,1),Co(Pt,1)]):h.current.lr=!1}_r();var Mr=$e===!0?0:$e;typeof Mr=="number"&&(Ot<Ee.left&&(Se-=Ot-Ee.left-We,I.x+de<Ee.left+Mr&&(Se+=I.x-Ee.left+de-Mr)),jt>Ee.right&&(Se-=jt-Ee.right-We,I.x>Ee.right-Mr&&(Se+=I.x-Ee.right+Mr)));var an=Xe===!0?0:Xe;typeof an=="number"&&(St<Ee.top&&(Ce-=St-Ee.top-_e,I.y+re<Ee.top+an&&(Ce+=I.y-Ee.top+re-an)),Nt>Ee.bottom&&(Ce-=Nt-Ee.bottom-_e,I.y>Ee.bottom-an&&(Ce+=I.y-Ee.bottom+an)));var ln=_.x+Se,Jr=ln+ae,Hr=_.y+Ce,Et=Hr+U,Ge=I.x,vt=Ge+de,Ht=I.y,zt=Ht+re,rr=Math.max(ln,Ge),Or=Math.min(Jr,vt),br=(rr+Or)/2,Ar=br-ln,Er=Math.max(Hr,Ht),kr=Math.min(Et,zt),mn=(Er+kr)/2,Hn=mn-Hr;i==null||i(t,Oe);var ct=Ye.right-_.x-(Se+_.width),It=Ye.bottom-_.y-(Ce+_.height);Re===1&&(Se=Math.round(Se),ct=Math.round(ct)),Te===1&&(Ce=Math.round(Ce),It=Math.round(It));var zr={ready:!0,offsetX:Se/Re,offsetY:Ce/Te,offsetR:ct/Re,offsetB:It/Te,arrowX:Ar/Re,arrowY:Hn/Te,scaleX:Re,scaleY:Te,align:Oe};c(zr)}}),m=function(){p.current+=1;var y=p.current;Promise.resolve().then(function(){p.current===y&&g()})},b=function(){c(function(y){return K(K({},y),{},{ready:!1})})};return Kt(b,[n]),Kt(function(){e||b()},[e]),[s.ready,s.offsetX,s.offsetY,s.offsetR,s.offsetB,s.arrowX,s.arrowY,s.scaleX,s.scaleY,s.align,m]}function mN(e,t,r,n,o){Kt(function(){if(e&&t&&r){let p=function(){n(),o()};var a=t,i=r,l=Af(a),u=Af(i),s=$l(i),c=new Set([s].concat(Ie(l),Ie(u)));return c.forEach(function(f){f.addEventListener("scroll",p,{passive:!0})}),s.addEventListener("resize",p,{passive:!0}),n(),function(){c.forEach(function(f){f.removeEventListener("scroll",p),s.removeEventListener("resize",p)})}}},[e,t,r])}function hN(e,t,r,n,o,a,i,l){var u=d.useRef(e);u.current=e;var s=d.useRef(!1);d.useEffect(function(){if(t&&n&&(!o||a)){var p=function(){s.current=!1},f=function(g){var m;u.current&&!i(((m=g.composedPath)===null||m===void 0||(m=m.call(g))===null||m===void 0?void 0:m[0])||g.target)&&!s.current&&l(!1)},h=$l(n);h.addEventListener("pointerdown",p,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var v=qs(r);return v&&(v.addEventListener("mousedown",f,!0),v.addEventListener("contextmenu",f,!0)),function(){h.removeEventListener("pointerdown",p,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),v&&(v.removeEventListener("mousedown",f,!0),v.removeEventListener("contextmenu",f,!0))}}},[t,r,n,o,a]);function c(){s.current=!0}return c}var gN=["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 vN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:PC,t=d.forwardRef(function(r,n){var o=r.prefixCls,a=o===void 0?"rc-trigger-popup":o,i=r.children,l=r.action,u=l===void 0?"hover":l,s=r.showAction,c=r.hideAction,p=r.popupVisible,f=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,w=r.mask,E=r.maskClosable,D=E===void 0?!0:E,k=r.getPopupContainer,x=r.forceRender,O=r.autoDestroy,j=r.destroyPopupOnHide,B=r.popup,N=r.popupClassName,A=r.popupStyle,S=r.popupPlacement,$=r.builtinPlacements,P=$===void 0?{}:$,F=r.popupAlign,I=r.zIndex,T=r.stretch,q=r.getPopupClassNameFromAlign,L=r.fresh,_=r.alignPoint,V=r.onPopupClick,Z=r.onPopupAlign,J=r.arrow,z=r.popupMotion,Y=r.maskMotion,G=r.popupTransitionName,X=r.popupAnimation,W=r.maskTransitionName,H=r.maskAnimation,ne=r.className,U=r.getTriggerDOMNode,ae=bt(r,gN),re=O||j||!1,de=d.useState(!1),ge=he(de,2),ye=ge[0],Ne=ge[1];Kt(function(){Ne(HC())},[]);var xe=d.useRef({}),be=d.useContext(e0),Ae=d.useMemo(function(){return{registerSubPopup:function(tt,_t){xe.current[tt]=_t,be==null||be.registerSubPopup(tt,_t)}}},[be]),me=em(),Ee=d.useState(null),je=he(Ee,2),Be=je[0],Ye=je[1],Re=d.useRef(null),Te=nr(function(tt){Re.current=tt,Qi(tt)&&Be!==tt&&Ye(tt),be==null||be.registerSubPopup(me,tt)}),ue=d.useState(null),ke=he(ue,2),Ke=ke[0],Ze=ke[1],We=d.useRef(null),_e=nr(function(tt){Qi(tt)&&Ke!==tt&&(Ze(tt),We.current=tt)}),nt=d.Children.only(i),Ue=(nt==null?void 0:nt.props)||{},et={},yt=nr(function(tt){var _t,Fr,Dr=Ke;return(Dr==null?void 0:Dr.contains(tt))||((_t=qs(Dr))===null||_t===void 0?void 0:_t.host)===tt||tt===Dr||(Be==null?void 0:Be.contains(tt))||((Fr=qs(Be))===null||Fr===void 0?void 0:Fr.host)===tt||tt===Be||Object.values(xe.current).some(function(fr){return(fr==null?void 0:fr.contains(tt))||tt===fr})}),kt=r0(a,z,X,G),dt=r0(a,Y,H,W),ht=d.useState(f||!1),Mt=he(ht,2),Pt=Mt[0],ft=Mt[1],ut=p??Pt,pe=nr(function(tt){p===void 0&&ft(tt)});Kt(function(){ft(p||!1)},[p]);var Oe=d.useRef(ut);Oe.current=ut;var Se=d.useRef([]);Se.current=[];var Ce=nr(function(tt){var _t;pe(tt),((_t=Se.current[Se.current.length-1])!==null&&_t!==void 0?_t:ut)!==tt&&(Se.current.push(tt),h==null||h(tt))}),we=d.useRef(),fe=function(){clearTimeout(we.current)},le=function(tt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;fe(),_t===0?Ce(tt):we.current=setTimeout(function(){Ce(tt)},_t*1e3)};d.useEffect(function(){return fe},[]);var ee=d.useState(!1),te=he(ee,2),se=te[0],Pe=te[1];Kt(function(tt){(!tt||ut)&&Pe(!0)},[ut]);var ot=d.useState(null),He=he(ot,2),$e=He[0],Xe=He[1],wt=d.useState(null),St=he(wt,2),Nt=St[0],Ot=St[1],jt=function(tt){Ot([tt.clientX,tt.clientY])},ar=pN(ut,Be,_&&Nt!==null?Nt:Ke,S,P,F,Z),Le=he(ar,11),Je=Le[0],gt=Le[1],pt=Le[2],At=Le[3],mr=Le[4],wr=Le[5],lt=Le[6],$t=Le[7],Ft=Le[8],qt=Le[9],Br=Le[10],on=cN(ye,u,s,c),wn=he(on,2),Zr=wn[0],Mr=wn[1],an=Zr.has("click"),ln=Mr.has("click")||Mr.has("contextMenu"),Jr=nr(function(){se||Br()}),Hr=function(){Oe.current&&_&&ln&&le(!1)};mN(ut,Ke,Be,Jr,Hr),Kt(function(){Jr()},[Nt,S]),Kt(function(){ut&&!(P!=null&&P[S])&&Jr()},[JSON.stringify(F)]);var Et=d.useMemo(function(){var tt=fN(P,a,qt,_);return ve(tt,q==null?void 0:q(qt))},[qt,q,P,a,_]);d.useImperativeHandle(n,function(){return{nativeElement:We.current,popupElement:Re.current,forceAlign:Jr}});var Ge=d.useState(0),vt=he(Ge,2),Ht=vt[0],zt=vt[1],rr=d.useState(0),Or=he(rr,2),br=Or[0],Ar=Or[1],Er=function(){if(T&&Ke){var tt=Ke.getBoundingClientRect();zt(tt.width),Ar(tt.height)}},kr=function(){Er(),Jr()},mn=function(tt){Pe(!1),Br(),v==null||v(tt)},Hn=function(){return new Promise(function(tt){Er(),Xe(function(){return tt})})};Kt(function(){$e&&(Br(),$e(),Xe(null))},[$e]);function ct(tt,_t,Fr,Dr){et[tt]=function(fr){var Pl;Dr==null||Dr(fr),le(_t,Fr);for(var Gu=arguments.length,Nm=new Array(Gu>1?Gu-1:0),Nl=1;Nl<Gu;Nl++)Nm[Nl-1]=arguments[Nl];(Pl=Ue[tt])===null||Pl===void 0||Pl.call.apply(Pl,[Ue,fr].concat(Nm))}}(an||ln)&&(et.onClick=function(tt){var _t;Oe.current&&ln?le(!1):!Oe.current&&an&&(jt(tt),le(!0));for(var Fr=arguments.length,Dr=new Array(Fr>1?Fr-1:0),fr=1;fr<Fr;fr++)Dr[fr-1]=arguments[fr];(_t=Ue.onClick)===null||_t===void 0||_t.call.apply(_t,[Ue,tt].concat(Dr))});var It=hN(ut,ln,Ke,Be,w,D,yt,le),zr=Zr.has("hover"),Gt=Mr.has("hover"),_r,Qr;zr&&(ct("onMouseEnter",!0,g,function(tt){jt(tt)}),ct("onPointerEnter",!0,g,function(tt){jt(tt)}),_r=function(tt){(ut||se)&&Be!==null&&Be!==void 0&&Be.contains(tt.target)&&le(!0,g)},_&&(et.onMouseMove=function(tt){var _t;(_t=Ue.onMouseMove)===null||_t===void 0||_t.call(Ue,tt)})),Gt&&(ct("onMouseLeave",!1,b),ct("onPointerLeave",!1,b),Qr=function(){le(!1,b)}),Zr.has("focus")&&ct("onFocus",!0,y),Mr.has("focus")&&ct("onBlur",!1,C),Zr.has("contextMenu")&&(et.onContextMenu=function(tt){var _t;Oe.current&&Mr.has("contextMenu")?le(!1):(jt(tt),le(!0)),tt.preventDefault();for(var Fr=arguments.length,Dr=new Array(Fr>1?Fr-1:0),fr=1;fr<Fr;fr++)Dr[fr-1]=arguments[fr];(_t=Ue.onContextMenu)===null||_t===void 0||_t.call.apply(_t,[Ue,tt].concat(Dr))}),ne&&(et.className=ve(Ue.className,ne));var hn=d.useRef(!1);hn.current||(hn.current=x||ut||se);var sn=K(K({},Ue),et),ao={},bo=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];bo.forEach(function(tt){ae[tt]&&(ao[tt]=function(){for(var _t,Fr=arguments.length,Dr=new Array(Fr),fr=0;fr<Fr;fr++)Dr[fr]=arguments[fr];(_t=sn[tt])===null||_t===void 0||_t.call.apply(_t,[sn].concat(Dr)),ae[tt].apply(ae,Dr)})});var Vu=d.cloneElement(nt,K(K({},sn),ao)),Xu={x:wr,y:lt},Uu=J?K({},J!==!0?J:{}):null;return d.createElement(d.Fragment,null,d.createElement(oo,{disabled:!ut,ref:_e,onResize:kr},d.createElement(uN,{getTriggerDOMNode:U},Vu)),hn.current&&d.createElement(e0.Provider,{value:Ae},d.createElement(sN,{portal:e,ref:Te,prefixCls:a,popup:B,className:ve(N,Et),style:A,target:Ke,onMouseEnter:_r,onMouseLeave:Qr,onPointerEnter:_r,zIndex:I,open:ut,keepDom:se,fresh:L,onClick:V,onPointerDownCapture:It,mask:w,motion:kt,maskMotion:dt,onVisibleChanged:mn,onPrepare:Hn,forceRender:x,autoDestroy:re,getPopupContainer:k,align:qt,arrow:Uu,arrowPos:Xu,ready:Je,offsetX:gt,offsetY:pt,offsetR:At,offsetB:mr,onAlign:Jr,stretch:T,targetWidth:Ht/$t,targetHeight:br/Ft})))});return t}const Ru=vN(PC);var bN=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],yN=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"}}},CN=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,u=e.dropdownStyle,s=e.dropdownClassName,c=e.direction,p=c===void 0?"ltr":c,f=e.placement,h=e.builtinPlacements,v=e.dropdownMatchSelectWidth,g=e.dropdownRender,m=e.dropdownAlign,b=e.getPopupContainer,y=e.empty,C=e.getTriggerDOMNode,w=e.onPopupVisibleChange,E=e.onPopupMouseEnter,D=bt(e,bN),k="".concat(r,"-dropdown"),x=a;g&&(x=g(a));var O=d.useMemo(function(){return h||yN(v)},[h,v]),j=i?"".concat(k,"-").concat(i):l,B=typeof v=="number",N=d.useMemo(function(){return B?null:v===!1?"minWidth":"width"},[v,B]),A=u;B&&(A=K(K({},A),{},{width:v}));var S=d.useRef(null);return d.useImperativeHandle(t,function(){return{getPopupElement:function(){var $;return($=S.current)===null||$===void 0?void 0:$.popupElement}}}),d.createElement(Ru,ze({},D,{showAction:w?["click"]:[],hideAction:w?["click"]:[],popupPlacement:f||(p==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:O,prefixCls:k,popupTransitionName:j,popup:d.createElement("div",{onMouseEnter:E},x),ref:S,stretch:N,popupAlign:m,popupVisible:n,getPopupContainer:b,popupClassName:ve(s,M({},"".concat(k,"-empty"),y)),popupStyle:A,getTriggerDOMNode:C,onPopupVisibleChange:w}),o)},xN=d.forwardRef(CN);function l0(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 Ff(e){return typeof e<"u"&&!Number.isNaN(e)}function ZC(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 wN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.fieldNames,n=t.childrenAsData,o=[],a=ZC(r,!1),i=a.label,l=a.value,u=a.options,s=a.groupLabel;function c(p,f){Array.isArray(p)&&p.forEach(function(h){if(f||!(u in h)){var v=h[l];o.push({key:l0(h,o.length),groupOption:f,data:h,label:h[i],value:v})}else{var g=h[s];g===void 0&&n&&(g=h.label),o.push({key:l0(h,o.length),group:!0,data:h,label:g}),c(h[u],!0)}})}return c(e,!1),o}function Pf(e){var t=K({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return ur(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var EN=function(e,t,r){if(!t||!t.length)return null;var n=!1,o=function i(l,u){var s=M1(u),c=s[0],p=s.slice(1);if(!c)return[l];var f=l.split(c);return n=n||f.length>1,f.reduce(function(h,v){return[].concat(Ie(h),Ie(i(v,p)))},[]).filter(Boolean)},a=o(e,t);return n?typeof r<"u"?a.slice(0,r):a:null},rm=d.createContext(null);function kN(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(it(a))?a:i}).join(", ")),r.length>n?", ...":null)}var DN=["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"],SN=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Nf=function(e){return e==="tags"||e==="multiple"},$N=d.forwardRef(function(e,t){var r,n=e.id,o=e.prefixCls,a=e.className,i=e.showSearch,l=e.tagRender,u=e.direction,s=e.omitDomProps,c=e.displayValues,p=e.onDisplayValuesChange,f=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,w=e.getRawInputElement,E=e.open,D=e.defaultOpen,k=e.onDropdownVisibleChange,x=e.activeValue,O=e.onActiveValueChange,j=e.activeDescendantId,B=e.searchValue,N=e.autoClearSearchValue,A=e.onSearch,S=e.onSearchSplit,$=e.tokenSeparators,P=e.allowClear,F=e.prefix,I=e.suffixIcon,T=e.clearIcon,q=e.OptionList,L=e.animation,_=e.transitionName,V=e.dropdownStyle,Z=e.dropdownClassName,J=e.dropdownMatchSelectWidth,z=e.dropdownRender,Y=e.dropdownAlign,G=e.placement,X=e.builtinPlacements,W=e.getPopupContainer,H=e.showAction,ne=H===void 0?[]:H,U=e.onFocus,ae=e.onBlur,re=e.onKeyUp,de=e.onKeyDown,ge=e.onMouseDown,ye=bt(e,DN),Ne=Nf(m),xe=(i!==void 0?i:Ne)||m==="combobox",be=K({},ye);SN.forEach(function(Ge){delete be[Ge]}),s==null||s.forEach(function(Ge){delete be[Ge]});var Ae=d.useState(!1),me=he(Ae,2),Ee=me[0],je=me[1];d.useEffect(function(){je(HC())},[]);var Be=d.useRef(null),Ye=d.useRef(null),Re=d.useRef(null),Te=d.useRef(null),ue=d.useRef(null),ke=d.useRef(!1),Ke=PP(),Ze=he(Ke,3),We=Ze[0],_e=Ze[1],nt=Ze[2];d.useImperativeHandle(t,function(){var Ge,vt;return{focus:(Ge=Te.current)===null||Ge===void 0?void 0:Ge.focus,blur:(vt=Te.current)===null||vt===void 0?void 0:vt.blur,scrollTo:function(Ht){var zt;return(zt=ue.current)===null||zt===void 0?void 0:zt.scrollTo(Ht)},nativeElement:Be.current||Ye.current}});var Ue=d.useMemo(function(){var Ge;if(m!=="combobox")return B;var vt=(Ge=c[0])===null||Ge===void 0?void 0:Ge.value;return typeof vt=="string"||typeof vt=="number"?String(vt):""},[B,m,c]),et=m==="combobox"&&typeof C=="function"&&C()||null,yt=typeof w=="function"&&w(),kt=sa(Ye,yt==null||(r=yt.props)===null||r===void 0?void 0:r.ref),dt=d.useState(!1),ht=he(dt,2),Mt=ht[0],Pt=ht[1];Kt(function(){Pt(!0)},[]);var ft=Vr(!1,{defaultValue:D,value:E}),ut=he(ft,2),pe=ut[0],Oe=ut[1],Se=Mt?pe:!1,Ce=!v&&f;(b||Ce&&Se&&m==="combobox")&&(Se=!1);var we=Ce?!1:Se,fe=d.useCallback(function(Ge){var vt=Ge!==void 0?Ge:!Se;b||(Oe(vt),Se!==vt&&(k==null||k(vt)))},[b,Se,Oe,k]),le=d.useMemo(function(){return($||[]).some(function(Ge){return[`
299
+ `,`\r
300
+ `].includes(Ge)})},[$]),ee=d.useContext(rm)||{},te=ee.maxCount,se=ee.rawValues,Pe=function(Ge,vt,Ht){if(!(Ne&&Ff(te)&&(se==null?void 0:se.size)>=te)){var zt=!0,rr=Ge;O==null||O(null);var Or=EN(Ge,$,Ff(te)?te-se.size:void 0),br=Ht?null:Or;return m!=="combobox"&&br&&(rr="",S==null||S(br),fe(!1),zt=!1),A&&Ue!==rr&&A(rr,{source:vt?"typing":"effect"}),zt}},ot=function(Ge){!Ge||!Ge.trim()||A(Ge,{source:"submit"})};d.useEffect(function(){!Se&&!Ne&&m!=="combobox"&&Pe("",!1,!1)},[Se]),d.useEffect(function(){pe&&b&&Oe(!1),b&&!ke.current&&_e(!1)},[b]);var He=KC(),$e=he(He,2),Xe=$e[0],wt=$e[1],St=d.useRef(!1),Nt=function(Ge){var vt=Xe(),Ht=Ge.key,zt=Ht==="Enter";if(zt&&(m!=="combobox"&&Ge.preventDefault(),Se||fe(!0)),wt(!!Ue),Ht==="Backspace"&&!vt&&Ne&&!Ue&&c.length){for(var rr=Ie(c),Or=null,br=rr.length-1;br>=0;br-=1){var Ar=rr[br];if(!Ar.disabled){rr.splice(br,1),Or=Ar;break}}Or&&p(rr,{type:"remove",values:[Or]})}for(var Er=arguments.length,kr=new Array(Er>1?Er-1:0),mn=1;mn<Er;mn++)kr[mn-1]=arguments[mn];if(Se&&(!zt||!St.current)){var Hn;zt&&(St.current=!0),(Hn=ue.current)===null||Hn===void 0||Hn.onKeyDown.apply(Hn,[Ge].concat(kr))}de==null||de.apply(void 0,[Ge].concat(kr))},Ot=function(Ge){for(var vt=arguments.length,Ht=new Array(vt>1?vt-1:0),zt=1;zt<vt;zt++)Ht[zt-1]=arguments[zt];if(Se){var rr;(rr=ue.current)===null||rr===void 0||rr.onKeyUp.apply(rr,[Ge].concat(Ht))}Ge.key==="Enter"&&(St.current=!1),re==null||re.apply(void 0,[Ge].concat(Ht))},jt=function(Ge){var vt=c.filter(function(Ht){return Ht!==Ge});p(vt,{type:"remove",values:[Ge]})},ar=function(){St.current=!1},Le=d.useRef(!1),Je=function(){_e(!0),b||(U&&!Le.current&&U.apply(void 0,arguments),ne.includes("focus")&&fe(!0)),Le.current=!0},gt=function(){ke.current=!0,_e(!1,function(){Le.current=!1,ke.current=!1,fe(!1)}),!b&&(Ue&&(m==="tags"?A(Ue,{source:"submit"}):m==="multiple"&&A("",{source:"blur"})),ae&&ae.apply(void 0,arguments))},pt=[];d.useEffect(function(){return function(){pt.forEach(function(Ge){return clearTimeout(Ge)}),pt.splice(0,pt.length)}},[]);var At=function(Ge){var vt,Ht=Ge.target,zt=(vt=Re.current)===null||vt===void 0?void 0:vt.getPopupElement();if(zt&&zt.contains(Ht)){var rr=setTimeout(function(){var Er=pt.indexOf(rr);if(Er!==-1&&pt.splice(Er,1),nt(),!Ee&&!zt.contains(document.activeElement)){var kr;(kr=Te.current)===null||kr===void 0||kr.focus()}});pt.push(rr)}for(var Or=arguments.length,br=new Array(Or>1?Or-1:0),Ar=1;Ar<Or;Ar++)br[Ar-1]=arguments[Ar];ge==null||ge.apply(void 0,[Ge].concat(br))},mr=d.useState({}),wr=he(mr,2),lt=wr[1];function $t(){lt({})}var Ft;yt&&(Ft=function(Ge){fe(Ge)}),NP(function(){var Ge;return[Be.current,(Ge=Re.current)===null||Ge===void 0?void 0:Ge.getPopupElement()]},we,fe,!!yt);var qt=d.useMemo(function(){return K(K({},e),{},{notFoundContent:v,open:Se,triggerOpen:we,id:n,showSearch:xe,multiple:Ne,toggleOpen:fe})},[e,v,we,Se,n,xe,Ne,fe]),Br=!!I||y,on;Br&&(on=d.createElement(Iu,{className:ve("".concat(o,"-arrow"),M({},"".concat(o,"-arrow-loading"),y)),customizeIcon:I,customizeIconProps:{loading:y,searchValue:Ue,open:Se,focused:We,showSearch:xe}}));var wn=function(){var Ge;g==null||g(),(Ge=Te.current)===null||Ge===void 0||Ge.focus(),p([],{type:"clear",values:c}),Pe("",!1,!1)},Zr=AP(o,wn,c,P,T,b,Ue,m),Mr=Zr.allowClear,an=Zr.clearIcon,ln=d.createElement(q,{ref:ue}),Jr=ve(o,a,M(M(M(M(M(M(M(M(M(M({},"".concat(o,"-focused"),We),"".concat(o,"-multiple"),Ne),"".concat(o,"-single"),!Ne),"".concat(o,"-allow-clear"),P),"".concat(o,"-show-arrow"),Br),"".concat(o,"-disabled"),b),"".concat(o,"-loading"),y),"".concat(o,"-open"),Se),"".concat(o,"-customize-input"),et),"".concat(o,"-show-search"),xe)),Hr=d.createElement(xN,{ref:Re,disabled:b,prefixCls:o,visible:we,popupElement:ln,animation:L,transitionName:_,dropdownStyle:V,dropdownClassName:Z,direction:u,dropdownMatchSelectWidth:J,dropdownRender:z,dropdownAlign:Y,placement:G,builtinPlacements:X,getPopupContainer:W,empty:f,getTriggerDOMNode:function(Ge){return Ye.current||Ge},onPopupVisibleChange:Ft,onPopupMouseEnter:$t},yt?d.cloneElement(yt,{ref:kt}):d.createElement(oN,ze({},e,{domRef:Ye,prefixCls:o,inputElement:et,ref:Te,id:n,prefix:F,showSearch:xe,autoClearSearchValue:N,mode:m,activeDescendantId:j,tagRender:l,values:c,open:Se,onToggleOpen:fe,activeValue:x,searchValue:Ue,onSearch:Pe,onSearchSubmit:ot,onRemove:jt,tokenWithEnter:le,onInputBlur:ar}))),Et;return yt?Et=Hr:Et=d.createElement("div",ze({className:Jr},be,{ref:Be,onMouseDown:At,onKeyDown:Nt,onKeyUp:Ot,onFocus:Je,onBlur:gt}),d.createElement(kN,{visible:We&&!Se,values:c}),Hr,on,Mr&&an),d.createElement(WC.Provider,{value:qt},Et)}),nm=function(){return null};nm.isSelectOptGroup=!0;var om=function(){return null};om.isSelectOption=!0;var JC=d.forwardRef(function(e,t){var r=e.height,n=e.offsetY,o=e.offsetX,a=e.children,i=e.prefixCls,l=e.onInnerResize,u=e.innerProps,s=e.rtl,c=e.extra,p={},f={display:"flex",flexDirection:"column"};return n!==void 0&&(p={height:r,position:"relative",overflow:"hidden"},f=K(K({},f),{},M(M(M(M(M({transform:"translateY(".concat(n,"px)")},s?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),d.createElement("div",{style:p},d.createElement(oo,{onResize:function(h){var v=h.offsetHeight;v&&l&&l()}},d.createElement("div",ze({style:f,className:ve(M({},"".concat(i,"-holder-inner"),i)),ref:t},u),a,c)))});JC.displayName="Filler";function BN(e){var t=e.children,r=e.setRef,n=d.useCallback(function(o){r(o)},[]);return d.cloneElement(t,{ref:n})}function ON(e,t,r,n,o,a,i,l){var u=l.getKey;return e.slice(t,r+1).map(function(s,c){var p=t+c,f=i(s,p,{style:{width:n},offsetX:o}),h=u(s);return d.createElement(BN,{key:h,setRef:function(v){return a(s,v)}},f)})}function AN(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 u(v){return v!==void 0?r(v):l}for(var s=null,c=Math.abs(n-o)!==1,p=0;p<i.length;p+=1){var f=u(a[p]),h=u(i[p]);if(f!==h){s=p,c=c||f!==u(i[p+1]);break}}return s===null?null:{index:s,multiple:c}}function FN(e,t,r){var n=d.useState(e),o=he(n,2),a=o[0],i=o[1],l=d.useState(null),u=he(l,2),s=u[0],c=u[1];return d.useEffect(function(){var p=AN(a||[],e||[],t);(p==null?void 0:p.index)!==void 0&&c(e[p.index]),i(e)},[e]),[s]}var s0=(typeof navigator>"u"?"undefined":it(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const QC=(function(e,t,r,n){var o=qe(!1),a=qe(null);function i(){clearTimeout(a.current),o.current=!0,a.current=setTimeout(function(){o.current=!1},50)}var l=qe({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(u,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=u?s<0&&l.current.left||s>0&&l.current.right:s<0&&l.current.top||s>0&&l.current.bottom;return c&&p?(clearTimeout(a.current),o.current=!1):(!p||o.current)&&i(),!o.current&&p}});function PN(e,t,r,n,o,a,i){var l=qe(0),u=qe(null),s=qe(null),c=qe(!1),p=QC(t,r,n,o);function f(y,C){if(Xt.cancel(u.current),!p(!1,C)){var w=y;if(!w._virtualHandled)w._virtualHandled=!0;else return;l.current+=C,s.current=C,s0||w.preventDefault(),u.current=Xt(function(){var E=c.current?10:1;i(l.current*E,!1),l.current=0})}}function h(y,C){i(C,!0),s0||y.preventDefault()}var v=qe(null),g=qe(null);function m(y){if(e){Xt.cancel(g.current),g.current=Xt(function(){v.current=null},2);var C=y.deltaX,w=y.deltaY,E=y.shiftKey,D=C,k=w;(v.current==="sx"||!v.current&&E&&w&&!C)&&(D=w,k=0,v.current="sx");var x=Math.abs(D),O=Math.abs(k);v.current===null&&(v.current=a&&x>O?"x":"y"),v.current==="y"?f(y,k):h(y,D)}}function b(y){e&&(c.current=y.detail===s.current)}return[m,b]}function NN(e,t,r,n){var o=d.useMemo(function(){return[new Map,[]]},[e,r.id,n]),a=he(o,2),i=a[0],l=a[1],u=function(s){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,p=i.get(s),f=i.get(c);if(p===void 0||f===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===s&&(p=v),b===c&&(f=v),p!==void 0&&f!==void 0)break}return{top:l[p-1]||0,bottom:l[f]}};return u}var jN=(function(){function e(){gr(this,e),M(this,"maps",void 0),M(this,"id",0),M(this,"diffRecords",new Map),this.maps=Object.create(null)}return vr(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 u0(e){var t=parseFloat(e);return isNaN(t)?0:t}function IN(e,t,r){var n=d.useState(0),o=he(n,2),a=o[0],i=o[1],l=qe(new Map),u=qe(new jN),s=qe(0);function c(){s.current+=1}function p(){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,w=getComputedStyle(b),E=w.marginTop,D=w.marginBottom,k=u0(E),x=u0(D),O=C+k+x;u.current.get(y)!==O&&(u.current.set(y,O),m=!0)}}),m&&i(function(b){return b+1})};if(h)v();else{s.current+=1;var g=s.current;Promise.resolve().then(function(){g===s.current&&v()})}}function f(h,v){var g=e(h);l.current.get(g),v?(l.current.set(g,v),p()):l.current.delete(g)}return Bt(function(){return c},[]),[f,p,u.current,a]}var c0=14/15;function RN(e,t,r){var n=qe(!1),o=qe(0),a=qe(0),i=qe(null),l=qe(null),u,s=function(f){if(n.current){var h=Math.ceil(f.touches[0].pageX),v=Math.ceil(f.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,f);y&&f.preventDefault(),clearInterval(l.current),y&&(l.current=setInterval(function(){b?g*=c0:m*=c0;var C=Math.floor(b?g:m);(!r(b,C,!0)||Math.abs(C)<=.1)&&clearInterval(l.current)},16))}},c=function(){n.current=!1,u()},p=function(f){u(),f.touches.length===1&&!n.current&&(n.current=!0,o.current=Math.ceil(f.touches[0].pageX),a.current=Math.ceil(f.touches[0].pageY),i.current=f.target,i.current.addEventListener("touchmove",s,{passive:!1}),i.current.addEventListener("touchend",c,{passive:!0}))};u=function(){i.current&&(i.current.removeEventListener("touchmove",s),i.current.removeEventListener("touchend",c))},Kt(function(){return e&&t.current.addEventListener("touchstart",p,{passive:!0}),function(){var f;(f=t.current)===null||f===void 0||f.removeEventListener("touchstart",p),u(),clearInterval(l.current)}},[e])}function d0(e){return Math.floor(Math.pow(e,.5))}function jf(e,t){var r="touches"in e?e.touches[0]:e;return r[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function TN(e,t,r){d.useEffect(function(){var n=t.current;if(e&&n){var o=!1,a,i,l=function(){Xt.cancel(a)},u=function f(){l(),a=Xt(function(){r(i),f()})},s=function(){o=!1,l()},c=function(f){if(!(f.target.draggable||f.button!==0)){var h=f;h._virtualHandled||(h._virtualHandled=!0,o=!0)}},p=function(f){if(o){var h=jf(f,!1),v=n.getBoundingClientRect(),g=v.top,m=v.bottom;if(h<=g){var b=g-h;i=-d0(b),u()}else if(h>=m){var y=h-m;i=d0(y),u()}else l()}};return n.addEventListener("mousedown",c),n.ownerDocument.addEventListener("mouseup",s),n.ownerDocument.addEventListener("mousemove",p),n.ownerDocument.addEventListener("dragend",s),function(){n.removeEventListener("mousedown",c),n.ownerDocument.removeEventListener("mouseup",s),n.ownerDocument.removeEventListener("mousemove",p),n.ownerDocument.removeEventListener("dragend",s),l()}}},[e])}var MN=10;function zN(e,t,r,n,o,a,i,l){var u=d.useRef(),s=d.useState(null),c=he(s,2),p=c[0],f=c[1];return Kt(function(){if(p&&p.times<MN){if(!e.current){f(function(T){return K({},T)});return}a();var h=p.targetAlign,v=p.originAlign,g=p.index,m=p.offset,b=e.current.clientHeight,y=!1,C=h,w=null;if(b){for(var E=h||v,D=0,k=0,x=0,O=Math.min(t.length-1,g),j=0;j<=O;j+=1){var B=o(t[j]);k=D;var N=r.get(B);x=k+(N===void 0?n:N),D=x}for(var A=E==="top"?m:b-m,S=O;S>=0;S-=1){var $=o(t[S]),P=r.get($);if(P===void 0){y=!0;break}if(A-=P,A<=0)break}switch(E){case"top":w=k-m;break;case"bottom":w=x-b+m;break;default:{var F=e.current.scrollTop,I=F+b;k<F?C="top":x>I&&(C="bottom")}}w!==null&&i(w),w!==p.lastTop&&(y=!0)}y&&f(K(K({},p),{},{times:p.times+1,targetAlign:C,lastTop:w}))}},[p,e.current]),function(h){if(h==null){l();return}if(Xt.cancel(u.current),typeof h=="number")i(h);else if(h&&it(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;f({times:0,index:v,offset:b,originAlign:g})}}}var f0=d.forwardRef(function(e,t){var r=e.prefixCls,n=e.rtl,o=e.scrollOffset,a=e.scrollRange,i=e.onStartMove,l=e.onStopMove,u=e.onScroll,s=e.horizontal,c=e.spinSize,p=e.containerSize,f=e.style,h=e.thumbStyle,v=e.showScrollBar,g=d.useState(!1),m=he(g,2),b=m[0],y=m[1],C=d.useState(null),w=he(C,2),E=w[0],D=w[1],k=d.useState(null),x=he(k,2),O=x[0],j=x[1],B=!n,N=d.useRef(),A=d.useRef(),S=d.useState(v),$=he(S,2),P=$[0],F=$[1],I=d.useRef(),T=function(){v===!0||v===!1||(clearTimeout(I.current),F(!0),I.current=setTimeout(function(){F(!1)},3e3))},q=a-p||0,L=p-c||0,_=d.useMemo(function(){if(o===0||q===0)return 0;var H=o/q;return H*L},[o,q,L]),V=function(H){H.stopPropagation(),H.preventDefault()},Z=d.useRef({top:_,dragging:b,pageY:E,startTop:O});Z.current={top:_,dragging:b,pageY:E,startTop:O};var J=function(H){y(!0),D(jf(H,s)),j(Z.current.top),i(),H.stopPropagation(),H.preventDefault()};d.useEffect(function(){var H=function(ae){ae.preventDefault()},ne=N.current,U=A.current;return ne.addEventListener("touchstart",H,{passive:!1}),U.addEventListener("touchstart",J,{passive:!1}),function(){ne.removeEventListener("touchstart",H),U.removeEventListener("touchstart",J)}},[]);var z=d.useRef();z.current=q;var Y=d.useRef();Y.current=L,d.useEffect(function(){if(b){var H,ne=function(ae){var re=Z.current,de=re.dragging,ge=re.pageY,ye=re.startTop;Xt.cancel(H);var Ne=N.current.getBoundingClientRect(),xe=p/(s?Ne.width:Ne.height);if(de){var be=(jf(ae,s)-ge)*xe,Ae=ye;!B&&s?Ae-=be:Ae+=be;var me=z.current,Ee=Y.current,je=Ee?Ae/Ee:0,Be=Math.ceil(je*me);Be=Math.max(Be,0),Be=Math.min(Be,me),H=Xt(function(){u(Be,s)})}},U=function(){y(!1),l()};return window.addEventListener("mousemove",ne,{passive:!0}),window.addEventListener("touchmove",ne,{passive:!0}),window.addEventListener("mouseup",U,{passive:!0}),window.addEventListener("touchend",U,{passive:!0}),function(){window.removeEventListener("mousemove",ne),window.removeEventListener("touchmove",ne),window.removeEventListener("mouseup",U),window.removeEventListener("touchend",U),Xt.cancel(H)}}},[b]),d.useEffect(function(){return T(),function(){clearTimeout(I.current)}},[o]),d.useImperativeHandle(t,function(){return{delayHidden:T}});var G="".concat(r,"-scrollbar"),X={position:"absolute",visibility:P?null:"hidden"},W={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return s?(Object.assign(X,{height:8,left:0,right:0,bottom:0}),Object.assign(W,M({height:"100%",width:c},B?"left":"right",_))):(Object.assign(X,M({width:8,top:0,bottom:0},B?"right":"left",0)),Object.assign(W,{width:"100%",height:c,top:_})),d.createElement("div",{ref:N,className:ve(G,M(M(M({},"".concat(G,"-horizontal"),s),"".concat(G,"-vertical"),!s),"".concat(G,"-visible"),P)),style:K(K({},X),f),onMouseDown:V,onMouseMove:T},d.createElement("div",{ref:A,className:ve("".concat(G,"-thumb"),M({},"".concat(G,"-thumb-moving"),b)),style:K(K({},W),h),onMouseDown:J}))}),_N=20;function p0(){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,_N),Math.floor(r)}var LN=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],HN=[],WN={overflowY:"auto",overflowAnchor:"none"};function KN(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,u=l===void 0?!0:l,s=e.style,c=e.data,p=e.children,f=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,w=e.onVisibleChange,E=e.innerProps,D=e.extraRender,k=e.styles,x=e.showScrollBar,O=x===void 0?"optional":x,j=bt(e,LN),B=d.useCallback(function(Le){return typeof f=="function"?f(Le):Le==null?void 0:Le[f]},[f]),N=IN(B),A=he(N,4),S=A[0],$=A[1],P=A[2],F=A[3],I=!!(h!==!1&&a&&i),T=d.useMemo(function(){return Object.values(P.maps).reduce(function(Le,Je){return Le+Je},0)},[P.id,P.maps]),q=I&&c&&(Math.max(i*c.length,T)>a||!!g),L=v==="rtl",_=ve(n,M({},"".concat(n,"-rtl"),L),o),V=c||HN,Z=qe(),J=qe(),z=qe(),Y=xt(0),G=he(Y,2),X=G[0],W=G[1],H=xt(0),ne=he(H,2),U=ne[0],ae=ne[1],re=xt(!1),de=he(re,2),ge=de[0],ye=de[1],Ne=function(){ye(!0)},xe=function(){ye(!1)},be={getKey:B};function Ae(Le){W(function(Je){var gt;typeof Le=="function"?gt=Le(Je):gt=Le;var pt=Pt(gt);return Z.current.scrollTop=pt,pt})}var me=qe({start:0,end:V.length}),Ee=qe(),je=FN(V,B),Be=he(je,1),Ye=Be[0];Ee.current=Ye;var Re=d.useMemo(function(){if(!I)return{scrollHeight:void 0,start:0,end:V.length-1,offset:void 0};if(!q){var Le;return{scrollHeight:((Le=J.current)===null||Le===void 0?void 0:Le.offsetHeight)||0,start:0,end:V.length-1,offset:void 0}}for(var Je=0,gt,pt,At,mr=V.length,wr=0;wr<mr;wr+=1){var lt=V[wr],$t=B(lt),Ft=P.get($t),qt=Je+(Ft===void 0?i:Ft);qt>=X&&gt===void 0&&(gt=wr,pt=Je),qt>X+a&&At===void 0&&(At=wr),Je=qt}return gt===void 0&&(gt=0,pt=0,At=Math.ceil(a/i)),At===void 0&&(At=V.length-1),At=Math.min(At+1,V.length-1),{scrollHeight:Je,start:gt,end:At,offset:pt}},[q,I,X,V,F,a]),Te=Re.scrollHeight,ue=Re.start,ke=Re.end,Ke=Re.offset;me.current.start=ue,me.current.end=ke,d.useLayoutEffect(function(){var Le=P.getRecord();if(Le.size===1){var Je=Array.from(Le.keys())[0],gt=Le.get(Je),pt=V[ue];if(pt&&gt===void 0){var At=B(pt);if(At===Je){var mr=P.get(Je),wr=mr-i;Ae(function(lt){return lt+wr})}}}P.resetRecord()},[Te]);var Ze=d.useState({width:0,height:a}),We=he(Ze,2),_e=We[0],nt=We[1],Ue=function(Le){nt({width:Le.offsetWidth,height:Le.offsetHeight})},et=qe(),yt=qe(),kt=d.useMemo(function(){return p0(_e.width,g)},[_e.width,g]),dt=d.useMemo(function(){return p0(_e.height,Te)},[_e.height,Te]),ht=Te-a,Mt=qe(ht);Mt.current=ht;function Pt(Le){var Je=Le;return Number.isNaN(Mt.current)||(Je=Math.min(Je,Mt.current)),Je=Math.max(Je,0),Je}var ft=X<=0,ut=X>=ht,pe=U<=0,Oe=U>=g,Se=QC(ft,ut,pe,Oe),Ce=function(){return{x:L?-U:U,y:X}},we=qe(Ce()),fe=nr(function(Le){if(C){var Je=K(K({},Ce()),Le);(we.current.x!==Je.x||we.current.y!==Je.y)&&(C(Je),we.current=Je)}});function le(Le,Je){var gt=Le;Je?(cd(function(){ae(gt)}),fe()):Ae(gt)}function ee(Le){var Je=Le.currentTarget.scrollTop;Je!==X&&Ae(Je),y==null||y(Le),fe()}var te=function(Le){var Je=Le,gt=g?g-_e.width:0;return Je=Math.max(Je,0),Je=Math.min(Je,gt),Je},se=nr(function(Le,Je){Je?(cd(function(){ae(function(gt){var pt=gt+(L?-Le:Le);return te(pt)})}),fe()):Ae(function(gt){var pt=gt+Le;return pt})}),Pe=PN(I,ft,ut,pe,Oe,!!g,se),ot=he(Pe,2),He=ot[0],$e=ot[1];RN(I,Z,function(Le,Je,gt,pt){var At=pt;return Se(Le,Je,gt)?!1:!At||!At._virtualHandled?(At&&(At._virtualHandled=!0),He({preventDefault:function(){},deltaX:Le?Je:0,deltaY:Le?0:Je}),!0):!1}),TN(q,Z,function(Le){Ae(function(Je){return Je+Le})}),Kt(function(){function Le(gt){var pt=ft&&gt.detail<0,At=ut&&gt.detail>0;I&&!pt&&!At&&gt.preventDefault()}var Je=Z.current;return Je.addEventListener("wheel",He,{passive:!1}),Je.addEventListener("DOMMouseScroll",$e,{passive:!0}),Je.addEventListener("MozMousePixelScroll",Le,{passive:!1}),function(){Je.removeEventListener("wheel",He),Je.removeEventListener("DOMMouseScroll",$e),Je.removeEventListener("MozMousePixelScroll",Le)}},[I,ft,ut]),Kt(function(){if(g){var Le=te(U);ae(Le),fe({x:Le})}},[_e.width,g]);var Xe=function(){var Le,Je;(Le=et.current)===null||Le===void 0||Le.delayHidden(),(Je=yt.current)===null||Je===void 0||Je.delayHidden()},wt=zN(Z,V,P,i,B,function(){return $(!0)},Ae,Xe);d.useImperativeHandle(t,function(){return{nativeElement:z.current,getScrollInfo:Ce,scrollTo:function(Le){function Je(gt){return gt&&it(gt)==="object"&&("left"in gt||"top"in gt)}Je(Le)?(Le.left!==void 0&&ae(te(Le.left)),wt(Le.top)):wt(Le)}}}),Kt(function(){if(w){var Le=V.slice(ue,ke+1);w(Le,V)}},[ue,ke,V]);var St=NN(V,B,P,i),Nt=D==null?void 0:D({start:ue,end:ke,virtual:q,offsetX:U,offsetY:Ke,rtl:L,getSize:St}),Ot=ON(V,ue,ke,g,U,S,p,be),jt=null;a&&(jt=K(M({},u?"height":"maxHeight",a),WN),I&&(jt.overflowY="hidden",g&&(jt.overflowX="hidden"),ge&&(jt.pointerEvents="none")));var ar={};return L&&(ar.dir="rtl"),d.createElement("div",ze({ref:z,style:K(K({},s),{},{position:"relative"}),className:_},ar,j),d.createElement(oo,{onResize:Ue},d.createElement(b,{className:"".concat(n,"-holder"),style:jt,ref:Z,onScroll:ee,onMouseEnter:Xe},d.createElement(JC,{prefixCls:n,height:Te,offsetX:U,offsetY:Ke,scrollWidth:g,onInnerResize:$,ref:J,innerProps:E,rtl:L,extra:Nt},Ot))),q&&Te>a&&d.createElement(f0,{ref:et,prefixCls:n,scrollOffset:X,scrollRange:Te,rtl:L,onScroll:le,onStartMove:Ne,onStopMove:xe,spinSize:dt,containerSize:_e.height,style:k==null?void 0:k.verticalScrollBar,thumbStyle:k==null?void 0:k.verticalScrollBarThumb,showScrollBar:O}),q&&g>_e.width&&d.createElement(f0,{ref:yt,prefixCls:n,scrollOffset:U,scrollRange:g,rtl:L,onScroll:le,onStartMove:Ne,onStopMove:xe,spinSize:kt,containerSize:_e.width,horizontal:!0,style:k==null?void 0:k.horizontalScrollBar,thumbStyle:k==null?void 0:k.horizontalScrollBarThumb,showScrollBar:O}))}var Tu=d.forwardRef(KN);Tu.displayName="List";function qN(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var VN=["disabled","title","children","style","className"];function m0(e){return typeof e=="string"||typeof e=="number"}var XN=function(e,t){var r=FP(),n=r.prefixCls,o=r.id,a=r.open,i=r.multiple,l=r.mode,u=r.searchValue,s=r.toggleOpen,c=r.notFoundContent,p=r.onPopupScroll,f=d.useContext(rm),h=f.maxCount,v=f.flattenOptions,g=f.onActiveValue,m=f.defaultActiveFirstOption,b=f.onSelect,y=f.menuItemSelectedIcon,C=f.rawValues,w=f.fieldNames,E=f.virtual,D=f.direction,k=f.listHeight,x=f.listItemHeight,O=f.optionRender,j="".concat(n,"-item"),B=la(function(){return v},[a,v],function(W,H){return H[0]&&W[1]!==H[1]}),N=d.useRef(null),A=d.useMemo(function(){return i&&Ff(h)&&(C==null?void 0:C.size)>=h},[i,h,C==null?void 0:C.size]),S=function(W){W.preventDefault()},$=function(W){var H;(H=N.current)===null||H===void 0||H.scrollTo(typeof W=="number"?{index:W}:W)},P=d.useCallback(function(W){return l==="combobox"?!1:C.has(W)},[l,Ie(C).toString(),C.size]),F=function(W){for(var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ne=B.length,U=0;U<ne;U+=1){var ae=(W+U*H+ne)%ne,re=B[ae]||{},de=re.group,ge=re.data;if(!de&&!(ge!=null&&ge.disabled)&&(P(ge.value)||!A))return ae}return-1},I=d.useState(function(){return F(0)}),T=he(I,2),q=T[0],L=T[1],_=function(W){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;L(W);var ne={source:H?"keyboard":"mouse"},U=B[W];if(!U){g(null,-1,ne);return}g(U.value,W,ne)};Bt(function(){_(m!==!1?F(0):-1)},[B.length,u]);var V=d.useCallback(function(W){return l==="combobox"?String(W).toLowerCase()===u.toLowerCase():C.has(W)},[l,u,Ie(C).toString(),C.size]);Bt(function(){var W=setTimeout(function(){if(!i&&a&&C.size===1){var ne=Array.from(C)[0],U=B.findIndex(function(ae){var re=ae.data;return u?String(re.value).startsWith(u):re.value===ne});U!==-1&&(_(U),$(U))}});if(a){var H;(H=N.current)===null||H===void 0||H.scrollTo(void 0)}return function(){return clearTimeout(W)}},[a,u]);var Z=function(W){W!==void 0&&b(W,{selected:!C.has(W)}),i||s(!1)};if(d.useImperativeHandle(t,function(){return{onKeyDown:function(W){var H=W.which,ne=W.ctrlKey;switch(H){case rt.N:case rt.P:case rt.UP:case rt.DOWN:{var U=0;if(H===rt.UP?U=-1:H===rt.DOWN?U=1:qN()&&ne&&(H===rt.N?U=1:H===rt.P&&(U=-1)),U!==0){var ae=F(q+U,U);$(ae),_(ae,!0)}break}case rt.TAB:case rt.ENTER:{var re,de=B[q];de&&!(de!=null&&(re=de.data)!==null&&re!==void 0&&re.disabled)&&!A?Z(de.value):Z(void 0),a&&W.preventDefault();break}case rt.ESC:s(!1),a&&W.stopPropagation()}},onKeyUp:function(){},scrollTo:function(W){$(W)}}}),B.length===0)return d.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(j,"-empty"),onMouseDown:S},c);var J=Object.keys(w).map(function(W){return w[W]}),z=function(W){return W.label};function Y(W,H){var ne=W.group;return{role:ne?"presentation":"option",id:"".concat(o,"_list_").concat(H)}}var G=function(W){var H=B[W];if(!H)return null;var ne=H.data||{},U=ne.value,ae=H.group,re=Jn(ne,!0),de=z(H);return H?d.createElement("div",ze({"aria-label":typeof de=="string"&&!ae?de:null},re,{key:W},Y(H,W),{"aria-selected":V(U)}),U):null},X={role:"listbox",id:"".concat(o,"_list")};return d.createElement(d.Fragment,null,E&&d.createElement("div",ze({},X,{style:{height:0,width:0,overflow:"hidden"}}),G(q-1),G(q),G(q+1)),d.createElement(Tu,{itemKey:"key",ref:N,data:B,height:k,itemHeight:x,fullHeight:!1,onMouseDown:S,onScroll:p,virtual:E,direction:D,innerProps:E?null:X},function(W,H){var ne=W.group,U=W.groupOption,ae=W.data,re=W.label,de=W.value,ge=ae.key;if(ne){var ye,Ne=(ye=ae.title)!==null&&ye!==void 0?ye:m0(re)?re.toString():void 0;return d.createElement("div",{className:ve(j,"".concat(j,"-group"),ae.className),title:Ne},re!==void 0?re:ge)}var xe=ae.disabled,be=ae.title;ae.children;var Ae=ae.style,me=ae.className,Ee=bt(ae,VN),je=pn(Ee,J),Be=P(de),Ye=xe||!Be&&A,Re="".concat(j,"-option"),Te=ve(j,Re,me,M(M(M(M({},"".concat(Re,"-grouped"),U),"".concat(Re,"-active"),q===H&&!Ye),"".concat(Re,"-disabled"),Ye),"".concat(Re,"-selected"),Be)),ue=z(W),ke=!y||typeof y=="function"||Be,Ke=typeof ue=="number"?ue:ue||de,Ze=m0(Ke)?Ke.toString():void 0;return be!==void 0&&(Ze=be),d.createElement("div",ze({},Jn(je),E?{}:Y(W,H),{"aria-selected":V(de),className:Te,title:Ze,onMouseMove:function(){q===H||Ye||_(H)},onClick:function(){Ye||Z(de)},style:Ae}),d.createElement("div",{className:"".concat(Re,"-content")},typeof O=="function"?O(W,{index:H}):Ke),d.isValidElement(y)||Be,ke&&d.createElement(Iu,{className:"".concat(j,"-option-state"),customizeIcon:y,customizeIconProps:{value:de,disabled:Ye,isSelected:Be}},Be?"\u2713":null))}))},UN=d.forwardRef(XN);const GN=(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,u=e.map(function(p){if(p.label===void 0){var f;return K(K({},p),{},{label:(f=i.get(p.value))===null||f===void 0?void 0:f.label})}return p}),s=new Map,c=new Map;return u.forEach(function(p){s.set(p.value,p),c.set(p.value,t.get(p.value)||l.get(p.value))}),r.current.values=s,r.current.options=c,u},[e,t]),o=d.useCallback(function(a){return t.get(a)||r.current.options.get(a)},[t]);return[n,o]});function Yc(e,t){return GC(e).join("").toUpperCase().includes(t)}const YN=(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,u=[],s=typeof n=="function",c=r.toUpperCase(),p=s?n:function(h,v){return o?Yc(v[o],c):v[a]?Yc(v[i!=="children"?i:"label"],c):Yc(v[l],c)},f=s?function(h){return Pf(h)}:function(h){return h};return e.forEach(function(h){if(h[a]){var v=p(r,f(h));if(v)u.push(h);else{var g=h[a].filter(function(m){return p(r,f(m))});g.length&&u.push(K(K({},h),{},M({},a,g)))}return}p(r,f(h))&&u.push(h)}),u},[e,n,o,r,t])});var h0=0,ZN=Xr();function JN(){var e;return ZN?(e=h0,h0+=1):e="TEST_OR_SSR",e}function QN(e){var t=d.useState(),r=he(t,2),n=r[0],o=r[1];return d.useEffect(function(){o("rc_select_".concat(JN()))},[]),e||n}var e4=["children","value"],t4=["children"];function r4(e){var t=e,r=t.key,n=t.props,o=n.children,a=n.value,i=bt(n,e4);return K({key:r,value:a!==void 0?a:r,children:o},i)}function ex(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return _n(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,u=l.children,s=bt(l,t4);return t||!a?r4(r):K(K({key:"__RC_SELECT_GRP__".concat(i===null?n:i,"__"),label:i},s),{},{options:ex(u)})}).filter(function(r){return r})}var n4=function(e,t,r,n,o){return d.useMemo(function(){var a=e,i=!e;i&&(a=ex(t));var l=new Map,u=new Map,s=function(p,f,h){h&&typeof h=="string"&&p.set(f[h],f)},c=function p(f){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<f.length;v+=1){var g=f[v];!g[r.options]||h?(l.set(g[r.value],g),s(u,g,r.label),s(u,g,n),s(u,g,o)):p(g[r.options],!0)}};return c(a),{options:a,valueOptions:l,labelOptions:u}},[e,t,r,n,o])};function g0(e){var t=d.useRef();t.current=e;var r=d.useCallback(function(){return t.current.apply(t,arguments)},[]);return r}var o4=["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"],a4=["inputValue"];function i4(e){return!e||it(e)!=="object"}var l4=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,u=e.inputValue,s=e.searchValue,c=e.onSearch,p=e.autoClearSearchValue,f=p===void 0?!0:p,h=e.onSelect,v=e.onDeselect,g=e.dropdownMatchSelectWidth,m=g===void 0?!0:g,b=e.filterOption,y=e.filterSort,C=e.optionFilterProp,w=e.optionLabelProp,E=e.options,D=e.optionRender,k=e.children,x=e.defaultActiveFirstOption,O=e.menuItemSelectedIcon,j=e.virtual,B=e.direction,N=e.listHeight,A=N===void 0?200:N,S=e.listItemHeight,$=S===void 0?20:S,P=e.labelRender,F=e.value,I=e.defaultValue,T=e.labelInValue,q=e.onChange,L=e.maxCount,_=bt(e,o4),V=QN(r),Z=Nf(n),J=!!(!E&&k),z=d.useMemo(function(){return b===void 0&&n==="combobox"?!1:b},[b,n]),Y=d.useMemo(function(){return ZC(l,J)},[JSON.stringify(l),J]),G=Vr("",{value:s!==void 0?s:u,postState:function(fe){return fe||""}}),X=he(G,2),W=X[0],H=X[1],ne=n4(E,k,Y,C,w),U=ne.valueOptions,ae=ne.labelOptions,re=ne.options,de=d.useCallback(function(fe){var le=GC(fe);return le.map(function(ee){var te,se,Pe,ot,He;if(i4(ee))te=ee;else{var $e;Pe=ee.key,se=ee.label,te=($e=ee.value)!==null&&$e!==void 0?$e:Pe}var Xe=U.get(te);if(Xe){var wt;se===void 0&&(se=Xe==null?void 0:Xe[w||Y.label]),Pe===void 0&&(Pe=(wt=Xe==null?void 0:Xe.key)!==null&&wt!==void 0?wt:te),ot=Xe==null?void 0:Xe.disabled,He=Xe==null?void 0:Xe.title}return{label:se,value:te,key:Pe,disabled:ot,title:He}})},[Y,w,U]),ge=Vr(I,{value:F}),ye=he(ge,2),Ne=ye[0],xe=ye[1],be=d.useMemo(function(){var fe,le=Z&&Ne===null?[]:Ne,ee=de(le);return n==="combobox"&&JP((fe=ee[0])===null||fe===void 0?void 0:fe.value)?[]:ee},[Ne,de,n,Z]),Ae=GN(be,U),me=he(Ae,2),Ee=me[0],je=me[1],Be=d.useMemo(function(){if(!n&&Ee.length===1){var fe=Ee[0];if(fe.value===null&&(fe.label===null||fe.label===void 0))return[]}return Ee.map(function(le){var ee;return K(K({},le),{},{label:(ee=typeof P=="function"?P(le):le.label)!==null&&ee!==void 0?ee:le.value})})},[n,Ee,P]),Ye=d.useMemo(function(){return new Set(Ee.map(function(fe){return fe.value}))},[Ee]);d.useEffect(function(){if(n==="combobox"){var fe,le=(fe=Ee[0])===null||fe===void 0?void 0:fe.value;H(ZP(le)?String(le):"")}},[Ee]);var Re=g0(function(fe,le){var ee=le??fe;return M(M({},Y.value,fe),Y.label,ee)}),Te=d.useMemo(function(){if(n!=="tags")return re;var fe=Ie(re),le=function(ee){return U.has(ee)};return Ie(Ee).sort(function(ee,te){return ee.value<te.value?-1:1}).forEach(function(ee){var te=ee.value;le(te)||fe.push(Re(te,ee.label))}),fe},[Re,re,U,Ee,n]),ue=YN(Te,Y,W,z,C),ke=d.useMemo(function(){return n!=="tags"||!W||ue.some(function(fe){return fe[C||"value"]===W})||ue.some(function(fe){return fe[Y.value]===W})?ue:[Re(W)].concat(Ie(ue))},[Re,C,n,ue,W,Y]),Ke=function fe(le){var ee=Ie(le).sort(function(te,se){return y(te,se,{searchValue:W})});return ee.map(function(te){return Array.isArray(te.options)?K(K({},te),{},{options:te.options.length>0?fe(te.options):te.options}):te})},Ze=d.useMemo(function(){return y?Ke(ke):ke},[ke,y,W]),We=d.useMemo(function(){return wN(Ze,{fieldNames:Y,childrenAsData:J})},[Ze,Y,J]),_e=function(fe){var le=de(fe);if(xe(le),q&&(le.length!==Ee.length||le.some(function(se,Pe){var ot;return((ot=Ee[Pe])===null||ot===void 0?void 0:ot.value)!==(se==null?void 0:se.value)}))){var ee=T?le:le.map(function(se){return se.value}),te=le.map(function(se){return Pf(je(se.value))});q(Z?ee:ee[0],Z?te:te[0])}},nt=d.useState(null),Ue=he(nt,2),et=Ue[0],yt=Ue[1],kt=d.useState(0),dt=he(kt,2),ht=dt[0],Mt=dt[1],Pt=x!==void 0?x:n!=="combobox",ft=d.useCallback(function(fe,le){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},te=ee.source,se=te===void 0?"keyboard":te;Mt(le),i&&n==="combobox"&&fe!==null&&se==="keyboard"&&yt(String(fe))},[i,n]),ut=function(fe,le,ee){var te=function(){var Nt,Ot=je(fe);return[T?{label:Ot==null?void 0:Ot[Y.label],value:fe,key:(Nt=Ot==null?void 0:Ot.key)!==null&&Nt!==void 0?Nt:fe}:fe,Pf(Ot)]};if(le&&h){var se=te(),Pe=he(se,2),ot=Pe[0],He=Pe[1];h(ot,He)}else if(!le&&v&&ee!=="clear"){var $e=te(),Xe=he($e,2),wt=Xe[0],St=Xe[1];v(wt,St)}},pe=g0(function(fe,le){var ee,te=Z?le.selected:!0;te?ee=Z?[].concat(Ie(Ee),[fe]):[fe]:ee=Ee.filter(function(se){return se.value!==fe}),_e(ee),ut(fe,te),n==="combobox"?yt(""):(!Nf||f)&&(H(""),yt(""))}),Oe=function(fe,le){_e(fe);var ee=le.type,te=le.values;(ee==="remove"||ee==="clear")&&te.forEach(function(se){ut(se.value,!1,ee)})},Se=function(fe,le){if(H(fe),yt(null),le.source==="submit"){var ee=(fe||"").trim();if(ee){var te=Array.from(new Set([].concat(Ie(Ye),[ee])));_e(te),ut(ee,!0),H("")}return}le.source!=="blur"&&(n==="combobox"&&_e(fe),c==null||c(fe))},Ce=function(fe){var le=fe;n!=="tags"&&(le=fe.map(function(te){var se=ae.get(te);return se==null?void 0:se.value}).filter(function(te){return te!==void 0}));var ee=Array.from(new Set([].concat(Ie(Ye),Ie(le))));_e(ee),ee.forEach(function(te){ut(te,!0)})},we=d.useMemo(function(){var fe=j!==!1&&m!==!1;return K(K({},ne),{},{flattenOptions:We,onActiveValue:ft,defaultActiveFirstOption:Pt,onSelect:pe,menuItemSelectedIcon:O,rawValues:Ye,fieldNames:Y,virtual:fe,direction:B,listHeight:A,listItemHeight:$,childrenAsData:J,maxCount:L,optionRender:D})},[L,ne,We,ft,Pt,pe,O,Ye,Y,j,m,B,A,$,J,D]);return d.createElement(rm.Provider,{value:we},d.createElement($N,ze({},_,{id:V,prefixCls:a,ref:t,omitDomProps:a4,mode:n,displayValues:Be,onDisplayValuesChange:Oe,direction:B,searchValue:W,onSearch:Se,autoClearSearchValue:f,onSearchSplit:Ce,dropdownMatchSelectWidth:m,OptionList:UN,emptyOptions:!We.length,activeValue:et,activeDescendantId:"".concat(V,"_list_").concat(ht)})))}),am=l4;am.Option=om;am.OptGroup=nm;function If(e,t,r){return ve({[`${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 tx=(e,t)=>t||e,s4=()=>{const[,e]=Gr(),[t]=wu("Empty"),r=new Wt(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"}))))},u4=()=>{const[,e]=Gr(),[t]=wu("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:o,colorBgContainer:a}=e,{borderColor:i,shadowColor:l,contentColor:u}=Ct(()=>({borderColor:new Wt(r).onBackground(a).toHexString(),shadowColor:new Wt(n).onBackground(a).toHexString(),contentColor:new Wt(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:u}))))},c4=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}}}}},d4=Lr("Empty",e=>{const{componentCls:t,controlHeightLG:r,calc:n}=e,o=tr(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return c4(o)});var f4=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 rx=d.createElement(s4,null),nx=d.createElement(u4,null),uo=e=>{var t;const{className:r,rootClassName:n,prefixCls:o,image:a,description:i,children:l,imageStyle:u,style:s,classNames:c,styles:p}=e,f=f4(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"),w=h("empty",o),[E,D,k]=d4(w),[x]=wu("Empty"),O=typeof i<"u"?i:x==null?void 0:x.description,j=typeof O=="string"?O:"empty",B=(t=a??C)!==null&&t!==void 0?t:rx;let N=null;return typeof B=="string"?N=d.createElement("img",{draggable:!1,alt:j,src:B}):N=B,E(d.createElement("div",Object.assign({className:ve(D,k,w,g,{[`${w}-normal`]:B===nx,[`${w}-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),p==null?void 0:p.root),s)},f),d.createElement("div",{className:ve(`${w}-image`,b.image,c==null?void 0:c.image),style:Object.assign(Object.assign(Object.assign({},u),y.image),p==null?void 0:p.image)},N),O&&d.createElement("div",{className:ve(`${w}-description`,b.description,c==null?void 0:c.description),style:Object.assign(Object.assign({},y.description),p==null?void 0:p.description)},O),l&&d.createElement("div",{className:ve(`${w}-footer`,b.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},y.footer),p==null?void 0:p.footer)},l)))};uo.PRESENTED_IMAGE_DEFAULT=rx;uo.PRESENTED_IMAGE_SIMPLE=nx;const ox=e=>{const{componentName:t}=e,{getPrefixCls:r}=Rr(Qt),n=r("empty");switch(t){case"Table":case"List":return oe.createElement(uo,{image:uo.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return oe.createElement(uo,{image:uo.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return oe.createElement(uo,null)}},ax=(e,t,r=void 0)=>{var n,o;const{variant:a,[e]:i}=d.useContext(Qt),l=d.useContext(SP),u=i==null?void 0:i.variant;let s;typeof t<"u"?s=t:r===!1?s="borderless":s=(o=(n=l??u)!==null&&n!==void 0?n:a)!==null&&o!==void 0?o:"outlined";const c=YA.includes(s);return[s,c]},p4=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 m4(e,t){return e||p4(t)}const v0=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"}},h4=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-`,u=`${n}-option-selected`;return[{[`${r}-dropdown`]:Object.assign(Object.assign({},Sr(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:Xp},[`
304
+ ${o}${l}topLeft,
305
+ ${a}${l}topLeft,
306
+ ${o}${l}topRight,
307
+ ${a}${l}topRight
308
+ `]:{animationName:Gp},[`${i}${l}bottomLeft`]:{animationName:Up},[`
309
+ ${i}${l}topLeft,
310
+ ${i}${l}topRight
311
+ `]:{animationName:Yp},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},v0(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"},cl),"&-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({},v0(e)),{color:e.colorTextDisabled})}),[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Ja(e,"slide-up"),Ja(e,"slide-down"),Us(e,"move-up"),Us(e,"move-down")]},g4=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:ce(t),itemLineHeight:ce(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},v4=e=>{const{multipleSelectItemHeight:t,selectHeight:r,lineWidth:n}=e;return e.calc(r).sub(t).div(2).sub(n).equal()},b4=e=>{const{componentCls:t,iconCls:r,borderRadiusSM:n,motionDurationSlow:o,paddingXS:a,multipleItemColorDisabled:i,multipleItemBorderColorDisabled:l,colorIcon:u,colorIconHover:s,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({},El()),{display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:s}})}}}},y4=(e,t)=>{const{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:n}=e,o=`${r}-selection-overflow`,a=e.multipleSelectItemHeight,i=v4(e),l=t?`${r}-${t}`:"",u=g4(e);return{[`${r}-multiple${l}`]:Object.assign(Object.assign({},b4(e)),{[`${r}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:u.basePadding,paddingBlock:u.containerPadding,borderRadius:e.borderRadius,[`${r}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ce(n)} 0`,lineHeight:ce(a),visibility:"hidden",content:'"\\a0"'}},[`${r}-selection-item`]:{height:u.itemHeight,lineHeight:ce(u.itemLineHeight)},[`${r}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:ce(a),marginBlock:n}},[`${r}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(u.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:u.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:ce(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(u.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function Zc(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[y4(e,t),o]}const C4=e=>{const{componentCls:t}=e,r=tr(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),n=tr(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Zc(e),Zc(r,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Zc(n,"lg")]};function Jc(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({},Sr(e,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${r}-selection-wrap:after`]:{lineHeight:ce(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:ce(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 ${ce(n)}`,[`${r}-selection-search-input`]:{height:a,fontSize:e.fontSize},"&:after":{lineHeight:ce(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 ${ce(n)}`,"&:after":{display:"none"}}}}}}}function x4(e){const{componentCls:t}=e,r=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Jc(e),Jc(tr(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${ce(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()}}}},Jc(tr(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const w4=e=>{const{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:a,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:u,zIndexPopupBase:s,colorText:c,fontWeightStrong:p,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:v,colorFillSecondary:g,colorBgContainerDisabled:m,colorTextDisabled:b,colorPrimaryHover:y,colorPrimary:C,controlOutline:w}=e,E=l*2,D=n*2,k=Math.min(o-E,o-D),x=Math.min(a-E,a-D),O=Math.min(i-E,i-D);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:s+50,optionSelectedColor:c,optionSelectedFontWeight:p,optionSelectedBg:f,optionActiveBg:h,optionPadding:`${(o-t*r)/2}px ${u}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:v,clearBg:v,singleItemHeightLG:i,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:k,multipleItemHeightSM:x,multipleItemHeightLG:O,multipleSelectorBgDisabled:m,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:y,activeBorderColor:C,activeOutlineColor:w,selectAffixPadding:l}},ix=(e,t)=>{const{componentCls:r,antCls:n,controlOutlineWidth:o}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{border:`${ce(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 ${ce(o)} ${t.activeOutlineColor}`,outline:0},[`${r}-prefix`]:{color:t.color}}}},b0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},ix(e,t))}),E4=e=>({"&-outlined":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})),b0(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),b0(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:`${ce(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),lx=(e,t)=>{const{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{background:t.bg,border:`${ce(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}}}},y0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},lx(e,t))}),k4=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},lx(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),y0(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),y0(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:`${ce(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),D4=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${ce(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:`${ce(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}}}}),sx=(e,t)=>{const{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{borderWidth:`0 0 ${ce(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}}}},C0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},sx(e,t))}),S4=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},sx(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),C0(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),C0(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:`${ce(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),$4=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},E4(e)),k4(e)),D4(e)),S4(e))}),B4=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"}}}},O4=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"}}}},A4=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({},Sr(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${r}-customize-input) ${r}-selector`]:Object.assign(Object.assign({},B4(e)),O4(e)),[`${r}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},cl),{[`> ${t}-typography`]:{display:"inline"}}),[`${r}-selection-placeholder`]:Object.assign(Object.assign({},cl),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${r}-arrow`]:Object.assign(Object.assign({},El()),{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()}}}}}},F4=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},A4(e),x4(e),C4(e),h4(e),{[`${t}-rtl`]:{direction:"rtl"}},Qp(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},P4=Lr("Select",(e,{rootPrefixCls:t})=>{const r=tr(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[F4(r),$4(r)]},w4,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var N4={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"},j4=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:N4}))},I4=d.forwardRef(j4),R4={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"},T4=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:R4}))},ux=d.forwardRef(T4),M4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},z4=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:M4}))},cx=d.forwardRef(z4);function _4({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:r,removeIcon:n,loading:o,multiple:a,hasFeedback:i,prefixCls:l,showSuffixIcon:u,feedbackIcon:s,showArrow:c,componentName:p}){const f=t??d.createElement(gC,null),h=b=>e===null&&!i&&!c?null:d.createElement(d.Fragment,null,u!==!1&&b,i&&s);let v=null;if(e!==void 0)v=h(e);else if(o)v=h(d.createElement(Hp,{spin:!0}));else{const b=`${l}-suffix`;v=({open:y,showSearch:C})=>h(y&&C?d.createElement(cx,{className:b}):d.createElement(ux,{className:b}))}let g=null;r!==void 0?g=r:a?g=d.createElement(I4,null):g=null;let m=null;return n!==void 0?m=n:m=d.createElement(yF,null),{clearIcon:f,suffixIcon:v,itemIcon:g,removeIcon:m}}function L4(e){return oe.useMemo(()=>{if(e)return(...t)=>oe.createElement(pl,{space:!0},e.apply(void 0,t))},[e])}function H4(e,t){return t!==void 0?t:e!==null}var W4=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 dx="SECRET_COMBOBOX_MODE_DO_NOT_USE",K4=(e,t)=>{var r,n,o,a,i;const{prefixCls:l,bordered:u,className:s,rootClassName:c,getPopupContainer:p,popupClassName:f,dropdownClassName:h,listHeight:v=256,placement:g,listItemHeight:m,size:b,disabled:y,notFoundContent:C,status:w,builtinPlacements:E,dropdownMatchSelectWidth:D,popupMatchSelectWidth:k,direction:x,style:O,allowClear:j,variant:B,dropdownStyle:N,transitionName:A,tagRender:S,maxCount:$,prefix:P,dropdownRender:F,popupRender:I,onDropdownVisibleChange:T,onOpenChange:q,styles:L,classNames:_}=e,V=W4(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:Z,getPrefixCls:J,renderEmpty:z,direction:Y,virtual:G,popupMatchSelectWidth:X,popupOverflow:W}=d.useContext(Qt),{showSearch:H,style:ne,styles:U,className:ae,classNames:re}=Ro("select"),[,de]=Gr(),ge=m??(de==null?void 0:de.controlHeight),ye=J("select",l),Ne=J(),xe=x??Y,{compactSize:be,compactItemClassnames:Ae}=Bu(ye,xe),[me,Ee]=ax("select",B,u),je=go(ye),[Be,Ye,Re]=P4(ye,je),Te=d.useMemo(()=>{const{mode:te}=e;if(te!=="combobox")return te===dx?"combobox":te},[e.mode]),ue=Te==="multiple"||Te==="tags",ke=H4(e.suffixIcon,e.showArrow),Ke=(r=k??D)!==null&&r!==void 0?r:X,Ze=((n=L==null?void 0:L.popup)===null||n===void 0?void 0:n.root)||((o=U.popup)===null||o===void 0?void 0:o.root)||N,We=L4(I||F),_e=q||T,{status:nt,hasFeedback:Ue,isFormItemInput:et,feedbackIcon:yt}=d.useContext(oa),kt=tx(nt,w);let dt;C!==void 0?dt=C:Te==="combobox"?dt=null:dt=(z==null?void 0:z("Select"))||d.createElement(ox,{componentName:"Select"});const{suffixIcon:ht,itemIcon:Mt,removeIcon:Pt,clearIcon:ft}=_4(Object.assign(Object.assign({},V),{multiple:ue,hasFeedback:Ue,feedbackIcon:yt,showSuffixIcon:ke,prefixCls:ye,componentName:"Select"})),ut=j===!0?{clearIcon:ft}:j,pe=pn(V,["suffixIcon","itemIcon"]),Oe=ve(((a=_==null?void 0:_.popup)===null||a===void 0?void 0:a.root)||((i=re==null?void 0:re.popup)===null||i===void 0?void 0:i.root)||f||h,{[`${ye}-dropdown-${xe}`]:xe==="rtl"},c,re.root,_==null?void 0:_.root,Re,je,Ye),Se=pa(te=>{var se;return(se=b??be)!==null&&se!==void 0?se:te}),Ce=d.useContext(Po),we=y??Ce,fe=ve({[`${ye}-lg`]:Se==="large",[`${ye}-sm`]:Se==="small",[`${ye}-rtl`]:xe==="rtl",[`${ye}-${me}`]:Ee,[`${ye}-in-form-item`]:et},If(ye,kt,Ue),Ae,ae,s,re.root,_==null?void 0:_.root,c,Re,je,Ye),le=d.useMemo(()=>g!==void 0?g:xe==="rtl"?"bottomRight":"bottomLeft",[g,xe]),[ee]=Eu("SelectLike",Ze==null?void 0:Ze.zIndex);return Be(d.createElement(am,Object.assign({ref:t,virtual:G,showSearch:H},pe,{style:Object.assign(Object.assign(Object.assign(Object.assign({},U.root),L==null?void 0:L.root),ne),O),dropdownMatchSelectWidth:Ke,transitionName:wC(Ne,"slide-up",A),builtinPlacements:m4(E,W),listHeight:v,listItemHeight:ge,mode:Te,prefixCls:ye,placement:le,direction:xe,prefix:P,suffixIcon:ht,menuItemSelectedIcon:Mt,removeIcon:Pt,allowClear:ut,notFoundContent:dt,className:fe,getPopupContainer:p||Z,dropdownClassName:Oe,disabled:we,dropdownStyle:Object.assign(Object.assign({},Ze),{zIndex:ee}),maxCount:ue?$:void 0,tagRender:ue?S:void 0,dropdownRender:We,onDropdownVisibleChange:_e})))},ui=d.forwardRef(K4),q4=LC(ui,"dropdownAlign");ui.SECRET_COMBOBOX_MODE_DO_NOT_USE=dx;ui.Option=om;ui.OptGroup=nm;ui._InternalPanelDoNotUseOrYouWillBeFired=q4;const V4=(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)},X4=(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)},U4=["xxl","xl","lg","md","sm","xs"],G4=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)`}),Y4=e=>{const t=e,r=[].concat(U4).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 u=`screen${a}Max`;if(!(t[l]<=t[u]))throw new Error(`${l}<=${u} fails : !(${t[l]}<=${t[u]})`);const s=`screen${r[o+1].toUpperCase()}Min`;if(!(t[u]<=t[s]))throw new Error(`${u}<=${s} fails : !(${t[u]}<=${t[s]})`)}}),e},Z4=()=>{const[,e]=Gr(),t=G4(Y4(e));return oe.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:s})=>{this.dispatch(Object.assign(Object.assign({},o),{[a]:s}))},u=window.matchMedia(i);V4(u,l),this.matchHandlers[i]={mql:u,listener:l},l(u)})},unregister(){Object.values(t).forEach(a=>{const i=this.matchHandlers[a];X4(i==null?void 0:i.mql,i==null?void 0:i.listener)}),r.clear()}}},[e])};function fx(){const[,e]=d.useReducer(t=>t+1,0);return e}function px(e=!0,t={}){const r=qe(t),n=fx(),o=Z4();return Kt(()=>{const a=o.subscribe(i=>{r.current=i,e&&n()});return()=>o.unsubscribe(a)},[]),r.current}function mx(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:ve("".concat(r,"-content"),i),style:l},d.createElement("div",{className:ve("".concat(r,"-inner"),a),id:n,role:"tooltip",style:o},typeof t=="function"?t():t))}var wa={shiftX:64,adjustY:1},Ea={adjustX:1,shiftY:!0},Dn=[0,0],J4={left:{points:["cr","cl"],overflow:Ea,offset:[-4,0],targetOffset:Dn},right:{points:["cl","cr"],overflow:Ea,offset:[4,0],targetOffset:Dn},top:{points:["bc","tc"],overflow:wa,offset:[0,-4],targetOffset:Dn},bottom:{points:["tc","bc"],overflow:wa,offset:[0,4],targetOffset:Dn},topLeft:{points:["bl","tl"],overflow:wa,offset:[0,-4],targetOffset:Dn},leftTop:{points:["tr","tl"],overflow:Ea,offset:[-4,0],targetOffset:Dn},topRight:{points:["br","tr"],overflow:wa,offset:[0,-4],targetOffset:Dn},rightTop:{points:["tl","tr"],overflow:Ea,offset:[4,0],targetOffset:Dn},bottomRight:{points:["tr","br"],overflow:wa,offset:[0,4],targetOffset:Dn},rightBottom:{points:["bl","br"],overflow:Ea,offset:[4,0],targetOffset:Dn},bottomLeft:{points:["tl","bl"],overflow:wa,offset:[0,4],targetOffset:Dn},leftBottom:{points:["br","bl"],overflow:Ea,offset:[-4,0],targetOffset:Dn}},Q4=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],ej=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,u=l===void 0?.1:l,s=e.overlayStyle,c=e.prefixCls,p=c===void 0?"rc-tooltip":c,f=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,w=e.align,E=w===void 0?{}:w,D=e.destroyTooltipOnHide,k=D===void 0?!1:D,x=e.defaultVisible,O=e.getTooltipContainer,j=e.overlayInnerStyle;e.arrowContent;var B=e.overlay,N=e.id,A=e.showArrow,S=A===void 0?!0:A,$=e.classNames,P=e.styles,F=bt(e,Q4),I=em(N),T=qe(null);ni(t,function(){return T.current});var q=K({},F);"visible"in e&&(q.popupVisible=e.visible);var L=function(){return d.createElement(mx,{key:"content",prefixCls:p,id:I,bodyClassName:$==null?void 0:$.body,overlayInnerStyle:K(K({},j),P==null?void 0:P.body)},B)},_=function(){var V=d.Children.only(f),Z=(V==null?void 0:V.props)||{},J=K(K({},Z),{},{"aria-describedby":B?I:null});return d.cloneElement(f,J)};return d.createElement(Ru,ze({popupClassName:ve(r,$==null?void 0:$.root),prefixCls:p,popup:L,action:o,builtinPlacements:J4,popupPlacement:C,ref:T,popupAlign:E,getPopupContainer:O,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:m,popupMotion:b,defaultPopupVisible:x,autoDestroy:k,mouseLeaveDelay:u,popupStyle:K(K({},s),P==null?void 0:P.root),mouseEnterDelay:i,arrow:S},q),_())};const tj=fn(ej);function hx(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,o=t/2,a=0,i=o,l=n*1/Math.sqrt(2),u=o-n*(1-1/Math.sqrt(2)),s=o-r*(1/Math.sqrt(2)),c=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),p=2*o-s,f=c,h=2*o-l,v=u,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%)`,w=`path('M ${a} ${i} A ${n} ${n} 0 0 0 ${l} ${u} L ${s} ${c} A ${r} ${r} 0 0 1 ${p} ${f} L ${h} ${v} A ${n} ${n} 0 0 0 ${g} ${m} Z')`;return{arrowShadowWidth:b,arrowPath:w,arrowPolygon:C}}const rj=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:o,arrowPath:a,arrowShadowWidth:i,borderRadiusXS:l,calc:u}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:u(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 ${ce(l)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},gx=8;function im(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?gx:n}}function es(e,t){return e?t:{}}function vx(e,t,r){const{componentCls:n,boxShadowPopoverArrow:o,arrowOffsetVertical:a,arrowOffsetHorizontal:i}=e,{arrowDistance:l=0,arrowPlacement:u={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"},rj(e,t,o)),{"&:before":{background:t}})]},es(!!u.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% - ${ce(i)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:i}}}})),es(!!u.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% - ${ce(i)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:i}}}})),es(!!u.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}})),es(!!u.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 nj(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 x0={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"]}},oj={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"]}},aj=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function bx(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:o,borderRadius:a,visibleFirst:i}=e,l=t/2,u={},s=im({contentRadius:a,limitVerticalRadius:!0});return Object.keys(x0).forEach(c=>{const p=n&&oj[c]||x0[c],f=Object.assign(Object.assign({},p),{offset:[0,0],dynamicInset:!0});switch(u[c]=f,aj.has(c)&&(f.autoArrow=!1),c){case"top":case"topLeft":case"topRight":f.offset[1]=-l-o;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=l+o;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-l-o;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=l+o;break}if(n)switch(c){case"topLeft":case"bottomLeft":f.offset[0]=-s.arrowOffsetHorizontal-l;break;case"topRight":case"bottomRight":f.offset[0]=s.arrowOffsetHorizontal+l;break;case"leftTop":case"rightTop":f.offset[1]=-s.arrowOffsetHorizontal*2+l;break;case"leftBottom":case"rightBottom":f.offset[1]=s.arrowOffsetHorizontal*2-l;break}f.overflow=nj(c,s,t,r),i&&(f.htmlRegion="visibleFirst")}),u}const ij=e=>{const{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:a,tooltipBorderRadius:i,zIndexPopup:l,controlHeight:u,boxShadowSecondary:s,paddingSM:c,paddingXS:p,arrowOffsetHorizontal:f,sizePopupArrow:h}=e,v=t(i).add(h).add(f).equal(),g=t(i).mul(2).add(h).equal();return[{[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Sr(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:u,padding:`${ce(e.calc(c).div(2).equal())} ${ce(p)}`,color:`var(--ant-tooltip-color, ${o})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:a,borderRadius:i,boxShadow:s,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,gx)}},[`${r}-content`]:{position:"relative"}}),k5(e,(m,{darkColor:b})=>({[`&${r}-${m}`]:{[`${r}-inner`]:{backgroundColor:b},[`${r}-arrow`]:{"--antd-arrow-background-color":b}}}))),{"&-rtl":{direction:"rtl"}})},vx(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},lj=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},im({contentRadius:e.borderRadius,limitVerticalRadius:!0})),hx(tr(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),yx=(e,t=!0)=>Lr("Tooltip",r=>{const{borderRadius:n,colorTextLightSolid:o,colorBgSpotlight:a}=r,i=tr(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:n,tooltipBg:a});return[ij(i),Zp(r,"zoom-big-fast")]},lj,{resetStyle:!1,injectStyle:t})(e),sj=na.map(e=>`${e}-inverse`);function uj(e,t=!0){return t?[].concat(Ie(sj),Ie(na)).includes(e):na.includes(e)}function Cx(e,t){const r=uj(t),n=ve({[`${e}-${t}`]:t&&r}),o={},a={},i=U3(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 cj=e=>{const{prefixCls:t,className:r,placement:n="top",title:o,color:a,overlayInnerStyle:i}=e,{getPrefixCls:l}=d.useContext(Qt),u=l("tooltip",t),[s,c,p]=yx(u),f=Cx(u,a),h=f.arrowStyle,v=Object.assign(Object.assign({},i),f.overlayStyle),g=ve(c,p,u,`${u}-pure`,`${u}-placement-${n}`,r,f.className);return s(d.createElement("div",{className:g,style:h},d.createElement("div",{className:`${u}-arrow`}),d.createElement(mx,Object.assign({},e,{className:c,prefixCls:u,overlayInnerStyle:v}),o)))};var dj=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 fj=d.forwardRef((e,t)=>{var r,n;const{prefixCls:o,openClassName:a,getTooltipContainer:i,color:l,overlayInnerStyle:u,children:s,afterOpenChange:c,afterVisibleChange:p,destroyTooltipOnHide:f,destroyOnHidden:h,arrow:v=!0,title:g,overlay:m,builtinPlacements:b,arrowPointAtCenter:y=!1,autoAdjustOverflow:C=!0,motion:w,getPopupContainer:E,placement:D="top",mouseEnterDelay:k=.1,mouseLeaveDelay:x=.1,overlayStyle:O,rootClassName:j,overlayClassName:B,styles:N,classNames:A}=e,S=dj(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"]),$=!!v,[,P]=Gr(),{getPopupContainer:F,getPrefixCls:I,direction:T,className:q,style:L,classNames:_,styles:V}=Ro("tooltip"),Z=li(),J=d.useRef(null),z=()=>{var ke;(ke=J.current)===null||ke===void 0||ke.forceAlign()};d.useImperativeHandle(t,()=>{var ke,Ke;return{forceAlign:z,forcePopupAlign:()=>{Z.deprecated(!1,"forcePopupAlign","forceAlign"),z()},nativeElement:(ke=J.current)===null||ke===void 0?void 0:ke.nativeElement,popupElement:(Ke=J.current)===null||Ke===void 0?void 0:Ke.popupElement}});const[Y,G]=Vr(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),X=!g&&!m&&g!==0,W=ke=>{var Ke,Ze;G(X?!1:ke),X||((Ke=e.onOpenChange)===null||Ke===void 0||Ke.call(e,ke),(Ze=e.onVisibleChange)===null||Ze===void 0||Ze.call(e,ke))},H=d.useMemo(()=>{var ke,Ke;let Ze=y;return typeof v=="object"&&(Ze=(Ke=(ke=v.pointAtCenter)!==null&&ke!==void 0?ke:v.arrowPointAtCenter)!==null&&Ke!==void 0?Ke:y),b||bx({arrowPointAtCenter:Ze,autoAdjustOverflow:C,arrowWidth:$?P.sizePopupArrow:0,borderRadius:P.borderRadius,offset:P.marginXXS,visibleFirst:!0})},[y,v,b,P]),ne=d.useMemo(()=>g===0?g:m||g||"",[m,g]),U=d.createElement(pl,{space:!0},typeof ne=="function"?ne():ne),ae=I("tooltip",o),re=I(),de=e["data-popover-inject"];let ge=Y;!("open"in e)&&!("visible"in e)&&X&&(ge=!1);const ye=d.isValidElement(s)&&!vC(s)?s:d.createElement("span",null,s),Ne=ye.props,xe=!Ne.className||typeof Ne.className=="string"?ve(Ne.className,a||`${ae}-open`):Ne.className,[be,Ae,me]=yx(ae,!de),Ee=Cx(ae,l),je=Ee.arrowStyle,Be=ve(B,{[`${ae}-rtl`]:T==="rtl"},Ee.className,j,Ae,me,q,_.root,A==null?void 0:A.root),Ye=ve(_.body,A==null?void 0:A.body),[Re,Te]=Eu("Tooltip",S.zIndex),ue=d.createElement(tj,Object.assign({},S,{zIndex:Re,showArrow:$,placement:D,mouseEnterDelay:k,mouseLeaveDelay:x,prefixCls:ae,classNames:{root:Be,body:Ye},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},je),V.root),L),O),N==null?void 0:N.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},V.body),u),N==null?void 0:N.body),Ee.overlayStyle)},getTooltipContainer:E||i||F,ref:J,builtinPlacements:H,overlay:U,visible:ge,onVisibleChange:W,afterVisibleChange:c??p,arrowContent:d.createElement("span",{className:`${ae}-arrow-content`}),motion:{motionName:wC(re,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!f}),ge?Qn(ye,{className:xe}):ye);return be(d.createElement(Wp.Provider,{value:Te},ue))}),hl=fj;hl._InternalPanelDoNotUseOrYouWillBeFired=cj;var pj={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"},mj=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:pj}))},Rf=d.forwardRef(mj),hj=rt.ESC,gj=rt.TAB;function vj(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,p;(c=r.current)===null||c===void 0||(p=c.focus)===null||p===void 0||p.call(c),n==null||n(!1)}},u=function(){var c;return(c=a.current)!==null&&c!==void 0&&c.focus?(a.current.focus(),i.current=!0,!0):!1},s=function(c){switch(c.keyCode){case hj:l();break;case gj:{var p=!1;i.current||(p=u()),p?c.preventDefault():l();break}}};d.useEffect(function(){return t?(window.addEventListener("keydown",s),o&&Xt(u,3),function(){window.removeEventListener("keydown",s),i.current=!1}):function(){i.current=!1}},[t])}var bj=fn(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=Ct(function(){var l;return typeof r=="function"?l=r():l=r,l},[r]),i=to(t,ua(a));return oe.createElement(oe.Fragment,null,n&&oe.createElement("div",{className:"".concat(o,"-arrow")}),oe.cloneElement(a,{ref:Yn(a)?i:void 0}))}),ka={adjustX:1,adjustY:1},Da=[0,0],yj={topLeft:{points:["bl","tl"],overflow:ka,offset:[0,-4],targetOffset:Da},top:{points:["bc","tc"],overflow:ka,offset:[0,-4],targetOffset:Da},topRight:{points:["br","tr"],overflow:ka,offset:[0,-4],targetOffset:Da},bottomLeft:{points:["tl","bl"],overflow:ka,offset:[0,4],targetOffset:Da},bottom:{points:["tc","bc"],overflow:ka,offset:[0,4],targetOffset:Da},bottomRight:{points:["tr","br"],overflow:ka,offset:[0,4],targetOffset:Da}},Cj=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function xj(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,u=e.animation,s=e.align,c=e.placement,p=c===void 0?"bottomLeft":c,f=e.placements,h=f===void 0?yj:f,v=e.getPopupContainer,g=e.showAction,m=e.hideAction,b=e.overlayClassName,y=e.overlayStyle,C=e.visible,w=e.trigger,E=w===void 0?["hover"]:w,D=e.autoFocus,k=e.overlay,x=e.children,O=e.onVisibleChange,j=bt(e,Cj),B=oe.useState(),N=he(B,2),A=N[0],S=N[1],$="visible"in e?C:A,P=oe.useRef(null),F=oe.useRef(null),I=oe.useRef(null);oe.useImperativeHandle(t,function(){return P.current});var T=function(Y){S(Y),O==null||O(Y)};vj({visible:$,triggerRef:I,onVisibleChange:T,autoFocus:D,overlayRef:F});var q=function(Y){var G=e.onOverlayClick;S(!1),G&&G(Y)},L=function(){return oe.createElement(bj,{ref:F,overlay:k,prefixCls:i,arrow:o})},_=function(){return typeof k=="function"?L:L()},V=function(){var Y=e.minOverlayWidthMatchTrigger,G=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?Y:!G},Z=function(){var Y=e.openClassName;return Y!==void 0?Y:"".concat(i,"-open")},J=oe.cloneElement(x,{className:ve((r=x.props)===null||r===void 0?void 0:r.className,$&&Z()),ref:Yn(x)?to(I,ua(x)):void 0}),z=m;return!z&&E.indexOf("contextMenu")!==-1&&(z=["click"]),oe.createElement(Ru,ze({builtinPlacements:h},j,{prefixCls:i,ref:P,popupClassName:ve(b,M({},"".concat(i,"-show-arrow"),o)),popupStyle:y,action:E,showAction:g,hideAction:z,popupPlacement:p,popupAlign:s,popupTransitionName:l,popupAnimation:u,popupVisible:$,stretch:V()?"minWidth":"",popup:_(),onPopupVisibleChange:T,onPopupClick:q,getPopupContainer:v}),J)}const wj=oe.forwardRef(xj),Ej=e=>typeof e!="object"&&typeof e!="function"||e===null;var xx=d.createContext(null);function wx(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function Ex(e){var t=d.useContext(xx);return wx(t,e)}var kj=["children","locked"],Ln=d.createContext(null);function Dj(e,t){var r=K({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function gl(e){var t=e.children,r=e.locked,n=bt(e,kj),o=d.useContext(Ln),a=la(function(){return Dj(o,n)},[o,n],function(i,l){return!r&&(i[0]!==l[0]||!Zn(i[1],l[1],!0))});return d.createElement(Ln.Provider,{value:a},t)}var Sj=[],kx=d.createContext(null);function Mu(){return d.useContext(kx)}var Dx=d.createContext(Sj);function ci(e){var t=d.useContext(Dx);return d.useMemo(function(){return e!==void 0?[].concat(Ie(t),[e]):t},[t,e])}var Sx=d.createContext(null),lm=d.createContext({});function w0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Du(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 $j(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=Ie(e.querySelectorAll("*")).filter(function(n){return w0(n,t)});return w0(e,t)&&r.unshift(e),r}var Tf=rt.LEFT,Mf=rt.RIGHT,zf=rt.UP,Es=rt.DOWN,ks=rt.ENTER,$x=rt.ESC,Ei=rt.HOME,ki=rt.END,E0=[zf,Es,Tf,Mf];function Bj(e,t,r,n){var o,a="prev",i="next",l="children",u="parent";if(e==="inline"&&n===ks)return{inlineTrigger:!0};var s=M(M({},zf,a),Es,i),c=M(M(M(M({},Tf,r?i:a),Mf,r?a:i),Es,l),ks,l),p=M(M(M(M(M(M({},zf,a),Es,i),ks,l),$x,u),Tf,r?l:u),Mf,r?u:l),f={inline:s,horizontal:c,vertical:p,inlineSub:s,horizontalSub:p,verticalSub:p},h=(o=f["".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 u:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function Oj(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function Aj(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function sm(e,t){var r=$j(e,!0);return r.filter(function(n){return t.has(n)})}function k0(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=sm(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 _f=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(wx(t,a),"']"));i&&(r.add(i),o.set(i,a),n.set(a,i))}),{elements:r,key2element:n,element2key:o}};function Fj(e,t,r,n,o,a,i,l,u,s){var c=d.useRef(),p=d.useRef();p.current=t;var f=function(){Xt.cancel(c.current)};return d.useEffect(function(){return function(){f()}},[]),function(h){var v=h.which;if([].concat(E0,[ks,$x,Ei,ki]).includes(v)){var g=a(),m=_f(g,n),b=m,y=b.elements,C=b.key2element,w=b.element2key,E=C.get(t),D=Aj(E,y),k=w.get(D),x=Bj(e,i(k,!0).length===1,r,v);if(!x&&v!==Ei&&v!==ki)return;(E0.includes(v)||[Ei,ki].includes(v))&&h.preventDefault();var O=function(P){if(P){var F=P,I=P.querySelector("a");I!=null&&I.getAttribute("href")&&(F=I);var T=w.get(P);l(T),f(),c.current=Xt(function(){p.current===T&&F.focus()})}};if([Ei,ki].includes(v)||x.sibling||!D){var j;!D||e==="inline"?j=o.current:j=Oj(D);var B,N=sm(j,y);v===Ei?B=N[0]:v===ki?B=N[N.length-1]:B=k0(j,y,D,x.offset),O(B)}else if(x.inlineTrigger)u(k);else if(x.offset>0)u(k,!0),f(),c.current=Xt(function(){m=_f(g,n);var P=D.getAttribute("aria-controls"),F=document.getElementById(P),I=k0(F,m.elements);O(I)},5);else if(x.offset<0){var A=i(k,!0),S=A[A.length-2],$=C.get(S);u(S,!1),O($)}}s==null||s(h)}}function Pj(e){Promise.resolve().then(e)}var um="__RC_UTIL_PATH_SPLIT__",D0=function(e){return e.join(um)},Nj=function(e){return e.split(um)},Lf="rc-menu-more";function jj(){var e=d.useState({}),t=he(e,2),r=t[1],n=qe(new Map),o=qe(new Map),a=d.useState([]),i=he(a,2),l=i[0],u=i[1],s=qe(0),c=qe(!1),p=function(){c.current||r({})},f=mt(function(C,w){var E=D0(w);o.current.set(E,C),n.current.set(C,E),s.current+=1;var D=s.current;Pj(function(){D===s.current&&p()})},[]),h=mt(function(C,w){var E=D0(w);o.current.delete(E),n.current.delete(C)},[]),v=mt(function(C){u(C)},[]),g=mt(function(C,w){var E=n.current.get(C)||"",D=Nj(E);return w&&l.includes(D[0])&&D.unshift(Lf),D},[l]),m=mt(function(C,w){return C.filter(function(E){return E!==void 0}).some(function(E){var D=g(E,!0);return D.includes(w)})},[g]),b=function(){var C=Ie(n.current.keys());return l.length&&C.push(Lf),C},y=mt(function(C){var w="".concat(n.current.get(C)).concat(um),E=new Set;return Ie(o.current.keys()).forEach(function(D){D.startsWith(w)&&E.add(o.current.get(D))}),E},[]);return d.useEffect(function(){return function(){c.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:v,isSubPathKey:m,getKeyPath:g,getKeys:b,getSubPathKeys:y}}function Ai(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 Ij=Math.random().toFixed(5).toString().slice(2),S0=0;function Rj(e){var t=Vr(e,{value:e}),r=he(t,2),n=r[0],o=r[1];return d.useEffect(function(){S0+=1;var a="".concat(Ij,"-").concat(S0);o("rc-menu-uuid-".concat(a))},[]),n}function Bx(e,t,r,n){var o=d.useContext(Ln),a=o.activeKey,i=o.onActive,l=o.onInactive,u={active:a===e};return t||(u.onMouseEnter=function(s){r==null||r({key:e,domEvent:s}),i(e)},u.onMouseLeave=function(s){n==null||n({key:e,domEvent:s}),l(e)}),u}function Ox(e){var t=d.useContext(Ln),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 Ax(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,K({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var Tj=["item"];function Zs(e){var t=e.item,r=bt(e,Tj);return Object.defineProperty(r,"item",{get:function(){return ur(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var Mj=["title","attribute","elementRef"],zj=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],_j=["active"],Lj=(function(e){ro(r,e);var t=no(r);function r(){return gr(this,r),t.apply(this,arguments)}return vr(r,[{key:"render",value:function(){var n=this.props,o=n.title,a=n.attribute,i=n.elementRef,l=bt(n,Mj),u=pn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return ur(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),d.createElement(Gn.Item,ze({},a,{title:typeof o=="string"?o:void 0},u,{ref:i}))}}]),r})(d.Component),Hj=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,u=e.role,s=e.onMouseEnter,c=e.onMouseLeave,p=e.onClick,f=e.onKeyDown,h=e.onFocus,v=bt(e,zj),g=Ex(o),m=d.useContext(Ln),b=m.prefixCls,y=m.onItemClick,C=m.disabled,w=m.overflowDisabled,E=m.itemIcon,D=m.selectedKeys,k=m.onActive,x=d.useContext(lm),O=x._internalRenderMenuItem,j="".concat(b,"-item"),B=d.useRef(),N=d.useRef(),A=C||a,S=sa(t,N),$=ci(o),P=function(G){return{key:o,keyPath:Ie($).reverse(),item:B.current,domEvent:G}},F=i||E,I=Bx(o,A,s,c),T=I.active,q=bt(I,_j),L=D.includes(o),_=Ox($.length),V=function(G){if(!A){var X=P(G);p==null||p(Zs(X)),y(X)}},Z=function(G){if(f==null||f(G),G.which===rt.ENTER){var X=P(G);p==null||p(Zs(X)),y(X)}},J=function(G){k(o),h==null||h(G)},z={};e.role==="option"&&(z["aria-selected"]=L);var Y=d.createElement(Lj,ze({ref:B,elementRef:S,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":w&&g?null:g},pn(v,["extra"]),q,z,{component:"li","aria-disabled":a,style:K(K({},_),r),className:ve(j,M(M(M({},"".concat(j,"-active"),T),"".concat(j,"-selected"),L),"".concat(j,"-disabled"),A),n),onClick:V,onKeyDown:Z,onFocus:J}),l,d.createElement(Ax,{props:K(K({},e),{},{isSelected:L}),icon:F}));return O&&(Y=O(Y,e,{selected:L})),Y});function Wj(e,t){var r=e.eventKey,n=Mu(),o=ci(r);return d.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:d.createElement(Hj,ze({},e,{ref:t}))}const zu=d.forwardRef(Wj);var Kj=["className","children"],qj=function(e,t){var r=e.className,n=e.children,o=bt(e,Kj),a=d.useContext(Ln),i=a.prefixCls,l=a.mode,u=a.rtl;return d.createElement("ul",ze({className:ve(i,u&&"".concat(i,"-rtl"),"".concat(i,"-sub"),"".concat(i,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:t}),n)},cm=d.forwardRef(qj);cm.displayName="SubMenuList";function dm(e,t){return _n(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,u=l==null;u&&(l="tmp_key-".concat([].concat(Ie(t),[n]).join("-")));var s={key:l,eventKey:l};return d.cloneElement(r,s)}return r})}var Kr={adjustX:1,adjustY:1},Vj={topLeft:{points:["bl","tl"],overflow:Kr},topRight:{points:["br","tr"],overflow:Kr},bottomLeft:{points:["tl","bl"],overflow:Kr},bottomRight:{points:["tr","br"],overflow:Kr},leftTop:{points:["tr","tl"],overflow:Kr},leftBottom:{points:["br","bl"],overflow:Kr},rightTop:{points:["tl","tr"],overflow:Kr},rightBottom:{points:["bl","br"],overflow:Kr}},Xj={topLeft:{points:["bl","tl"],overflow:Kr},topRight:{points:["br","tr"],overflow:Kr},bottomLeft:{points:["tl","bl"],overflow:Kr},bottomRight:{points:["tr","br"],overflow:Kr},rightTop:{points:["tr","tl"],overflow:Kr},rightBottom:{points:["br","bl"],overflow:Kr},leftTop:{points:["tl","tr"],overflow:Kr},leftBottom:{points:["bl","br"],overflow:Kr}};function Fx(e,t,r){if(t)return t;if(r)return r[e]||r.other}var Uj={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Gj(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,i=e.popupClassName,l=e.popupOffset,u=e.disabled,s=e.mode,c=e.onVisibleChange,p=d.useContext(Ln),f=p.getPopupContainer,h=p.rtl,v=p.subMenuOpenDelay,g=p.subMenuCloseDelay,m=p.builtinPlacements,b=p.triggerSubMenuAction,y=p.forceSubMenuRender,C=p.rootClassName,w=p.motion,E=p.defaultMotions,D=d.useState(!1),k=he(D,2),x=k[0],O=k[1],j=K(h?K({},Xj):K({},Vj),m),B=Uj[s],N=Fx(s,w,E),A=d.useRef(N);s!=="inline"&&(A.current=N);var S=K(K({},A.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),$=d.useRef();return d.useEffect(function(){return $.current=Xt(function(){O(r)}),function(){Xt.cancel($.current)}},[r]),d.createElement(Ru,{prefixCls:t,popupClassName:ve("".concat(t,"-popup"),M({},"".concat(t,"-rtl"),h),i,C),stretch:s==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:j,popupPlacement:B,popupVisible:x,popup:o,popupStyle:a,popupAlign:l&&{offset:l},action:u?[]:[b],mouseEnterDelay:v,mouseLeaveDelay:g,onPopupVisibleChange:c,forceRender:y,popupMotion:S,fresh:!0},n)}function Yj(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",i=d.useContext(Ln),l=i.prefixCls,u=i.forceSubMenuRender,s=i.motion,c=i.defaultMotions,p=i.mode,f=d.useRef(!1);f.current=p===a;var h=d.useState(!f.current),v=he(h,2),g=v[0],m=v[1],b=f.current?r:!1;d.useEffect(function(){f.current&&m(!1)},[p]);var y=K({},Fx(a,s,c));n.length>1&&(y.motionAppear=!1);var C=y.onVisibleChanged;return y.onVisibleChanged=function(w){return!f.current&&!w&&m(!0),C==null?void 0:C(w)},g?null:d.createElement(gl,{mode:a,locked:!f.current},d.createElement(ca,ze({visible:b},y,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),function(w){var E=w.className,D=w.style;return d.createElement(cm,{id:t,className:E,style:D},o)}))}var Zj=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Jj=["active"],Qj=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,u=e.children,s=e.itemIcon,c=e.expandIcon,p=e.popupClassName,f=e.popupOffset,h=e.popupStyle,v=e.onClick,g=e.onMouseEnter,m=e.onMouseLeave,b=e.onTitleClick,y=e.onTitleMouseEnter,C=e.onTitleMouseLeave,w=bt(e,Zj),E=Ex(a),D=d.useContext(Ln),k=D.prefixCls,x=D.mode,O=D.openKeys,j=D.disabled,B=D.overflowDisabled,N=D.activeKey,A=D.selectedKeys,S=D.itemIcon,$=D.expandIcon,P=D.onItemClick,F=D.onOpenChange,I=D.onActive,T=d.useContext(lm),q=T._internalRenderSubMenuItem,L=d.useContext(Sx),_=L.isSubPathKey,V=ci(),Z="".concat(k,"-submenu"),J=j||i,z=d.useRef(),Y=d.useRef(),G=s??S,X=c??$,W=O.includes(a),H=!B&&W,ne=_(A,a),U=Bx(a,J,y,C),ae=U.active,re=bt(U,Jj),de=d.useState(!1),ge=he(de,2),ye=ge[0],Ne=ge[1],xe=function(_e){J||Ne(_e)},be=function(_e){xe(!0),g==null||g({key:a,domEvent:_e})},Ae=function(_e){xe(!1),m==null||m({key:a,domEvent:_e})},me=d.useMemo(function(){return ae||(x!=="inline"?ye||_([N],a):!1)},[x,ae,N,ye,a,_]),Ee=Ox(V.length),je=function(_e){J||(b==null||b({key:a,domEvent:_e}),x==="inline"&&F(a,!W))},Be=Ai(function(_e){v==null||v(Zs(_e)),P(_e)}),Ye=function(_e){x!=="inline"&&F(a,_e)},Re=function(){I(a)},Te=E&&"".concat(E,"-popup"),ue=d.useMemo(function(){return d.createElement(Ax,{icon:x!=="horizontal"?X:void 0,props:K(K({},e),{},{isOpen:H,isSubMenu:!0})},d.createElement("i",{className:"".concat(Z,"-arrow")}))},[x,X,e,H,Z]),ke=d.createElement("div",ze({role:"menuitem",style:Ee,className:"".concat(Z,"-title"),tabIndex:J?null:-1,ref:z,title:typeof o=="string"?o:null,"data-menu-id":B&&E?null:E,"aria-expanded":H,"aria-haspopup":!0,"aria-controls":Te,"aria-disabled":J,onClick:je,onFocus:Re},re),o,ue),Ke=d.useRef(x);if(x!=="inline"&&V.length>1?Ke.current="vertical":Ke.current=x,!B){var Ze=Ke.current;ke=d.createElement(Gj,{mode:Ze,prefixCls:Z,visible:!l&&H&&x!=="inline",popupClassName:p,popupOffset:f,popupStyle:h,popup:d.createElement(gl,{mode:Ze==="horizontal"?"vertical":Ze},d.createElement(cm,{id:Te,ref:Y},u)),disabled:J,onVisibleChange:Ye},ke)}var We=d.createElement(Gn.Item,ze({ref:t,role:"none"},w,{component:"li",style:r,className:ve(Z,"".concat(Z,"-").concat(x),n,M(M(M(M({},"".concat(Z,"-open"),H),"".concat(Z,"-active"),me),"".concat(Z,"-selected"),ne),"".concat(Z,"-disabled"),J)),onMouseEnter:be,onMouseLeave:Ae}),ke,!B&&d.createElement(Yj,{id:Te,open:H,keyPath:V},u));return q&&(We=q(We,e,{selected:ne,active:me,open:H,disabled:J})),d.createElement(gl,{onItemClick:Be,mode:x==="horizontal"?"vertical":x,itemIcon:G,expandIcon:X},We)}),_u=d.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=ci(r),a=dm(n,o),i=Mu();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(Qj,ze({ref:t},e),a),d.createElement(Dx.Provider,{value:o},l)});function fm(e){var t=e.className,r=e.style,n=d.useContext(Ln),o=n.prefixCls,a=Mu();return a?null:d.createElement("li",{role:"separator",className:ve("".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=bt(e,eI),i=d.useContext(Ln),l=i.prefixCls,u="".concat(l,"-item-group");return d.createElement("li",ze({ref:t,role:"presentation"},a,{onClick:function(s){return s.stopPropagation()},className:ve(u,r)}),d.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof n=="string"?n:void 0},n),d.createElement("ul",{role:"group",className:"".concat(u,"-list")},o))}),pm=d.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=ci(r),a=dm(n,o),i=Mu();return i?a:d.createElement(tI,ze({ref:t},pn(e,["warnKey"])),a)}),rI=["label","children","key","type","extra"];function Hf(e,t,r){var n=t.item,o=t.group,a=t.submenu,i=t.divider;return(e||[]).map(function(l,u){if(l&&it(l)==="object"){var s=l,c=s.label,p=s.children,f=s.key,h=s.type,v=s.extra,g=bt(s,rI),m=f??"tmp-".concat(u);return p||h==="group"?h==="group"?d.createElement(o,ze({key:m},g,{title:c}),Hf(p,t,r)):d.createElement(a,ze({key:m},g,{title:c}),Hf(p,t,r)):h==="divider"?d.createElement(i,ze({key:m},g)):d.createElement(n,ze({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 $0(e,t,r,n,o){var a=e,i=K({divider:fm,item:zu,group:pm,submenu:_u},n);return t&&(a=Hf(t,i,o)),dm(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,u=n.className,s=n.tabIndex,c=s===void 0?0:s,p=n.items,f=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,w=n.subMenuOpenDelay,E=w===void 0?.1:w,D=n.subMenuCloseDelay,k=D===void 0?.1:D,x=n.forceSubMenuRender,O=n.defaultOpenKeys,j=n.openKeys,B=n.activeKey,N=n.defaultActiveFirst,A=n.selectable,S=A===void 0?!0:A,$=n.multiple,P=$===void 0?!1:$,F=n.defaultSelectedKeys,I=n.selectedKeys,T=n.onSelect,q=n.onDeselect,L=n.inlineIndent,_=L===void 0?24:L,V=n.motion,Z=n.defaultMotions,J=n.triggerSubMenuAction,z=J===void 0?"hover":J,Y=n.builtinPlacements,G=n.itemIcon,X=n.expandIcon,W=n.overflowedIndicator,H=W===void 0?"...":W,ne=n.overflowedIndicatorPopupClassName,U=n.getPopupContainer,ae=n.onClick,re=n.onOpenChange,de=n.onKeyDown;n.openAnimation,n.openTransitionName;var ge=n._internalRenderMenuItem,ye=n._internalRenderSubMenuItem,Ne=n._internalComponents,xe=bt(n,nI),be=d.useMemo(function(){return[$0(f,p,Mo,Ne,a),$0(f,p,Mo,{},a)]},[f,p,Ne]),Ae=he(be,2),me=Ae[0],Ee=Ae[1],je=d.useState(!1),Be=he(je,2),Ye=Be[0],Re=Be[1],Te=d.useRef(),ue=Rj(v),ke=h==="rtl",Ke=Vr(O,{value:j,postState:function(Et){return Et||Mo}}),Ze=he(Ke,2),We=Ze[0],_e=Ze[1],nt=function(Et){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function vt(){_e(Et),re==null||re(Et)}Ge?cd(vt):vt()},Ue=d.useState(We),et=he(Ue,2),yt=et[0],kt=et[1],dt=d.useRef(!1),ht=d.useMemo(function(){return(m==="inline"||m==="vertical")&&b?["vertical",b]:[m,!1]},[m,b]),Mt=he(ht,2),Pt=Mt[0],ft=Mt[1],ut=Pt==="inline",pe=d.useState(Pt),Oe=he(pe,2),Se=Oe[0],Ce=Oe[1],we=d.useState(ft),fe=he(we,2),le=fe[0],ee=fe[1];d.useEffect(function(){Ce(Pt),ee(ft),dt.current&&(ut?_e(yt):nt(Mo))},[Pt,ft]);var te=d.useState(0),se=he(te,2),Pe=se[0],ot=se[1],He=Pe>=me.length-1||Se!=="horizontal"||C;d.useEffect(function(){ut&&kt(We)},[We]),d.useEffect(function(){return dt.current=!0,function(){dt.current=!1}},[]);var $e=jj(),Xe=$e.registerPath,wt=$e.unregisterPath,St=$e.refreshOverflowKeys,Nt=$e.isSubPathKey,Ot=$e.getKeyPath,jt=$e.getKeys,ar=$e.getSubPathKeys,Le=d.useMemo(function(){return{registerPath:Xe,unregisterPath:wt}},[Xe,wt]),Je=d.useMemo(function(){return{isSubPathKey:Nt}},[Nt]);d.useEffect(function(){St(He?Mo:me.slice(Pe+1).map(function(Et){return Et.key}))},[Pe,He]);var gt=Vr(B||N&&((r=me[0])===null||r===void 0?void 0:r.key),{value:B}),pt=he(gt,2),At=pt[0],mr=pt[1],wr=Ai(function(Et){mr(Et)}),lt=Ai(function(){mr(void 0)});ni(t,function(){return{list:Te.current,focus:function(Et){var Ge,vt=jt(),Ht=_f(vt,ue),zt=Ht.elements,rr=Ht.key2element,Or=Ht.element2key,br=sm(Te.current,zt),Ar=At??(br[0]?Or.get(br[0]):(Ge=me.find(function(mn){return!mn.props.disabled}))===null||Ge===void 0?void 0:Ge.key),Er=rr.get(Ar);if(Ar&&Er){var kr;Er==null||(kr=Er.focus)===null||kr===void 0||kr.call(Er,Et)}}}});var $t=Vr(F||[],{value:I,postState:function(Et){return Array.isArray(Et)?Et:Et==null?Mo:[Et]}}),Ft=he($t,2),qt=Ft[0],Br=Ft[1],on=function(Et){if(S){var Ge=Et.key,vt=qt.includes(Ge),Ht;P?vt?Ht=qt.filter(function(rr){return rr!==Ge}):Ht=[].concat(Ie(qt),[Ge]):Ht=[Ge],Br(Ht);var zt=K(K({},Et),{},{selectedKeys:Ht});vt?q==null||q(zt):T==null||T(zt)}!P&&We.length&&Se!=="inline"&&nt(Mo)},wn=Ai(function(Et){ae==null||ae(Zs(Et)),on(Et)}),Zr=Ai(function(Et,Ge){var vt=We.filter(function(zt){return zt!==Et});if(Ge)vt.push(Et);else if(Se!=="inline"){var Ht=ar(Et);vt=vt.filter(function(zt){return!Ht.has(zt)})}Zn(We,vt,!0)||nt(vt,!0)}),Mr=function(Et,Ge){var vt=Ge??!We.includes(Et);Zr(Et,vt)},an=Fj(Se,At,ke,ue,Te,jt,Ot,mr,Mr,de);d.useEffect(function(){Re(!0)},[]);var ln=d.useMemo(function(){return{_internalRenderMenuItem:ge,_internalRenderSubMenuItem:ye}},[ge,ye]),Jr=Se!=="horizontal"||C?me:me.map(function(Et,Ge){return d.createElement(gl,{key:Et.key,overflowDisabled:Ge>Pe},Et)}),Hr=d.createElement(Gn,ze({id:v,ref:Te,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:zu,className:ve(a,"".concat(a,"-root"),"".concat(a,"-").concat(Se),u,M(M({},"".concat(a,"-inline-collapsed"),le),"".concat(a,"-rtl"),ke),i),dir:h,style:l,role:"menu",tabIndex:c,data:Jr,renderRawItem:function(Et){return Et},renderRawRest:function(Et){var Ge=Et.length,vt=Ge?me.slice(-Ge):null;return d.createElement(_u,{eventKey:Lf,title:H,disabled:He,internalPopupClose:Ge===0,popupClassName:ne},vt)},maxCount:Se!=="horizontal"||C?Gn.INVALIDATE:Gn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Et){ot(Et)},onKeyDown:an},xe));return d.createElement(lm.Provider,{value:ln},d.createElement(xx.Provider,{value:ue},d.createElement(gl,{prefixCls:a,rootClassName:i,mode:Se,openKeys:We,rtl:ke,disabled:y,motion:Ye?V:null,defaultMotions:Ye?Z:null,activeKey:At,onActive:wr,onInactive:lt,selectedKeys:qt,inlineIndent:_,subMenuOpenDelay:E,subMenuCloseDelay:k,forceSubMenuRender:x,builtinPlacements:Y,triggerSubMenuAction:z,getPopupContainer:U,itemIcon:G,expandIcon:X,onItemClick:wn,onOpenChange:Zr},d.createElement(Sx.Provider,{value:Je},Hr),d.createElement("div",{style:{display:"none"},"aria-hidden":!0},d.createElement(kx.Provider,{value:Le},Ee)))))}),Bl=oI;Bl.Item=zu;Bl.SubMenu=_u;Bl.ItemGroup=pm;Bl.Divider=fm;const aI=e=>{const{antCls:t,componentCls:r,colorText:n,footerBg:o,headerHeight:a,headerPadding:i,headerColor:l,footerPadding:u,fontSize:s,bodyBg:c,headerBg:p}=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:ce(a),background:p,[`${t}-menu`]:{lineHeight:"inherit"}},[`${r}-footer`]:{padding:u,color:n,fontSize:s,background:o},[`${r}-content`]:{flex:"auto",color:n,minHeight:0}}},Px=e=>{const{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:o,controlHeightSM:a,marginXXS:i,colorTextLightSolid:l,colorBgContainer:u}=e,s=n*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:r*2,headerPadding:`0 ${s}px`,headerColor:o,footerPadding:`${a}px ${s}px`,footerBg:t,siderBg:"#001529",triggerHeight:n+i*2,triggerBg:"#002140",triggerColor:l,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:u,lightTriggerBg:u,lightTriggerColor:o}},Nx=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];Lr("Layout",aI,Px,{deprecatedTokens:Nx});const iI=e=>{const{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:o,antCls:a,triggerHeight:i,triggerColor:l,triggerBg:u,headerHeight:s,zeroTriggerWidth:c,zeroTriggerHeight:p,borderRadiusLG:f,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:ce(i),textAlign:"center",background:u,cursor:"pointer",transition:`all ${n}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:s,insetInlineEnd:e.calc(c).mul(-1).equal(),zIndex:1,width:c,height:p,color:l,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderRadius:`0 ${ce(f)} ${ce(f)} 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:`${ce(f)} 0 0 ${ce(f)}`}},"&-light":{background:h,[`${t}-trigger`]:{color:v,background:g},[`${t}-zero-width-trigger`]:{color:v,background:g,border:`1px solid ${m}`,borderInlineStart:0}}}}};Lr(["Layout","Sider"],iI,Px,{deprecatedTokens:Nx});const jx=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(cr,ze({},e,{ref:t,icon:lI}))},Ix=d.forwardRef(sI);const Js=An({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 Rx=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=uI(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=d.useContext(Qt),i=a("menu",t),l=ve({[`${i}-item-divider-dashed`]:!!n},r);return d.createElement(fm,Object.assign({className:l},o))},Tx=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:i,extra:l}=e,{prefixCls:u,firstLevel:s,direction:c,disableMenuItemTitleTooltip:p,inlineCollapsed:f}=d.useContext(Js),h=C=>{const w=n==null?void 0:n[0],E=d.createElement("span",{className:ve(`${u}-title-content`,{[`${u}-title-content-with-extra`]:!!l||l===0})},n);return(!o||d.isValidElement(n)&&n.type==="span")&&n&&C&&s&&typeof w=="string"?d.createElement("div",{className:`${u}-inline-collapsed-noicon`},w.charAt(0)):E},{siderCollapsed:v}=d.useContext(jx);let g=a;typeof a>"u"?g=s?n:"":a===!1&&(g="");const m={title:g};!v&&!f&&(m.title=null,m.open=!1);const b=_n(n).length;let y=d.createElement(zu,Object.assign({},pn(e,["title","icon","danger"]),{className:ve({[`${u}-item-danger`]:i,[`${u}-item-only-child`]:(o?b+1:b)===1},r),title:typeof a=="string"?a:void 0}),Qn(o,{className:ve(d.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${u}-item-icon`)}),h(f));return p||(y=d.createElement(hl,Object.assign({},m,{placement:c==="rtl"?"left":"right",classNames:{root:`${u}-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 Qs=d.createContext(null),Mx=d.forwardRef((e,t)=>{const{children:r}=e,n=cI(e,["children"]),o=d.useContext(Qs),a=d.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),i=qB(r),l=sa(t,i?ua(r):null);return d.createElement(Qs.Provider,{value:a},d.createElement(pl,{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:`${ce(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(${ce(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ce(t)})`}}}}),B0=e=>No(e),O0=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:i,itemBg:l,subMenuItemBg:u,itemSelectedBg:s,activeBarHeight:c,activeBarWidth:p,activeBarBorderWidth:f,motionDurationSlow:h,motionEaseInOut:v,motionEaseOut:g,itemPaddingInline:m,motionDurationMid:b,itemHoverColor:y,lineType:C,colorSplit:w,itemDisabledColor:E,dangerItemColor:D,dangerItemHoverColor:k,dangerItemSelectedColor:x,dangerItemActiveBg:O,dangerItemSelectedBg:j,popupBg:B,itemHoverBg:N,itemActiveBg:A,menuSubMenuBg:S,horizontalItemSelectedColor:$,horizontalItemSelectedBg:P,horizontalItemBorderRadius:F,horizontalItemHoverBg:I}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:l,[`&${r}-root:focus-visible`]:Object.assign({},B0(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({},B0(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${E} !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:N},"&:active":{backgroundColor:A}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:N},"&:active":{backgroundColor:A}}},[`${r}-item-danger`]:{color:D,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:k}},[`&${r}-item:active`]:{background:O}},[`${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:s,[`&${r}-item-danger`]:{backgroundColor:j}},[`&${r}-submenu > ${r}`]:{backgroundColor:S},[`&${r}-popup > ${r}`]:{backgroundColor:B},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:B},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:F,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${ce(c)} solid transparent`,transition:`border-color ${h} ${v}`,content:'""'},"&:hover, &-active, &-open":{background:I,"&::after":{borderBottomWidth:c,borderBottomColor:$}},"&-selected":{color:$,backgroundColor:P,"&:hover":{backgroundColor:P},"&::after":{borderBottomWidth:c,borderBottomColor:$}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${ce(f)} ${C} ${w}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:u},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ce(p)} 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(",")}}}}}},A0=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:i,itemMarginBlock:l,itemWidth:u,itemPaddingInline:s}=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:ce(r),paddingInline:s,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:l,width:u},[`> ${t}-item,
330
+ > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:ce(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:u,itemMarginInline:s,fontSizeLG:c,motionDurationFast:p,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:v,collapsedWidth:g,collapsedIconSize:m}=e,b={height:n,lineHeight:ce(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},A0(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},A0(e)),{boxShadow:v})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${ce(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 ${f}`,`background ${f}`,`padding ${p} ${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:u}},[`${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% - ${ce(e.calc(m).div(2).equal())} - ${ce(s)})`,textOverflow:"clip",[`
335
+ ${t}-submenu-arrow,
336
+ ${t}-submenu-expand-icon
337
+ `]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:m,lineHeight:ce(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({},cl),{paddingInline:h})}}]},F0=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:i,iconSize:l,iconMarginInlineEnd:u}=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:u,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},El()),[`&${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"}}}},P0=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(${ce(e.calc(i).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ce(i)})`}}}}},mI=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:i,paddingXS:l,padding:u,colorSplit:s,lineWidth:c,zIndexPopup:p,borderRadiusLG:f,subMenuItemBorderRadius:h,menuArrowSize:v,menuArrowOffset:g,lineType:m,groupTitleLineHeight:b,groupTitleFontSize:y}=e;return[{"":{[r]:Object.assign(Object.assign({},Ks()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Sr(e)),Ks()),{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:`${ce(l)} ${ce(u)}`,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:s,borderStyle:m,borderWidth:0,borderTopWidth:c,marginBlock:c,padding:0,"&-dashed":{borderStyle:"dashed"}}}),F0(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${ce(e.calc(n).mul(2).equal())} ${ce(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,borderRadius:f,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:f},F0(e)),P0(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}}}),P0(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
338
+ &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ce(g)})`},"&::after":{transform:`rotate(45deg) translateX(${ce(e.calc(g).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${ce(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ce(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ce(g)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},hI=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:i,colorErrorBg:l,colorText:u,colorTextDescription:s,colorBgContainer:c,colorFillAlter:p,colorFillContent:f,lineWidth:h,lineWidthBold:v,controlItemBgActive:g,colorBgTextHover:m,controlHeightLG:b,lineHeight:y,colorBgElevated:C,marginXXS:w,padding:E,fontSize:D,controlHeightSM:k,fontSizeLG:x,colorTextLightSolid:O,colorErrorHover:j}=e,B=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,N=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:h,A=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,S=new Wt(O).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:u,itemColor:u,colorItemTextHover:u,itemHoverColor:u,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:c,itemBg:c,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:f,itemActiveBg:g,colorSubItemBg:p,subMenuItemBg:p,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:B,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:h,activeBarBorderWidth:N,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:A,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:y,collapsedWidth:b*2,popupBg:C,itemMarginBlock:w,itemPaddingInline:E,horizontalLineHeight:`${b*1.15}px`,iconSize:D,iconMarginInlineEnd:k-D,collapsedIconSize:x,groupTitleFontSize:D,darkItemDisabledColor:new Wt(O).setA(.25).toRgbString(),darkItemColor:S,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:O,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:S,darkItemHoverColor:O,darkDangerItemHoverColor:j,darkDangerItemSelectedColor:O,darkDangerItemActiveBg:a,itemWidth:B?`calc(100% + ${N}px)`:`calc(100% - ${A*2}px)`}},gI=(e,t=e,r=!0)=>Lr("Menu",n=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:i,darkItemColor:l,darkDangerItemColor:u,darkItemBg:s,darkSubMenuItemBg:c,darkItemSelectedColor:p,darkItemSelectedBg:f,darkDangerItemSelectedBg:h,darkItemHoverBg:v,darkGroupTitleColor:g,darkItemHoverColor:m,darkItemDisabledColor:b,darkDangerItemHoverColor:y,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:w,popupBg:E,darkPopupBg:D}=n,k=n.calc(i).div(7).mul(5).equal(),x=tr(n,{menuArrowSize:k,menuHorizontalHeight:n.calc(a).mul(1.15).equal(),menuArrowOffset:n.calc(k).mul(.25).equal(),menuSubMenuBg:o,calc:n.calc,popupBg:E}),O=tr(x,{itemColor:l,itemHoverColor:m,groupTitleColor:g,itemSelectedColor:p,subMenuItemSelectedColor:p,itemBg:s,popupBg:D,subMenuItemBg:c,itemActiveBg:"transparent",itemSelectedBg:f,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:b,dangerItemColor:u,dangerItemHoverColor:y,dangerItemSelectedColor:C,dangerItemActiveBg:w,dangerItemSelectedBg:h,menuSubMenuBg:c,horizontalItemSelectedColor:p,horizontalItemSelectedBg:f});return[mI(x),dI(x),pI(x),O0(x,"light"),O0(O,"dark"),fI(x),SC(x),Ja(x,"slide-up"),Ja(x,"slide-down"),Zp(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),zx=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,i=d.useContext(Js),{prefixCls:l,inlineCollapsed:u,theme:s}=i,c=ci();let p;if(!n)p=u&&!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";p=d.createElement(d.Fragment,null,Qn(n,{className:ve(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 f=d.useMemo(()=>Object.assign(Object.assign({},i),{firstLevel:!1}),[i]),[h]=Eu("Menu");return d.createElement(Js.Provider,{value:f},d.createElement(_u,Object.assign({},pn(e,["icon"]),{title:p,popupClassName:ve(l,r,`${l}-${a||s}`),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 Qc(e){return e===null||e===!1}const bI={item:Tx,submenu:zx,divider:Rx},yI=fn((e,t)=>{var r;const n=d.useContext(Qs),o=n||{},{getPrefixCls:a,getPopupContainer:i,direction:l,menu:u}=d.useContext(Qt),s=a(),{prefixCls:c,className:p,style:f,theme:h="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:g,inlineCollapsed:m,siderCollapsed:b,rootClassName:y,mode:C,selectable:w,onClick:E,overflowedIndicatorPopupClassName:D}=e,k=vI(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),x=pn(k,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:C});const O=nr((..._)=>{var V;E==null||E.apply(void 0,_),(V=o.onClick)===null||V===void 0||V.call(o)}),j=o.mode||C,B=w??o.selectable,N=m??b,A={horizontal:{motionName:`${s}-slide-up`},inline:xC(s),other:{motionName:`${s}-zoom-big`}},S=a("menu",c||o.prefixCls),$=go(S),[P,F,I]=gI(S,$,!n),T=ve(`${S}-${h}`,u==null?void 0:u.className,p),q=d.useMemo(()=>{var _,V;if(typeof v=="function"||Qc(v))return v||null;if(typeof o.expandIcon=="function"||Qc(o.expandIcon))return o.expandIcon||null;if(typeof(u==null?void 0:u.expandIcon)=="function"||Qc(u==null?void 0:u.expandIcon))return(u==null?void 0:u.expandIcon)||null;const Z=(_=v??(o==null?void 0:o.expandIcon))!==null&&_!==void 0?_:u==null?void 0:u.expandIcon;return Qn(Z,{className:ve(`${S}-submenu-expand-icon`,d.isValidElement(Z)?(V=Z.props)===null||V===void 0?void 0:V.className:void 0)})},[v,o==null?void 0:o.expandIcon,u==null?void 0:u.expandIcon,S]),L=d.useMemo(()=>({prefixCls:S,inlineCollapsed:N||!1,direction:l,firstLevel:!0,theme:h,mode:j,disableMenuItemTitleTooltip:g}),[S,N,l,g,h]);return P(d.createElement(Qs.Provider,{value:null},d.createElement(Js.Provider,{value:L},d.createElement(Bl,Object.assign({getPopupContainer:i,overflowedIndicator:d.createElement(Ix,null),overflowedIndicatorPopupClassName:ve(S,`${S}-${h}`,D),mode:j,selectable:B,onClick:O},x,{inlineCollapsed:N,style:Object.assign(Object.assign({},u==null?void 0:u.style),f),className:T,prefixCls:S,direction:l,defaultMotions:A,expandIcon:q,ref:t,rootClassName:ve(y,F,o.rootClassName,I,$),_internalComponents:bI})))))}),di=fn((e,t)=>{const r=qe(null),n=d.useContext(jx);return ni(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))});di.Item=Tx;di.SubMenu=zx;di.Divider=Rx;di.ItemGroup=pm;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:u,paddingBlock:s,fontSize:c,dropdownEdgeChildPadding:p,colorTextDisabled:f,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 ${u}`}},[`${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:Xp},[`&${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:Gp},[`&${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:Yp}}},vx(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({},Sr(e)),{[r]:Object.assign(Object.assign({padding:p,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},dl(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${ce(s)} ${ce(v)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${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 ${u}`,"&: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:`${ce(s)} ${ce(v)}`,color:e.colorText,fontWeight:"normal",fontSize:c,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},dl(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ce(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 ${ce(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:f,backgroundColor:g,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ja(e,"slide-up"),Ja(e,"slide-down"),Us(e,"move-up"),Us(e,"move-down"),Zp(e,"zoom-big")]]},wI=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},im({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),hx(e)),EI=Lr("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=tr(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[xI(a),CI(a)]},wI,{resetStyle:!1}),Lu=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:i,disabled:l,dropdownRender:u,popupRender:s,getPopupContainer:c,overlayClassName:p,rootClassName:f,overlayStyle:h,open:v,onOpenChange:g,visible:m,onVisibleChange:b,mouseEnterDelay:y=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:w=!0,placement:E="",overlay:D,transitionName:k,destroyOnHidden:x,destroyPopupOnHide:O}=e,{getPopupContainer:j,getPrefixCls:B,direction:N,dropdown:A}=d.useContext(Qt),S=s||u;li();const $=d.useMemo(()=>{const ge=B();return k!==void 0?k:E.includes("top")?`${ge}-slide-down`:`${ge}-slide-up`},[B,E,k]),P=d.useMemo(()=>E?E.includes("Center")?E.slice(0,E.indexOf("Center")):E:N==="rtl"?"bottomRight":"bottomLeft",[E,N]),F=B("dropdown",o),I=go(F),[T,q,L]=EI(F,I),[,_]=Gr(),V=d.Children.only(Ej(a)?d.createElement("span",null,a):a),Z=Qn(V,{className:ve(`${F}-trigger`,{[`${F}-rtl`]:N==="rtl"},V.props.className),disabled:(t=V.props.disabled)!==null&&t!==void 0?t:l}),J=l?[]:i,z=!!(J!=null&&J.includes("contextMenu")),[Y,G]=Vr(!1,{value:v??m}),X=nr(ge=>{g==null||g(ge,{source:"trigger"}),b==null||b(ge),G(ge)}),W=ve(p,f,q,L,I,A==null?void 0:A.className,{[`${F}-rtl`]:N==="rtl"}),H=bx({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:w,offset:_.marginXXS,arrowWidth:n?_.sizePopupArrow:0,borderRadius:_.borderRadius}),ne=nr(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(g==null||g(!1,{source:"menu"}),G(!1))}),U=()=>{let ge;return r!=null&&r.items?ge=d.createElement(di,Object.assign({},r)):typeof D=="function"?ge=D():ge=D,S&&(ge=S(ge)),ge=d.Children.only(typeof ge=="string"?d.createElement("span",null,ge):ge),d.createElement(Mx,{prefixCls:`${F}-menu`,rootClassName:ve(L,I),expandIcon:d.createElement("span",{className:`${F}-menu-submenu-arrow`},N==="rtl"?d.createElement(Rf,{className:`${F}-menu-submenu-arrow-icon`}):d.createElement(bf,{className:`${F}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ne,validator:({mode:ye})=>{}},ge)},[ae,re]=Eu("Dropdown",h==null?void 0:h.zIndex);let de=d.createElement(wj,Object.assign({alignPoint:z},pn(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:C,visible:Y,builtinPlacements:H,arrow:!!n,overlayClassName:W,prefixCls:F,getPopupContainer:c||j,transitionName:$,trigger:J,overlay:U,placement:P,onVisibleChange:X,overlayStyle:Object.assign(Object.assign(Object.assign({},A==null?void 0:A.style),h),{zIndex:ae}),autoDestroy:x??O}),Z);return ae&&(de=d.createElement(Wp.Provider,{value:re},de)),T(de)},kI=LC(Lu,"align",void 0,"dropdown",e=>e),DI=e=>d.createElement(kI,Object.assign({},e),d.createElement("span",null));Lu._InternalPanelDoNotUseOrYouWillBeFired=DI;var Wf={exports:{}},SI=Wf.exports,N0;function $I(){return N0||(N0=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",u="hour",s="day",c="week",p="month",f="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(S){var $=["th","st","nd","rd"],P=S%100;return"["+S+($[(P-20)%10]||$[P]||$[0])+"]"}},C=function(S,$,P){var F=String(S);return!F||F.length>=$?S:""+Array($+1-F.length).join(P)+S},w={s:C,z:function(S){var $=-S.utcOffset(),P=Math.abs($),F=Math.floor(P/60),I=P%60;return($<=0?"+":"-")+C(F,2,"0")+":"+C(I,2,"0")},m:function S($,P){if($.date()<P.date())return-S(P,$);var F=12*(P.year()-$.year())+(P.month()-$.month()),I=$.clone().add(F,p),T=P-I<0,q=$.clone().add(F+(T?-1:1),p);return+(-(F+(P-I)/(T?I-q:q-I))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:p,y:h,w:c,d:s,D:v,h:u,m:l,s:i,ms:a,Q:f}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},E="en",D={};D[E]=y;var k="$isDayjsObject",x=function(S){return S instanceof N||!(!S||!S[k])},O=function S($,P,F){var I;if(!$)return E;if(typeof $=="string"){var T=$.toLowerCase();D[T]&&(I=T),P&&(D[T]=P,I=T);var q=$.split("-");if(!I&&q.length>1)return S(q[0])}else{var L=$.name;D[L]=$,I=L}return!F&&I&&(E=I),I||!F&&E},j=function(S,$){if(x(S))return S.clone();var P=typeof $=="object"?$:{};return P.date=S,P.args=arguments,new N(P)},B=w;B.l=O,B.i=x,B.w=function(S,$){return j(S,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var N=(function(){function S(P){this.$L=O(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[k]=!0}var $=S.prototype;return $.parse=function(P){this.$d=(function(F){var I=F.date,T=F.utc;if(I===null)return new Date(NaN);if(B.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var q=I.match(m);if(q){var L=q[2]-1||0,_=(q[7]||"0").substring(0,3);return T?new Date(Date.UTC(q[1],L,q[3]||1,q[4]||0,q[5]||0,q[6]||0,_)):new Date(q[1],L,q[3]||1,q[4]||0,q[5]||0,q[6]||0,_)}}return new Date(I)})(P),this.init()},$.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},$.$utils=function(){return B},$.isValid=function(){return this.$d.toString()!==g},$.isSame=function(P,F){var I=j(P);return this.startOf(F)<=I&&I<=this.endOf(F)},$.isAfter=function(P,F){return j(P)<this.startOf(F)},$.isBefore=function(P,F){return this.endOf(F)<j(P)},$.$g=function(P,F,I){return B.u(P)?this[F]:this.set(I,P)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(P,F){var I=this,T=!!B.u(F)||F,q=B.p(P),L=function(X,W){var H=B.w(I.$u?Date.UTC(I.$y,W,X):new Date(I.$y,W,X),I);return T?H:H.endOf(s)},_=function(X,W){return B.w(I.toDate()[X].apply(I.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(W)),I)},V=this.$W,Z=this.$M,J=this.$D,z="set"+(this.$u?"UTC":"");switch(q){case h:return T?L(1,0):L(31,11);case p:return T?L(1,Z):L(0,Z+1);case c:var Y=this.$locale().weekStart||0,G=(V<Y?V+7:V)-Y;return L(T?J-G:J+(6-G),Z);case s:case v:return _(z+"Hours",0);case u:return _(z+"Minutes",1);case l:return _(z+"Seconds",2);case i:return _(z+"Milliseconds",3);default:return this.clone()}},$.endOf=function(P){return this.startOf(P,!1)},$.$set=function(P,F){var I,T=B.p(P),q="set"+(this.$u?"UTC":""),L=(I={},I[s]=q+"Date",I[v]=q+"Date",I[p]=q+"Month",I[h]=q+"FullYear",I[u]=q+"Hours",I[l]=q+"Minutes",I[i]=q+"Seconds",I[a]=q+"Milliseconds",I)[T],_=T===s?this.$D+(F-this.$W):F;if(T===p||T===h){var V=this.clone().set(v,1);V.$d[L](_),V.init(),this.$d=V.set(v,Math.min(this.$D,V.daysInMonth())).$d}else L&&this.$d[L](_);return this.init(),this},$.set=function(P,F){return this.clone().$set(P,F)},$.get=function(P){return this[B.p(P)]()},$.add=function(P,F){var I,T=this;P=Number(P);var q=B.p(F),L=function(Z){var J=j(T);return B.w(J.date(J.date()+Math.round(Z*P)),T)};if(q===p)return this.set(p,this.$M+P);if(q===h)return this.set(h,this.$y+P);if(q===s)return L(1);if(q===c)return L(7);var _=(I={},I[l]=n,I[u]=o,I[i]=r,I)[q]||1,V=this.$d.getTime()+P*_;return B.w(V,this)},$.subtract=function(P,F){return this.add(-1*P,F)},$.format=function(P){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||g;var T=P||"YYYY-MM-DDTHH:mm:ssZ",q=B.z(this),L=this.$H,_=this.$m,V=this.$M,Z=I.weekdays,J=I.months,z=I.meridiem,Y=function(W,H,ne,U){return W&&(W[H]||W(F,T))||ne[H].slice(0,U)},G=function(W){return B.s(L%12||12,W,"0")},X=z||function(W,H,ne){var U=W<12?"AM":"PM";return ne?U.toLowerCase():U};return T.replace(b,(function(W,H){return H||(function(ne){switch(ne){case"YY":return String(F.$y).slice(-2);case"YYYY":return B.s(F.$y,4,"0");case"M":return V+1;case"MM":return B.s(V+1,2,"0");case"MMM":return Y(I.monthsShort,V,J,3);case"MMMM":return Y(J,V);case"D":return F.$D;case"DD":return B.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Y(I.weekdaysMin,F.$W,Z,2);case"ddd":return Y(I.weekdaysShort,F.$W,Z,3);case"dddd":return Z[F.$W];case"H":return String(L);case"HH":return B.s(L,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return X(L,_,!0);case"A":return X(L,_,!1);case"m":return String(_);case"mm":return B.s(_,2,"0");case"s":return String(F.$s);case"ss":return B.s(F.$s,2,"0");case"SSS":return B.s(F.$ms,3,"0");case"Z":return q}return null})(W)||q.replace(":","")}))},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(P,F,I){var T,q=this,L=B.p(F),_=j(P),V=(_.utcOffset()-this.utcOffset())*n,Z=this-_,J=function(){return B.m(q,_)};switch(L){case h:T=J()/12;break;case p:T=J();break;case f:T=J()/3;break;case c:T=(Z-V)/6048e5;break;case s:T=(Z-V)/864e5;break;case u:T=Z/o;break;case l:T=Z/n;break;case i:T=Z/r;break;default:T=Z}return I?T:B.a(T)},$.daysInMonth=function(){return this.endOf(p).$D},$.$locale=function(){return D[this.$L]},$.locale=function(P,F){if(!P)return this.$L;var I=this.clone(),T=O(P,F,!0);return T&&(I.$L=T),I},$.clone=function(){return B.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},S})(),A=N.prototype;return j.prototype=A,[["$ms",a],["$s",i],["$m",l],["$H",u],["$W",s],["$M",p],["$y",h],["$D",v]].forEach((function(S){A[S[1]]=function($){return this.$g($,S[0],S[1])}})),j.extend=function(S,$){return S.$i||(S($,N,j),S.$i=!0),j},j.locale=O,j.isDayjs=x,j.unix=function(S){return j(1e3*S)},j.en=D[E],j.Ls=D,j.p={},j}))})(Wf)),Wf.exports}var BI=$I();const OI=bl(BI),_x=d.createContext(null),AI=_x.Provider,Lx=d.createContext(null),FI=Lx.Provider;var PI=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Hx=fn(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,u=e.defaultChecked,s=u===void 0?!1:u,c=e.type,p=c===void 0?"checkbox":c,f=e.title,h=e.onChange,v=bt(e,PI),g=qe(null),m=qe(null),b=Vr(s,{value:i}),y=he(b,2),C=y[0],w=y[1];ni(t,function(){return{focus:function(k){var x;(x=g.current)===null||x===void 0||x.focus(k)},blur:function(){var k;(k=g.current)===null||k===void 0||k.blur()},input:g.current,nativeElement:m.current}});var E=ve(n,o,M(M({},"".concat(n,"-checked"),C),"".concat(n,"-disabled"),l)),D=function(k){l||("checked"in e||w(k.target.checked),h==null||h({target:K(K({},e),{},{type:p,checked:k.target.checked}),stopPropagation:function(){k.stopPropagation()},preventDefault:function(){k.preventDefault()},nativeEvent:k.nativeEvent}))};return d.createElement("span",{className:E,title:f,style:a,ref:m},d.createElement("input",ze({},v,{className:"".concat(n,"-input"),ref:g,onChange:D,disabled:l,checked:!!C,type:p})),d.createElement("span",{className:"".concat(n,"-inner")}))});function Wx(e){const t=oe.useRef(null),r=()=>{Xt.cancel(t.current),t.current=null};return[()=>{r(),t.current=Xt(()=>{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({},Sr(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:u,colorBorder:s,lineWidth:c,colorBgContainerDisabled:p,colorTextDisabled:f,paddingXS:h,dotColorDisabled:v,lineType:g,radioColor:m,radioBgColor:b,calc:y}=e,C=`${t}-inner`,w=y(o).sub(y(4).mul(2)),E=y(1).mul(o).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},Sr(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:`${ce(c)} ${g} ${n}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},Sr(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:E,height:E,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:E,transform:"scale(0)",opacity:0,transition:`all ${a} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:E,height:E,backgroundColor:u,borderColor:s,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:p,borderColor:s,cursor:"not-allowed","&::after":{backgroundColor:v}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:f,cursor:"not-allowed"},[`&${t}-checked`]:{[C]:{"&::after":{transform:`scale(${y(w).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},II=e=>{const{buttonColor:t,controlHeight:r,componentCls:n,lineWidth:o,lineType:a,colorBorder:i,motionDurationMid:l,buttonPaddingInline:u,fontSize:s,buttonBg:c,fontSizeLG:p,controlHeightLG:f,controlHeightSM:h,paddingXS:v,borderRadius:g,borderRadiusSM:m,borderRadiusLG:b,buttonCheckedBg:y,buttonSolidCheckedColor:C,colorTextDisabled:w,colorBgContainerDisabled:E,buttonCheckedBgDisabled:D,buttonCheckedColorDisabled:k,colorPrimary:x,colorPrimaryHover:O,colorPrimaryActive:j,buttonSolidCheckedBg:B,buttonSolidCheckedHoverBg:N,buttonSolidCheckedActiveBg:A,calc:S}=e;return{[`${n}-button-wrapper`]:{position:"relative",display:"inline-block",height:r,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:s,lineHeight:ce(S(r).sub(S(o).mul(2)).equal()),background:c,border:`${ce(o)} ${a} ${i}`,borderBlockStartWidth:S(o).add(.02).equal(),borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${n}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:S(o).mul(-1).equal()},"&:first-child":{borderInlineStart:`${ce(o)} ${a} ${i}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${n}-group-large &`]:{height:f,fontSize:p,lineHeight:ce(S(f).sub(S(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},[`${n}-group-small &`]:{height:h,paddingInline:S(v).sub(o).equal(),paddingBlock:0,lineHeight:ce(S(h).sub(S(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m}},"&:hover":{position:"relative",color:x},"&: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:x,background:y,borderColor:x,"&::before":{backgroundColor:x},"&:first-child":{borderColor:x},"&:hover":{color:O,borderColor:O,"&::before":{backgroundColor:O}},"&:active":{color:j,borderColor:j,"&::before":{backgroundColor:j}}},[`${n}-group-solid &-checked:not(${n}-button-wrapper-disabled)`]:{color:C,background:B,borderColor:B,"&:hover":{color:C,background:N,borderColor:N},"&:active":{color:C,background:A,borderColor:A}},"&-disabled":{color:w,backgroundColor:E,borderColor:i,cursor:"not-allowed","&:first-child, &:hover":{color:w,backgroundColor:E,borderColor:i}},[`&-disabled${n}-button-wrapper-checked`]:{color:k,backgroundColor:D,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:u,controlItemBgActiveDisabled:s,colorTextLightSolid:c,colorPrimary:p,colorPrimaryHover:f,colorPrimaryActive:h,colorWhite:v}=e,g=4,m=a,b=t?m-g*2:m-(g+o)*2;return{radioSize:m,dotSize:b,dotColorDisabled:u,buttonSolidCheckedColor:c,buttonSolidCheckedBg:p,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:h,buttonBg:l,buttonCheckedBg:l,buttonColor:i,buttonCheckedBgDisabled:s,buttonCheckedColorDisabled:u,buttonPaddingInline:r-o,wrapperMarginInlineEnd:n,radioColor:t?p:v,radioBgColor:t?l:p}},Kx=Lr("Radio",e=>{const{controlOutline:t,controlOutlineWidth:r}=e,n=`0 0 0 ${ce(r)} ${t}`,o=tr(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(_x),a=d.useContext(Lx),{getPrefixCls:i,direction:l,radio:u}=d.useContext(Qt),s=d.useRef(null),c=to(t,s),{isFormItemInput:p}=d.useContext(oa),f=P=>{var F,I;(F=e.onChange)===null||F===void 0||F.call(e,P),(I=o==null?void 0:o.onChange)===null||I===void 0||I.call(o,P)},{prefixCls:h,className:v,rootClassName:g,children:m,style:b,title:y}=e,C=TI(e,["prefixCls","className","rootClassName","children","style","title"]),w=i("radio",h),E=((o==null?void 0:o.optionType)||a)==="button",D=E?`${w}-button`:w,k=go(w),[x,O,j]=Kx(w,k),B=Object.assign({},C),N=d.useContext(Po);o&&(B.name=o.name,B.onChange=f,B.checked=e.value===o.value,B.disabled=(r=B.disabled)!==null&&r!==void 0?r:o.disabled),B.disabled=(n=B.disabled)!==null&&n!==void 0?n:N;const A=ve(`${D}-wrapper`,{[`${D}-wrapper-checked`]:B.checked,[`${D}-wrapper-disabled`]:B.disabled,[`${D}-wrapper-rtl`]:l==="rtl",[`${D}-wrapper-in-form-item`]:p,[`${D}-wrapper-block`]:!!(o!=null&&o.block)},u==null?void 0:u.className,v,g,O,j,k),[S,$]=Wx(B.onClick);return x(d.createElement(qp,{component:"Radio",disabled:B.disabled},d.createElement("label",{className:A,style:Object.assign(Object.assign({},u==null?void 0:u.style),b),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:y,onClick:S},d.createElement(Hx,Object.assign({},B,{className:ve(B.className,{[Su]:!E}),type:"radio",prefixCls:D,ref:c,onClick:$})),m!==void 0?d.createElement("span",{className:`${D}-label`},m):null)))},eu=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(Qt),{name:o}=d.useContext(oa),a=em(_I(o)),{prefixCls:i,className:l,rootClassName:u,options:s,buttonStyle:c="outline",disabled:p,children:f,size:h,style:v,id:g,optionType:m,name:b=a,defaultValue:y,value:C,block:w=!1,onChange:E,onMouseEnter:D,onMouseLeave:k,onFocus:x,onBlur:O}=e,[j,B]=Vr(y,{value:C}),N=d.useCallback(V=>{const Z=j,J=V.target.value;"value"in e||B(J),J!==Z&&(E==null||E(V))},[j,B,E]),A=r("radio",i),S=`${A}-group`,$=go(A),[P,F,I]=Kx(A,$);let T=f;s&&s.length>0&&(T=s.map(V=>typeof V=="string"||typeof V=="number"?d.createElement(eu,{key:V.toString(),prefixCls:A,disabled:p,value:V,checked:j===V},V):d.createElement(eu,{key:`radio-group-value-options-${V.value}`,prefixCls:A,disabled:V.disabled||p,value:V.value,checked:j===V.value,title:V.title,style:V.style,className:V.className,id:V.id,required:V.required},V.label)));const q=pa(h),L=ve(S,`${S}-${c}`,{[`${S}-${q}`]:q,[`${S}-rtl`]:n==="rtl",[`${S}-block`]:w},l,u,F,I,$),_=d.useMemo(()=>({onChange:N,value:j,disabled:p,name:b,optionType:m,block:w}),[N,j,p,b,m,w]);return P(d.createElement("div",Object.assign({},Jn(e,{aria:!0,data:!0}),{className:L,style:v,onMouseEnter:D,onMouseLeave:k,onFocus:x,onBlur:O,id:g,ref:t}),d.createElement(AI,{value:_},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(Qt),{prefixCls:n}=e,o=WI(e,["prefixCls"]),a=r("radio",n);return d.createElement(FI,{value:"button"},d.createElement(eu,Object.assign({prefixCls:a},o,{type:"radio",ref:t})))},qI=d.forwardRef(KI),Ol=eu;Ol.Button=qI;Ol.Group=HI;Ol.__ANT_RADIO=!0;function mm(e){return tr(e,{inputAffixPadding:e.paddingXXS})}const hm=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:o,controlHeightSM:a,controlHeightLG:i,fontSizeLG:l,lineHeightLG:u,paddingSM:s,controlPaddingHorizontalSM:c,controlPaddingHorizontal:p,colorFillAlter:f,colorPrimaryHover:h,colorPrimary:v,controlOutlineWidth:g,controlOutline:m,colorErrorOutline:b,colorWarningOutline:y,colorBgContainer:C,inputFontSize:w,inputFontSizeLG:E,inputFontSizeSM:D}=e,k=w||r,x=D||k,O=E||l,j=Math.round((t-k*n)/2*10)/10-o,B=Math.round((a-x*n)/2*10)/10-o,N=Math.ceil((i-O*u)/2*10)/10-o;return{paddingBlock:Math.max(j,0),paddingBlockSM:Math.max(B,0),paddingBlockLG:Math.max(N,0),paddingInline:s-o,paddingInlineSM:c-o,paddingInlineLG:p-o,addonBg:f,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:k,inputFontSizeLG:O,inputFontSizeSM:x}},VI=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Hu=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(tr(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),gm=(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}}),j0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},gm(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),XI=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},gm(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Hu(e))}),j0(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),j0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),I0=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),UI=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ce(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},I0(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),I0(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},Hu(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)}},qx=(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}}},R0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},qx(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({},qx(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Hu(e))}),R0(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),R0(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),T0=(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"}}},T0(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),T0(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:`${ce(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ce(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ce(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ce(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ce(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ce(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),Vx=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ce(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}}),M0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Vx(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({},Vx(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"}}),M0(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),M0(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"}}),Xx=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:o}=e;return{padding:`${ce(t)} ${ce(o)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},vm=e=>({padding:`${ce(e.paddingBlockSM)} ${ce(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),bm=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ce(e.paddingBlock)} ${ce(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},QI(e.colorTextPlaceholder)),{"&-lg":Object.assign({},Xx(e)),"&-sm":Object.assign({},vm(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({},Xx(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},vm(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 ${ce(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${ce(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ce(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:`${ce(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${r}-cascader-picker`]:{margin:`-9px ${ce(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"},Ks()),{[`${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({},Sr(e)),bm(e)),XI(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 ${ce(e.inputAffixPadding)}`}}}},nR=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:o,colorIcon:a,colorIconHover:i,iconCls:l}=e,u=`${t}-affix-wrapper`,s=`${t}-affix-wrapper-disabled`;return{[u]:Object.assign(Object.assign(Object.assign(Object.assign({},bm(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},[s]:{[`${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({},Sr(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}}},UI(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]:{"&:not([disabled]):hover, &:not([disabled]):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,"&:not([disabled]):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=Lr(["Input","Shared"],e=>{const t=tr(e,mm(e));return[tR(t),nR(t)]},hm,{resetFont:!1}),sR=Lr(["Input","Component"],e=>{const t=tr(e,mm(e));return[oR(t),aR(t),iR(t),Qp(t)]},hm,{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,u=n.debounceMode,s=u===void 0?void 0:u,c,p=!1,f=0;function h(){c&&clearTimeout(c)}function v(m){var b=m||{},y=b.upcomingOnly,C=y===void 0?!1:y;h(),p=!C}function g(){for(var m=arguments.length,b=new Array(m),y=0;y<m;y++)b[y]=arguments[y];var C=this,w=Date.now()-f;if(p)return;function E(){f=Date.now(),t.apply(C,b)}function D(){c=void 0}!l&&s&&!c&&E(),h(),s===void 0&&w>e?l?(f=Date.now(),a||(c=setTimeout(s?D:E,e))):E():a!==!0&&(c=setTimeout(s?D:E,s===void 0?e-w: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 cn(e,t){return e[t]}var dR=["children"];function Ux(e,t){return"".concat(e,"-").concat(t)}function fR(e){return e&&e.type&&e.type.isTreeNode}function Al(e,t){return e??t}function ti(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 Gx(e){function t(r){var n=_n(r);return n.map(function(o){if(!fR(o))return ur(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,i=o.props,l=i.children,u=bt(i,dR),s=K({key:a},u),c=t(l);return c.length&&(s.children=c),s}).filter(function(o){return o})}return t(e)}function ed(e,t,r){var n=ti(r),o=n._title,a=n.key,i=n.children,l=new Set(t===!0?[]:t),u=[];function s(c){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(f,h){for(var v=Ux(p?p.pos:"0",h),g=Al(f[a],v),m,b=0;b<o.length;b+=1){var y=o[b];if(f[y]!==void 0){m=f[y];break}}var C=Object.assign(pn(f,[].concat(Ie(o),[a,i])),{title:m,key:g,parent:p,pos:v,children:null,data:f,isStart:[].concat(Ie(p?p.isStart:[]),[h===0]),isEnd:[].concat(Ie(p?p.isEnd:[]),[h===c.length-1])});return u.push(C),t===!0||l.has(g)?C.children=s(f[i]||[],C):C.children=[],C})}return s(e),u}function pR(e,t,r){var n={};it(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,i=o.externalGetKey,l=o.fieldNames,u=ti(l),s=u.key,c=u.children,p=a||c,f;i?typeof i=="string"?f=function(v){return v[i]}:typeof i=="function"&&(f=function(v){return i(v)}):f=function(v,g){return Al(v[s],g)};function h(v,g,m,b){var y=v?v[p]:e,C=v?Ux(m.pos,g):"0",w=v?[].concat(Ie(b),[v]):[];if(v){var E=f(v,C),D={node:v,index:g,pos:C,key:E,parentPos:m.node?m.pos:null,level:m.level+1,nodes:w};t(D)}y&&y.forEach(function(k,x){h(k,x,{node:v,pos:C,level:m?m.level+1:-1},w)})}h(null)}function ym(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,u=arguments.length>2?arguments[2]:void 0,s=a||u,c={},p={},f={posEntities:c,keyEntities:p};return r&&(f=r(f)||f),pR(e,function(h){var v=h.node,g=h.index,m=h.pos,b=h.key,y=h.parentPos,C=h.level,w=h.nodes,E={node:v,nodes:w,index:g,key:b,pos:m,level:C},D=Al(b,m);c[m]=E,p[D]=E,E.parent=c[y],E.parent&&(E.parent.children=E.parent.children||[],E.parent.children.push(E)),n&&n(E,f)},{externalGetKey:s,childrenPropName:i,fieldNames:l}),o&&o(f),f}function Li(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,i=t.checkedKeys,l=t.halfCheckedKeys,u=t.dragOverNodeKey,s=t.dropPosition,c=t.keyEntities,p=cn(c,e),f={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(p?p.pos:""),dragOver:u===e&&s===0,dragOverGapTop:u===e&&s===-1,dragOverGapBottom:u===e&&s===1};return f}function yr(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,i=e.loading,l=e.halfChecked,u=e.dragOver,s=e.dragOverGapTop,c=e.dragOverGapBottom,p=e.pos,f=e.active,h=e.eventKey,v=K(K({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:i,halfChecked:l,dragOver:u,dragOverGapTop:s,dragOverGapBottom:c,pos:p,active:f,key:h});return"props"in v||Object.defineProperty(v,"props",{get:function(){return ur(!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 Yx(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(p){var f=p.key,h=p.node,v=p.children,g=v===void 0?[]:v;o.has(f)&&!n(h)&&g.filter(function(m){return!n(m.node)}).forEach(function(m){o.add(m.key)})})}for(var u=new Set,s=r;s>=0;s-=1){var c=t.get(s)||new Set;c.forEach(function(p){var f=p.parent,h=p.node;if(!(n(h)||!p.parent||u.has(p.parent.key))){if(n(p.parent.node)){u.add(f.key);return}var v=!0,g=!1;(f.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(f.key),g&&a.add(f.key),u.add(f.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(Yx(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 u=r.get(l)||new Set;u.forEach(function(f){var h=f.key,v=f.node,g=f.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 s=new Set,c=n;c>=0;c-=1){var p=r.get(c)||new Set;p.forEach(function(f){var h=f.parent,v=f.node;if(!(o(v)||!f.parent||s.has(f.parent.key))){if(o(f.parent.node)){s.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),s.add(h.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(Yx(i,a))}}function Ta(e,t,r,n){var o=[],a;n?a=n:a=mR;var i=new Set(e.filter(function(c){var p=!!cn(r,c);return p||o.push(c),p})),l=new Map,u=0;Object.keys(r).forEach(function(c){var p=r[c],f=p.level,h=l.get(f);h||(h=new Set,l.set(f,h)),h.add(p),u=Math.max(u,f)}),ur(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var s;return t===!0?s=hR(i,l,u,a):s=gR(i,t.halfCheckedKeys,l,u,a),s}const vR=e=>{const{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},Sr(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},Sr(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({},Sr(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:`${ce(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:`${ce(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 Zx(e,t){const r=tr(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return vR(r)}const Jx=Lr("Checkbox",(e,{prefixCls:t})=>[Zx(t,e)]),Qx=oe.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:u,onMouseEnter:s,onMouseLeave:c,skipGroup:p=!1,disabled:f}=e,h=bR(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:v,direction:g,checkbox:m}=d.useContext(Qt),b=d.useContext(Qx),{isFormItemInput:y}=d.useContext(oa),C=d.useContext(Po),w=(r=(b==null?void 0:b.disabled)||f)!==null&&r!==void 0?r:C,E=d.useRef(h.value),D=d.useRef(null),k=to(t,D);d.useEffect(()=>{b==null||b.registerValue(h.value)},[]),d.useEffect(()=>{if(!p)return h.value!==E.current&&(b==null||b.cancelValue(E.current),b==null||b.registerValue(h.value),E.current=h.value),()=>b==null?void 0:b.cancelValue(h.value)},[h.value]),d.useEffect(()=>{var I;!((I=D.current)===null||I===void 0)&&I.input&&(D.current.input.indeterminate=l)},[l]);const x=v("checkbox",n),O=go(x),[j,B,N]=Jx(x,O),A=Object.assign({},h);b&&!p&&(A.onChange=(...I)=>{h.onChange&&h.onChange.apply(h,I),b.toggleOption&&b.toggleOption({label:i,value:h.value})},A.name=b.name,A.checked=b.value.includes(h.value));const S=ve(`${x}-wrapper`,{[`${x}-rtl`]:g==="rtl",[`${x}-wrapper-checked`]:A.checked,[`${x}-wrapper-disabled`]:w,[`${x}-wrapper-in-form-item`]:y},m==null?void 0:m.className,o,a,N,O,B),$=ve({[`${x}-indeterminate`]:l},Su,B),[P,F]=Wx(A.onClick);return j(d.createElement(qp,{component:"Checkbox",disabled:w},d.createElement("label",{className:S,style:Object.assign(Object.assign({},m==null?void 0:m.style),u),onMouseEnter:s,onMouseLeave:c,onClick:P},d.createElement(Hx,Object.assign({},A,{onClick:F,prefixCls:x,className:$,disabled:w,ref:k})),i!=null&&d.createElement("span",{className:`${x}-label`},i))))},ew=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:u,onChange:s}=e,c=CR(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:p,direction:f}=d.useContext(Qt),[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($=>typeof $=="string"||typeof $=="number"?{label:$,value:$}:$),[o]),y=$=>{m(P=>P.filter(F=>F!==$))},C=$=>{m(P=>[].concat(Ie(P),[$]))},w=$=>{const P=h.indexOf($.value),F=Ie(h);P===-1?F.push($.value):F.splice(P,1),"value"in c||v(F),s==null||s(F.filter(I=>g.includes(I)).sort((I,T)=>{const q=b.findIndex(_=>_.value===I),L=b.findIndex(_=>_.value===T);return q-L}))},E=p("checkbox",a),D=`${E}-group`,k=go(E),[x,O,j]=Jx(E,k),B=pn(c,["value","disabled"]),N=o.length?b.map($=>d.createElement(ew,{prefixCls:E,key:$.value.toString(),disabled:"disabled"in $?$.disabled:c.disabled,value:$.value,checked:h.includes($.value),onChange:$.onChange,className:ve(`${D}-item`,$.className),style:$.style,title:$.title,id:$.id,required:$.required},$.label)):n,A=d.useMemo(()=>({toggleOption:w,value:h,disabled:c.disabled,name:c.name,registerValue:C,cancelValue:y}),[w,h,c.disabled,c.name,C,y]),S=ve(D,{[`${D}-rtl`]:f==="rtl"},i,l,j,k,O);return x(d.createElement("div",Object.assign({className:S,style:u},B,{ref:t}),d.createElement(Qx.Provider,{value:A},N)))}),ri=ew;ri.Group=xR;ri.__ANT_CHECKBOX=!0;function wR(e){return!!(e.addonBefore||e.addonAfter)}function ER(e){return!!(e.prefix||e.suffix||e.allowClear)}function z0(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 _0(e,t,r,n){if(r){var o=t;if(t.type==="click"){o=z0(t,e,""),r(o);return}if(e.type!=="file"&&n!==void 0){o=z0(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=oe.forwardRef(function(e,t){var r,n,o,a=e.inputElement,i=e.children,l=e.prefixCls,u=e.prefix,s=e.suffix,c=e.addonBefore,p=e.addonAfter,f=e.className,h=e.style,v=e.disabled,g=e.readOnly,m=e.focused,b=e.triggerFocus,y=e.allowClear,C=e.value,w=e.handleReset,E=e.hidden,D=e.classes,k=e.classNames,x=e.dataAttrs,O=e.styles,j=e.components,B=e.onClear,N=i??a,A=(j==null?void 0:j.affixWrapper)||"span",S=(j==null?void 0:j.groupWrapper)||"span",$=(j==null?void 0:j.wrapper)||"span",P=(j==null?void 0:j.groupAddon)||"span",F=qe(null),I=function(ae){var re;(re=F.current)!==null&&re!==void 0&&re.contains(ae.target)&&(b==null||b())},T=ER(e),q=qw(N,{value:C,className:ve((r=N.props)===null||r===void 0?void 0:r.className,!T&&(k==null?void 0:k.variant))||null}),L=qe(null);if(oe.useImperativeHandle(t,function(){return{nativeElement:L.current||F.current}}),T){var _=null;if(y){var V=!v&&!g&&C,Z="".concat(l,"-clear-icon"),J=it(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"\u2716";_=oe.createElement("button",{type:"button",tabIndex:-1,onClick:function(ae){w==null||w(ae),B==null||B()},onMouseDown:function(ae){return ae.preventDefault()},className:ve(Z,M(M({},"".concat(Z,"-hidden"),!V),"".concat(Z,"-has-suffix"),!!s))},J)}var z="".concat(l,"-affix-wrapper"),Y=ve(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"),s&&y&&C),D==null?void 0:D.affixWrapper,k==null?void 0:k.affixWrapper,k==null?void 0:k.variant),G=(s||y)&&oe.createElement("span",{className:ve("".concat(l,"-suffix"),k==null?void 0:k.suffix),style:O==null?void 0:O.suffix},_,s);q=oe.createElement(A,ze({className:Y,style:O==null?void 0:O.affixWrapper,onClick:I},x==null?void 0:x.affixWrapper,{ref:F}),u&&oe.createElement("span",{className:ve("".concat(l,"-prefix"),k==null?void 0:k.prefix),style:O==null?void 0:O.prefix},u),q,G)}if(wR(e)){var X="".concat(l,"-group"),W="".concat(X,"-addon"),H="".concat(X,"-wrapper"),ne=ve("".concat(l,"-wrapper"),X,D==null?void 0:D.wrapper,k==null?void 0:k.wrapper),U=ve(H,M({},"".concat(H,"-disabled"),v),D==null?void 0:D.group,k==null?void 0:k.groupWrapper);q=oe.createElement(S,{className:U,ref:L},oe.createElement($,{className:ne},c&&oe.createElement(P,{className:W},c),q,p&&oe.createElement(P,{className:W},p)))}return oe.cloneElement(q,{className:ve((n=q.props)===null||n===void 0?void 0:n.className,f)||null,style:K(K({},(o=q.props)===null||o===void 0?void 0:o.style),h),hidden:E})}),SR=["show"];function $R(e,t){return d.useMemo(function(){var r={};t&&(r.show=it(t)==="object"&&t.formatter?t.formatter:!!t),r=K(K({},r),e);var n=r,o=n.show,a=bt(n,SR);return K(K({},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=fn(function(e,t){var r=e.autoComplete,n=e.onChange,o=e.onFocus,a=e.onBlur,i=e.onPressEnter,l=e.onKeyDown,u=e.onKeyUp,s=e.prefixCls,c=s===void 0?"rc-input":s,p=e.disabled,f=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,w=e.classes,E=e.classNames,D=e.styles,k=e.onCompositionStart,x=e.onCompositionEnd,O=bt(e,BR),j=xt(!1),B=he(j,2),N=B[0],A=B[1],S=qe(!1),$=qe(!1),P=qe(null),F=qe(null),I=function(me){P.current&&kR(P.current,me)},T=Vr(e.defaultValue,{value:e.value}),q=he(T,2),L=q[0],_=q[1],V=L==null?"":String(L),Z=xt(null),J=he(Z,2),z=J[0],Y=J[1],G=$R(b,m),X=G.max||v,W=G.strategy(V),H=!!X&&W>X;ni(t,function(){var me;return{focus:I,blur:function(){var Ee;(Ee=P.current)===null||Ee===void 0||Ee.blur()},setSelectionRange:function(Ee,je,Be){var Ye;(Ye=P.current)===null||Ye===void 0||Ye.setSelectionRange(Ee,je,Be)},select:function(){var Ee;(Ee=P.current)===null||Ee===void 0||Ee.select()},input:P.current,nativeElement:((me=F.current)===null||me===void 0?void 0:me.nativeElement)||P.current}}),Bt(function(){$.current&&($.current=!1),A(function(me){return me&&p?!1:me})},[p]);var ne=function(me,Ee,je){var Be=Ee;if(!S.current&&G.exceedFormatter&&G.max&&G.strategy(Ee)>G.max){if(Be=G.exceedFormatter(Ee,{max:G.max}),Ee!==Be){var Ye,Re;Y([((Ye=P.current)===null||Ye===void 0?void 0:Ye.selectionStart)||0,((Re=P.current)===null||Re===void 0?void 0:Re.selectionEnd)||0])}}else if(je.source==="compositionEnd")return;_(Be),P.current&&_0(P.current,me,n,Be)};Bt(function(){if(z){var me;(me=P.current)===null||me===void 0||me.setSelectionRange.apply(me,Ie(z))}},[z]);var U=function(me){ne(me,me.target.value,{source:"change"})},ae=function(me){S.current=!1,ne(me,me.currentTarget.value,{source:"compositionEnd"}),x==null||x(me)},re=function(me){i&&me.key==="Enter"&&!$.current&&($.current=!0,i(me)),l==null||l(me)},de=function(me){me.key==="Enter"&&($.current=!1),u==null||u(me)},ge=function(me){A(!0),o==null||o(me)},ye=function(me){$.current&&($.current=!1),A(!1),a==null||a(me)},Ne=function(me){_(""),I(),P.current&&_0(P.current,me,n)},xe=H&&"".concat(c,"-out-of-range"),be=function(){var me=pn(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return oe.createElement("input",ze({autoComplete:r},me,{onChange:U,onFocus:ge,onBlur:ye,onKeyDown:re,onKeyUp:de,className:ve(c,M({},"".concat(c,"-disabled"),p),E==null?void 0:E.input),style:D==null?void 0:D.input,ref:P,size:f,type:C,onCompositionStart:function(Ee){S.current=!0,k==null||k(Ee)},onCompositionEnd:ae}))},Ae=function(){var me=Number(X)>0;if(g||G.show){var Ee=G.showFormatter?G.showFormatter({value:V,count:W,maxLength:X}):"".concat(W).concat(me?" / ".concat(X):"");return oe.createElement(oe.Fragment,null,G.show&&oe.createElement("span",{className:ve("".concat(c,"-show-count-suffix"),M({},"".concat(c,"-show-count-has-suffix"),!!g),E==null?void 0:E.count),style:K({},D==null?void 0:D.count)},Ee),g)}return null};return oe.createElement(DR,ze({},O,{prefixCls:c,className:ve(h,xe),handleReset:Ne,value:V,focused:N,triggerFocus:I,suffix:Ae(),disabled:p,classes:w,classNames:E,styles:D,ref:F}),be())});const AR=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:oe.createElement(gC,null)}),t};function FR(e,t){const r=qe([]),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 Bt(()=>(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=fn((e,t)=>{const{prefixCls:r,bordered:n=!0,status:o,size:a,disabled:i,onBlur:l,onFocus:u,suffix:s,allowClear:c,addonAfter:p,addonBefore:f,className:h,style:v,styles:g,rootClassName:m,onChange:b,classNames:y,variant:C}=e,w=NR(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:E,direction:D,allowClear:k,autoComplete:x,className:O,style:j,classNames:B,styles:N}=Ro("input"),A=E("input",r),S=qe(null),$=go(A),[P,F,I]=lR(A,m),[T]=sR(A,$),{compactSize:q,compactItemClassnames:L}=Bu(A,D),_=pa(ye=>{var Ne;return(Ne=a??q)!==null&&Ne!==void 0?Ne:ye}),V=oe.useContext(Po),Z=i??V,{status:J,hasFeedback:z,feedbackIcon:Y}=Rr(oa),G=tx(J,o),X=PR(e)||!!z;qe(X);const W=FR(S),H=ye=>{W(),l==null||l(ye)},ne=ye=>{W(),u==null||u(ye)},U=ye=>{W(),b==null||b(ye)},ae=(z||s)&&oe.createElement(oe.Fragment,null,s,z&&Y),re=AR(c??k),[de,ge]=ax("input",C,n);return P(T(oe.createElement(OR,Object.assign({ref:to(t,S),prefixCls:A,autoComplete:x},w,{disabled:Z,onBlur:H,onFocus:ne,style:Object.assign(Object.assign({},j),v),styles:Object.assign(Object.assign({},N),g),suffix:ae,allowClear:re,className:ve(h,m,I,$,L,O),onChange:U,addonBefore:f&&oe.createElement(pl,{form:!0,space:!0},f),addonAfter:p&&oe.createElement(pl,{form:!0,space:!0},p),classNames:Object.assign(Object.assign(Object.assign({},y),B),{input:ve({[`${A}-sm`]:_==="small",[`${A}-lg`]:_==="large",[`${A}-rtl`]:D==="rtl"},y==null?void 0:y.input,B.input,F),variant:ve({[`${A}-${de}`]:ge},If(A,G)),affixWrapper:ve({[`${A}-affix-wrapper-sm`]:_==="small",[`${A}-affix-wrapper-lg`]:_==="large",[`${A}-affix-wrapper-rtl`]:D==="rtl"},F),wrapper:ve({[`${A}-group-rtl`]:D==="rtl"},F),groupWrapper:ve({[`${A}-group-wrapper-sm`]:_==="small",[`${A}-group-wrapper-lg`]:_==="large",[`${A}-group-wrapper-rtl`]:D==="rtl",[`${A}-group-wrapper-${de}`]:ge},If(`${A}-group-wrapper`,G,z),F)})}))))});function L0(e){return["small","middle","large"].includes(e)}function H0(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const tw=oe.createContext({latestIndex:0}),IR=tw.Provider,RR=({className:e,index:t,children:r,split:n,style:o})=>{const{latestIndex:a}=d.useContext(tw);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:u,styles:s}=Ro("space"),{size:c=a??"small",align:p,className:f,rootClassName:h,children:v,direction:g="horizontal",prefixCls:m,split:b,style:y,wrap:C=!1,classNames:w,styles:E}=e,D=TR(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[k,x]=Array.isArray(c)?c:[c,c],O=L0(x),j=L0(k),B=H0(x),N=H0(k),A=_n(v,{keepEmpty:!0}),S=p===void 0&&g==="horizontal"?"center":p,$=n("space",m),[P,F,I]=EC($),T=ve($,i,F,`${$}-${g}`,{[`${$}-rtl`]:o==="rtl",[`${$}-align-${S}`]:S,[`${$}-gap-row-${x}`]:O,[`${$}-gap-col-${k}`]:j},f,h,I),q=ve(`${$}-item`,(r=w==null?void 0:w.item)!==null&&r!==void 0?r:u.item);let L=0;const _=A.map((J,z)=>{var Y;J!=null&&(L=z);const G=(J==null?void 0:J.key)||`${q}-${z}`;return d.createElement(RR,{className:q,key:G,index:z,split:b,style:(Y=E==null?void 0:E.item)!==null&&Y!==void 0?Y:s.item},J)}),V=d.useMemo(()=>({latestIndex:L}),[L]);if(A.length===0)return null;const Z={};return C&&(Z.flexWrap="wrap"),!j&&N&&(Z.columnGap=k),!O&&B&&(Z.rowGap=x),P(d.createElement("div",Object.assign({ref:t,className:T,style:Object.assign(Object.assign(Object.assign({},Z),l),y)},D),d.createElement(IR,{value:V},_)))}),rw=MR;rw.Compact=i3;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 nw=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=d.useContext(Qt),{prefixCls:o,type:a="default",danger:i,disabled:l,loading:u,onClick:s,htmlType:c,children:p,className:f,menu:h,arrow:v,autoFocus:g,overlay:m,trigger:b,align:y,open:C,onOpenChange:w,placement:E,getPopupContainer:D,href:k,icon:x=d.createElement(Ix,null),title:O,buttonsRender:j=W=>W,mouseEnterDelay:B,mouseLeaveDelay:N,overlayClassName:A,overlayStyle:S,destroyOnHidden:$,destroyPopupOnHide:P,dropdownRender:F,popupRender:I}=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"]),q=r("dropdown",o),L=`${q}-button`,_={menu:h,arrow:v,autoFocus:g,align:y,disabled:l,trigger:l?[]:b,onOpenChange:w,getPopupContainer:D||t,mouseEnterDelay:B,mouseLeaveDelay:N,overlayClassName:A,overlayStyle:S,destroyOnHidden:$,popupRender:I||F},{compactSize:V,compactItemClassnames:Z}=Bu(q,n),J=ve(L,Z,f);"destroyPopupOnHide"in e&&(_.destroyPopupOnHide=P),"overlay"in e&&(_.overlay=m),"open"in e&&(_.open=C),"placement"in e?_.placement=E:_.placement=n==="rtl"?"bottomLeft":"bottomRight";const z=d.createElement(Qa,{type:a,danger:i,disabled:l,loading:u,onClick:s,htmlType:c,href:k,title:O},p),Y=d.createElement(Qa,{type:a,danger:i,icon:x}),[G,X]=j([z,Y]);return d.createElement(rw.Compact,Object.assign({className:J,size:V,block:!0},T),G,d.createElement(Lu,Object.assign({},_),X))};nw.__ANT_BUTTON=!0;const Cm=Lu;Cm.Button=nw;function W0(e,t,r,n){var o=Wi.unstable_batchedUpdates?function(a){Wi.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(cr,ze({},e,{ref:t,icon:_R}))},K0=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(cr,ze({},e,{ref:t,icon:HR}))},q0=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,u=e.rootPrefixCls,s=e.disabled,c=e.buildOptionText,p=e.showSizeChanger,f=e.sizeChangerRender,h=oe.useState(""),v=he(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(B){return"".concat(B," ").concat(n.items_per_page)},C=function(B){m(B.target.value)},w=function(B){i||g===""||(m(""),!(B.relatedTarget&&(B.relatedTarget.className.indexOf("".concat(u,"-item-link"))>=0||B.relatedTarget.className.indexOf("".concat(u,"-item"))>=0))&&(l==null||l(b())))},E=function(B){g!==""&&(B.keyCode===rt.ENTER||B.type==="click")&&(m(""),l==null||l(b()))},D=function(){return r.some(function(B){return B.toString()===a.toString()})?r:r.concat([a]).sort(function(B,N){var A=Number.isNaN(Number(B))?0:Number(B),S=Number.isNaN(Number(N))?0:Number(N);return A-S})},k="".concat(u,"-options");if(!p&&!l)return null;var x=null,O=null,j=null;return p&&f&&(x=f({disabled:s,size:a,onSizeChange:function(B){o==null||o(Number(B))},"aria-label":n.page_size,className:"".concat(k,"-size-changer"),options:D().map(function(B){return{label:y(B),value:B}})})),l&&(i&&(j=typeof i=="boolean"?oe.createElement("button",{type:"button",onClick:E,onKeyUp:E,disabled:s,className:"".concat(k,"-quick-jumper-button")},n.jump_to_confirm):oe.createElement("span",{onClick:E,onKeyUp:E},i)),O=oe.createElement("div",{className:"".concat(k,"-quick-jumper")},n.jump_to,oe.createElement("input",{disabled:s,type:"text",value:g,onChange:C,onKeyUp:E,onBlur:w,"aria-label":n.page}),n.page,j)),oe.createElement("li",{className:k},x,O)},Di=function(e){var t=e.rootPrefixCls,r=e.page,n=e.active,o=e.className,a=e.showTitle,i=e.onClick,l=e.onKeyPress,u=e.itemRender,s="".concat(t,"-item"),c=ve(s,"".concat(s,"-").concat(r),M(M({},"".concat(s,"-active"),n),"".concat(s,"-disabled"),!r),o),p=function(){i(r)},f=function(v){l(v,i,r)},h=u(r,"page",oe.createElement("a",{rel:"nofollow"},r));return h?oe.createElement("li",{title:a?String(r):null,className:c,onClick:p,onKeyDown:f,tabIndex:0},h):null},XR=function(e,t,r){return r};function V0(){}function X0(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 UR=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,u=l===void 0?1:l,s=e.total,c=s===void 0?0:s,p=e.pageSize,f=e.defaultPageSize,h=f===void 0?10:f,v=e.onChange,g=v===void 0?V0:v,m=e.hideOnSinglePage,b=e.align,y=e.showPrevNextJumpers,C=y===void 0?!0:y,w=e.showQuickJumper,E=e.showLessItems,D=e.showTitle,k=D===void 0?!0:D,x=e.onShowSizeChange,O=x===void 0?V0:x,j=e.locale,B=j===void 0?KR:j,N=e.style,A=e.totalBoundaryShowSizeChanger,S=A===void 0?50:A,$=e.disabled,P=e.simple,F=e.showTotal,I=e.showSizeChanger,T=I===void 0?c>S:I,q=e.sizeChangerRender,L=e.pageSizeOptions,_=e.itemRender,V=_===void 0?XR:_,Z=e.jumpPrevIcon,J=e.jumpNextIcon,z=e.prevIcon,Y=e.nextIcon,G=oe.useRef(null),X=Vr(10,{value:p,defaultValue:h}),W=he(X,2),H=W[0],ne=W[1],U=Vr(1,{value:i,defaultValue:u,postState:function(lt){return Math.max(1,Math.min(lt,zo(void 0,H,c)))}}),ae=he(U,2),re=ae[0],de=ae[1],ge=oe.useState(re),ye=he(ge,2),Ne=ye[0],xe=ye[1];Bt(function(){xe(re)},[re]);var be=Math.max(1,re-(E?3:5)),Ae=Math.min(zo(void 0,H,c),re+(E?3:5));function me(lt,$t){var Ft=lt||oe.createElement("button",{type:"button","aria-label":$t,className:"".concat(r,"-item-link")});return typeof lt=="function"&&(Ft=oe.createElement(lt,K({},e))),Ft}function Ee(lt){var $t=lt.target.value,Ft=zo(void 0,H,c),qt;return $t===""?qt=$t:Number.isNaN(Number($t))?qt=Ne:$t>=Ft?qt=Ft:qt=Number($t),qt}function je(lt){return X0(lt)&&lt!==re&&X0(c)&&c>0}var Be=c>H?w:!1;function Ye(lt){(lt.keyCode===rt.UP||lt.keyCode===rt.DOWN)&&lt.preventDefault()}function Re(lt){var $t=Ee(lt);switch($t!==Ne&&xe($t),lt.keyCode){case rt.ENTER:ke($t);break;case rt.UP:ke($t-1);break;case rt.DOWN:ke($t+1);break}}function Te(lt){ke(Ee(lt))}function ue(lt){var $t=zo(lt,H,c),Ft=re>$t&&$t!==0?$t:re;ne(lt),xe(Ft),O==null||O(re,lt),de(Ft),g==null||g(Ft,lt)}function ke(lt){if(je(lt)&&!$){var $t=zo(void 0,H,c),Ft=lt;return lt>$t?Ft=$t:lt<1&&(Ft=1),Ft!==Ne&&xe(Ft),de(Ft),g==null||g(Ft,H),Ft}return re}var Ke=re>1,Ze=re<zo(void 0,H,c);function We(){Ke&&ke(re-1)}function _e(){Ze&&ke(re+1)}function nt(){ke(be)}function Ue(){ke(Ae)}function et(lt,$t){if(lt.key==="Enter"||lt.charCode===rt.ENTER||lt.keyCode===rt.ENTER){for(var Ft=arguments.length,qt=new Array(Ft>2?Ft-2:0),Br=2;Br<Ft;Br++)qt[Br-2]=arguments[Br];$t.apply(void 0,qt)}}function yt(lt){et(lt,We)}function kt(lt){et(lt,_e)}function dt(lt){et(lt,nt)}function ht(lt){et(lt,Ue)}function Mt(lt){var $t=V(lt,"prev",me(z,"prev page"));return oe.isValidElement($t)?oe.cloneElement($t,{disabled:!Ke}):$t}function Pt(lt){var $t=V(lt,"next",me(Y,"next page"));return oe.isValidElement($t)?oe.cloneElement($t,{disabled:!Ze}):$t}function ft(lt){(lt.type==="click"||lt.keyCode===rt.ENTER)&&ke(Ne)}var ut=null,pe=Jn(e,{aria:!0,data:!0}),Oe=F&&oe.createElement("li",{className:"".concat(r,"-total-text")},F(c,[c===0?0:(re-1)*H+1,re*H>c?c:re*H])),Se=null,Ce=zo(void 0,H,c);if(m&&c<=H)return null;var we=[],fe={rootPrefixCls:r,onClick:ke,onKeyPress:et,showTitle:k,itemRender:V,page:-1},le=re-1>0?re-1:0,ee=re+1<Ce?re+1:Ce,te=w&&w.goButton,se=it(P)==="object"?P.readOnly:!P,Pe=te,ot=null;P&&(te&&(typeof te=="boolean"?Pe=oe.createElement("button",{type:"button",onClick:ft,onKeyUp:ft},B.jump_to_confirm):Pe=oe.createElement("span",{onClick:ft,onKeyUp:ft},te),Pe=oe.createElement("li",{title:k?"".concat(B.jump_to).concat(re,"/").concat(Ce):null,className:"".concat(r,"-simple-pager")},Pe)),ot=oe.createElement("li",{title:k?"".concat(re,"/").concat(Ce):null,className:"".concat(r,"-simple-pager")},se?Ne:oe.createElement("input",{type:"text","aria-label":B.jump_to,value:Ne,disabled:$,onKeyDown:Ye,onKeyUp:Re,onChange:Re,onBlur:Te,size:3}),oe.createElement("span",{className:"".concat(r,"-slash")},"/"),Ce));var He=E?1:2;if(Ce<=3+He*2){Ce||we.push(oe.createElement(Di,ze({},fe,{key:"noPager",page:1,className:"".concat(r,"-item-disabled")})));for(var $e=1;$e<=Ce;$e+=1)we.push(oe.createElement(Di,ze({},fe,{key:$e,page:$e,active:re===$e})))}else{var Xe=E?B.prev_3:B.prev_5,wt=E?B.next_3:B.next_5,St=V(be,"jump-prev",me(Z,"prev page")),Nt=V(Ae,"jump-next",me(J,"next page"));C&&(ut=St?oe.createElement("li",{title:k?Xe:null,key:"prev",onClick:nt,tabIndex:0,onKeyDown:dt,className:ve("".concat(r,"-jump-prev"),M({},"".concat(r,"-jump-prev-custom-icon"),!!Z))},St):null,Se=Nt?oe.createElement("li",{title:k?wt:null,key:"next",onClick:Ue,tabIndex:0,onKeyDown:ht,className:ve("".concat(r,"-jump-next"),M({},"".concat(r,"-jump-next-custom-icon"),!!J))},Nt):null);var Ot=Math.max(1,re-He),jt=Math.min(re+He,Ce);re-1<=He&&(jt=1+He*2),Ce-re<=He&&(Ot=Ce-He*2);for(var ar=Ot;ar<=jt;ar+=1)we.push(oe.createElement(Di,ze({},fe,{key:ar,page:ar,active:re===ar})));if(re-1>=He*2&&re!==3&&(we[0]=oe.cloneElement(we[0],{className:ve("".concat(r,"-item-after-jump-prev"),we[0].props.className)}),we.unshift(ut)),Ce-re>=He*2&&re!==Ce-2){var Le=we[we.length-1];we[we.length-1]=oe.cloneElement(Le,{className:ve("".concat(r,"-item-before-jump-next"),Le.props.className)}),we.push(Se)}Ot!==1&&we.unshift(oe.createElement(Di,ze({},fe,{key:1,page:1}))),jt!==Ce&&we.push(oe.createElement(Di,ze({},fe,{key:Ce,page:Ce})))}var Je=Mt(le);if(Je){var gt=!Ke||!Ce;Je=oe.createElement("li",{title:k?B.prev_page:null,onClick:We,tabIndex:gt?null:0,onKeyDown:yt,className:ve("".concat(r,"-prev"),M({},"".concat(r,"-disabled"),gt)),"aria-disabled":gt},Je)}var pt=Pt(ee);if(pt){var At,mr;P?(At=!Ze,mr=Ke?0:null):(At=!Ze||!Ce,mr=At?null:0),pt=oe.createElement("li",{title:k?B.next_page:null,onClick:_e,tabIndex:mr,onKeyDown:kt,className:ve("".concat(r,"-next"),M({},"".concat(r,"-disabled"),At)),"aria-disabled":At},pt)}var wr=ve(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"),P),"".concat(r,"-disabled"),$));return oe.createElement("ul",ze({className:wr,style:N,ref:G},pe),Oe,Je,P?ot:we,pt,oe.createElement(VR,{locale:B,rootPrefixCls:r,disabled:$,selectPrefixCls:o,changeSize:ue,pageSize:H,pageSizeOptions:L,quickGo:Be?ke:null,goButton:Pe,showSizeChanger:T,sizeChangerRender:q}))};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:ce(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:ce(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:ce(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:ce(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:ce(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:ce(e.itemSizeSM),input:Object.assign(Object.assign({},vm(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},ZR=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:ce(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:ce(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 ${ce(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${ce(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:`${ce(e.inputOutlineOffset)} 0 ${ce(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:ce(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:ce(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{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:ce(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:`${ce(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:ce(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},bm(e)),gm(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},Hu(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:ce(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${ce(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${ce(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}}}}},e8=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Sr(e)),{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"&-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:ce(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"}}},t8=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},dl(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)}}}},ow=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},hm(e)),aw=e=>tr(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"},mm(e)),r8=Lr("Pagination",e=>{const t=aw(e);return[e8(t),t8(t)]},ow),n8=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:`${ce(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}}}}},o8=eC(["Pagination","bordered"],e=>{const t=aw(e);return n8(t)},ow);function U0(e){return Ct(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}var a8=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 iw=e=>{const{align:t,prefixCls:r,selectPrefixCls:n,className:o,rootClassName:a,style:i,size:l,locale:u,responsive:s,showSizeChanger:c,selectComponentClass:p,pageSizeOptions:f}=e,h=a8(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:v}=px(s),[,g]=Gr(),{getPrefixCls:m,direction:b,showSizeChanger:y,className:C,style:w}=Ro("pagination"),E=m("pagination",r),[D,k,x]=r8(E),O=pa(l),j=O==="small"||!!(v&&!O&&s),[B]=wu("Pagination",_1),N=Object.assign(Object.assign({},B),u),[A,S]=U0(c),[$,P]=U0(y),F=A??$,I=S??P,T=p||ui,q=d.useMemo(()=>f?f.map(z=>Number(z)):void 0,[f]),L=z=>{var Y;const{disabled:G,size:X,onSizeChange:W,"aria-label":H,className:ne,options:U}=z,{className:ae,onChange:re}=I||{},de=(Y=U.find(ge=>String(ge.value)===String(X)))===null||Y===void 0?void 0:Y.value;return d.createElement(T,Object.assign({disabled:G,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:ge=>ge.parentNode,"aria-label":H,options:U},I,{value:de,onChange:(ge,ye)=>{W==null||W(ge),re==null||re(ge,ye)},size:j?"small":"middle",className:ve(ne,ae)}))},_=d.useMemo(()=>{const z=d.createElement("span",{className:`${E}-item-ellipsis`},"\u2022\u2022\u2022"),Y=d.createElement("button",{className:`${E}-item-link`,type:"button",tabIndex:-1},b==="rtl"?d.createElement(bf,null):d.createElement(Rf,null)),G=d.createElement("button",{className:`${E}-item-link`,type:"button",tabIndex:-1},b==="rtl"?d.createElement(Rf,null):d.createElement(bf,null)),X=d.createElement("a",{className:`${E}-item-link`},d.createElement("div",{className:`${E}-item-container`},b==="rtl"?d.createElement(q0,{className:`${E}-item-link-icon`}):d.createElement(K0,{className:`${E}-item-link-icon`}),z)),W=d.createElement("a",{className:`${E}-item-link`},d.createElement("div",{className:`${E}-item-container`},b==="rtl"?d.createElement(K0,{className:`${E}-item-link-icon`}):d.createElement(q0,{className:`${E}-item-link-icon`}),z));return{prevIcon:Y,nextIcon:G,jumpPrevIcon:X,jumpNextIcon:W}},[b,E]),V=m("select",n),Z=ve({[`${E}-${t}`]:!!t,[`${E}-mini`]:j,[`${E}-rtl`]:b==="rtl",[`${E}-bordered`]:g.wireframe},C,o,a,k,x),J=Object.assign(Object.assign({},w),i);return D(d.createElement(d.Fragment,null,g.wireframe&&d.createElement(o8,{prefixCls:E}),d.createElement(UR,Object.assign({},_,h,{style:J,prefixCls:E,selectPrefixCls:V,className:Z,locale:N,pageSizeOptions:q,showSizeChanger:F,sizeChangerRender:L}))))},tu=100,lw=tu/5,sw=tu/2-lw/2,td=sw*2*Math.PI,G0=50,Y0=e=>{const{dotClassName:t,style:r,hasCircleCls:n}=e;return d.createElement("circle",{className:ve(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:sw,cx:G0,cy:G0,strokeWidth:lw,style:r})},i8=({percent:e,prefixCls:t})=>{const r=`${t}-dot`,n=`${r}-holder`,o=`${n}-hidden`,[a,i]=d.useState(!1);Kt(()=>{e!==0&&i(!0)},[e!==0]);const l=Math.max(Math.min(e,100),0);if(!a)return null;const u={strokeDashoffset:`${td/4}`,strokeDasharray:`${td*l/100} ${td*(100-l)/100}`};return d.createElement("span",{className:ve(n,`${r}-progress`,l<=0&&o)},d.createElement("svg",{viewBox:`0 0 ${tu} ${tu}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},d.createElement(Y0,{dotClassName:r,hasCircleCls:!0}),d.createElement(Y0,{dotClassName:r,style:u})))};function l8(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:ve(o,r>0&&a)},d.createElement("span",{className:ve(n,`${t}-dot-spin`)},[1,2,3,4].map(i=>d.createElement("i",{className:`${t}-dot-item`,key:i})))),d.createElement(i8,{prefixCls:t,percent:r}))}function s8(e){var t;const{prefixCls:r,indicator:n,percent:o}=e,a=`${r}-dot`;return n&&d.isValidElement(n)?Qn(n,{className:ve((t=n.props)===null||t===void 0?void 0:t.className,a),percent:o}):d.createElement(l8,{prefixCls:r,percent:o})}const u8=new Ut("antSpinMove",{to:{opacity:1}}),c8=new Ut("antRotate",{to:{transform:"rotate(405deg)"}}),d8=e=>{const{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},Sr(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:u8,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:c8,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"}})}},f8=e=>{const{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},p8=Lr("Spin",e=>{const t=tr(e,{spinDotDefault:e.colorTextDescription});return d8(t)},f8),m8=200,Z0=[[30,.05],[70,.03],[96,.01]];function h8(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 u=0;u<Z0.length;u+=1){const[s,c]=Z0[u];if(i<=s)return i+l*c}return i})},m8)),()=>{o.current&&(clearInterval(o.current),o.current=null)}),[a,e]),a?r:t}var g8=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 uw;function v8(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const xm=e=>{var t;const{prefixCls:r,spinning:n=!0,delay:o=0,className:a,rootClassName:i,size:l="default",tip:u,wrapperClassName:s,style:c,children:p,fullscreen:f=!1,indicator:h,percent:v}=e,g=g8(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:m,direction:b,className:y,style:C,indicator:w}=Ro("spin"),E=m("spin",r),[D,k,x]=p8(E),[O,j]=d.useState(()=>n&&!v8(n,o)),B=h8(O,v);d.useEffect(()=>{if(n){const I=cR(o,()=>{j(!0)});return I(),()=>{var T;(T=I==null?void 0:I.cancel)===null||T===void 0||T.call(I)}}j(!1)},[o,n]);const N=d.useMemo(()=>typeof p<"u"&&!f,[p,f]),A=ve(E,y,{[`${E}-sm`]:l==="small",[`${E}-lg`]:l==="large",[`${E}-spinning`]:O,[`${E}-show-text`]:!!u,[`${E}-rtl`]:b==="rtl"},a,!f&&i,k,x),S=ve(`${E}-container`,{[`${E}-blur`]:O}),$=(t=h??w)!==null&&t!==void 0?t:uw,P=Object.assign(Object.assign({},C),c),F=d.createElement("div",Object.assign({},g,{style:P,className:A,"aria-live":"polite","aria-busy":O}),d.createElement(s8,{prefixCls:E,indicator:$,percent:B}),u&&(N||f)?d.createElement("div",{className:`${E}-text`},u):null);return D(N?d.createElement("div",Object.assign({},g,{className:ve(`${E}-nested-loading`,s,k,x)}),O&&d.createElement("div",{key:"loading"},F),d.createElement("div",{className:S,key:"container"},p)):f?d.createElement("div",{className:ve(`${E}-fullscreen`,{[`${E}-fullscreen-show`]:O},i,k,x)},F):F)};xm.setDefaultIndicator=e=>{uw=e};var So={},Fl="rc-table-internal-hook";function wm(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}}),u=he(l,1),s=u[0];return Kt(function(){jb(function(){s.listeners.forEach(function(c){c(o)})})},[o]),d.createElement(t.Provider,{value:s},a)};return{Context:t,Provider:r,defaultValue:e}}function Tr(e,t){var r=nr(typeof t=="function"?t:function(p){if(t===void 0)return p;if(!Array.isArray(t))return p[t];var f={};return t.forEach(function(h){f[h]=p[h]}),f}),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 u=d.useState({}),s=he(u,2),c=s[1];return Kt(function(){if(!n)return;function p(f){var h=r(f);Zn(l.current,h,!0)||c({})}return a.add(p),function(){a.delete(p)}},[n]),l.current}function b8(){var e=d.createContext(null);function t(){return d.useContext(e)}function r(o,a){var i=Yn(o),l=function(u,s){var c=i?{ref:s}:{},p=d.useRef(0),f=d.useRef(u),h=t();return h!==null?d.createElement(o,ze({},u,c)):((!a||a(f.current,u))&&(p.current+=1),f.current=u,d.createElement(e.Provider,{value:p.current},d.createElement(o,ze({},u,c))))};return i?d.forwardRef(l):l}function n(o,a){var i=Yn(o),l=function(u,s){var c=i?{ref:s}:{};return t(),d.createElement(o,ze({},u,c))};return i?d.memo(d.forwardRef(l),a):d.memo(l,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var Em=b8(),cw=Em.makeImmutable,fi=Em.responseImmutable,y8=Em.useImmutableMark,Yr=wm(),dw=d.createContext({renderWithProps:!1}),C8="RC_TABLE_KEY";function x8(e){return e==null?[]:Array.isArray(e)?e:[e]}function Wu(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,i=o.dataIndex,l=a||x8(i).join("-")||C8;r[l];)l="".concat(l,"_next");r[l]=!0,t.push(l)}),t}function Kf(e){return e!=null}function w8(e){return typeof e=="number"&&!Number.isNaN(e)}function E8(e){return e&&it(e)==="object"&&!Array.isArray(e)&&!d.isValidElement(e)}function k8(e,t,r,n,o,a){var i=d.useContext(dw),l=y8(),u=la(function(){if(Kf(n))return[n];var s=t==null||t===""?[]:Array.isArray(t)?t:[t],c=yn(e,s),p=c,f=void 0;if(o){var h=o(c,e,r);E8(h)?(p=h.children,f=h.props,i.renderWithProps=!0):p=h}return[p,f]},[l,e,n,t,o,r],function(s,c){if(a){var p=he(s,2),f=p[1],h=he(c,2),v=h[1];return a(v,f)}return i.renderWithProps?!0:!Zn(s,c,!0)});return u}function D8(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function S8(e,t){return Tr(Yr,function(r){var n=D8(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var $8=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 B8(e){var t,r,n,o,a,i,l,u,s=e.component,c=e.children,p=e.ellipsis,f=e.scope,h=e.prefixCls,v=e.className,g=e.align,m=e.record,b=e.render,y=e.dataIndex,C=e.renderIndex,w=e.shouldCellUpdate,E=e.index,D=e.rowType,k=e.colSpan,x=e.rowSpan,O=e.fixLeft,j=e.fixRight,B=e.firstFixLeft,N=e.lastFixLeft,A=e.firstFixRight,S=e.lastFixRight,$=e.appendNode,P=e.additionalProps,F=P===void 0?{}:P,I=e.isSticky,T="".concat(h,"-cell"),q=Tr(Yr,["supportSticky","allColumnsFixedLeft","rowHoverable"]),L=q.supportSticky,_=q.allColumnsFixedLeft,V=q.rowHoverable,Z=k8(m,y,C,c,b,w),J=he(Z,2),z=J[0],Y=J[1],G={},X=typeof O=="number"&&L,W=typeof j=="number"&&L;X&&(G.position="sticky",G.left=O),W&&(G.position="sticky",G.right=j);var H=(t=(r=(n=Y==null?void 0:Y.colSpan)!==null&&n!==void 0?n:F.colSpan)!==null&&r!==void 0?r:k)!==null&&t!==void 0?t:1,ne=(o=(a=(i=Y==null?void 0:Y.rowSpan)!==null&&i!==void 0?i:F.rowSpan)!==null&&a!==void 0?a:x)!==null&&o!==void 0?o:1,U=S8(E,ne),ae=he(U,2),re=ae[0],de=ae[1],ge=nr(function(Ee){var je;m&&de(E,E+ne-1),F==null||(je=F.onMouseEnter)===null||je===void 0||je.call(F,Ee)}),ye=nr(function(Ee){var je;m&&de(-1,-1),F==null||(je=F.onMouseLeave)===null||je===void 0||je.call(F,Ee)});if(H===0||ne===0)return null;var Ne=(l=F.title)!==null&&l!==void 0?l:$8({rowType:D,ellipsis:p,children:z}),xe=ve(T,v,(u={},M(M(M(M(M(M(M(M(M(M(u,"".concat(T,"-fix-left"),X&&L),"".concat(T,"-fix-left-first"),B&&L),"".concat(T,"-fix-left-last"),N&&L),"".concat(T,"-fix-left-all"),N&&_&&L),"".concat(T,"-fix-right"),W&&L),"".concat(T,"-fix-right-first"),A&&L),"".concat(T,"-fix-right-last"),S&&L),"".concat(T,"-ellipsis"),p),"".concat(T,"-with-append"),$),"".concat(T,"-fix-sticky"),(X||W)&&I&&L),M(u,"".concat(T,"-row-hover"),!Y&&re)),F.className,Y==null?void 0:Y.className),be={};g&&(be.textAlign=g);var Ae=K(K(K(K({},Y==null?void 0:Y.style),G),be),F.style),me=z;return it(me)==="object"&&!Array.isArray(me)&&!d.isValidElement(me)&&(me=null),p&&(N||A)&&(me=d.createElement("span",{className:"".concat(T,"-content")},me)),d.createElement(s,ze({},Y,F,{className:xe,style:Ae,title:Ne,scope:f,onMouseEnter:V?ge:void 0,onMouseLeave:V?ye:void 0,colSpan:H!==1?H:null,rowSpan:ne!==1?ne:null}),$,me)}const pi=d.memo(B8);function km(e,t,r,n,o){var a=r[e]||{},i=r[t]||{},l,u;a.fixed==="left"?l=n.left[o==="rtl"?t:e]:i.fixed==="right"&&(u=n.right[o==="rtl"?e:t]);var s=!1,c=!1,p=!1,f=!1,h=r[t+1],v=r[e-1],g=h&&!h.fixed||v&&!v.fixed||r.every(function(w){return w.fixed==="left"});if(o==="rtl"){if(l!==void 0){var m=v&&v.fixed==="left";f=!m&&g}else if(u!==void 0){var b=h&&h.fixed==="right";p=!b&&g}}else if(l!==void 0){var y=h&&h.fixed==="left";s=!y&&g}else if(u!==void 0){var C=v&&v.fixed==="right";c=!C&&g}return{fixLeft:l,fixRight:u,lastFixLeft:s,firstFixRight:c,lastFixRight:p,firstFixLeft:f,isSticky:n.isSticky}}var fw=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,u=Tr(Yr,["prefixCls","direction"]),s=u.prefixCls,c=u.direction,p=d.useContext(fw),f=p.scrollColumnIndex,h=p.stickyOffsets,v=p.flattenColumns,g=r+a-1,m=g+1===f?a+1:a,b=km(r,r+m-1,v,h,c);return d.createElement(pi,ze({className:t,index:r,component:"td",prefixCls:s,record:null,dataIndex:null,align:l,colSpan:m,rowSpan:i,render:function(){return n}},b))}var A8=["children"];function F8(e){var t=e.children,r=bt(e,A8);return d.createElement("tr",r,t)}function Ku(e){var t=e.children;return t}Ku.Row=F8;Ku.Cell=O8;function P8(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Tr(Yr,"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(fw.Provider,{value:l},d.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const ts=fi(P8);var pw=Ku;function N8(e){return null}function j8(e){return null}function mw(e,t,r,n,o,a,i){var l=a(t,i);e.push({record:t,indent:r,index:i,rowKey:l});var u=o==null?void 0:o.has(l);if(t&&Array.isArray(t[n])&&u)for(var s=0;s<t[n].length;s+=1)mw(e,t[n][s],r+1,n,o,a,s)}function hw(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];mw(a,l,0,t,r,n,i)}return a}return e==null?void 0:e.map(function(u,s){return{record:u,indent:0,index:s,rowKey:n(u,s)}})},[e,t,r,n]);return o}function gw(e,t,r,n){var o=Tr(Yr,["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,u=o.childrenColumnName,s=o.onTriggerExpand,c=o.rowExpandable,p=o.onRow,f=o.expandRowByClick,h=o.rowClassName,v=i==="nest",g=i==="row"&&(!c||c(e)),m=g||v,b=l&&l.has(t),y=u&&e&&e[u],C=nr(s),w=p==null?void 0:p(e,r),E=w==null?void 0:w.onClick,D=function(O){f&&m&&s(e,O);for(var j=arguments.length,B=new Array(j>1?j-1:0),N=1;N<j;N++)B[N-1]=arguments[N];E==null||E.apply(void 0,[O].concat(B))},k;typeof h=="string"?k=h:typeof h=="function"&&(k=h(e,r,n));var x=Wu(a);return K(K({},o),{},{columnsKey:x,nestExpandable:v,expanded:b,hasNestChildren:y,record:e,onTriggerExpand:C,rowSupportExpand:g,expandable:m,rowProps:K(K({},w),{},{className:ve(k,w==null?void 0:w.className),onClick:D})})}function vw(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,i=e.expanded,l=e.colSpan,u=e.isEmpty,s=e.stickyOffset,c=s===void 0?0:s,p=Tr(Yr,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),f=p.scrollbarSize,h=p.fixHeader,v=p.fixColumn,g=p.componentWidth,m=p.horizonScroll,b=r;return(u?m&&g:v)&&(b=d.createElement("div",{style:{width:g-c-(h&&!u?f: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(pi,{component:o,prefixCls:t,colSpan:l},b))}function I8(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:ve(i,"".concat(t,"-row-spaced"))});var l=function(u){n(r,u),u.stopPropagation()};return d.createElement("span",{className:ve(i,M(M({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:l})}function R8(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 bw(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function yw(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,u=e.record,s=e.prefixCls,c=e.columnsKey,p=e.fixedInfoList,f=e.expandIconColumnIndex,h=e.nestExpandable,v=e.indentSize,g=e.expandIcon,m=e.expanded,b=e.hasNestChildren,y=e.onTriggerExpand,C=e.expandable,w=e.expandedKeys,E=c[r],D=p[r],k;r===(f||0)&&h&&(k=d.createElement(d.Fragment,null,d.createElement("span",{style:{paddingLeft:"".concat(v*n,"px")},className:"".concat(s,"-row-indent indent-level-").concat(n)}),g({prefixCls:s,expanded:m,expandable:b,record:u,onExpand:y})));var x=((a=t.onCell)===null||a===void 0?void 0:a.call(t,u,o))||{};if(l){var O=x.rowSpan,j=O===void 0?1:O;if(C&&j&&r<l){for(var B=j,N=o;N<o+j;N+=1){var A=i[N];w.has(A)&&(B+=1)}x.rowSpan=B}}return{key:E,fixedInfo:D,appendCellNode:k,additionalCellProps:x}}function T8(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,i=e.rowKey,l=e.rowKeys,u=e.indent,s=u===void 0?0:u,c=e.rowComponent,p=e.cellComponent,f=e.scopeCellComponent,h=e.expandedRowInfo,v=gw(n,i,o,s),g=v.prefixCls,m=v.flattenColumns,b=v.expandedRowClassName,y=v.expandedRowRender,C=v.rowProps,w=v.expanded,E=v.rowSupportExpand,D=d.useRef(!1);D.current||(D.current=w);var k=bw(b,n,o,s),x=d.createElement(c,ze({},C,{"data-row-key":i,className:ve(t,"".concat(g,"-row"),"".concat(g,"-row-level-").concat(s),C==null?void 0:C.className,M({},k,s>=1)),style:K(K({},r),C==null?void 0:C.style)}),m.map(function(B,N){var A=B.render,S=B.dataIndex,$=B.className,P=yw(v,B,N,s,o,l,h==null?void 0:h.offset),F=P.key,I=P.fixedInfo,T=P.appendCellNode,q=P.additionalCellProps;return d.createElement(pi,ze({className:$,ellipsis:B.ellipsis,align:B.align,scope:B.rowScope,component:B.rowScope?f:p,prefixCls:g,key:F,record:n,index:o,renderIndex:a,dataIndex:S,render:A,shouldCellUpdate:B.shouldCellUpdate},I,{appendNode:T,additionalProps:q}))})),O;if(E&&(D.current||w)){var j=y(n,o,s+1,w);O=d.createElement(vw,{expanded:w,className:ve("".concat(g,"-expanded-row"),"".concat(g,"-expanded-row-level-").concat(s+1),k),prefixCls:g,component:c,cellComponent:p,colSpan:h?h.colSpan:m.length,stickyOffset:h==null?void 0:h.sticky,isEmpty:!1},j)}return d.createElement(d.Fragment,null,x,O)}const M8=fi(T8);function z8(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=d.useRef();return Kt(function(){a.current&&r(t,a.current.offsetWidth)},[]),d.createElement(oo,{data:t},d.createElement("th",{ref:a,className:"".concat(n,"-measure-cell")},d.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function _8(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,a=d.useRef(null),i=Tr(Yr,["measureRowRender"]),l=i.measureRowRender,u=d.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:a,tabIndex:-1},d.createElement(oo.Collection,{onBatchResize:function(s){Du(a.current)&&s.forEach(function(c){var p=c.data,f=c.size;n(p,f.offsetWidth)})}},r.map(function(s){var c=o.find(function(h){return h.key===s}),p=c==null?void 0:c.title,f=d.isValidElement(p)?d.cloneElement(p,{ref:null}):p;return d.createElement(z8,{prefixCls:t,key:s,columnKey:s,onColumnResize:n,title:f})})));return l?l(u):u}function L8(e){var t=e.data,r=e.measureColumnWidth,n=Tr(Yr,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,i=n.onColumnResize,l=n.flattenColumns,u=n.getRowKey,s=n.expandedKeys,c=n.childrenColumnName,p=n.emptyNode,f=n.expandedRowOffset,h=f===void 0?0:f,v=n.colWidths,g=hw(t,c,s,u),m=d.useMemo(function(){return g.map(function(O){return O.rowKey})},[g]),b=d.useRef({renderWithProps:!1}),y=d.useMemo(function(){for(var O=l.length-h,j=0,B=0;B<h;B+=1)j+=v[B]||0;return{offset:h,colSpan:O,sticky:j}},[l.length,h,v]),C=a(["body","wrapper"],"tbody"),w=a(["body","row"],"tr"),E=a(["body","cell"],"td"),D=a(["body","cell"],"th"),k;t.length?k=g.map(function(O,j){var B=O.record,N=O.indent,A=O.index,S=O.rowKey;return d.createElement(M8,{key:S,rowKey:S,rowKeys:m,record:B,index:j,renderIndex:A,rowComponent:w,cellComponent:E,scopeCellComponent:D,indent:N,expandedRowInfo:y})}):k=d.createElement(vw,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:w,cellComponent:E,colSpan:l.length,isEmpty:!0},p);var x=Wu(l);return d.createElement(dw.Provider,{value:b.current},d.createElement(C,{className:"".concat(o,"-tbody")},r&&d.createElement(_8,{prefixCls:o,columnsKey:x,onColumnResize:i,columns:l}),k))}const H8=fi(L8);var W8=["expandable"],Hi="RC_TABLE_INTERNAL_COL_DEFINE";function K8(e){var t=e.expandable,r=bt(e,W8),n;return"expandable"in e?n=K(K({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var q8=["columnType"];function Cw(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Tr(Yr,["tableLayout"]),a=o.tableLayout,i=[],l=n||r.length,u=!1,s=l-1;s>=0;s-=1){var c=t[s],p=r&&r[s],f=void 0,h=void 0;if(p&&(f=p[Hi],a==="auto"&&(h=p.minWidth)),c||h||f||u){var v=f||{};v.columnType;var g=bt(v,q8);i.unshift(d.createElement("col",ze({key:s,style:{width:c,minWidth:h}},g))),u=!0}}return i.length>0?d.createElement("colgroup",null,i):null}var V8=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function X8(e,t){return Ct(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 U8=d.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,i=e.colWidths,l=e.colGroup,u=e.columCount,s=e.stickyOffsets,c=e.direction,p=e.fixHeader,f=e.stickyTopOffset,h=e.stickyBottomOffset,v=e.stickyClassName,g=e.scrollX,m=e.tableLayout,b=m===void 0?"fixed":m,y=e.onScroll,C=e.children,w=bt(e,V8),E=Tr(Yr,["prefixCls","scrollbarSize","isSticky","getComponent"]),D=E.prefixCls,k=E.scrollbarSize,x=E.isSticky,O=E.getComponent,j=O(["header","table"],"table"),B=x&&!p?0:k,N=d.useRef(null),A=d.useCallback(function(L){el(t,L),el(N,L)},[]);d.useEffect(function(){function L(V){var Z=V,J=Z.currentTarget,z=Z.deltaX;z&&(y({currentTarget:J,scrollLeft:J.scrollLeft+z}),V.preventDefault())}var _=N.current;return _==null||_.addEventListener("wheel",L,{passive:!1}),function(){_==null||_.removeEventListener("wheel",L)}},[]);var S=a[a.length-1],$={fixed:S?S.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(D,"-cell-scrollbar")}}},P=Ct(function(){return B?[].concat(Ie(o),[$]):o},[B,o]),F=Ct(function(){return B?[].concat(Ie(a),[$]):a},[B,a]),I=Ct(function(){var L=s.right,_=s.left;return K(K({},s),{},{left:c==="rtl"?[].concat(Ie(_.map(function(V){return V+B})),[0]):_,right:c==="rtl"?L:[].concat(Ie(L.map(function(V){return V+B})),[0]),isSticky:x})},[B,s,x]),T=X8(i,u),q=Ct(function(){var L=!T||!T.length||T.every(function(_){return!_});return n||L},[n,T]);return d.createElement("div",{style:K({overflow:"hidden"},x?{top:f,bottom:h}:{}),ref:A,className:ve(r,M({},v,!!v))},d.createElement(j,{style:{tableLayout:b,minWidth:"100%",width:g}},q?l:d.createElement(Cw,{colWidths:[].concat(Ie(T),[B]),columCount:u+1,columns:F}),C(K(K({},w),{},{stickyOffsets:I,columns:P,flattenColumns:F}))))});const J0=d.memo(U8);var G8=function(e){var t=e.cells,r=e.stickyOffsets,n=e.flattenColumns,o=e.rowComponent,a=e.cellComponent,i=e.onHeaderRow,l=e.index,u=Tr(Yr,["prefixCls","direction"]),s=u.prefixCls,c=u.direction,p;i&&(p=i(t.map(function(h){return h.column}),l));var f=Wu(t.map(function(h){return h.column}));return d.createElement(o,p,t.map(function(h,v){var g=h.column,m=km(h.colStart,h.colEnd,n,r,c),b;return g&&g.onHeaderCell&&(b=h.column.onHeaderCell(g)),d.createElement(pi,ze({},h,{scope:g.title?h.colSpan>1?"colgroup":"col":null,ellipsis:g.ellipsis,align:g.align,component:a,prefixCls:s,key:f[v]},m,{additionalProps:b,rowType:"header"}))}))};function Y8(e){var t=[];function r(i,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[u]=t[u]||[];var s=l,c=i.filter(Boolean).map(function(p){var f={key:p.key,className:p.className||"",children:p.title,column:p,colStart:s},h=1,v=p.children;return v&&v.length>0&&(h=r(v,s,u+1).reduce(function(g,m){return g+m},0),f.hasSubColumns=!0),"colSpan"in p&&(h=p.colSpan),"rowSpan"in p&&(f.rowSpan=p.rowSpan),f.colSpan=h,f.colEnd=f.colStart+h-1,t[u].push(f),s+=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 Z8=function(e){var t=e.stickyOffsets,r=e.columns,n=e.flattenColumns,o=e.onHeaderRow,a=Tr(Yr,["prefixCls","getComponent"]),i=a.prefixCls,l=a.getComponent,u=d.useMemo(function(){return Y8(r)},[r]),s=l(["header","wrapper"],"thead"),c=l(["header","row"],"tr"),p=l(["header","cell"],"th");return d.createElement(s,{className:"".concat(i,"-thead")},u.map(function(f,h){var v=d.createElement(G8,{key:h,flattenColumns:n,cells:f,stickyOffsets:t,rowComponent:c,cellComponent:p,onHeaderRow:o,index:h});return v}))};const Q0=fi(Z8);function eb(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 J8(e,t,r){return d.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(f){var h=eb(t,f.width);h?n+=h:o+=1});var a=Math.max(t,r),i=Math.max(a-n,o),l=o,u=i/o,s=0,c=e.map(function(f){var h=K({},f),v=eb(t,h.width);if(v)h.width=v;else{var g=Math.floor(u);h.width=l===1?i:g,i-=g,l-=1}return s+=h.width,h});if(s<a){var p=a/s;i=a,c.forEach(function(f,h){var v=Math.floor(f.width*p);f.width=h===c.length-1?i:v,i-=v})}return[c,Math.max(s,a)]}return[e,t]},[e,t,r])}var Q8=["children"],eT=["fixed"];function Dm(e){return _n(e).filter(function(t){return d.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=bt(n,Q8),i=K({key:r},a);return o&&(i.children=Dm(o)),i})}function xw(e){return e.filter(function(t){return t&&it(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?K(K({},t),{},{children:xw(r)}):t})}function qf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&it(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,i=a===!0?"left":a,l="".concat(t,"-").concat(o),u=n.children;return u&&u.length>0?[].concat(Ie(r),Ie(qf(u,l).map(function(s){var c;return K(K({},s),{},{fixed:(c=s.fixed)!==null&&c!==void 0?c:i})}))):[].concat(Ie(r),[K(K({key:l},n),{},{fixed:i})])},[])}function tT(e){return e.map(function(t){var r=t.fixed,n=bt(t,eT),o=r;return r==="left"?o="right":r==="right"&&(o="left"),K({fixed:o},n)})}function rT(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,i=e.expandedKeys,l=e.columnTitle,u=e.getRowKey,s=e.onTriggerExpand,c=e.expandIcon,p=e.rowExpandable,f=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,w=e.clientWidth,E=d.useMemo(function(){var S=n||Dm(o)||[];return xw(S.slice())},[n,o]),D=d.useMemo(function(){if(a){var S=E.slice();if(!S.includes(So)){var $=f||0,P=$===0&&y==="right"?E.length:$;P>=0&&S.splice(P,0,So)}var F=S.indexOf(So);S=S.filter(function(L,_){return L!==So||_===F});var I=E[F],T;y?T=y:T=I?I.fixed:null;var q=M(M(M(M(M(M({},Hi,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",l),"fixed",T),"className","".concat(r,"-row-expand-icon-cell")),"width",b),"render",function(L,_,V){var Z=u(_,V),J=i.has(Z),z=p?p(_):!0,Y=c({prefixCls:r,expanded:J,expandable:z,record:_,onExpand:s});return m?d.createElement("span",{onClick:function(G){return G.stopPropagation()}},Y):Y});return S.map(function(L,_){var V=L===So?q:L;return _<v?K(K({},V),{},{fixed:V.fixed||"left"}):V})}return E.filter(function(L){return L!==So})},[a,E,u,i,c,g,v]),k=d.useMemo(function(){var S=D;return t&&(S=t(S)),S.length||(S=[{render:function(){return null}}]),S},[t,D,g]),x=d.useMemo(function(){return g==="rtl"?tT(qf(k)):qf(k)},[k,g,C]),O=d.useMemo(function(){for(var S=-1,$=x.length-1;$>=0;$-=1){var P=x[$].fixed;if(P==="left"||P===!0){S=$;break}}if(S>=0)for(var F=0;F<=S;F+=1){var I=x[F].fixed;if(I!=="left"&&I!==!0)return!0}var T=x.findIndex(function(_){var V=_.fixed;return V==="right"});if(T>=0)for(var q=T;q<x.length;q+=1){var L=x[q].fixed;if(L!=="right")return!0}return!1},[x]),j=J8(x,C,w),B=he(j,2),N=B[0],A=B[1];return[k,N,A,O]}function nT(e,t,r){var n=K8(e),o=n.expandIcon,a=n.expandedRowKeys,i=n.defaultExpandedRowKeys,l=n.defaultExpandAllRows,u=n.expandedRowRender,s=n.onExpand,c=n.onExpandedRowsChange,p=n.childrenColumnName,f=o||I8,h=p||"children",v=d.useMemo(function(){return u?"row":e.expandable&&e.internalHooks===Fl&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(E){return E&&it(E)==="object"&&E[h]})?"nest":!1},[!!u,t]),g=d.useState(function(){return i||(l?R8(t,r,h):[])}),m=he(g,2),b=m[0],y=m[1],C=d.useMemo(function(){return new Set(a||b||[])},[a,b]),w=d.useCallback(function(E){var D=r(E,t.indexOf(E)),k,x=C.has(D);x?(C.delete(D),k=Ie(C)):k=[].concat(Ie(C),[D]),y(k),s&&s(!x,E),c&&c(k)},[r,C,t,s,c]);return[n,v,C,f,h,w]}function oT(e,t,r){var n=e.map(function(o,a){return km(a,a,e,t,r)});return la(function(){return n},[n],function(o,a){return!Zn(o,a)})}function aT(e){var t=qe(e),r=xt({}),n=he(r,2),o=n[1],a=qe(null),i=qe([]);function l(u){i.current.push(u);var s=Promise.resolve();a.current=s,s.then(function(){if(a.current===s){var c=i.current,p=t.current;i.current=[],c.forEach(function(f){t.current=f(t.current)}),a.current=null,p!==t.current&&o({})}})}return Bt(function(){return function(){a.current=null}},[]),[t.current,l]}function iT(e){var t=qe(null),r=qe();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 Bt(function(){return n},[]),[o,a]}function lT(){var e=d.useState(-1),t=he(e,2),r=t[0],n=t[1],o=d.useState(-1),a=he(o,2),i=a[0],l=a[1],u=d.useCallback(function(s,c){n(s),l(c)},[]);return[r,i,u]}var tb=Xr()?window:null;function sT(e,t){var r=it(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,i=a===void 0?0:a,l=r.offsetScroll,u=l===void 0?0:l,s=r.getContainer,c=s===void 0?function(){return tb}:s,p=c()||tb,f=!!e;return d.useMemo(function(){return{isSticky:f,stickyClassName:f?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:i,offsetScroll:u,container:p}},[f,u,o,i,t,p])}function uT(e,t,r){var n=Ct(function(){var o=t.length,a=function(u,s,c){for(var p=[],f=0,h=u;h!==s;h+=c)p.push(f),t[h].fixed&&(f+=e[h]||0);return p},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 rb(e){var t=e.className,r=e.children;return d.createElement("div",{className:t},r)}function nb(e){var t=vu(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 cT=function(e,t){var r,n,o=e.scrollBodyRef,a=e.onScroll,i=e.offsetScroll,l=e.container,u=e.direction,s=Tr(Yr,"prefixCls"),c=((r=o.current)===null||r===void 0?void 0:r.scrollWidth)||0,p=((n=o.current)===null||n===void 0?void 0:n.clientWidth)||0,f=c&&p*(p/c),h=d.useRef(),v=aT({scrollLeft:0,isHiddenScrollBar:!0}),g=he(v,2),m=g[0],b=g[1],y=d.useRef({delta:0,x:0}),C=d.useState(!1),w=he(C,2),E=w[0],D=w[1],k=d.useRef(null);d.useEffect(function(){return function(){Xt.cancel(k.current)}},[]);var x=function(){D(!1)},O=function(A){A.persist(),y.current.delta=A.pageX-m.scrollLeft,y.current.x=0,D(!0),A.preventDefault()},j=function(A){var S,$=A||((S=window)===null||S===void 0?void 0:S.event),P=$.buttons;if(!E||P===0){E&&D(!1);return}var F=y.current.x+A.pageX-y.current.x-y.current.delta,I=u==="rtl";F=Math.max(I?f-p:0,Math.min(I?0:p-f,F));var T=!I||Math.abs(F)+Math.abs(f)<p;T&&(a({scrollLeft:F/p*(c+2)}),y.current.x=A.pageX)},B=function(){Xt.cancel(k.current),k.current=Xt(function(){if(o.current){var A=nb(o.current).top,S=A+o.current.offsetHeight,$=l===window?document.documentElement.scrollTop+window.innerHeight:nb(l).top+l.clientHeight;b(function(P){return K(K({},P),{},{isHiddenScrollBar:S-Tv()<=$||A>=$-i})})}})},N=function(A){b(function(S){return K(K({},S),{},{scrollLeft:c?A/c*p:0})})};return d.useImperativeHandle(t,function(){return{setScrollLeft:N,checkScrollBarVisible:B}}),d.useEffect(function(){var A=W0(document.body,"mouseup",x,!1),S=W0(document.body,"mousemove",j,!1);return B(),function(){A.remove(),S.remove()}},[f,E]),d.useEffect(function(){if(o.current){for(var A=[],S=vu(o.current);S;)A.push(S),S=S.parentElement;return A.forEach(function($){return $.addEventListener("scroll",B,!1)}),window.addEventListener("resize",B,!1),window.addEventListener("scroll",B,!1),l.addEventListener("scroll",B,!1),function(){A.forEach(function($){return $.removeEventListener("scroll",B)}),window.removeEventListener("resize",B),window.removeEventListener("scroll",B),l.removeEventListener("scroll",B)}}},[l]),d.useEffect(function(){m.isHiddenScrollBar||b(function(A){var S=o.current;return S?K(K({},A),{},{scrollLeft:S.scrollLeft/S.scrollWidth*S.clientWidth}):A})},[m.isHiddenScrollBar]),c<=p||!f||m.isHiddenScrollBar?null:d.createElement("div",{style:{height:Tv(),width:p,bottom:i},className:"".concat(s,"-sticky-scroll")},d.createElement("div",{onMouseDown:O,ref:h,className:ve("".concat(s,"-sticky-scroll-bar"),M({},"".concat(s,"-sticky-scroll-bar-active"),E)),style:{width:"".concat(f,"px"),transform:"translate3d(".concat(m.scrollLeft,"px, 0, 0)")}}))};const dT=d.forwardRef(cT);var ww="rc-table",fT=[],pT={};function mT(){return"No Data"}function hT(e,t){var r=K({rowKey:"key",prefixCls:ww,emptyText:mT},e),n=r.prefixCls,o=r.className,a=r.rowClassName,i=r.style,l=r.data,u=r.rowKey,s=r.scroll,c=r.tableLayout,p=r.direction,f=r.title,h=r.footer,v=r.summary,g=r.caption,m=r.id,b=r.showHeader,y=r.components,C=r.emptyText,w=r.onRow,E=r.onHeaderRow,D=r.measureRowRender,k=r.onScroll,x=r.internalHooks,O=r.transformColumns,j=r.internalRefs,B=r.tailor,N=r.getContainerWidth,A=r.sticky,S=r.rowHoverable,$=S===void 0?!0:S,P=l||fT,F=!!P.length,I=x===Fl,T=d.useCallback(function(ct,It){return yn(y,ct)||It},[y]),q=d.useMemo(function(){return typeof u=="function"?u:function(ct){var It=ct&&ct[u];return It}},[u]),L=T(["body"]),_=lT(),V=he(_,3),Z=V[0],J=V[1],z=V[2],Y=nT(r,P,q),G=he(Y,6),X=G[0],W=G[1],H=G[2],ne=G[3],U=G[4],ae=G[5],re=s==null?void 0:s.x,de=d.useState(0),ge=he(de,2),ye=ge[0],Ne=ge[1],xe=rT(K(K(K({},r),X),{},{expandable:!!X.expandedRowRender,columnTitle:X.columnTitle,expandedKeys:H,getRowKey:q,onTriggerExpand:ae,expandIcon:ne,expandIconColumnIndex:X.expandIconColumnIndex,direction:p,scrollWidth:I&&B&&typeof re=="number"?re:null,clientWidth:ye}),I?O:null),be=he(xe,4),Ae=be[0],me=be[1],Ee=be[2],je=be[3],Be=Ee??re,Ye=d.useMemo(function(){return{columns:Ae,flattenColumns:me}},[Ae,me]),Re=d.useRef(),Te=d.useRef(),ue=d.useRef(),ke=d.useRef();d.useImperativeHandle(t,function(){return{nativeElement:Re.current,scrollTo:function(ct){var It;if(ue.current instanceof HTMLElement){var zr=ct.index,Gt=ct.top,_r=ct.key;if(w8(Gt)){var Qr;(Qr=ue.current)===null||Qr===void 0||Qr.scrollTo({top:Gt})}else{var hn,sn=_r??q(P[zr]);(hn=ue.current.querySelector('[data-row-key="'.concat(sn,'"]')))===null||hn===void 0||hn.scrollIntoView()}}else(It=ue.current)!==null&&It!==void 0&&It.scrollTo&&ue.current.scrollTo(ct)}}});var Ke=d.useRef(),Ze=d.useState(!1),We=he(Ze,2),_e=We[0],nt=We[1],Ue=d.useState(!1),et=he(Ue,2),yt=et[0],kt=et[1],dt=d.useState(new Map),ht=he(dt,2),Mt=ht[0],Pt=ht[1],ft=Wu(me),ut=ft.map(function(ct){return Mt.get(ct)}),pe=d.useMemo(function(){return ut},[ut.join("_")]),Oe=uT(pe,me,p),Se=s&&Kf(s.y),Ce=s&&Kf(Be)||!!X.fixed,we=Ce&&me.some(function(ct){var It=ct.fixed;return It}),fe=d.useRef(),le=sT(A,n),ee=le.isSticky,te=le.offsetHeader,se=le.offsetSummary,Pe=le.offsetScroll,ot=le.stickyClassName,He=le.container,$e=d.useMemo(function(){return v==null?void 0:v(P)},[v,P]),Xe=(Se||ee)&&d.isValidElement($e)&&$e.type===Ku&&$e.props.fixed,wt,St,Nt;Se&&(St={overflowY:F?"scroll":"auto",maxHeight:s.y}),Ce&&(wt={overflowX:"auto"},Se||(St={overflowY:"hidden"}),Nt={width:Be===!0?"auto":Be,minWidth:"100%"});var Ot=d.useCallback(function(ct,It){Pt(function(zr){if(zr.get(ct)!==It){var Gt=new Map(zr);return Gt.set(ct,It),Gt}return zr})},[]),jt=iT(),ar=he(jt,2),Le=ar[0],Je=ar[1];function gt(ct,It){It&&(typeof It=="function"?It(ct):It.scrollLeft!==ct&&(It.scrollLeft=ct,It.scrollLeft!==ct&&setTimeout(function(){It.scrollLeft=ct},0)))}var pt=nr(function(ct){var It=ct.currentTarget,zr=ct.scrollLeft,Gt=p==="rtl",_r=typeof zr=="number"?zr:It.scrollLeft,Qr=It||pT;if(!Je()||Je()===Qr){var hn;Le(Qr),gt(_r,Te.current),gt(_r,ue.current),gt(_r,Ke.current),gt(_r,(hn=fe.current)===null||hn===void 0?void 0:hn.setScrollLeft)}var sn=It||Te.current;if(sn){var ao=I&&B&&typeof Be=="number"?Be:sn.scrollWidth,bo=sn.clientWidth;if(ao===bo){nt(!1),kt(!1);return}Gt?(nt(-_r<ao-bo),kt(-_r>0)):(nt(_r>0),kt(_r<ao-bo))}}),At=nr(function(ct){pt(ct),k==null||k(ct)}),mr=function(){if(Ce&&ue.current){var ct;pt({currentTarget:vu(ue.current),scrollLeft:(ct=ue.current)===null||ct===void 0?void 0:ct.scrollLeft})}else nt(!1),kt(!1)},wr=function(ct){var It,zr=ct.width;(It=fe.current)===null||It===void 0||It.checkScrollBarVisible();var Gt=Re.current?Re.current.offsetWidth:zr;I&&N&&Re.current&&(Gt=N(Re.current,Gt)||Gt),Gt!==ye&&(mr(),Ne(Gt))},lt=d.useRef(!1);d.useEffect(function(){lt.current&&mr()},[Ce,l,Ae.length]),d.useEffect(function(){lt.current=!0},[]);var $t=d.useState(0),Ft=he($t,2),qt=Ft[0],Br=Ft[1],on=d.useState(!0),wn=he(on,2),Zr=wn[0],Mr=wn[1];Kt(function(){(!B||!I)&&(ue.current instanceof Element?Br(yf(ue.current).width):Br(yf(ke.current).width)),Mr(BP("position","sticky"))},[]),d.useEffect(function(){I&&j&&(j.body.current=ue.current)});var an=d.useCallback(function(ct){return d.createElement(d.Fragment,null,d.createElement(Q0,ct),Xe==="top"&&d.createElement(ts,ct,$e))},[Xe,$e]),ln=d.useCallback(function(ct){return d.createElement(ts,ct,$e)},[$e]),Jr=T(["table"],"table"),Hr=d.useMemo(function(){return c||(we?Be==="max-content"?"auto":"fixed":Se||ee||me.some(function(ct){var It=ct.ellipsis;return It})?"fixed":"auto")},[Se,we,me,c,ee]),Et,Ge={colWidths:pe,columCount:me.length,stickyOffsets:Oe,onHeaderRow:E,fixHeader:Se,scroll:s},vt=d.useMemo(function(){return F?null:typeof C=="function"?C():C},[F,C]),Ht=d.createElement(H8,{data:P,measureColumnWidth:Se||Ce||ee}),zt=d.createElement(Cw,{colWidths:me.map(function(ct){var It=ct.width;return It}),columns:me}),rr=g!=null?d.createElement("caption",{className:"".concat(n,"-caption")},g):void 0,Or=Jn(r,{data:!0}),br=Jn(r,{aria:!0});if(Se||ee){var Ar;typeof L=="function"?(Ar=L(P,{scrollbarSize:qt,ref:ue,onScroll:pt}),Ge.colWidths=me.map(function(ct,It){var zr=ct.width,Gt=It===me.length-1?zr-qt:zr;return typeof Gt=="number"&&!Number.isNaN(Gt)?Gt:0})):Ar=d.createElement("div",{style:K(K({},wt),St),onScroll:At,ref:ue,className:ve("".concat(n,"-body"))},d.createElement(Jr,ze({style:K(K({},Nt),{},{tableLayout:Hr})},br),rr,zt,Ht,!Xe&&$e&&d.createElement(ts,{stickyOffsets:Oe,flattenColumns:me},$e)));var Er=K(K(K({noData:!P.length},Ge),Ye),{},{direction:p,stickyClassName:ot,scrollX:Be,tableLayout:Hr,onScroll:pt});Et=d.createElement(d.Fragment,null,b!==!1&&d.createElement(J0,ze({},Er,{stickyTopOffset:te,className:"".concat(n,"-header"),ref:Te,colGroup:zt}),an),Ar,Xe&&Xe!=="top"&&d.createElement(J0,ze({},Er,{stickyBottomOffset:se,className:"".concat(n,"-summary"),ref:Ke,colGroup:zt}),ln),ee&&ue.current&&ue.current instanceof Element&&d.createElement(dT,{ref:fe,offsetScroll:Pe,scrollBodyRef:ue,onScroll:pt,container:He,direction:p}))}else Et=d.createElement("div",{style:K(K({},wt),St),className:ve("".concat(n,"-content")),onScroll:pt,ref:ue},d.createElement(Jr,ze({style:K(K({},Nt),{},{tableLayout:Hr})},br),rr,zt,b!==!1&&d.createElement(Q0,ze({},Ge,Ye)),Ht,$e&&d.createElement(ts,{stickyOffsets:Oe,flattenColumns:me},$e)));var kr=d.createElement("div",ze({className:ve(n,o,M(M(M(M(M(M(M(M(M(M({},"".concat(n,"-rtl"),p==="rtl"),"".concat(n,"-ping-left"),_e),"".concat(n,"-ping-right"),yt),"".concat(n,"-layout-fixed"),c==="fixed"),"".concat(n,"-fixed-header"),Se),"".concat(n,"-fixed-column"),we),"".concat(n,"-fixed-column-gapped"),we&&je),"".concat(n,"-scroll-horizontal"),Ce),"".concat(n,"-has-fix-left"),me[0]&&me[0].fixed),"".concat(n,"-has-fix-right"),me[me.length-1]&&me[me.length-1].fixed==="right")),style:i,id:m,ref:Re},Or),f&&d.createElement(rb,{className:"".concat(n,"-title")},f(P)),d.createElement("div",{ref:ke,className:"".concat(n,"-container")},Et),h&&d.createElement(rb,{className:"".concat(n,"-footer")},h(P)));Ce&&(kr=d.createElement(oo,{onResize:wr},kr));var mn=oT(me,Oe,p),Hn=d.useMemo(function(){return{scrollX:Be,prefixCls:n,getComponent:T,scrollbarSize:qt,direction:p,fixedInfoList:mn,isSticky:ee,supportSticky:Zr,componentWidth:ye,fixHeader:Se,fixColumn:we,horizonScroll:Ce,tableLayout:Hr,rowClassName:a,expandedRowClassName:X.expandedRowClassName,expandIcon:ne,expandableType:W,expandRowByClick:X.expandRowByClick,expandedRowRender:X.expandedRowRender,expandedRowOffset:X.expandedRowOffset,onTriggerExpand:ae,expandIconColumnIndex:X.expandIconColumnIndex,indentSize:X.indentSize,allColumnsFixedLeft:me.every(function(ct){return ct.fixed==="left"}),emptyNode:vt,columns:Ae,flattenColumns:me,onColumnResize:Ot,colWidths:pe,hoverStartRow:Z,hoverEndRow:J,onHover:z,rowExpandable:X.rowExpandable,onRow:w,getRowKey:q,expandedKeys:H,childrenColumnName:U,rowHoverable:$,measureRowRender:D}},[Be,n,T,qt,p,mn,ee,Zr,ye,Se,we,Ce,Hr,a,X.expandedRowClassName,ne,W,X.expandRowByClick,X.expandedRowRender,X.expandedRowOffset,ae,X.expandIconColumnIndex,X.indentSize,vt,Ae,me,Ot,pe,Z,J,z,X.rowExpandable,w,q,H,U,$,D]);return d.createElement(Yr.Provider,{value:Hn},kr)}var gT=d.forwardRef(hT);function Ew(e){return cw(gT,e)}var mi=Ew();mi.EXPAND_COLUMN=So;mi.INTERNAL_HOOKS=Fl;mi.Column=N8;mi.ColumnGroup=j8;mi.Summary=pw;var Sm=wm(null),kw=wm(null);function vT(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function bT(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,i=e.component,l=e.renderIndex,u=e.record,s=e.style,c=e.className,p=e.inverse,f=e.getHeight,h=r.render,v=r.dataIndex,g=r.className,m=r.width,b=Tr(kw,["columnsOffset"]),y=b.columnsOffset,C=yw(t,r,n,o,a),w=C.key,E=C.fixedInfo,D=C.appendCellNode,k=C.additionalCellProps,x=k.style,O=k.colSpan,j=O===void 0?1:O,B=k.rowSpan,N=B===void 0?1:B,A=n-1,S=vT(A,j,y),$=j>1?m-S:0,P=K(K(K({},x),s),{},{flex:"0 0 ".concat(S,"px"),width:"".concat(S,"px"),marginRight:$,pointerEvents:"auto"}),F=d.useMemo(function(){return p?N<=1:j===0||N===0||N>1},[N,j,p]);F?P.visibility="hidden":p&&(P.height=f==null?void 0:f(N));var I=F?function(){return null}:h,T={};return(N===0||j===0)&&(T.rowSpan=1,T.colSpan=1),d.createElement(pi,ze({className:ve(g,c),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:i,prefixCls:t.prefixCls,key:w,record:u,index:a,renderIndex:l,dataIndex:v,render:I,shouldCellUpdate:r.shouldCellUpdate},E,{appendNode:D,additionalProps:K(K({},k),{},{style:P},T)}))}var yT=["data","index","className","rowKey","style","extra","getHeight"],CT=d.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,i=e.style,l=e.extra,u=e.getHeight,s=bt(e,yT),c=r.record,p=r.indent,f=r.index,h=Tr(Yr,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),v=h.scrollX,g=h.flattenColumns,m=h.prefixCls,b=h.fixColumn,y=h.componentWidth,C=Tr(Sm,["getComponent"]),w=C.getComponent,E=gw(c,a,n,p),D=w(["body","row"],"div"),k=w(["body","cell"],"div"),x=E.rowSupportExpand,O=E.expanded,j=E.rowProps,B=E.expandedRowRender,N=E.expandedRowClassName,A;if(x&&O){var S=B(c,n,p+1,O),$=bw(N,c,n,p),P={};b&&(P={style:M({},"--virtual-width","".concat(y,"px"))});var F="".concat(m,"-expanded-row-cell");A=d.createElement(D,{className:ve("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(p+1),$)},d.createElement(pi,{component:k,prefixCls:m,className:ve(F,M({},"".concat(F,"-fixed"),b)),additionalProps:P},S))}var I=K(K({},i),{},{width:v});l&&(I.position="absolute",I.pointerEvents="none");var T=d.createElement(D,ze({},j,s,{"data-row-key":a,ref:x?null:t,className:ve(o,"".concat(m,"-row"),j==null?void 0:j.className,M({},"".concat(m,"-row-extra"),l)),style:K(K({},I),j==null?void 0:j.style)}),g.map(function(q,L){return d.createElement(bT,{key:L,component:k,rowInfo:E,column:q,colIndex:L,indent:p,index:n,renderIndex:f,record:c,inverse:l,getHeight:u})}));return x?d.createElement("div",{ref:t},T,A):T}),ob=fi(CT),xT=d.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Tr(Yr,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,i=o.onColumnResize,l=o.getRowKey,u=o.expandedKeys,s=o.prefixCls,c=o.childrenColumnName,p=o.scrollX,f=o.direction,h=Tr(Sm),v=h.sticky,g=h.scrollY,m=h.listItemHeight,b=h.getComponent,y=h.onScroll,C=d.useRef(),w=hw(r,c,u,l),E=d.useMemo(function(){var A=0;return a.map(function(S){var $=S.width,P=S.minWidth,F=S.key,I=Math.max($||0,P||0);return A+=I,[F,I,A]})},[a]),D=d.useMemo(function(){return E.map(function(A){return A[2]})},[E]);d.useEffect(function(){E.forEach(function(A){var S=he(A,2),$=S[0],P=S[1];i($,P)})},[E]),d.useImperativeHandle(t,function(){var A,S={scrollTo:function($){var P;(P=C.current)===null||P===void 0||P.scrollTo($)},nativeElement:(A=C.current)===null||A===void 0?void 0:A.nativeElement};return Object.defineProperty(S,"scrollLeft",{get:function(){var $;return(($=C.current)===null||$===void 0?void 0:$.getScrollInfo().x)||0},set:function($){var P;(P=C.current)===null||P===void 0||P.scrollTo({left:$})}}),Object.defineProperty(S,"scrollTop",{get:function(){var $;return(($=C.current)===null||$===void 0?void 0:$.getScrollInfo().y)||0},set:function($){var P;(P=C.current)===null||P===void 0||P.scrollTo({top:$})}}),S});var k=function(A,S){var $,P=($=w[S])===null||$===void 0?void 0:$.record,F=A.onCell;if(F){var I,T=F(P,S);return(I=T==null?void 0:T.rowSpan)!==null&&I!==void 0?I:1}return 1},x=function(A){var S=A.start,$=A.end,P=A.getSize,F=A.offsetY;if($<0)return null;for(var I=a.filter(function(W){return k(W,S)===0}),T=S,q=function(W){if(I=I.filter(function(H){return k(H,W)===0}),!I.length)return T=W,1},L=S;L>=0&&!q(L);L-=1);for(var _=a.filter(function(W){return k(W,$)!==1}),V=$,Z=function(W){if(_=_.filter(function(H){return k(H,W)!==1}),!_.length)return V=Math.max(W-1,$),1},J=$;J<w.length&&!Z(J);J+=1);for(var z=[],Y=function(W){var H=w[W];if(!H)return 1;a.some(function(ne){return k(ne,W)>1})&&z.push(W)},G=T;G<=V;G+=1)Y(G);var X=z.map(function(W){var H=w[W],ne=l(H.record,W),U=function(re){var de=W+re-1,ge=l(w[de].record,de),ye=P(ne,ge);return ye.bottom-ye.top},ae=P(ne);return d.createElement(ob,{key:W,data:H,rowKey:ne,index:W,style:{top:-F+ae.top},extra:!0,getHeight:U})});return X},O=d.useMemo(function(){return{columnsOffset:D}},[D]),j="".concat(s,"-tbody"),B=b(["body","wrapper"]),N={};return v&&(N.position="sticky",N.bottom=0,it(v)==="object"&&v.offsetScroll&&(N.bottom=v.offsetScroll)),d.createElement(kw.Provider,{value:O},d.createElement(Tu,{fullHeight:!1,ref:C,prefixCls:"".concat(j,"-virtual"),styles:{horizontalScrollBar:N},className:j,height:g,itemHeight:m||24,data:w,itemKey:function(A){return l(A.record)},component:B,scrollWidth:p,direction:f,onVirtualScroll:function(A){var S,$=A.x;n({currentTarget:(S=C.current)===null||S===void 0?void 0:S.nativeElement,scrollLeft:$})},onScroll:y,extraRender:x},function(A,S,$){var P=l(A.record,S);return d.createElement(ob,{data:A,rowKey:P,index:S,style:$.style})}))}),wT=fi(xT),ET=function(e,t){var r=t.ref,n=t.onScroll;return d.createElement(wT,{ref:r,data:e,onScroll:n})};function kT(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,i=e.prefixCls,l=i===void 0?ww:i,u=e.className,s=e.listItemHeight,c=e.components,p=e.onScroll,f=o||{},h=f.x,v=f.y;typeof h!="number"&&(h=1),typeof v!="number"&&(v=500);var g=nr(function(y,C){return yn(c,y)||C}),m=nr(p),b=d.useMemo(function(){return{sticky:a,scrollY:v,listItemHeight:s,getComponent:g,onScroll:m}},[a,v,s,g,m]);return d.createElement(Sm.Provider,{value:b},d.createElement(mi,ze({},e,{className:ve(u,"".concat(l,"-virtual")),scroll:K(K({},o),{},{x:h}),components:K(K({},c),{},{body:r!=null&&r.length?ET:void 0}),columns:n,internalHooks:Fl,tailor:!0,ref:t})))}var DT=d.forwardRef(kT);function Dw(e){return cw(DT,e)}Dw();const ST=e=>null,$T=e=>null;var $m=d.createContext(null),BT=d.createContext({}),OT=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:ve(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 AT=d.memo(OT);var FT=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ab="open",ib="close",PT="---",vl=function(e){var t,r,n,o=e.eventKey,a=e.className,i=e.style,l=e.dragOver,u=e.dragOverGapTop,s=e.dragOverGapBottom,c=e.isLeaf,p=e.isStart,f=e.isEnd,h=e.expanded,v=e.selected,g=e.checked,m=e.halfChecked,b=e.loading,y=e.domRef,C=e.active,w=e.data,E=e.onMouseMove,D=e.selectable,k=bt(e,FT),x=oe.useContext($m),O=oe.useContext(BT),j=oe.useRef(null),B=oe.useState(!1),N=he(B,2),A=N[0],S=N[1],$=!!(x.disabled||e.disabled||(t=O.nodeDisabled)!==null&&t!==void 0&&t.call(O,w)),P=oe.useMemo(function(){return!x.checkable||e.checkable===!1?!1:x.checkable},[x.checkable,e.checkable]),F=function(ue){$||x.onNodeSelect(ue,yr(e))},I=function(ue){$||!P||e.disableCheckbox||x.onNodeCheck(ue,yr(e),!g)},T=oe.useMemo(function(){return typeof D=="boolean"?D:x.selectable},[D,x.selectable]),q=function(ue){x.onNodeClick(ue,yr(e)),T?F(ue):I(ue)},L=function(ue){x.onNodeDoubleClick(ue,yr(e))},_=function(ue){x.onNodeMouseEnter(ue,yr(e))},V=function(ue){x.onNodeMouseLeave(ue,yr(e))},Z=function(ue){x.onNodeContextMenu(ue,yr(e))},J=oe.useMemo(function(){return!!(x.draggable&&(!x.draggable.nodeDraggable||x.draggable.nodeDraggable(w)))},[x.draggable,w]),z=function(ue){ue.stopPropagation(),S(!0),x.onNodeDragStart(ue,e);try{ue.dataTransfer.setData("text/plain","")}catch{}},Y=function(ue){ue.preventDefault(),ue.stopPropagation(),x.onNodeDragEnter(ue,e)},G=function(ue){ue.preventDefault(),ue.stopPropagation(),x.onNodeDragOver(ue,e)},X=function(ue){ue.stopPropagation(),x.onNodeDragLeave(ue,e)},W=function(ue){ue.stopPropagation(),S(!1),x.onNodeDragEnd(ue,e)},H=function(ue){ue.preventDefault(),ue.stopPropagation(),S(!1),x.onNodeDrop(ue,e)},ne=function(ue){b||x.onNodeExpand(ue,yr(e))},U=oe.useMemo(function(){var ue=cn(x.keyEntities,o)||{},ke=ue.children;return!!(ke||[]).length},[x.keyEntities,o]),ae=oe.useMemo(function(){return c===!1?!1:c||!x.loadData&&!U||x.loadData&&e.loaded&&!U},[c,x.loadData,U,e.loaded]);oe.useEffect(function(){b||typeof x.loadData=="function"&&h&&!ae&&!e.loaded&&x.onNodeLoad(yr(e))},[b,x.loadData,x.onNodeLoad,h,ae,e]);var re=oe.useMemo(function(){var ue;return(ue=x.draggable)!==null&&ue!==void 0&&ue.icon?oe.createElement("span",{className:"".concat(x.prefixCls,"-draggable-icon")},x.draggable.icon):null},[x.draggable]),de=function(ue){var ke=e.switcherIcon||x.switcherIcon;return typeof ke=="function"?ke(K(K({},e),{},{isLeaf:ue})):ke},ge=function(){if(ae){var ue=de(!0);return ue!==!1?oe.createElement("span",{className:ve("".concat(x.prefixCls,"-switcher"),"".concat(x.prefixCls,"-switcher-noop"))},ue):null}var ke=de(!1);return ke!==!1?oe.createElement("span",{onClick:ne,className:ve("".concat(x.prefixCls,"-switcher"),"".concat(x.prefixCls,"-switcher_").concat(h?ab:ib))},ke):null},ye=oe.useMemo(function(){if(!P)return null;var ue=typeof P!="boolean"?P:null;return oe.createElement("span",{className:ve("".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"),$||e.disableCheckbox)),onClick:I,role:"checkbox","aria-checked":m?"mixed":g,"aria-disabled":$||e.disableCheckbox,"aria-label":"Select ".concat(typeof e.title=="string"?e.title:"tree node")},ue)},[P,g,m,$,e.disableCheckbox,e.title]),Ne=oe.useMemo(function(){return ae?null:h?ab:ib},[ae,h]),xe=oe.useMemo(function(){return oe.createElement("span",{className:ve("".concat(x.prefixCls,"-iconEle"),"".concat(x.prefixCls,"-icon__").concat(Ne||"docu"),M({},"".concat(x.prefixCls,"-icon_loading"),b))})},[x.prefixCls,Ne,b]),be=oe.useMemo(function(){var ue=!!x.draggable,ke=!e.disabled&&ue&&x.dragOverNodeKey===o;return ke?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]),Ae=oe.useMemo(function(){var ue=e.title,ke=ue===void 0?PT:ue,Ke="".concat(x.prefixCls,"-node-content-wrapper"),Ze;if(x.showIcon){var We=e.icon||x.icon;Ze=We?oe.createElement("span",{className:ve("".concat(x.prefixCls,"-iconEle"),"".concat(x.prefixCls,"-icon__customize"))},typeof We=="function"?We(e):We):xe}else x.loadData&&b&&(Ze=xe);var _e;return typeof ke=="function"?_e=ke(w):x.titleRender?_e=x.titleRender(w):_e=ke,oe.createElement("span",{ref:j,title:typeof ke=="string"?ke:"",className:ve(Ke,"".concat(Ke,"-").concat(Ne||"normal"),M({},"".concat(x.prefixCls,"-node-selected"),!$&&(v||A))),onMouseEnter:_,onMouseLeave:V,onContextMenu:Z,onClick:q,onDoubleClick:L},Ze,oe.createElement("span",{className:"".concat(x.prefixCls,"-title")},_e),be)},[x.prefixCls,x.showIcon,e,x.icon,xe,x.titleRender,w,Ne,_,V,Z,q,L]),me=Jn(k,{aria:!0,data:!0}),Ee=cn(x.keyEntities,o)||{},je=Ee.level,Be=f[f.length-1],Ye=!$&&J,Re=x.draggingNodeKey===o,Te=D!==void 0?{"aria-selected":!!D}:void 0;return oe.createElement("div",ze({ref:y,role:"treeitem","aria-expanded":c?void 0:h,className:ve(a,"".concat(x.prefixCls,"-treenode"),(n={},M(M(M(M(M(M(M(M(M(M(n,"".concat(x.prefixCls,"-treenode-disabled"),$),"".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"),Be),"".concat(x.prefixCls,"-treenode-draggable"),J),"dragging",Re),M(M(M(M(M(M(M(n,"drop-target",x.dropTargetKey===o),"drop-container",x.dropContainerKey===o),"drag-over",!$&&l),"drag-over-gap-top",!$&&u),"drag-over-gap-bottom",!$&&s),"filter-node",(r=x.filterTreeNode)===null||r===void 0?void 0:r.call(x,yr(e))),"".concat(x.prefixCls,"-treenode-leaf"),ae))),style:i,draggable:Ye,onDragStart:Ye?z:void 0,onDragEnter:J?Y:void 0,onDragOver:J?G:void 0,onDragLeave:J?X:void 0,onDrop:J?H:void 0,onDragEnd:J?W:void 0,onMouseMove:E},Te,me),oe.createElement(AT,{prefixCls:x.prefixCls,level:je,isStart:p,isEnd:f}),re,ge(),ye,Ae)};vl.isTreeNode=1;function Vn(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function lo(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function Bm(e){return e.split("-")}function NT(e,t){var r=[],n=cn(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(i){var l=i.key,u=i.children;r.push(l),o(u)})}return o(n.children),r}function jT(e){if(e.parent){var t=Bm(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function IT(e){var t=Bm(e.pos);return Number(t[t.length-1])===0}function lb(e,t,r,n,o,a,i,l,u,s){var c,p=e.clientX,f=e.clientY,h=e.target.getBoundingClientRect(),v=h.top,g=h.height,m=(s==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-p),b=(m-12)/n,y=u.filter(function(P){var F;return(F=l[P])===null||F===void 0||(F=F.children)===null||F===void 0?void 0:F.length}),C=cn(l,r.eventKey);if(f<v+g/2){var w=i.findIndex(function(P){return P.key===C.key}),E=w<=0?0:w-1,D=i[E].key;C=cn(l,D)}var k=C.key,x=C,O=C.key,j=0,B=0;if(!y.includes(k))for(var N=0;N<b&&jT(C);N+=1)C=C.parent,B+=1;var A=t.data,S=C.node,$=!0;return IT(C)&&C.level===0&&f<v+g/2&&a({dragNode:A,dropNode:S,dropPosition:-1})&&C.key===r.eventKey?j=-1:(x.children||[]).length&&y.includes(O)?a({dragNode:A,dropNode:S,dropPosition:0})?j=0:$=!1:B===0?b>-1.5?a({dragNode:A,dropNode:S,dropPosition:1})?j=1:$=!1:a({dragNode:A,dropNode:S,dropPosition:0})?j=0:a({dragNode:A,dropNode:S,dropPosition:1})?j=1:$=!1:a({dragNode:A,dropNode:S,dropPosition:1})?j=1:$=!1,{dropPosition:j,dropLevelOffset:B,dropTargetKey:C.key,dropTargetPos:C.pos,dragOverNodeKey:O,dropContainerKey:j===0?null:((c=C.parent)===null||c===void 0?void 0:c.key)||null,dropAllowed:$}}function sb(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function rd(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(it(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return ur(!1,"`checkedKeys` is not an array or an object"),null;return t}function Vf(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=cn(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)}),Ie(r)}function RT(e){const[t,r]=xt(null);return[mt((n,o,a)=>{const i=t??n,l=Math.min(i||0,n),u=Math.max(i||0,n),s=o.slice(l,u+1).map(f=>e(f)),c=s.some(f=>!a.has(f)),p=[];return s.forEach(f=>{c?(a.has(f)||p.push(f),a.add(f)):(a.delete(f),p.push(f))}),r(c?u:null),p},[t]),n=>{r(n)}]}const Eo={},Xf="SELECT_ALL",Uf="SELECT_INVERT",Gf="SELECT_NONE",ub=[],Sw=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&Sw(e,n[e],r)}),r),TT=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:i,onChange:l,onSelect:u,onSelectAll:s,onSelectInvert:c,onSelectNone:p,onSelectMultiple:f,columnWidth:h,type:v,selections:g,fixed:m,renderCell:b,hideSelectAll:y,checkStrictly:C=!0}=t||{},{prefixCls:w,data:E,pageData:D,getRecordByKey:k,getRowKey:x,expandType:O,childrenColumnName:j,locale:B,getPopupContainer:N}=e,A=li(),[S,$]=RT(H=>H),[P,F]=Vr(n||o||ub,{value:n}),I=d.useRef(new Map),T=mt(H=>{if(r){const ne=new Map;H.forEach(U=>{let ae=k(U);!ae&&I.current.has(U)&&(ae=I.current.get(U)),ne.set(U,ae)}),I.current=ne}},[k,r]);d.useEffect(()=>{T(P)},[P]);const q=Ct(()=>Sw(j,D),[j,D]),{keyEntities:L}=Ct(()=>{if(C)return{keyEntities:null};let H=E;if(r){const ne=new Set(q.map((ae,re)=>x(ae,re))),U=Array.from(I.current).reduce((ae,[re,de])=>ne.has(re)?ae:ae.concat(de),[]);H=[].concat(Ie(H),Ie(U))}return ym(H,{externalGetKey:x,childrenPropName:j})},[E,x,C,j,r,q]),_=Ct(()=>{const H=new Map;return q.forEach((ne,U)=>{const ae=x(ne,U),re=(a?a(ne):null)||{};H.set(ae,re)}),H},[q,x,a]),V=mt(H=>{const ne=x(H);let U;return _.has(ne)?U=_.get(x(H)):U=a?a(H):void 0,!!(U!=null&&U.disabled)},[_,x]),[Z,J]=Ct(()=>{if(C)return[P||[],[]];const{checkedKeys:H,halfCheckedKeys:ne}=Ta(P,!0,L,V);return[H||[],ne]},[P,C,L,V]),z=Ct(()=>{const H=v==="radio"?Z.slice(0,1):Z;return new Set(H)},[Z,v]),Y=Ct(()=>v==="radio"?new Set:new Set(J),[J,v]);d.useEffect(()=>{t||F(ub)},[!!t]);const G=mt((H,ne)=>{let U,ae;T(H),r?(U=H,ae=H.map(re=>I.current.get(re))):(U=[],ae=[],H.forEach(re=>{const de=k(re);de!==void 0&&(U.push(re),ae.push(de))})),F(U),l==null||l(U,ae,{type:ne})},[F,k,l,r]),X=mt((H,ne,U,ae)=>{if(u){const re=U.map(de=>k(de));u(k(H),ne,re,ae)}G(U,"single")},[u,k,G]),W=Ct(()=>!g||y?null:(g===!0?[Xf,Uf,Gf]:g).map(H=>H===Xf?{key:"all",text:B.selectionAll,onSelect(){G(E.map((ne,U)=>x(ne,U)).filter(ne=>{const U=_.get(ne);return!(U!=null&&U.disabled)||z.has(ne)}),"all")}}:H===Uf?{key:"invert",text:B.selectInvert,onSelect(){const ne=new Set(z);D.forEach((ae,re)=>{const de=x(ae,re),ge=_.get(de);ge!=null&&ge.disabled||(ne.has(de)?ne.delete(de):ne.add(de))});const U=Array.from(ne);c&&(A.deprecated(!1,"onSelectInvert","onChange"),c(U)),G(U,"invert")}}:H===Gf?{key:"none",text:B.selectNone,onSelect(){p==null||p(),G(Array.from(z).filter(ne=>{const U=_.get(ne);return U==null?void 0:U.disabled}),"none")}}:H).map(H=>Object.assign(Object.assign({},H),{onSelect:(...ne)=>{var U,ae;(ae=H.onSelect)===null||ae===void 0||(U=ae).call.apply(U,[H].concat(ne)),$(null)}})),[g,z,D,x,c,G]);return[mt(H=>{var ne;if(!t)return H.filter(ue=>ue!==Eo);let U=Ie(H);const ae=new Set(z),re=q.map(x).filter(ue=>!_.get(ue).disabled),de=re.every(ue=>ae.has(ue)),ge=re.some(ue=>ae.has(ue)),ye=()=>{const ue=[];de?re.forEach(Ke=>{ae.delete(Ke),ue.push(Ke)}):re.forEach(Ke=>{ae.has(Ke)||(ae.add(Ke),ue.push(Ke))});const ke=Array.from(ae);s==null||s(!de,ke.map(Ke=>k(Ke)),ue.map(Ke=>k(Ke))),G(ke,"all"),$(null)};let Ne,xe;if(v!=="radio"){let ue;if(W){const et={getPopupContainer:N,items:W.map((yt,kt)=>{const{key:dt,text:ht,onSelect:Mt}=yt;return{key:dt??kt,onClick:()=>{Mt==null||Mt(re)},label:ht}})};ue=d.createElement("div",{className:`${w}-selection-extra`},d.createElement(Cm,{menu:et,getPopupContainer:N},d.createElement("span",null,d.createElement(ux,null))))}const ke=q.map((et,yt)=>{const kt=x(et,yt),dt=_.get(kt)||{};return Object.assign({checked:ae.has(kt)},dt)}).filter(({disabled:et})=>et),Ke=!!ke.length&&ke.length===q.length,Ze=Ke&&ke.every(({checked:et})=>et),We=Ke&&ke.some(({checked:et})=>et),_e=(i==null?void 0:i())||{},{onChange:nt,disabled:Ue}=_e;xe=d.createElement(ri,Object.assign({"aria-label":ue?"Custom selection":"Select all"},_e,{checked:Ke?Ze:!!q.length&&de,indeterminate:Ke?!Ze&&We:!de&&ge,onChange:et=>{ye(),nt==null||nt(et)},disabled:Ue??(q.length===0||Ke),skipGroup:!0})),Ne=!y&&d.createElement("div",{className:`${w}-selection`},xe,ue)}let be;v==="radio"?be=(ue,ke,Ke)=>{const Ze=x(ke,Ke),We=ae.has(Ze),_e=_.get(Ze);return{node:d.createElement(Ol,Object.assign({},_e,{checked:We,onClick:nt=>{var Ue;nt.stopPropagation(),(Ue=_e==null?void 0:_e.onClick)===null||Ue===void 0||Ue.call(_e,nt)},onChange:nt=>{var Ue;ae.has(Ze)||X(Ze,!0,[Ze],nt.nativeEvent),(Ue=_e==null?void 0:_e.onChange)===null||Ue===void 0||Ue.call(_e,nt)}})),checked:We}}:be=(ue,ke,Ke)=>{var Ze;const We=x(ke,Ke),_e=ae.has(We),nt=Y.has(We),Ue=_.get(We);let et;return O==="nest"?et=nt:et=(Ze=Ue==null?void 0:Ue.indeterminate)!==null&&Ze!==void 0?Ze:nt,{node:d.createElement(ri,Object.assign({},Ue,{indeterminate:et,checked:_e,skipGroup:!0,onClick:yt=>{var kt;yt.stopPropagation(),(kt=Ue==null?void 0:Ue.onClick)===null||kt===void 0||kt.call(Ue,yt)},onChange:yt=>{var kt;const{nativeEvent:dt}=yt,{shiftKey:ht}=dt,Mt=re.indexOf(We),Pt=Z.some(ft=>re.includes(ft));if(ht&&C&&Pt){const ft=S(Mt,re,ae),ut=Array.from(ae);f==null||f(!_e,ut.map(pe=>k(pe)),ft.map(pe=>k(pe))),G(ut,"multiple")}else{const ft=Z;if(C){const ut=_e?Vn(ft,We):lo(ft,We);X(We,!_e,ut,dt)}else{const ut=Ta([].concat(Ie(ft),[We]),!0,L,V),{checkedKeys:pe,halfCheckedKeys:Oe}=ut;let Se=pe;if(_e){const Ce=new Set(pe);Ce.delete(We),Se=Ta(Array.from(Ce),{halfCheckedKeys:Oe},L,V).checkedKeys}X(We,!_e,Se,dt)}}$(_e?null:Mt),(kt=Ue==null?void 0:Ue.onChange)===null||kt===void 0||kt.call(Ue,yt)}})),checked:_e}};const Ae=(ue,ke,Ke)=>{const{node:Ze,checked:We}=be(ue,ke,Ke);return b?b(We,ke,Ke,Ze):Ze};if(!U.includes(Eo))if(U.findIndex(ue=>{var ke;return((ke=ue[Hi])===null||ke===void 0?void 0:ke.columnType)==="EXPAND_COLUMN"})===0){const[ue,...ke]=U;U=[ue,Eo].concat(Ie(ke))}else U=[Eo].concat(Ie(U));const me=U.indexOf(Eo);U=U.filter((ue,ke)=>ue!==Eo||ke===me);const Ee=U[me-1],je=U[me+1];let Be=m;Be===void 0&&((je==null?void 0:je.fixed)!==void 0?Be=je.fixed:(Ee==null?void 0:Ee.fixed)!==void 0&&(Be=Ee.fixed)),Be&&Ee&&((ne=Ee[Hi])===null||ne===void 0?void 0:ne.columnType)==="EXPAND_COLUMN"&&Ee.fixed===void 0&&(Ee.fixed=Be);const Ye=ve(`${w}-selection-col`,{[`${w}-selection-col-with-dropdown`]:g&&v==="checkbox"}),Re=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(xe):t.columnTitle:Ne,Te={fixed:Be,width:h,className:`${w}-selection-column`,title:Re(),render:Ae,onCell:t.onCell,align:t.align,[Hi]:{className:Ye}};return U.map(ue=>ue===Eo?Te:ue)},[x,q,t,Z,z,Y,h,W,O,_,f,X,V]),z]};function MT(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 zT(e,t){return ni(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)}}):MT(n,r)})}function _T(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:u=>{n(o,u),u.stopPropagation()},className:ve(l,{[`${l}-spaced`]:!i,[`${l}-expanded`]:i&&a,[`${l}-collapsed`]:i&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function LT(e){return(t,r)=>{const n=t.querySelector(`.${e}-container`);let o=r;if(n){const a=getComputedStyle(n),i=Number.parseInt(a.borderLeftWidth,10),l=Number.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 hi(e,t){return t?`${t}-${e}`:`${e}`}const qu=(e,t)=>typeof e=="function"?e(t):e,HT=(e,t)=>{const r=qu(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var WT={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"},KT=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:WT}))},qT=d.forwardRef(KT);function VT(e){const t=d.useRef(e),r=fx();return[()=>t.current,n=>{t.current=n,r()}]}var XT=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 oe.createElement("div",{style:o})};function $w(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function UT(e,t){var r=d.useState(!1),n=he(r,2),o=n[0],a=n[1];Kt(function(){if(o)return e(),function(){t()}},[o]),Kt(function(){return a(!0),function(){a(!1)}},[])}var GT=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],YT=d.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,i=e.motionType,l=e.onMotionStart,u=e.onMotionEnd,s=e.active,c=e.treeNodeRequiredProps,p=bt(e,GT),f=d.useState(!0),h=he(f,2),v=h[0],g=h[1],m=d.useContext($m),b=m.prefixCls,y=a&&i!=="hide";Kt(function(){a&&y!==v&&g(y)},[a]);var C=function(){a&&l()},w=d.useRef(!1),E=function(){a&&!w.current&&(w.current=!0,u())};UT(C,E);var D=function(k){y===k&&E()};return a?d.createElement(ca,ze({ref:t,visible:v},o,{motionAppear:i==="show",onVisibleChanged:D}),function(k,x){var O=k.className,j=k.style;return d.createElement("div",{ref:x,className:ve("".concat(b,"-treenode-motion"),O),style:j},a.map(function(B){var N=Object.assign({},($w(B.data),B.data)),A=B.title,S=B.key,$=B.isStart,P=B.isEnd;delete N.children;var F=Li(S,c);return d.createElement(vl,ze({},N,F,{title:A,active:s,data:B.data,key:S,isStart:$,isEnd:P}))}))}):d.createElement(vl,ze({domRef:t,className:r,style:n},p,{active:s}))});function ZT(){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(s){l.set(s,!0)});var u=i.filter(function(s){return!l.has(s)});return u.length===1?u[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function cb(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 JT=["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"],db={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},QT=function(){},aa="RC_TREE_MOTION_".concat(Math.random()),Yf={key:aa},Bw={key:aa,level:0,index:0,pos:"0",node:Yf,nodes:[Yf]},fb={parent:null,children:[],pos:Bw.pos,data:Yf,title:null,key:aa,isStart:[],isEnd:[]};function pb(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function mb(e){var t=e.key,r=e.pos;return Al(t,r)}function eM(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 tM=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,u=e.loadingKeys,s=e.halfCheckedKeys,c=e.keyEntities,p=e.disabled,f=e.dragging,h=e.dragOverNodeKey,v=e.dropPosition,g=e.motion,m=e.height,b=e.itemHeight,y=e.virtual,C=e.scrollWidth,w=e.focusable,E=e.activeItem,D=e.focused,k=e.tabIndex,x=e.onKeyDown,O=e.onFocus,j=e.onBlur,B=e.onActiveChange,N=e.onListChangeStart,A=e.onListChangeEnd,S=bt(e,JT),$=d.useRef(null),P=d.useRef(null);d.useImperativeHandle(t,function(){return{scrollTo:function(be){$.current.scrollTo(be)},getIndentWidth:function(){return P.current.offsetWidth}}});var F=d.useState(o),I=he(F,2),T=I[0],q=I[1],L=d.useState(n),_=he(L,2),V=_[0],Z=_[1],J=d.useState(n),z=he(J,2),Y=z[0],G=z[1],X=d.useState([]),W=he(X,2),H=W[0],ne=W[1],U=d.useState(null),ae=he(U,2),re=ae[0],de=ae[1],ge=d.useRef(n);ge.current=n;function ye(){var be=ge.current;Z(be),G(be),ne([]),de(null),A()}Kt(function(){q(o);var be=ZT(T,o);if(be.key!==null)if(be.add){var Ae=V.findIndex(function(Re){var Te=Re.key;return Te===be.key}),me=pb(cb(V,n,be.key),y,m,b),Ee=V.slice();Ee.splice(Ae+1,0,fb),G(Ee),ne(me),de("show")}else{var je=n.findIndex(function(Re){var Te=Re.key;return Te===be.key}),Be=pb(cb(n,V,be.key),y,m,b),Ye=n.slice();Ye.splice(je+1,0,fb),G(Ye),ne(Be),de("hide")}else V!==n&&(Z(n),G(n))},[o,n]),d.useEffect(function(){f||ye()},[f]);var Ne=g?Y:n,xe={expandedKeys:o,selectedKeys:a,loadedKeys:l,loadingKeys:u,checkedKeys:i,halfCheckedKeys:s,dragOverNodeKey:h,dropPosition:v,keyEntities:c};return d.createElement(d.Fragment,null,D&&E&&d.createElement("span",{style:db,"aria-live":"assertive"},eM(E)),d.createElement("div",null,d.createElement("input",{style:db,disabled:w===!1||p,tabIndex:w!==!1?k:null,onKeyDown:x,onFocus:O,onBlur:j,value:"",onChange:QT,"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:P,className:"".concat(r,"-indent-unit")}))),d.createElement(Tu,ze({},S,{data:Ne,itemKey:mb,height:m,fullHeight:!1,virtual:y,itemHeight:b,scrollWidth:C,prefixCls:"".concat(r,"-list"),ref:$,role:"tree",onVisibleChange:function(be){be.every(function(Ae){return mb(Ae)!==aa})&&ye()}}),function(be){var Ae=be.pos,me=Object.assign({},($w(be.data),be.data)),Ee=be.title,je=be.key,Be=be.isStart,Ye=be.isEnd,Re=Al(je,Ae);delete me.key,delete me.children;var Te=Li(Re,xe);return d.createElement(YT,ze({},me,Te,{title:Ee,active:!!E&&je===E.key,pos:Ae,data:be.data,isStart:Be,isEnd:Ye,motion:g,motionNodes:je===aa?H:null,motionType:re,onMotionStart:N,onMotionEnd:ye,treeNodeRequiredProps:xe,onMouseMove:function(){B(null)}}))}))}),rM=10,Om=(function(e){ro(r,e);var t=no(r);function r(){var n;gr(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(Qe(n),"destroyed",!1),M(Qe(n),"delayedDragEnterLogic",void 0),M(Qe(n),"loadingRetryTimes",{}),M(Qe(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:ti()}),M(Qe(n),"dragStartMousePosition",null),M(Qe(n),"dragNodeProps",null),M(Qe(n),"currentMouseOverDroppableNodeKey",null),M(Qe(n),"listRef",d.createRef()),M(Qe(n),"onNodeDragStart",function(l,u){var s=n.state,c=s.expandedKeys,p=s.keyEntities,f=n.props.onDragStart,h=u.eventKey;n.dragNodeProps=u,n.dragStartMousePosition={x:l.clientX,y:l.clientY};var v=Vn(c,h);n.setState({draggingNodeKey:h,dragChildrenKeys:NT(h,p),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(v),window.addEventListener("dragend",n.onWindowDragEnd),f==null||f({event:l,node:yr(u)})}),M(Qe(n),"onNodeDragEnter",function(l,u){var s=n.state,c=s.expandedKeys,p=s.keyEntities,f=s.dragChildrenKeys,h=s.flattenNodes,v=s.indent,g=n.props,m=g.onDragEnter,b=g.onExpand,y=g.allowDrop,C=g.direction,w=u.pos,E=u.eventKey;if(n.currentMouseOverDroppableNodeKey!==E&&(n.currentMouseOverDroppableNodeKey=E),!n.dragNodeProps){n.resetDragState();return}var D=lb(l,n.dragNodeProps,u,v,n.dragStartMousePosition,y,h,p,c,C),k=D.dropPosition,x=D.dropLevelOffset,O=D.dropTargetKey,j=D.dropContainerKey,B=D.dropTargetPos,N=D.dropAllowed,A=D.dragOverNodeKey;if(f.includes(O)||!N){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(S){clearTimeout(n.delayedDragEnterLogic[S])}),n.dragNodeProps.eventKey!==u.eventKey&&(l.persist(),n.delayedDragEnterLogic[w]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var S=Ie(c),$=cn(p,u.eventKey);$&&($.children||[]).length&&(S=lo(c,u.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(S),b==null||b(S,{node:yr(u),expanded:!0,nativeEvent:l.nativeEvent})}},800)),n.dragNodeProps.eventKey===O&&x===0){n.resetDragState();return}n.setState({dragOverNodeKey:A,dropPosition:k,dropLevelOffset:x,dropTargetKey:O,dropContainerKey:j,dropTargetPos:B,dropAllowed:N}),m==null||m({event:l,node:yr(u),expandedKeys:c})}),M(Qe(n),"onNodeDragOver",function(l,u){var s=n.state,c=s.dragChildrenKeys,p=s.flattenNodes,f=s.keyEntities,h=s.expandedKeys,v=s.indent,g=n.props,m=g.onDragOver,b=g.allowDrop,y=g.direction;if(n.dragNodeProps){var C=lb(l,n.dragNodeProps,u,v,n.dragStartMousePosition,b,p,f,h,y),w=C.dropPosition,E=C.dropLevelOffset,D=C.dropTargetKey,k=C.dropContainerKey,x=C.dropTargetPos,O=C.dropAllowed,j=C.dragOverNodeKey;c.includes(D)||!O||(n.dragNodeProps.eventKey===D&&E===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():w===n.state.dropPosition&&E===n.state.dropLevelOffset&&D===n.state.dropTargetKey&&k===n.state.dropContainerKey&&x===n.state.dropTargetPos&&O===n.state.dropAllowed&&j===n.state.dragOverNodeKey||n.setState({dropPosition:w,dropLevelOffset:E,dropTargetKey:D,dropContainerKey:k,dropTargetPos:x,dropAllowed:O,dragOverNodeKey:j}),m==null||m({event:l,node:yr(u)}))}}),M(Qe(n),"onNodeDragLeave",function(l,u){n.currentMouseOverDroppableNodeKey===u.eventKey&&!l.currentTarget.contains(l.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var s=n.props.onDragLeave;s==null||s({event:l,node:yr(u)})}),M(Qe(n),"onWindowDragEnd",function(l){n.onNodeDragEnd(l,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),M(Qe(n),"onNodeDragEnd",function(l,u){var s=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),s==null||s({event:l,node:yr(u)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),M(Qe(n),"onNodeDrop",function(l,u){var s,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=n.state,f=p.dragChildrenKeys,h=p.dropPosition,v=p.dropTargetKey,g=p.dropTargetPos,m=p.dropAllowed;if(m){var b=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),v!==null){var y=K(K({},Li(v,n.getTreeNodeRequiredProps())),{},{active:((s=n.getActiveItem())===null||s===void 0?void 0:s.key)===v,data:cn(n.state.keyEntities,v).node}),C=f.includes(v);ur(!C,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var w=Bm(g),E={event:l,node:yr(y),dragNode:n.dragNodeProps?yr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(f),dropToGap:h!==0,dropPosition:h+Number(w[w.length-1])};c||(b==null||b(E)),n.dragNodeProps=null}}}),M(Qe(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(Qe(n),"triggerExpandActionExpand",function(l,u){var s=n.state,c=s.expandedKeys,p=s.flattenNodes,f=u.expanded,h=u.key,v=u.isLeaf;if(!(v||l.shiftKey||l.metaKey||l.ctrlKey)){var g=p.filter(function(b){return b.key===h})[0],m=yr(K(K({},Li(h,n.getTreeNodeRequiredProps())),{},{data:g.data}));n.setExpandedKeys(f?Vn(c,h):lo(c,h)),n.onNodeExpand(l,m)}}),M(Qe(n),"onNodeClick",function(l,u){var s=n.props,c=s.onClick,p=s.expandAction;p==="click"&&n.triggerExpandActionExpand(l,u),c==null||c(l,u)}),M(Qe(n),"onNodeDoubleClick",function(l,u){var s=n.props,c=s.onDoubleClick,p=s.expandAction;p==="doubleClick"&&n.triggerExpandActionExpand(l,u),c==null||c(l,u)}),M(Qe(n),"onNodeSelect",function(l,u){var s=n.state.selectedKeys,c=n.state,p=c.keyEntities,f=c.fieldNames,h=n.props,v=h.onSelect,g=h.multiple,m=u.selected,b=u[f.key],y=!m;y?g?s=lo(s,b):s=[b]:s=Vn(s,b);var C=s.map(function(w){var E=cn(p,w);return E?E.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:s}),v==null||v(s,{event:"select",selected:y,node:u,selectedNodes:C,nativeEvent:l.nativeEvent})}),M(Qe(n),"onNodeCheck",function(l,u,s){var c=n.state,p=c.keyEntities,f=c.checkedKeys,h=c.halfCheckedKeys,v=n.props,g=v.checkStrictly,m=v.onCheck,b=u.key,y,C={event:"check",node:u,checked:s,nativeEvent:l.nativeEvent};if(g){var w=s?lo(f,b):Vn(f,b),E=Vn(h,b);y={checked:w,halfChecked:E},C.checkedNodes=w.map(function(B){return cn(p,B)}).filter(Boolean).map(function(B){return B.node}),n.setUncontrolledState({checkedKeys:w})}else{var D=Ta([].concat(Ie(f),[b]),!0,p),k=D.checkedKeys,x=D.halfCheckedKeys;if(!s){var O=new Set(k);O.delete(b);var j=Ta(Array.from(O),{halfCheckedKeys:x},p);k=j.checkedKeys,x=j.halfCheckedKeys}y=k,C.checkedNodes=[],C.checkedNodesPositions=[],C.halfCheckedKeys=x,k.forEach(function(B){var N=cn(p,B);if(N){var A=N.node,S=N.pos;C.checkedNodes.push(A),C.checkedNodesPositions.push({node:A,pos:S})}}),n.setUncontrolledState({checkedKeys:k},!1,{halfCheckedKeys:x})}m==null||m(y,C)}),M(Qe(n),"onNodeLoad",function(l){var u,s=l.key,c=n.state.keyEntities,p=cn(c,s);if(!(p!=null&&(u=p.children)!==null&&u!==void 0&&u.length)){var f=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,w=n.props,E=w.loadData,D=w.onLoad;if(!E||b.includes(s)||C.includes(s))return null;var k=E(l);return k.then(function(){var x=n.state.loadedKeys,O=lo(x,s);D==null||D(O,{event:"load",node:l}),n.setUncontrolledState({loadedKeys:O}),n.setState(function(j){return{loadingKeys:Vn(j.loadingKeys,s)}}),h()}).catch(function(x){if(n.setState(function(j){return{loadingKeys:Vn(j.loadingKeys,s)}}),n.loadingRetryTimes[s]=(n.loadingRetryTimes[s]||0)+1,n.loadingRetryTimes[s]>=rM){var O=n.state.loadedKeys;ur(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:lo(O,s)}),h()}v(x)}),{loadingKeys:lo(C,s)}})});return f.catch(function(){}),f}}),M(Qe(n),"onNodeMouseEnter",function(l,u){var s=n.props.onMouseEnter;s==null||s({event:l,node:u})}),M(Qe(n),"onNodeMouseLeave",function(l,u){var s=n.props.onMouseLeave;s==null||s({event:l,node:u})}),M(Qe(n),"onNodeContextMenu",function(l,u){var s=n.props.onRightClick;s&&(l.preventDefault(),s({event:l,node:u}))}),M(Qe(n),"onFocus",function(){var l=n.props.onFocus;n.setState({focused:!0});for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];l==null||l.apply(void 0,s)}),M(Qe(n),"onBlur",function(){var l=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];l==null||l.apply(void 0,s)}),M(Qe(n),"getTreeNodeRequiredProps",function(){var l=n.state,u=l.expandedKeys,s=l.selectedKeys,c=l.loadedKeys,p=l.loadingKeys,f=l.checkedKeys,h=l.halfCheckedKeys,v=l.dragOverNodeKey,g=l.dropPosition,m=l.keyEntities;return{expandedKeys:u||[],selectedKeys:s||[],loadedKeys:c||[],loadingKeys:p||[],checkedKeys:f||[],halfCheckedKeys:h||[],dragOverNodeKey:v,dropPosition:g,keyEntities:m}}),M(Qe(n),"setExpandedKeys",function(l){var u=n.state,s=u.treeData,c=u.fieldNames,p=ed(s,l,c);n.setUncontrolledState({expandedKeys:l,flattenNodes:p},!0)}),M(Qe(n),"onNodeExpand",function(l,u){var s=n.state.expandedKeys,c=n.state,p=c.listChanging,f=c.fieldNames,h=n.props,v=h.onExpand,g=h.loadData,m=u.expanded,b=u[f.key];if(!p){var y=s.includes(b),C=!m;if(ur(m&&y||!m&&!y,"Expand state not sync with index check"),s=C?lo(s,b):Vn(s,b),n.setExpandedKeys(s),v==null||v(s,{node:u,expanded:C,nativeEvent:l.nativeEvent}),C&&g){var w=n.onNodeLoad(u);w&&w.then(function(){var E=ed(n.state.treeData,s,f);n.setUncontrolledState({flattenNodes:E})}).catch(function(){var E=n.state.expandedKeys,D=Vn(E,b);n.setExpandedKeys(D)})}}}),M(Qe(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),M(Qe(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),M(Qe(n),"onActiveChange",function(l){var u=n.state.activeKey,s=n.props,c=s.onActiveChange,p=s.itemScrollOffset,f=p===void 0?0:p;u!==l&&(n.setState({activeKey:l}),l!==null&&n.scrollTo({key:l,offset:f}),c==null||c(l))}),M(Qe(n),"getActiveItem",function(){var l=n.state,u=l.activeKey,s=l.flattenNodes;return u===null?null:s.find(function(c){var p=c.key;return p===u})||null}),M(Qe(n),"offsetActiveKey",function(l){var u=n.state,s=u.flattenNodes,c=u.activeKey,p=s.findIndex(function(v){var g=v.key;return g===c});p===-1&&l<0&&(p=s.length),p=(p+l+s.length)%s.length;var f=s[p];if(f){var h=f.key;n.onActiveChange(h)}else n.onActiveChange(null)}),M(Qe(n),"onKeyDown",function(l){var u=n.state,s=u.activeKey,c=u.expandedKeys,p=u.checkedKeys,f=u.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[f.children]||[]).length,w=yr(K(K({},Li(s,y)),{},{data:b.data,active:!0}));switch(l.which){case rt.LEFT:{C&&c.includes(s)?n.onNodeExpand({},w):b.parent&&n.onActiveChange(b.parent.key),l.preventDefault();break}case rt.RIGHT:{C&&!c.includes(s)?n.onNodeExpand({},w):b.children&&b.children.length&&n.onActiveChange(b.children[0].key),l.preventDefault();break}case rt.ENTER:case rt.SPACE:{g&&!w.disabled&&w.checkable!==!1&&!w.disableCheckbox?n.onNodeCheck({},w,!p.includes(s)):!g&&m&&!w.disabled&&w.selectable!==!1&&n.onNodeSelect({},w);break}}}v==null||v(l)}),M(Qe(n),"setUncontrolledState",function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var c=!1,p=!0,f={};Object.keys(l).forEach(function(h){if(n.props.hasOwnProperty(h)){p=!1;return}c=!0,f[h]=l[h]}),c&&(!u||p)&&n.setState(K(K({},f),s))}}),M(Qe(n),"scrollTo",function(l){n.listRef.current.scrollTo(l)}),n}return vr(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,u=n.activeKey,s=n.dropLevelOffset,c=n.dropContainerKey,p=n.dropTargetKey,f=n.dropPosition,h=n.dragOverNodeKey,v=n.indent,g=this.props,m=g.prefixCls,b=g.className,y=g.style,C=g.showLine,w=g.focusable,E=g.tabIndex,D=E===void 0?0:E,k=g.selectable,x=g.showIcon,O=g.icon,j=g.switcherIcon,B=g.draggable,N=g.checkable,A=g.checkStrictly,S=g.disabled,$=g.motion,P=g.loadData,F=g.filterTreeNode,I=g.height,T=g.itemHeight,q=g.scrollWidth,L=g.virtual,_=g.titleRender,V=g.dropIndicatorRender,Z=g.onContextMenu,J=g.onScroll,z=g.direction,Y=g.rootClassName,G=g.rootStyle,X=Jn(this.props,{aria:!0,data:!0}),W;B&&(it(B)==="object"?W=B:typeof B=="function"?W={nodeDraggable:B}:W={});var H={prefixCls:m,selectable:k,showIcon:x,icon:O,switcherIcon:j,draggable:W,draggingNodeKey:l,checkable:N,checkStrictly:A,disabled:S,keyEntities:i,dropLevelOffset:s,dropContainerKey:c,dropTargetKey:p,dropPosition:f,dragOverNodeKey:h,indent:v,direction:z,dropIndicatorRender:V,loadData:P,filterTreeNode:F,titleRender:_,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($m.Provider,{value:H},d.createElement("div",{className:ve(m,b,Y,M(M(M({},"".concat(m,"-show-line"),C),"".concat(m,"-focused"),o),"".concat(m,"-active-focused"),u!==null)),style:G},d.createElement(tM,ze({ref:this.listRef,prefixCls:m,style:y,data:a,disabled:S,selectable:k,checkable:!!N,motion:$,dragging:l!==null,height:I,itemHeight:T,virtual:L,focusable:w,focused:o,tabIndex:D,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Z,onScroll:J,scrollWidth:q},this.getTreeNodeRequiredProps(),X))))}}],[{key:"getDerivedStateFromProps",value:function(n,o){var a=o.prevProps,i={prevProps:n};function l(D){return!a&&n.hasOwnProperty(D)||a&&a[D]!==n[D]}var u,s=o.fieldNames;if(l("fieldNames")&&(s=ti(n.fieldNames),i.fieldNames=s),l("treeData")?u=n.treeData:l("children")&&(ur(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),u=Gx(n.children)),u){i.treeData=u;var c=ym(u,{fieldNames:s});i.keyEntities=K(M({},aa,Bw),c.keyEntities)}var p=i.keyEntities||o.keyEntities;if(l("expandedKeys")||a&&l("autoExpandParent"))i.expandedKeys=n.autoExpandParent||!a&&n.defaultExpandParent?Vf(n.expandedKeys,p):n.expandedKeys;else if(!a&&n.defaultExpandAll){var f=K({},p);delete f[aa];var h=[];Object.keys(f).forEach(function(D){var k=f[D];k.children&&k.children.length&&h.push(k.key)}),i.expandedKeys=h}else!a&&n.defaultExpandedKeys&&(i.expandedKeys=n.autoExpandParent||n.defaultExpandParent?Vf(n.defaultExpandedKeys,p):n.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,u||i.expandedKeys){var v=ed(u||o.treeData,i.expandedKeys||o.expandedKeys,s);i.flattenNodes=v}if(n.selectable&&(l("selectedKeys")?i.selectedKeys=sb(n.selectedKeys,n):!a&&n.defaultSelectedKeys&&(i.selectedKeys=sb(n.defaultSelectedKeys,n))),n.checkable){var g;if(l("checkedKeys")?g=rd(n.checkedKeys)||{}:!a&&n.defaultCheckedKeys?g=rd(n.defaultCheckedKeys)||{}:u&&(g=rd(n.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),g){var m=g,b=m.checkedKeys,y=b===void 0?[]:b,C=m.halfCheckedKeys,w=C===void 0?[]:C;if(!n.checkStrictly){var E=Ta(y,!0,p);y=E.checkedKeys,w=E.halfCheckedKeys}i.checkedKeys=y,i.halfCheckedKeys=w}}return l("loadedKeys")&&(i.loadedKeys=n.loadedKeys),i}}]),r})(d.Component);M(Om,"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:XT,allowDrop:function(){return!0},expandAction:!1});M(Om,"TreeNode",vl);var nM={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"},oM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:nM}))},Ow=d.forwardRef(oM),aM={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"},iM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:aM}))},lM=d.forwardRef(iM),sM={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"},uM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:sM}))},cM=d.forwardRef(uM),dM={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"},fM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:dM}))},pM=d.forwardRef(fM);const mM=({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","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),hM=new Ut("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),gM=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),vM=(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:`${ce(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),bM=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:i,nodeSelectedBg:l,nodeHoverBg:u,colorTextQuaternary:s,controlItemBgActiveDisabled:c}=t;return{[r]:Object.assign(Object.assign({},Sr(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:hM,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:ce(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:s},[`&${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({},gM(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`},vM(e,t)),{"&:hover":{backgroundColor:u},[`&${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:`${ce(t.calc(a).div(2).equal())} !important`}})}},yM=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),i=tr(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[bM(e,i),r&&mM(i)].filter(Boolean)},CM=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}},xM=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},CM(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},wM=Lr("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Zx(`${t}-checkbox`,e)},yM(t,e),SC(e)],xM),hb=4;function EM(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,i=a==="ltr"?"left":"right",l=a==="ltr"?"right":"left",u={[i]:-r*o+hb,[l]:0};switch(t){case-1:u.top=-3;break;case 1:u.bottom=-3;break;default:u.bottom=-3,u[i]=o+hb;break}return oe.createElement("div",{style:u,className:`${n}-drop-indicator`})}var kM={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"},DM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:kM}))},SM=d.forwardRef(DM),$M={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"},BM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:$M}))},OM=d.forwardRef(BM),AM={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"},FM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:AM}))},PM=d.forwardRef(FM);const NM=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:i,switcherLoadingIcon:l}=e,{isLeaf:u,expanded:s,loading:c}=a;if(c)return d.isValidElement(l)?l:d.createElement(Hp,{className:`${n}-switcher-loading-icon`});let p;if(i&&typeof i=="object"&&(p=i.showLeafIcon),u){if(!i)return null;if(typeof p!="boolean"&&p){const v=typeof p=="function"?p(a):p,g=`${n}-switcher-line-custom-icon`;return d.isValidElement(v)?Qn(v,{className:ve((t=v.props)===null||t===void 0?void 0:t.className,g)}):v}return p?d.createElement(Ow,{className:`${n}-switcher-line-icon`}):d.createElement("span",{className:`${n}-switcher-leaf-line`})}const f=`${n}-switcher-icon`,h=typeof o=="function"?o(a):o;return d.isValidElement(h)?Qn(h,{className:ve((r=h.props)===null||r===void 0?void 0:r.className,f)}):h!==void 0?h:i?s?d.createElement(OM,{className:`${n}-switcher-line-icon`}):d.createElement(PM,{className:`${n}-switcher-line-icon`}):d.createElement(SM,{className:f})},Aw=oe.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:i}=oe.useContext(Qt),{prefixCls:l,className:u,showIcon:s=!1,showLine:c,switcherIcon:p,switcherLoadingIcon:f,blockNode:h=!1,children:v,checkable:g=!1,selectable:m=!0,draggable:b,motion:y,style:C}=e,w=n("tree",l),E=n(),D=y??Object.assign(Object.assign({},xC(E)),{motionAppear:!1}),k=Object.assign(Object.assign({},e),{checkable:g,selectable:m,showIcon:s,motion:D,blockNode:h,showLine:!!c,dropIndicatorRender:EM}),[x,O,j]=wM(w),[,B]=Gr(),N=B.paddingXS/2+(((r=B.Tree)===null||r===void 0?void 0:r.titleHeight)||B.controlHeightSM),A=oe.useMemo(()=>{if(!b)return!1;let $={};switch(typeof b){case"function":$.nodeDraggable=b;break;case"object":$=Object.assign({},b);break}return $.icon!==!1&&($.icon=$.icon||oe.createElement(pM,null)),$},[b]),S=$=>oe.createElement(NM,{prefixCls:w,switcherIcon:p,switcherLoadingIcon:f,treeNodeProps:$,showLine:c});return x(oe.createElement(Om,Object.assign({itemHeight:N,ref:t,virtual:a},k,{style:Object.assign(Object.assign({},i==null?void 0:i.style),C),prefixCls:w,className:ve({[`${w}-icon-hide`]:!s,[`${w}-block-node`]:h,[`${w}-unselectable`]:!m,[`${w}-rtl`]:o==="rtl"},i==null?void 0:i.className,u,O,j),direction:o,checkable:g&&oe.createElement("span",{className:`${w}-checkbox-inner`}),selectable:m,switcherIcon:S,draggable:A}),v))}),gb=0,nd=1,vb=2;function Am(e,t,r){const{key:n,children:o}=r;function a(i){const l=i[n],u=i[o];t(l,i)!==!1&&Am(u||[],t,r)}e.forEach(a)}function jM({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let i=gb;if(r&&r===n)return[r];if(!r||!n)return[];function l(u){return u===r||u===n}return Am(e,u=>{if(i===vb)return!1;if(l(u)){if(a.push(u),i===gb)i=nd;else if(i===nd)return i=vb,!1}else i===nd&&a.push(u);return t.includes(u)},ti(o)),a}function od(e,t,r){const n=Ie(t),o=[];return Am(e,(a,i)=>{const l=n.indexOf(a);return l!==-1&&(o.push(i),n.splice(l,1)),!!n.length},ti(r)),o}var bb=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 IM(e){const{isLeaf:t,expanded:r}=e;return t?d.createElement(Ow,null):r?d.createElement(lM,null):d.createElement(cM,null)}function yb({treeData:e,children:t}){return e||Gx(t)}const RM=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=bb(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const i=d.useRef(null),l=d.useRef(null),u=()=>{const{keyEntities:x}=ym(yb(a));let O;return r?O=Object.keys(x):n?O=Vf(a.expandedKeys||o||[],x):O=a.expandedKeys||o||[],O},[s,c]=d.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[p,f]=d.useState(()=>u());d.useEffect(()=>{"selectedKeys"in a&&c(a.selectedKeys)},[a.selectedKeys]),d.useEffect(()=>{"expandedKeys"in a&&f(a.expandedKeys)},[a.expandedKeys]);const h=(x,O)=>{var j;return"expandedKeys"in a||f(x),(j=a.onExpand)===null||j===void 0?void 0:j.call(a,x,O)},v=(x,O)=>{var j;const{multiple:B,fieldNames:N}=a,{node:A,nativeEvent:S}=O,{key:$=""}=A,P=yb(a),F=Object.assign(Object.assign({},O),{selected:!0}),I=(S==null?void 0:S.ctrlKey)||(S==null?void 0:S.metaKey),T=S==null?void 0:S.shiftKey;let q;B&&I?(q=x,i.current=$,l.current=q,F.selectedNodes=od(P,q,N)):B&&T?(q=Array.from(new Set([].concat(Ie(l.current||[]),Ie(jM({treeData:P,expandedKeys:p,startKey:$,endKey:i.current,fieldNames:N}))))),F.selectedNodes=od(P,q,N)):(q=[$],i.current=$,l.current=q,F.selectedNodes=od(P,q,N)),(j=a.onSelect)===null||j===void 0||j.call(a,q,F),"selectedKeys"in a||c(q)},{getPrefixCls:g,direction:m}=d.useContext(Qt),{prefixCls:b,className:y,showIcon:C=!0,expandAction:w="click"}=a,E=bb(a,["prefixCls","className","showIcon","expandAction"]),D=g("tree",b),k=ve(`${D}-directory`,{[`${D}-directory-rtl`]:m==="rtl"},y);return d.createElement(Aw,Object.assign({icon:IM,ref:t,blockNode:!0},E,{showIcon:C,expandAction:w,prefixCls:D,className:k,expandedKeys:p,selectedKeys:s,onSelect:v,onExpand:h}))},TM=d.forwardRef(RM),Fm=Aw;Fm.DirectoryTree=TM;Fm.TreeNode=vl;const Cb=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(cx,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},MM=e=>{const{keyCode:t}=e;t===rt.ENTER&&e.stopPropagation()},zM=d.forwardRef((e,t)=>d.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:MM,ref:t},e.children));function Ma(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(Ie(t),Ie(Ma(n))))}),t}function _M(e){return e.some(({children:t})=>t)}function Fw(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Pw({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((i,l)=>{const u=String(i.value);if(i.children)return{key:u||l,label:i.text,popupClassName:`${t}-dropdown-submenu`,children:Pw({filters:i.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const s=n?ri:Ol,c={key:i.value!==void 0?u:l,label:d.createElement(d.Fragment,null,d.createElement(s,{checked:r.includes(u)}),d.createElement("span",null,i.text))};return o.trim()?typeof a=="function"?a(o,i)?c:null:Fw(o,i.text)?c:null:c})}function ad(e){return e||[]}const LM=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:i,column:l,dropdownPrefixCls:u,columnKey:s,filterOnClose:c,filterMultiple:p,filterMode:f="menu",filterSearch:h=!1,filterState:v,triggerFilter:g,locale:m,children:b,getPopupContainer:y,rootClassName:C}=e,{filterResetToDefaultFilteredValue:w,defaultFilteredValue:E,filterDropdownProps:D={},filterDropdownOpen:k,filterDropdownVisible:x,onFilterDropdownVisibleChange:O,onFilterDropdownOpenChange:j}=l,[B,N]=d.useState(!1),A=!!(v&&(!((t=v.filteredKeys)===null||t===void 0)&&t.length||v.forceFiltered)),S=xe=>{var be;N(xe),(be=D.onOpenChange)===null||be===void 0||be.call(D,xe),j==null||j(xe),O==null||O(xe)},$=(o=(n=(r=D.open)!==null&&r!==void 0?r:k)!==null&&n!==void 0?n:x)!==null&&o!==void 0?o:B,P=v==null?void 0:v.filteredKeys,[F,I]=VT(ad(P)),T=({selectedKeys:xe})=>{I(xe)},q=(xe,{node:be,checked:Ae})=>{T(p?{selectedKeys:xe}:{selectedKeys:Ae&&be.key?[be.key]:[]})};d.useEffect(()=>{B&&T({selectedKeys:ad(P)})},[P]);const[L,_]=d.useState([]),V=xe=>{_(xe)},[Z,J]=d.useState(""),z=xe=>{const{value:be}=xe.target;J(be)};d.useEffect(()=>{B||J("")},[B]);const Y=xe=>{const be=xe!=null&&xe.length?xe:null;if(be===null&&(!v||!v.filteredKeys)||Zn(be,v==null?void 0:v.filteredKeys,!0))return null;g({column:l,key:s,filteredKeys:be})},G=()=>{S(!1),Y(F())},X=({confirm:xe,closeDropdown:be}={confirm:!1,closeDropdown:!1})=>{xe&&Y([]),be&&S(!1),J(""),I(w?(E||[]).map(Ae=>String(Ae)):[])},W=({closeDropdown:xe}={closeDropdown:!0})=>{xe&&S(!1),Y(F())},H=(xe,be)=>{be.source==="trigger"&&(xe&&P!==void 0&&I(ad(P)),S(xe),!xe&&!l.filterDropdown&&c&&G())},ne=ve({[`${u}-menu-without-submenu`]:!_M(l.filters||[])}),U=xe=>{if(xe.target.checked){const be=Ma(l==null?void 0:l.filters).map(Ae=>String(Ae));I(be)}else I([])},ae=({filters:xe})=>(xe||[]).map((be,Ae)=>{const me=String(be.value),Ee={title:be.text,key:be.value!==void 0?me:String(Ae)};return be.children&&(Ee.children=ae({filters:be.children})),Ee}),re=xe=>{var be;return Object.assign(Object.assign({},xe),{text:xe.title,value:xe.key,children:((be=xe.children)===null||be===void 0?void 0:be.map(Ae=>re(Ae)))||[]})};let de;const{direction:ge,renderEmpty:ye}=d.useContext(Qt);if(typeof l.filterDropdown=="function")de=l.filterDropdown({prefixCls:`${u}-custom`,setSelectedKeys:xe=>T({selectedKeys:xe}),selectedKeys:F(),confirm:W,clearFilters:X,filters:l.filters,visible:$,close:()=>{S(!1)}});else if(l.filterDropdown)de=l.filterDropdown;else{const xe=F()||[],be=()=>{var me,Ee;const je=(me=ye==null?void 0:ye("Table.filter"))!==null&&me!==void 0?me:d.createElement(uo,{image:uo.PRESENTED_IMAGE_SIMPLE,description:m.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((l.filters||[]).length===0)return je;if(f==="tree")return d.createElement(d.Fragment,null,d.createElement(Cb,{filterSearch:h,value:Z,onChange:z,tablePrefixCls:a,locale:m}),d.createElement("div",{className:`${a}-filter-dropdown-tree`},p?d.createElement(ri,{checked:xe.length===Ma(l.filters).length,indeterminate:xe.length>0&&xe.length<Ma(l.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:U},(Ee=m==null?void 0:m.filterCheckall)!==null&&Ee!==void 0?Ee:m==null?void 0:m.filterCheckAll):null,d.createElement(Fm,{checkable:!0,selectable:!1,blockNode:!0,multiple:p,checkStrictly:!p,className:`${u}-menu`,onCheck:q,checkedKeys:xe,selectedKeys:xe,showIcon:!1,treeData:ae({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Z.trim()?Re=>typeof h=="function"?h(Z,re(Re)):Fw(Z,Re.title):void 0})));const Be=Pw({filters:l.filters||[],filterSearch:h,prefixCls:i,filteredKeys:F(),filterMultiple:p,searchValue:Z}),Ye=Be.every(Re=>Re===null);return d.createElement(d.Fragment,null,d.createElement(Cb,{filterSearch:h,value:Z,onChange:z,tablePrefixCls:a,locale:m}),Ye?je:d.createElement(di,{selectable:!0,multiple:p,prefixCls:`${u}-menu`,className:ne,onSelect:T,onDeselect:T,selectedKeys:xe,getPopupContainer:y,openKeys:L,onOpenChange:V,items:Be}))},Ae=()=>w?Zn((E||[]).map(me=>String(me)),xe,!0):xe.length===0;de=d.createElement(d.Fragment,null,be(),d.createElement("div",{className:`${i}-dropdown-btns`},d.createElement(Qa,{type:"link",size:"small",disabled:Ae(),onClick:()=>X()},m.filterReset),d.createElement(Qa,{type:"primary",size:"small",onClick:G},m.filterConfirm)))}l.filterDropdown&&(de=d.createElement(Mx,{selectable:void 0},de)),de=d.createElement(zM,{className:`${i}-dropdown`},de);const Ne=zC({trigger:["click"],placement:ge==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let xe;return typeof l.filterIcon=="function"?xe=l.filterIcon(A):l.filterIcon?xe=l.filterIcon:xe=d.createElement(qT,null),d.createElement("span",{role:"button",tabIndex:-1,className:ve(`${i}-trigger`,{active:A}),onClick:be=>{be.stopPropagation()}},xe)})(),getPopupContainer:y},Object.assign(Object.assign({},D),{rootClassName:ve(C,D.rootClassName),open:$,onOpenChange:H,popupRender:()=>typeof(D==null?void 0:D.dropdownRender)=="function"?D.dropdownRender(de):de}));return d.createElement("div",{className:`${i}-column`},d.createElement("span",{className:`${a}-column-title`},b),d.createElement(Cm,Object.assign({},Ne)))},Zf=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var i;const l=hi(a,r),u=o.filterDropdown!==void 0;if(o.filters||u||"onFilter"in o)if("filteredValue"in o){let s=o.filteredValue;u||(s=(i=s==null?void 0:s.map(String))!==null&&i!==void 0?i:s),n.push({column:o,key:jo(o,l),filteredKeys:s,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(Ie(n),Ie(Zf(o.children,t,l))))}),n};function Nw(e,t,r,n,o,a,i,l,u){return r.map((s,c)=>{const p=hi(c,l),{filterOnClose:f=!0,filterMultiple:h=!0,filterMode:v,filterSearch:g}=s;let m=s;if(m.filters||m.filterDropdown){const b=jo(m,p),y=n.find(({key:C})=>b===C);m=Object.assign(Object.assign({},m),{title:C=>d.createElement(LM,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:b,filterState:y,filterOnClose:f,filterMultiple:h,filterMode:v,filterSearch:g,triggerFilter:a,locale:o,getPopupContainer:i,rootClassName:u},qu(s.title,C))})}return"children"in m&&(m=Object.assign(Object.assign({},m),{children:Nw(e,t,m.children,n,o,a,i,p,u)})),m})}const xb=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 u=Ma(i);t[a]=u.filter(s=>n.includes(String(s)))}else t[a]=null}),t},Jf=(e,t,r)=>t.reduce((n,o)=>{const{column:{onFilter:a,filters:i},filteredKeys:l}=o;return a&&l&&l.length?n.map(u=>Object.assign({},u)).filter(u=>l.some(s=>{const c=Ma(i),p=c.findIndex(h=>String(h)===String(s)),f=p!==-1?c[p]:s;return u[r]&&(u[r]=Jf(u[r],t,r)),a(f,u)})):n},e),jw=e=>e.flatMap(t=>"children"in t?[t].concat(Ie(jw(t.children||[]))):[t]),HM=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:i,rootClassName:l}=e;li();const u=d.useMemo(()=>jw(n||[]),[n]),[s,c]=d.useState(()=>Zf(u,!0)),p=d.useMemo(()=>{const v=Zf(u,!1);if(v.length===0)return v;let g=!0;if(v.forEach(({filteredKeys:m})=>{m!==void 0&&(g=!1)}),g){const m=(u||[]).map((b,y)=>jo(b,hi(y)));return s.filter(({key:b})=>m.includes(b)).map(b=>{const y=u[m.indexOf(b.key)];return Object.assign(Object.assign({},b),{column:Object.assign(Object.assign({},b.column),y),forceFiltered:y.filtered})})}return v},[u,s]),f=d.useMemo(()=>xb(p),[p]),h=v=>{const g=p.filter(({key:m})=>m!==v.key);g.push(v),c(g),o(xb(g),g)};return[v=>Nw(t,r,v,p,i,h,a,void 0,l),p,f]},WM=(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(s){s.forEach((c,p)=>{const f=r(c,p);u.set(f,c),c&&typeof c=="object"&&t in c&&l(c[t]||[])})};const u=new Map;l(e),n.current={data:e,childrenColumnName:t,kvMap:u,getRowKey:r}}return(i=n.current.kvMap)===null||i===void 0?void 0:i.get(a)}return[o]};var KM=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 Iw=10;function qM(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 VM(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=KM(n,["total"]),[i,l]=xt(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:Iw})),u=zC(i,a,{total:o>0?o:e}),s=Math.ceil((o||e)/u.pageSize);u.current>s&&(u.current=s||1);const c=(f,h)=>{l({current:f??1,pageSize:h||u.pageSize})},p=(f,h)=>{var v;r&&((v=r.onChange)===null||v===void 0||v.call(r,f,h)),c(f,h),t(f,h||(u==null?void 0:u.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},u),{onChange:p}),c]}var XM={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"},UM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:XM}))},GM=d.forwardRef(UM),YM={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"},ZM=function(e,t){return d.createElement(cr,ze({},e,{ref:t,icon:YM}))},JM=d.forwardRef(ZM);const Ds="ascend",id="descend",ru=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,wb=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],Qf=(e,t,r)=>{let n=[];const o=(a,i)=>{n.push({column:a,key:jo(a,i),multiplePriority:ru(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,i)=>{const l=hi(i,r);a.children?("sortOrder"in a&&o(a,l),n=[].concat(Ie(n),Ie(Qf(a.children,t,l)))):a.sorter&&("sortOrder"in a?o(a,l):t&&a.defaultSortOrder&&n.push({column:a,key:jo(a,l),multiplePriority:ru(a),sortOrder:a.defaultSortOrder}))}),n},Rw=(e,t,r,n,o,a,i,l)=>(t||[]).map((u,s)=>{const c=hi(s,l);let p=u;if(p.sorter){const f=p.sortDirections||o,h=p.showSorterTooltip===void 0?i:p.showSorterTooltip,v=jo(p,c),g=r.find(({key:x})=>x===v),m=g?g.sortOrder:null,b=QM(f,m);let y;if(u.sortIcon)y=u.sortIcon({sortOrder:m});else{const x=f.includes(Ds)&&d.createElement(JM,{className:ve(`${e}-column-sorter-up`,{active:m===Ds})}),O=f.includes(id)&&d.createElement(GM,{className:ve(`${e}-column-sorter-down`,{active:m===id})});y=d.createElement("span",{className:ve(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(x&&O)})},d.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},x,O))}const{cancelSort:C,triggerAsc:w,triggerDesc:E}=a||{};let D=C;b===id?D=E:b===Ds&&(D=w);const k=typeof h=="object"?Object.assign({title:D},h):{title:D};p=Object.assign(Object.assign({},p),{className:ve(p.className,{[`${e}-column-sort`]:m}),title:x=>{const O=`${e}-column-sorters`,j=d.createElement("span",{className:`${e}-column-title`},qu(u.title,x)),B=d.createElement("div",{className:O},j,y);return h?typeof h!="boolean"&&(h==null?void 0:h.target)==="sorter-icon"?d.createElement("div",{className:`${O} ${e}-column-sorters-tooltip-target-sorter`},j,d.createElement(hl,Object.assign({},k),y)):d.createElement(hl,Object.assign({},k),B):B},onHeaderCell:x=>{var O;const j=((O=u.onHeaderCell)===null||O===void 0?void 0:O.call(u,x))||{},B=j.onClick,N=j.onKeyDown;j.onClick=$=>{n({column:u,key:v,sortOrder:b,multiplePriority:ru(u)}),B==null||B($)},j.onKeyDown=$=>{$.keyCode===rt.ENTER&&(n({column:u,key:v,sortOrder:b,multiplePriority:ru(u)}),N==null||N($))};const A=HT(u.title,{}),S=A==null?void 0:A.toString();return m&&(j["aria-sort"]=m==="ascend"?"ascending":"descending"),j["aria-label"]=S||"",j.className=ve(j.className,`${e}-column-has-sorters`),j.tabIndex=0,u.ellipsis&&(j.title=(A??"").toString()),j}})}return"children"in p&&(p=Object.assign(Object.assign({},p),{children:Rw(e,p.children,r,n,o,a,i,c)})),p}),Eb=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},kb=e=>{const t=e.filter(({sortOrder:r})=>r).map(Eb);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},Eb(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},ep=(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})=>wb(i)&&l);return a.length?o.sort((i,l)=>{for(let u=0;u<a.length;u+=1){const s=a[u],{column:{sorter:c},sortOrder:p}=s,f=wb(c);if(f&&p){const h=f(i,l,p);if(h!==0)return p===Ds?h:-h}}return 0}).map(i=>{const l=i[r];return l?Object.assign(Object.assign({},i),{[r]:ep(l,t,r)}):i}):o},e9=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:i}=e,[l,u]=d.useState(()=>Qf(r,!0)),s=(h,v)=>{const g=[];return h.forEach((m,b)=>{const y=hi(b,v);if(g.push(jo(m,y)),Array.isArray(m.children)){const C=s(m.children,y);g.push.apply(g,Ie(C))}}),g},c=d.useMemo(()=>{let h=!0;const v=Qf(r,!1);if(!v.length){const y=s(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]),p=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]),f=h=>{let v;h.multiplePriority===!1||!c.length||c[0].multiplePriority===!1?v=[h]:v=[].concat(Ie(c.filter(({key:g})=>g!==h.key)),[h]),u(v),i(kb(v),v)};return[h=>Rw(t,h,c,f,n,o,a),c,p,()=>kb(c)]},Tw=(e,t)=>e.map(r=>{const n=Object.assign({},r);return n.title=qu(r.title,t),"children"in n&&(n.children=Tw(n.children,t)),n}),t9=e=>[d.useCallback(t=>Tw(t,e),[e])],r9=Ew((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),n9=Dw((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:u}=e,s=`${ce(r)} ${n} ${o}`,c=(p,f,h)=>({[`&${t}-${p}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${ce(u(f).mul(-1).equal())}
387
+ ${ce(u(u(h).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:s,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:s,borderTop:s,[`
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:s},"> thead":{"> tr:not(:last-child) > th":{borderBottom:s},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:s}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${ce(u(i).mul(-1).equal())} ${ce(u(u(l).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:s,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:s,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${ce(r)} 0 ${ce(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:s}}}},a9=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},cl),{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:u,tableExpandColumnWidth:s,borderRadius:c,tablePaddingVertical:p,tablePaddingHorizontal:f,tableExpandedRowBg:h,paddingXXS:v,expandIconMarginTop:g,expandIconSize:m,expandIconHalfInner:b,expandIconScale:y,calc:C}=e,w=`${ce(o)} ${i} ${l}`,E=C(v).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:s},[`${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({},w5(e)),{position:"relative",float:"left",width:m,height:m,color:"inherit",lineHeight:ce(m),background:u,border:w,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:E,insetInlineStart:E,height:o},"&::after":{top:E,bottom:E,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:`${ce(C(p).mul(-1).equal())} ${ce(C(f).mul(-1).equal())}`,padding:`${ce(p)} ${ce(f)}`}}}},s9=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:i,paddingXS:l,colorText:u,lineWidth:s,lineType:c,tableBorderColor:p,headerIconColor:f,fontSizeSM:h,tablePaddingHorizontal:v,borderRadius:g,motionDurationSlow:m,colorIcon:b,colorPrimary:y,tableHeaderFilterActiveBg:C,colorTextDisabled:w,tableFilterDropdownBg:E,tableFilterDropdownHeight:D,controlItemBgHover:k,controlItemBgActive:x,boxShadowSecondary:O,filterDropdownMenuBg:j,calc:B}=e,N=`${r}-dropdown`,A=`${t}-filter-dropdown`,S=`${r}-tree`,$=`${ce(s)} ${c} ${p}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:B(i).mul(-1).equal(),marginInline:`${ce(i)} ${ce(B(v).div(2).mul(-1).equal())}`,padding:`0 ${ce(i)}`,color:f,fontSize:h,borderRadius:g,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:b,background:C},"&.active":{color:y}}}},{[`${r}-dropdown`]:{[A]:Object.assign(Object.assign({},Sr(e)),{minWidth:o,backgroundColor:E,borderRadius:g,boxShadow:O,overflow:"hidden",[`${N}-menu`]:{maxHeight:D,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:j,"&:empty::after":{display:"block",padding:`${ce(l)} 0`,color:w,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${A}-tree`]:{paddingBlock:`${ce(l)} 0`,paddingInline:l,[S]:{padding:0},[`${S}-treenode ${S}-node-content-wrapper:hover`]:{backgroundColor:k},[`${S}-treenode-checkbox-checked ${S}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:x}}},[`${A}-search`]:{padding:l,borderBottom:$,"&-input":{input:{minWidth:a},[n]:{color:w}}},[`${A}-checkall`]:{width:"100%",marginBottom:i,marginInlineStart:i},[`${A}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${ce(B(l).sub(s).equal())} ${ce(l)}`,overflow:"hidden",borderTop:$}})}},{[`${r}-dropdown ${A}, ${A}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:u},"> 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:u}=e,s=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:u(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:u(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:u(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 ${s}`},[`
408
+ ${t}-cell-fix-left-first::after,
409
+ ${t}-cell-fix-left-last::after
410
+ `]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`${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 ${s}`},[`
411
+ ${t}-cell-fix-right-first::after,
412
+ ${t}-cell-fix-right-last::after
413
+ `]:{boxShadow:`inset -10px 0 8px -8px ${s}`}},[`${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:`${ce(n)} 0`}}},d9=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${ce(r)} ${ce(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 ${ce(r)} ${ce(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:u,tableSelectionColumnWidth:s,tableSelectedRowBg:c,tableSelectedRowHoverBg:p,tableRowHoverBg:f,tablePaddingHorizontal:h,calc:v}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:s,[`&${t}-selection-col-with-dropdown`]:{width:v(s).add(o).add(v(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:v(s).add(v(i).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:v(s).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:ce(v(h).div(4).equal()),[n]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:u}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:c,"&-row-hover":{background:p}}},[`> ${t}-cell-row-hover`]:{background:f}}}}}},m9=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,i,l,u)=>({[`${t}${t}-${a}`]:{fontSize:u,[`
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:`${ce(i)} ${ce(l)}`},[`${t}-filter-trigger`]:{marginInlineEnd:ce(n(l).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${ce(n(i).mul(-1).equal())} ${ce(n(l).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:ce(n(i).mul(-1).equal()),marginInline:`${ce(n(r).sub(l).equal())} ${ce(n(l).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:ce(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:u,lineWidth:s,lineType:c,tableBorderColor:p}=e,f=`${ce(s)} ${c} ${p}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${ce(a)} !important`,zIndex:l,display:"flex",alignItems:"center",background:i,borderTop:f,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:u,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},Db=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${ce(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 ${ce(o(r).mul(-1).equal())} 0 ${n}`}}}},v9=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:i}=e,l=`${ce(n)} ${o} ${a}`,u=`${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`]:{[`${u}${u}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${ce(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:u,tableFontSize:s,tableBg:c,tableRadius:p,tableHeaderTextColor:f,motionDurationMid:h,tableHeaderBg:v,tableHeaderCellSplitColor:g,tableFooterTextColor:m,tableFooterBg:b,calc:y}=e,C=`${ce(i)} ${l} ${u}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},Ks()),{[t]:Object.assign(Object.assign({},Sr(e)),{fontSize:s,background:c,borderRadius:`${ce(p)} ${ce(p)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${ce(p)} ${ce(p)} 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:`${ce(n)} ${ce(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${ce(n)} ${ce(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:f,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:ce(y(n).mul(-1).equal()),marginInline:`${ce(y(a).sub(o).equal())}
448
+ ${ce(y(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:f,fontWeight:r,textAlign:"start",background:v,borderBottom:C,transition:`background ${h} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${ce(n)} ${ce(o)}`,color:m,background:b}})}},y9=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:i,controlItemBgActiveHover:l,padding:u,paddingSM:s,paddingXS:c,colorBorderSecondary:p,borderRadiusLG:f,controlHeight:h,colorTextPlaceholder:v,fontSize:g,fontSizeSM:m,lineHeight:b,lineWidth:y,colorIcon:C,colorIconHover:w,opacityLoading:E,controlInteractiveSize:D}=e,k=new Wt(o).onBackground(r).toHexString(),x=new Wt(a).onBackground(r).toHexString(),O=new Wt(t).onBackground(r).toHexString(),j=new Wt(C),B=new Wt(w),N=D/2-y,A=N*2+y*3;return{headerBg:O,headerColor:n,headerSortActiveBg:k,headerSortHoverBg:x,bodySortBg:O,rowHoverBg:O,rowSelectedBg:i,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:u,cellPaddingInline:u,cellPaddingBlockMD:s,cellPaddingInlineMD:c,cellPaddingBlockSM:c,cellPaddingInlineSM:c,borderColor:p,headerBorderRadius:f,footerBg:O,footerColor:n,cellFontSize:g,cellFontSizeMD:g,cellFontSizeSM:g,headerSplitColor:p,fixedHeaderSortActiveBg:k,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:j.clone().setA(j.a*E).toRgbString(),headerIconHoverColor:B.clone().setA(B.a*E).toRgbString(),expandIconHalfInner:N,expandIconSize:A,expandIconScale:D/A}},Sb=2,C9=Lr("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:i,headerSortActiveBg:l,headerSortHoverBg:u,bodySortBg:s,rowHoverBg:c,rowSelectedBg:p,rowSelectedHoverBg:f,rowExpandedBg:h,cellPaddingBlock:v,cellPaddingInline:g,cellPaddingBlockMD:m,cellPaddingInlineMD:b,cellPaddingBlockSM:y,cellPaddingInlineSM:C,borderColor:w,footerBg:E,footerColor:D,headerBorderRadius:k,cellFontSize:x,cellFontSizeMD:O,cellFontSizeSM:j,headerSplitColor:B,fixedHeaderSortActiveBg:N,headerFilterHoverBg:A,filterDropdownBg:S,expandIconBg:$,selectionColumnWidth:P,stickyScrollBarBg:F,calc:I}=e,T=tr(e,{tableFontSize:x,tableBg:n,tableRadius:k,tablePaddingVertical:v,tablePaddingHorizontal:g,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:b,tablePaddingVerticalSmall:y,tablePaddingHorizontalSmall:C,tableBorderColor:w,tableHeaderTextColor:i,tableHeaderBg:a,tableFooterTextColor:D,tableFooterBg:E,tableHeaderCellSplitColor:B,tableHeaderSortBg:l,tableHeaderSortHoverBg:u,tableBodySortBg:s,tableFixedHeaderSortActiveBg:N,tableHeaderFilterActiveBg:A,tableFilterDropdownBg:S,tableRowHoverBg:c,tableSelectedRowBg:p,tableSelectedRowHoverBg:f,zIndexTableFixed:Sb,zIndexTableSticky:I(Sb).add(1).equal({unit:!1}),tableFontSizeMiddle:O,tableFontSizeSmall:j,tableSelectionColumnWidth:P,tableExpandIconBg:$,tableExpandColumnWidth:I(o).add(I(e.padding).mul(2)).equal(),tableExpandedRowBg:h,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:F,tableScrollThumbBgHover:t,tableScrollBg:r});return[b9(T),c9(T),Db(T),h9(T),s9(T),o9(T),d9(T),l9(T),Db(T),i9(T),p9(T),u9(T),g9(T),a9(T),m9(T),f9(T),v9(T)]},y9,{unitless:{expandIconScale:!0}}),$b=[],x9=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:i,style:l,size:u,bordered:s,dropdownPrefixCls:c,dataSource:p,pagination:f,rowSelection:h,rowKey:v="key",rowClassName:g,columns:m,children:b,childrenColumnName:y,onChange:C,getPopupContainer:w,loading:E,expandIcon:D,expandable:k,expandedRowRender:x,expandIconColumnIndex:O,indentSize:j,scroll:B,sortDirections:N,locale:A,showSorterTooltip:S={target:"full-header"},virtual:$}=e;li();const P=d.useMemo(()=>m||Dm(b),[m,b]),F=d.useMemo(()=>P.some(He=>He.responsive),[P]),I=px(F),T=d.useMemo(()=>{const He=new Set(Object.keys(I).filter($e=>I[$e]));return P.filter($e=>!$e.responsive||$e.responsive.some(Xe=>He.has(Xe)))},[P,I]),q=pn(e,["className","style","columns"]),{locale:L=ra,direction:_,table:V,renderEmpty:Z,getPrefixCls:J,getPopupContainer:z}=d.useContext(Qt),Y=pa(u),G=Object.assign(Object.assign({},L.Table),A),X=p||$b,W=J("table",o),H=J("dropdown",c),[,ne]=Gr(),U=go(W),[ae,re,de]=C9(W,U),ge=Object.assign(Object.assign({childrenColumnName:y,expandIconColumnIndex:O},k),{expandIcon:(r=k==null?void 0:k.expandIcon)!==null&&r!==void 0?r:(n=V==null?void 0:V.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:ye="children"}=ge,Ne=d.useMemo(()=>X.some(He=>He==null?void 0:He[ye])?"nest":x||k!=null&&k.expandedRowRender?"row":null,[X]),xe={body:d.useRef(null)},be=LT(W),Ae=d.useRef(null),me=d.useRef(null);zT(t,()=>Object.assign(Object.assign({},me.current),{nativeElement:Ae.current}));const Ee=d.useMemo(()=>typeof v=="function"?v:He=>He==null?void 0:He[v],[v]),[je]=WM(X,ye,Ee),Be={},Ye=(He,$e,Xe=!1)=>{var wt,St,Nt,Ot;const jt=Object.assign(Object.assign({},Be),He);Xe&&((wt=Be.resetPagination)===null||wt===void 0||wt.call(Be),!((St=jt.pagination)===null||St===void 0)&&St.current&&(jt.pagination.current=1),f&&((Nt=f.onChange)===null||Nt===void 0||Nt.call(f,1,(Ot=jt.pagination)===null||Ot===void 0?void 0:Ot.pageSize))),B&&B.scrollToFirstRowOnChange!==!1&&xe.body.current&&BF(0,{getContainer:()=>xe.body.current}),C==null||C(jt.pagination,jt.filters,jt.sorter,{currentDataSource:Jf(ep(X,jt.sorterStates,ye),jt.filterStates,ye),action:$e})},Re=(He,$e)=>{Ye({sorter:He,sorterStates:$e},"sort",!1)},[Te,ue,ke,Ke]=e9({prefixCls:W,mergedColumns:T,onSorterChange:Re,sortDirections:N||["ascend","descend"],tableLocale:G,showSorterTooltip:S}),Ze=d.useMemo(()=>ep(X,ue,ye),[X,ue]);Be.sorter=Ke(),Be.sorterStates=ue;const We=(He,$e)=>{Ye({filters:He,filterStates:$e},"filter",!0)},[_e,nt,Ue]=HM({prefixCls:W,locale:G,dropdownPrefixCls:H,mergedColumns:T,onFilterChange:We,getPopupContainer:w||z,rootClassName:ve(i,U)}),et=Jf(Ze,nt,ye);Be.filters=Ue,Be.filterStates=nt;const yt=d.useMemo(()=>{const He={};return Object.keys(Ue).forEach($e=>{Ue[$e]!==null&&(He[$e]=Ue[$e])}),Object.assign(Object.assign({},ke),{filters:He})},[ke,Ue]),[kt]=t9(yt),dt=(He,$e)=>{Ye({pagination:Object.assign(Object.assign({},Be.pagination),{current:He,pageSize:$e})},"paginate")},[ht,Mt]=VM(et.length,dt,f);Be.pagination=f===!1?{}:qM(ht,f),Be.resetPagination=Mt;const Pt=d.useMemo(()=>{if(f===!1||!ht.pageSize)return et;const{current:He=1,total:$e,pageSize:Xe=Iw}=ht;return et.length<$e?et.length>Xe?et.slice((He-1)*Xe,He*Xe):et:et.slice((He-1)*Xe,He*Xe)},[!!f,et,ht==null?void 0:ht.current,ht==null?void 0:ht.pageSize,ht==null?void 0:ht.total]),[ft,ut]=TT({prefixCls:W,data:et,pageData:Pt,getRowKey:Ee,getRecordByKey:je,expandType:Ne,childrenColumnName:ye,locale:G,getPopupContainer:w||z},h),pe=(He,$e,Xe)=>{let wt;return typeof g=="function"?wt=ve(g(He,$e,Xe)):wt=ve(g),ve({[`${W}-row-selected`]:ut.has(Ee(He,$e))},wt)};ge.__PARENT_RENDER_ICON__=ge.expandIcon,ge.expandIcon=ge.expandIcon||D||_T(G),Ne==="nest"&&ge.expandIconColumnIndex===void 0?ge.expandIconColumnIndex=h?1:0:ge.expandIconColumnIndex>0&&h&&(ge.expandIconColumnIndex-=1),typeof ge.indentSize!="number"&&(ge.indentSize=typeof j=="number"?j:15);const Oe=d.useCallback(He=>kt(ft(_e(Te(He)))),[Te,_e,ft]),Se=()=>{if(f===!1||!(ht!=null&&ht.total))return{};const He=()=>ht.size||(Y==="small"||Y==="middle"?"small":void 0),$e=pt=>{const At=pt==="left"?"start":pt==="right"?"end":pt;return d.createElement(iw,Object.assign({},ht,{align:ht.align||At,className:ve(`${W}-pagination`,ht.className),size:He()}))},Xe=_==="rtl"?"left":"right",wt=ht.position;if(wt===null||!Array.isArray(wt))return{bottom:$e(Xe)};const St=wt.find(pt=>typeof pt=="string"&&pt.toLowerCase().includes("top")),Nt=wt.find(pt=>typeof pt=="string"&&pt.toLowerCase().includes("bottom")),Ot=wt.every(pt=>`${pt}`=="none"),jt=St?St.toLowerCase().replace("top",""):"",ar=Nt?Nt.toLowerCase().replace("bottom",""):"",Le=!St&&!Nt&&!Ot,Je=()=>jt?$e(jt):void 0,gt=()=>{if(ar)return $e(ar);if(Le)return $e(Xe)};return{top:Je(),bottom:gt()}},Ce=d.useMemo(()=>typeof E=="boolean"?{spinning:E}:typeof E=="object"&&E!==null?Object.assign({spinning:!0},E):void 0,[E]),we=ve(de,U,`${W}-wrapper`,V==null?void 0:V.className,{[`${W}-wrapper-rtl`]:_==="rtl"},a,i,re),fe=Object.assign(Object.assign({},V==null?void 0:V.style),l),le=d.useMemo(()=>Ce!=null&&Ce.spinning&&X===$b?null:typeof(A==null?void 0:A.emptyText)<"u"?A.emptyText:(Z==null?void 0:Z("Table"))||d.createElement(ox,{componentName:"Table"}),[Ce==null?void 0:Ce.spinning,X,A==null?void 0:A.emptyText,Z]),ee=$?n9:r9,te={},se=d.useMemo(()=>{const{fontSize:He,lineHeight:$e,lineWidth:Xe,padding:wt,paddingXS:St,paddingSM:Nt}=ne,Ot=Math.floor(He*$e);switch(Y){case"middle":return Nt*2+Ot+Xe;case"small":return St*2+Ot+Xe;default:return wt*2+Ot+Xe}},[ne,Y]);$&&(te.listItemHeight=se);const{top:Pe,bottom:ot}=Se();return ae(d.createElement("div",{ref:Ae,className:we,style:fe},d.createElement(xm,Object.assign({spinning:!1},Ce),Pe,d.createElement(ee,Object.assign({},te,q,{ref:me,columns:T,direction:_,expandable:ge,prefixCls:W,className:ve({[`${W}-middle`]:Y==="middle",[`${W}-small`]:Y==="small",[`${W}-bordered`]:s,[`${W}-empty`]:X.length===0},de,U,re),data:Pt,rowKey:Ee,rowClassName:pe,emptyText:le,internalHooks:Fl,internalRefs:xe,transformColumns:Oe,getContainerWidth:be,measureRowRender:He=>d.createElement(da,{getPopupContainer:$e=>$e},He)})),ot)))},w9=d.forwardRef(x9),E9=(e,t)=>{const r=d.useRef(0);return r.current+=1,d.createElement(w9,Object.assign({},e,{ref:t,_renderTimes:r.current}))},vo=d.forwardRef(E9);vo.SELECTION_COLUMN=Eo;vo.EXPAND_COLUMN=So;vo.SELECTION_ALL=Xf;vo.SELECTION_INVERT=Uf;vo.SELECTION_NONE=Gf;vo.Column=ST;vo.ColumnGroup=$T;vo.Summary=pw;const Mw=oe.forwardRef(({attributes:e,element:t,eventsEmit:r,onDataUpdate:n,dataSource:o,tagIndex:a},i)=>{var E;const[l,u]=xt(null),[s,c]=xt(!0),[p,f]=xt(1),[h,v]=xt(10);Bt(()=>{if(!l){if(!o){c(!0);try{const D=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(D)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const D=(o==null?void 0:o.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",D);let k=null,x=null,O;for(const N of D){const A=N==null?void 0:N.reply;if(!(A!=null&&A.databaseReference))continue;const S=A.databaseReference;console.log(S,"123123123jk123lk12j3l12jl3"),S!=null&&S.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",S.retrieveSqlData.filePath),O=S.retrieveSqlData.filePath);let $=S;if(typeof S=="string")try{$=JSON.parse(S)}catch{}if(!$)continue;const P=Array.isArray($)?$:[$],F=P.findIndex(q=>(q==null?void 0:q.id)===t.id),I=F>=0?P[F]:null;if(console.log("~~~~~~~~~~~~~~~",I),I){k=I,x=I.retrieveSqlData||I.retrieve_table_data||I.retrieveTableData;break}const T=P.find(q=>{var L,_;return(((_=(L=q==null?void 0:q.retrieveSqlData)==null?void 0:L.preData)==null?void 0:_.length)||0)>0});!k&&T&&(k=T,x=T.retrieveSqlData||T.retrieve_table_data||T.retrieveTableData)}if(!k||!x){console.warn("No databaseReference with preData found for id:",t.id),c(!1);return}const j=Array.isArray(x==null?void 0:x.preData)?x.preData[0]:null;if(!j){console.warn("Matched item has no preData"),c(!1);return}const B={columns:(j.columns||[]).map(N=>({key:N.key,title:N.title})),rows:j.data||j.rows||[],total:(x==null?void 0:x.total)||0,fetchUrl:(x==null?void 0:x.fetchUrl)||"/index/knowledgeBase/file/stream",source:O||(x==null?void 0:x.source)||(k==null?void 0:k.source)};u(B),c(!1)}catch(D){console.error("Init preData parsing failed:",D),c(!1)}}},[t.id,l,o]),Bt(()=>{const D=k=>{try{const x=(k==null?void 0:k.detail)||{},O=x==null?void 0:x.id;if(!O||String(O)!==String(t.id))return;const j=x.databaseReference;if(!j)return;let B=j;if(typeof j=="string")try{B=JSON.parse(j)}catch{}if(!B)return;const N=Array.isArray(B)?B:[B],A=N.findIndex(I=>String(I==null?void 0:I.id)===String(t.id)),S=A>=0?N[A]:null;if(!S)return;const $=(S==null?void 0:S.retrieveSqlData)||(S==null?void 0:S.retrieve_table_data)||(S==null?void 0:S.retrieveTableData),P=Array.isArray($==null?void 0:$.preData)?$.preData[0]:null;if(!P)return;const F={columns:(P.columns||[]).map(I=>({key:I.key,title:I.title})),rows:P.data||P.rows||[],total:($==null?void 0:$.total)||0,fetchUrl:($==null?void 0:$.fetchUrl)||"/index/knowledgeBase/file/stream",source:(S==null?void 0:S.source)||($==null?void 0:$.source)};u(F),c(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",D),()=>{window.removeEventListener("retrieve-sql-data:data-response",D)}},[t.id]),Bt(()=>{n&&l&&n(l)},[l,n]);const g=D=>{if(!D||D.length===0)return[];const k=D.find(x=>x&&typeof x=="object")||{};return Object.keys(k).map(x=>({key:x,title:x}))},m=(D,k)=>{f(D),k&&v(k);const x=O=>{let j=null;if(O&&Array.isArray(O.columns)&&Array.isArray(O.rows))j={columns:O.columns,rows:O.rows,total:Number(O.total)||0,fetchUrl:O.fetchUrl||(l==null?void 0:l.fetchUrl)||"",source:O.source||(l==null?void 0:l.source)};else if(O&&Array.isArray(O.data)){const B=O.data;j={columns:l!=null&&l.columns&&l.columns.length>0?l.columns:g(B),rows:B,total:Number(O.totalCount??O.total??(l==null?void 0:l.total)??B.length)||0,fetchUrl:(l==null?void 0:l.fetchUrl)||"",source:l==null?void 0:l.source},typeof O.currentPage=="number"&&f(O.currentPage),typeof O.pageSize=="number"&&v(O.pageSize)}else if(Array.isArray(O)){const B=O;j={columns:l!=null&&l.columns&&l.columns.length>0?l.columns:g(B),rows:B,total:Number((l==null?void 0:l.total)??B.length)||0,fetchUrl:(l==null?void 0:l.fetchUrl)||"",source:l==null?void 0:l.source}}if(!j){console.warn("replacePredataFunction received unsupported data format:",O);return}console.log("Replacing table data with:",j),u(j)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:D,pageSize:k||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=D=>l!=null&&l.rows?Math.max(...l.rows.map(k=>{const x=k[D];return x?String(x).length:0})):0,y=(((E=l==null?void 0:l.columns)==null?void 0:E.length)||0)===1,C=(l==null?void 0:l.columns.map((D,k)=>({title:D.title||D.key,dataIndex:D.key,key:D.key,render:x=>{const O=x==null||x===""?"-":x;return y?Q.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(O)}):O},...y?{width:void 0}:{}})))||[],w=(l==null?void 0:l.rows.map((D,k)=>({key:k,...D})))||[];return Q.jsx("div",{...e,ref:i,className:"retrieve-sql-data-container my-4",children:s?Q.jsxs("div",{className:"flex items-center justify-center py-8",children:[Q.jsx(xm,{size:"large"}),Q.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):l?Q.jsxs("div",{className:"retrieve-sql-data-content",children:[a!==null&&Q.jsxs("div",{className:"mb-2 flex items-center",children:[Q.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}),Q.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]}),Q.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:Q.jsx(vo,{columns:C.map((D,k)=>({...D,...y?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:k===0?160:void 0,minWidth:120,maxWidth:k===0?180:300,fixed:k===0?"left":void 0,ellipsis:{showTitle:!0}},render:x=>{if(x==null)return"-";const O=String(x);if(y)return Q.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:O,children:O});const j=b(D.key);let B="200px";return k===0?B="80px":j<=8?B="100px":j<=15?B="150px":j<=25?B="200px":j<=40?B="250px":B="300px",Q.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:B,display:"inline-block",cursor:"default"},title:O,children:O})}})),dataSource:w,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&&Q.jsx("div",{className:"flex justify-center mt-3",children:Q.jsx(iw,{current:p,pageSize:h,total:l.total,onChange:m,onShowSizeChange:m,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):Q.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});Mw.displayName="RetrieveSqlDataElement";const k9=e=>{var a,i,l,u,s,c,p,f;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return Q.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 Q.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 Q.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 Q.jsx("h3",{...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"bulleted-list":return Q.jsx("ul",{...o,children:n});case"numbered-list":return Q.jsx("ol",{...o,children:n});case"list-item":return Q.jsx("li",{...o,children:n});case"table":return Q.jsx("div",{className:"table-container",children:Q.jsx("table",{...o,children:Q.jsx("tbody",{children:n})})});case"table-row":return Q.jsx("tr",{...o,children:n});case"table-cell":return r.header?Q.jsx("th",{...o,children:n}):Q.jsx("td",{...o,children:n});case"block-quote":return Q.jsx("blockquote",{...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"code-block":return Q.jsx("pre",{...o,children:Q.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),Q.jsx(AB,{attributes:o,styles:t,extraProps:g,children:n});case"template":return Q.jsx(o1,{...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}})(((p=e.extraProps)==null?void 0:p.databaseReference)||e.databaseReference);return Q.jsx(Mw,{...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})}});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),Q.jsx("img",{...o,src:r.url,alt:r.alt||"",style:{maxWidth:"100%",height:"auto",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",transition:"transform 0.2s ease-in-out",display:"block"},onError:b=>{const y=b.target;y.style.display="none",console.warn("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25:",r.url)}});case"iframe":return console.log("\u6E32\u67D3iframe\u5143\u7D20:",{src:r.src,width:r.width,height:r.height}),Q.jsx("iframe",{...o,src:r.src,width:r.width||"100%",height:r.height||"400",frameBorder:r.frameborder||"0",title:r.title||"",style:{width:r.width||"100%",height:r.height||"400px",border:"none",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",display:"block"},onError:b=>{const y=b.target;y.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return Q.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(f=t==null?void 0:t.text)==null?void 0:f.color} !important`},children:n})}},D9=e=>{var i,l,u,s,c,p;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 f=n.fromtype==="0",h=n.fromtype==="1",v=n.fromtype==="2",g=n.text||"";let m=g,b="#e6f7ff",y="#1890ff",C="#bae7ff";return f?(m=`${g}`,b="#e6f7ff",y="#1890ff",C="#bae7ff"):h?(m=`${g}`,b="#f6ffed",y="#52c41a",C="#d9f7be"):v&&(m=`${g}`,b="#f9f0ff",y="#722ed1",C="#efdbff"),a=Q.jsx("span",{...t,style:{display:"inline-block",background:b,color:y,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:w=>w.currentTarget.style.background=C,onMouseLeave:w=>w.currentTarget.style.background=b,children:m}),a}if(n.code)a=Q.jsx("code",{...t,style:{color:`${(l=o==null?void 0:o.text)==null?void 0:l.color} !important`},children:a});else{const f=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),h={color:`${(u=o==null?void 0:o.text)==null?void 0:u.color} !important`,fontSize:(s=o==null?void 0:o.text)==null?void 0:s.fontSize,lineHeight:(c=o==null?void 0:o.text)==null?void 0:c.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=Q.jsx("span",{...t,className:f,style:h,children:a})}return n.link&&(a=Q.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(p=o==null?void 0:o.text)==null?void 0:p.color} !important`},children:a})),a},ld=pr.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 ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#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 ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#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 ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
518
+ padding: 0 16px;
519
+ margin: 16px 0;
520
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
521
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
522
+ }
523
+
524
+ /* 行内代码样式 */
525
+ & code {
526
+ font-size: 0.875em;
527
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#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: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
537
+ padding: 16px;
538
+ border-radius: 6px;
539
+ overflow-x: auto;
540
+ margin: 16px 0;
541
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
542
+ }
543
+
544
+ & pre code {
545
+ background-color: transparent;
546
+ padding: 0;
547
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
548
+ }
549
+
550
+ /* 表格样式 */
551
+ & table {
552
+ width: 100%;
553
+ border-collapse: collapse;
554
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
555
+ margin: 16px 0;
556
+ }
557
+
558
+ & th, & td {
559
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
560
+ padding: 8px 12px;
561
+ text-align: left;
562
+ }
563
+
564
+ & th {
565
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
566
+ font-weight: 600;
567
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
568
+ }
569
+
570
+ & tr:nth-child(even) {
571
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
572
+ }
573
+
574
+ & td {
575
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
576
+ }
577
+
578
+ /* 图片样式 */
579
+ & img {
580
+ max-width: 100%;
581
+ height: auto;
582
+ border-radius: 6px;
583
+ margin: 16px 0;
584
+ }
585
+
586
+ /* 链接样式 */
587
+ & a {
588
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
589
+ text-decoration: none;
590
+
591
+ &:hover {
592
+ text-decoration: underline;
593
+ }
594
+ }
595
+
596
+ /* 文本样式 */
597
+ & strong {
598
+ font-weight: 600;
599
+ }
600
+
601
+ & em {
602
+ font-style: italic;
603
+ }
604
+
605
+ & u {
606
+ text-decoration: underline;
607
+ }
608
+
609
+ & s {
610
+ text-decoration: line-through;
611
+ }
612
+
613
+ /* 分割线样式 */
614
+ & hr {
615
+ border: none;
616
+ border-top: 1px solid #d0d7de;
617
+ margin: 24px 0;
618
+ }
619
+
620
+ /* 思考容器样式 */
621
+ & .think-container {
622
+
623
+
624
+ }
625
+
626
+ & .think-header {
627
+
628
+ }
629
+
630
+ & .think-icon {
631
+
632
+ }
633
+
634
+ & .think-title {
635
+ font-weight: 600;
636
+ color: #24292f;
637
+ font-size: 14px;
638
+ }
639
+
640
+ & .think-text {
641
+ color: #86909C;
642
+ font-size: 14px;
643
+ line-height: 1.6;
644
+ }
645
+
646
+ /* 召回标签样式 */
647
+ & .retrive-tag {
648
+ display: inline-block;
649
+ background: #e6f7ff;
650
+ color: #1890ff;
651
+ border: 1px solid rgba(114, 187, 255, 0.3);
652
+ border-radius: 6px;
653
+ padding: 2px 6px;
654
+ margin: 0 2px;
655
+ font-weight: 500;
656
+ font-size: 12px;
657
+ line-height: 1.4;
658
+ cursor: pointer;
659
+ vertical-align: middle;
660
+ transition: background-color 0.2s ease;
661
+ }
662
+
663
+ & .retrive-tag:hover {
664
+ background: #bae7ff;
665
+ }
666
+ `;function zw(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?zw([r])[0]:r)})}function _w(e,t){const r=(t==null?void 0:t.disabledTags)||[];console.log("\u{1F50D} deserializeMarkdown \u5F00\u59CB\u5904\u7406:",{markdownLength:e.length,basePath:t==null?void 0:t.basePath,hasImgTags:e.includes("<img"),hasMarkdownImages:e.includes("![")});function n(s){var c;if(s.indexOf("<think>")>-1)if(s.indexOf("</think>")>-1){const p=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,f=s.match(p);return f?{thinkContent:f[1],content:f[2],finish:!0}:{thinkContent:"",content:s,finish:!0}}else{const p=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((c=s.match(p))==null?void 0:c[1])||"",content:""}}else return{thinkContent:"",content:s}}const{thinkContent:o,content:a,finish:i}=n(e||"");let l=[],u=0;if(!r.includes("think")&&o){const s=o.split(/\n+/).map(c=>c.trim()).filter(Boolean).flatMap(c=>{if(/<retrive-tag/i.test(c)){const p=document.createElement("div");return p.innerHTML=c,Bb(p,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:c}]}]});l.push({type:"think",id:`think-${u++}`,thinkContent:o,finish:i,children:s})}if(a){let s=a;r.includes("retrive")||(s=s.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(f,h,v)=>`<retrive-tag${h?" "+h.trim():""}>${v}</retrive-tag>`)),r.includes("retrieve-sql-data")||(s=s.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(f,h)=>`<retrieve-sql-data id="${h}"></retrieve-sql-data>`)),Vt.setOptions({gfm:!0,breaks:!0,pedantic:!1});const c=Vt(s),p=typeof c=="string"?c:"";if(console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:p.length,hasImgTags:p.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:p}),typeof c=="string"){const f=document.createElement("div");f.innerHTML=c,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:f.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(f.querySelectorAll("*")).map(v=>v.tagName),imgElements:Array.from(f.querySelectorAll("img")).map(v=>({src:v.src,alt:v.alt}))});const h=Bb(f,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:h.length,hasImageElements:h.some(v=>v.type==="image")}),h&&h.length>0&&(l=l.concat(h))}}return!l||l.length===0?[{type:"paragraph",children:[{text:""}]}]:zw(l)}function Bb(e,t){const r=[];return console.log("\u{1F3AF} deserializeHtmlNode \u5F00\u59CB\u89E3\u6790:",{nodeType:e.nodeType,nodeName:e.nodeName,basePath:t,childNodesCount:e.childNodes.length}),((n,o)=>(o.forEach(a=>{var i;if(a.nodeType===Node.ELEMENT_NODE){const l=a;switch(console.log("\u{1F50D} \u5904\u7406\u5143\u7D20\u8282\u70B9:",{tagName:l.tagName,isImg:l.tagName==="IMG",src:l.getAttribute("src"),basePath:t}),l.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:Nr(l,t)});break;case"h1":n.push({type:"heading-one",children:Nr(l,t)});break;case"h2":n.push({type:"heading-two",children:Nr(l,t)});break;case"h3":n.push({type:"heading-three",children:Nr(l,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(l.children).map(s=>({type:"list-item",children:Nr(s)}))});break;case"ol":const u={type:"numbered-list",children:Array.from(l.children).map(s=>({type:"list-item",children:Nr(s)}))};n.push(u);break;case"li":n.push({type:"list-item",children:Nr(l,t)});break;case"pre":{const s=l.querySelector("code");s?n.push({type:"code-block",children:Nr(s)}):n.push({type:"code-block",children:Nr(l,t)});break}case"code":{l.closest("pre")||n.push({type:"paragraph",children:Nr(l,t)});break}case"retrive-tag":{const s=Nr(l,t);s.length>0&&n.push({type:"paragraph",children:s});break}case"retrieve-sql-data":{const s=l.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:s,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:Nr(l,t)});break;case"table":n.push(S9(l));break;case"img":{const s=l.getAttribute("src")||"",c=l.getAttribute("alt")||"";let p=s;if(t)if(s.startsWith("./"))p=s.replace(/^\.\//,t+"/");else if(s.startsWith("../")){const f=t.substring(0,t.lastIndexOf("/"));p=s.replace(/^\.\.\//,f+"/")}else!s.startsWith("/")&&!s.startsWith("http")&&(p=`${t}/${s}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:s,basePath:t,processedSrc:p}),n.push({type:"image",url:p,alt:c,children:[{text:""}]});break}case"iframe":{const s=l.getAttribute("src")||"",c=l.getAttribute("width")||"100%",p=l.getAttribute("height")||"400",f=l.getAttribute("frameborder")||"0",h=l.getAttribute("title")||"";let v=s;if(t)if(s.startsWith("./"))v=s.replace(/^\.\//,t+"/");else if(s.startsWith("../")){const g=t.substring(0,t.lastIndexOf("/"));v=s.replace(/^\.\.\//,g+"/")}else!s.startsWith("/")&&!s.startsWith("http")&&(v=`${t}/${s}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:s,basePath:t,processedSrc:v}),n.push({type:"iframe",src:v,width:c,height:p,frameborder:f,title:h,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:Nr(l)});break;default:n.push({type:"paragraph",children:Nr(l,t)});break}}else a.nodeType===Node.TEXT_NODE&&((i=a.textContent)!=null&&i.trim())&&n.push({type:"paragraph",children:[{text:a.textContent}]})}),n))(r,e.childNodes),r}function Nr(e,t){const r=[];function n(a){const i=[];let l="",u=!1,s=!1,c=0;for(;c<a.length;)a.startsWith("**",c)?(l&&(i.push({text:l,code:!0,bold:u,italic:s}),l=""),u=!u,c+=2):a.startsWith("*",c)?(l&&(i.push({text:l,code:!0,bold:u,italic:s}),l=""),s=!s,c+=1):(l+=a[c],c+=1);return l&&i.push({text:l,code:!0,bold:u,italic:s}),i}function o(a,i={}){var l,u;if(a.nodeType===Node.TEXT_NODE){const s=(l=a.textContent)==null?void 0:l.trim();return s?i.code?n(s):[{text:s,...i}]:[]}if(a.nodeType===Node.ELEMENT_NODE){const s=a,c={...i};switch(s.tagName.toLowerCase()){case"em":case"i":c.italic=!0;break;case"strong":case"b":c.bold=!0;break;case"code":s.closest("pre")||(c.code=!0);break;case"del":case"s":c.strikethrough=!0;break;case"u":c.underline=!0;break;case"a":c.link=s.getAttribute("href")||void 0;break;case"retrive-tag":{const f={};for(const{name:h,value:v}of Array.from(s.attributes))f[h]=v;return[{text:s.textContent||""||"[0]",retrive:!0,...f}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:s.getAttribute("id")||"",children:[{text:""}]}];case"img":{const f=s.getAttribute("src")||"",h=s.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:f,alt:h,basePath:t});let v=f;if(t)if(f.startsWith("./"))v=f.replace(/^\.\//,t+"/");else if(f.startsWith("../")){const g=t.substring(0,t.lastIndexOf("/"));v=f.replace(/^\.\.\//,g+"/")}else!f.startsWith("/")&&!f.startsWith("http")&&(v=`${t}/${f}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:f,processedSrc:v}),[{type:"image",url:v,alt:h,children:[{text:""}]}]}case"iframe":{const f=s.getAttribute("src")||"",h=s.getAttribute("width")||"100%",v=s.getAttribute("height")||"400",g=s.getAttribute("frameborder")||"0",m=s.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:f,width:h,height:v,basePath:t});let b=f;if(t)if(f.startsWith("./"))b=f.replace(/^\.\//,t+"/");else if(f.startsWith("../")){const y=t.substring(0,t.lastIndexOf("/"));b=f.replace(/^\.\.\//,y+"/")}else!f.startsWith("/")&&!f.startsWith("http")&&(b=`${t}/${f}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:f,processedSrc:b}),[{type:"iframe",src:b,width:h,height:v,frameborder:g,title:m,children:[{text:""}]}]}}if(s.childNodes.length===0&&((u=s.textContent)!=null&&u.trim()))return c.code?n(s.textContent):[{text:s.textContent,...c}];let p=[];for(const f of Array.from(s.childNodes))p=p.concat(o(f,c));return p}return[]}for(const a of Array.from(e.childNodes))r.push(...o(a));return r}function S9(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 $9=pr.div`
667
+ border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
668
+ border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
669
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
670
+ min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
671
+ overflow: hidden;
672
+ transition: all 0.2s ease-in-out;
673
+
674
+ ${e=>{var t,r;return e.$isEditing&&`
675
+ &:focus-within {
676
+ border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
677
+ box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
678
+ }
679
+ `}}
680
+ `,sd=pr.div`
681
+ padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
682
+ min-height: inherit;
683
+ outline: none;
684
+
685
+ & > * + * {
686
+ margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
687
+ }
688
+ `;var nu=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(nu||{});const Pm=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:a={},onChange:i,onFocus:l,onBlur:u,renderElement:s,renderLeaf:c,onRetriveTagClick:p,eventsEmit:f,extraProps:h={},className:v,style:g,styles:m,enableTemplateInput:b=!1,disabledTags:y=[]})=>{const C=ou(),w=Ct(()=>{var L,_,V,Z,J,z,Y,G,X;return{primaryColor:((L=C==null?void 0:C.colors)==null?void 0:L.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((_=C==null?void 0:C.colors)==null?void 0:_.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((V=C==null?void 0:C.colors)==null?void 0:V.background)||(a==null?void 0:a.backgroundColor)||"transparent",textColor:((Z=C==null?void 0:C.colors)==null?void 0:Z.text)||(a==null?void 0:a.textColor)||"#24292f",borderColor:((J=C==null?void 0:C.colors)==null?void 0:J.border)||(a==null?void 0:a.borderColor)||"#dee2e6",disabledBackground:((z=C==null?void 0:C.colors)==null?void 0:z.disabledBackground)||(a==null?void 0:a.disabledBackground)||"#f8f9fa",hoverBackground:(a==null?void 0:a.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((Y=C==null?void 0:C.space)==null?void 0:Y.radius)||(a==null?void 0:a.borderRadius)||"4px",padding:((G=C==null?void 0:C.space)==null?void 0:G.padding)||(a==null?void 0:a.padding)||"0rem 1rem",margin:((X=C==null?void 0:C.space)==null?void 0:X.margin)||(a==null?void 0:a.margin)||"0.5rem",minHeight:(a==null?void 0:a.minHeight)||"200px",baseFontSize:(a==null?void 0:a.baseFontSize)||(o==="md"?14:12),...a}},[C,a,o]),E=qe();if(!E.current){const L=OD(),_=W$(L),{isInline:V}=_;_.isInline=z=>!y.includes("template")&&z.type==="template"?!0:V(z);const{isVoid:Z}=_;_.isVoid=z=>!y.includes("template")&&z.type==="template"?!0:Z(z);const J=z=>{if(!(b&&!y.includes("template")))return z;const{insertText:Y,insertData:G}=z,X=()=>{const W=/<template>([^<]*)<\/template>/g,H=Array.from(R.nodes(z,{match:ne=>at.isText(ne)&&W.test(ne.text)}));if(H.length!==0)for(const ne of H){const[U,ae]=ne,re=U.text||"",de=[];let ge=0,ye;for(W.lastIndex=0;(ye=W.exec(re))!==null;){if(ye.index>ge){const Ne=re.slice(ge,ye.index);Ne&&de.push({text:Ne})}de.push({type:"template",placeholder:(ye[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),ge=ye.index+ye[0].length}if(ge<re.length){const Ne=re.slice(ge);Ne&&de.push({text:Ne})}Me.removeNodes(z,{at:ae}),Me.insertNodes(z,de,{at:ae})}};return z.insertText=W=>{Y(W),X()},z.insertData=W=>{const H=W.getData("text/plain");if(H&&/<template>[\s\S]*?<\/template>/.test(H)){Y(H),X();return}return G(W)},z};E.current=J(_)}const D=E.current,[k,x]=xt(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[O,j]=xt(0);Bt(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const L=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",L),x(L),j(_=>_+1)}},[e.type,e.content]);const B=qe(void 0);Bt(()=>{if(e.type!=="markdown")return;const L=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");B.current!==L&&(B.current=L,j(_=>_+1))},[e.type,e.content]);const N=qe("");Bt(()=>{if(e.type!=="markdown")return;const L=JSON.stringify(h||{});L!==N.current&&(N.current=L,j(_=>_+1))},[h,e.type]);const A=mt(L=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",L),L&&Array.isArray(L)?(x(L),i==null||i(L,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",L)},[i]),S=Ct(()=>{const L=w==null?void 0:w.baseFontSize;return typeof L=="number"&&!Number.isNaN(L)?L:o==="md"?14:12},[w,o]),$=mt(L=>{const _={...L,size:o,styles:m,eventsEmit:f,extraProps:h};return s?s(_):k9(_)},[s,o,m,f,h]),P=mt(L=>{const _={...L,styles:m,onRetriveTagClick:p};return c?c(_):D9(_)},[c,m,p]);Bt(()=>(window.copyCodeFromData=L=>{const _=L.getAttribute("data-code");if(!_){console.error("No code content found");return}const V=_.replace(/\\n/g,`
689
+ `).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/&quot;/g,'"');navigator.clipboard.writeText(V).then(()=>{const Z=L.innerHTML;L.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>',L.classList.add("copied"),setTimeout(()=>{L.innerHTML=Z,L.classList.remove("copied")},2e3)}).catch(Z=>{console.error("\u590D\u5236\u5931\u8D25:",Z);const J=L.innerHTML;L.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>',L.style.background="#d73a49",L.style.borderColor="#d73a49",L.style.color="white",setTimeout(()=>{L.innerHTML=J,L.style.background="",L.style.borderColor="",L.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const F=Ct(()=>{var L,_;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(L=e.content)==null?void 0:L.length,basePath:n,hasImages:(_=e.content)==null?void 0:_.includes("![")});const V=_w(e.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:V.length,hasImageElements:V.some(X=>X.type==="image"),imageElements:V.filter(X=>X.type==="image")}),V&&V.length>0)return Q.jsx(ld,{theme:w,$size:o,children:Q.jsx(xc,{editor:D,initialValue:V,onChange:()=>{},children:Q.jsx(sd,{theme:w,children:Q.jsx(Cc,{renderElement:$,renderLeaf:P,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${S}px`}})})},O)});const Z={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let J=Vt(e.content||"",Z);J=J.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),J=J.replace(/<\/table>/g,"</table></div>"),J=J.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(X,W,H)=>{const ne=H.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,"&quot;");return`<pre><code${W}>${H}</code><button class="code-copy-btn" data-code="${ne}" 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>`});const z=(w==null?void 0:w.disabledBackground)||(w==null?void 0:w.backgroundColor)||"#ffffff",Y=(X,W)=>X.startsWith("#")?`${X}${Math.round(W*255).toString(16).padStart(2,"0")}`:X,G=`
690
+ <style>
691
+ .table-container{ overflow:auto; border:1px solid ${(w==null?void 0:w.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(w==null?void 0:w.backgroundColor)||"transparent"} !important; }
692
+ .table-container table{ background:${(w==null?void 0:w.backgroundColor)||"transparent"} !important; color:${(w==null?void 0:w.textColor)||"#24292f"} !important; }
693
+ .table-container th{ background:${(w==null?void 0:w.disabledBackground)||"#f6f8fa"} !important; color:${(w==null?void 0:w.textColor)||"#24292f"} !important; }
694
+ .table-container td{ color:${(w==null?void 0:w.textColor)||"#24292f"} !important; background:${(w==null?void 0:w.backgroundColor)||"transparent"} !important; }
695
+ .table-container tr:nth-child(even) td{ background:${(w==null?void 0:w.disabledBackground)||"#f6f8fa"} !important; }
696
+ pre{ position:relative; background:${z}; border:1px solid ${(w==null?void 0:w.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(w==null?void 0:w.textColor)||"#e5e7eb"}; }
697
+ pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${Y("#22c55e",.25)}, ${Y("#f59e0b",.25)}, ${Y("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
698
+ pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(w==null?void 0:w.borderColor)||"#e5e7eb"}; color:${(w==null?void 0:w.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
699
+ pre .code-copy-btn:hover{ background:${(w==null?void 0:w.hoverBackground)||"rgba(0,0,0,0.06)"}; }
700
+ </style>
701
+ `;return Q.jsx("div",{style:{padding:(w==null?void 0:w.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(w==null?void 0:w.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:G+J}})}catch(V){return console.error("Markdown parsing error:",V),Q.jsx("div",{children:e.content})}},[e,w,D,O,$,P,S]),I=Ct(()=>e.type!=="html"?null:Q.jsx("div",{style:{padding:(w==null?void 0:w.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(w==null?void 0:w.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,w,S]),T=Ct(()=>e.type!=="text"?null:Q.jsx("div",{style:{padding:(w==null?void 0:w.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(w==null?void 0:w.textColor)||"#24292f"},children:Q.jsx("span",{children:e.content||""})}),[e,w,S]),q=()=>{switch(e.type){case"markdown":return F;case"html":return I;case"text":return T;case"slate":default:return t?Q.jsx(ld,{theme:w,$size:o,children:Q.jsx(xc,{editor:D,initialValue:k,onChange:A,children:Q.jsx(sd,{theme:w,children:Q.jsx(Cc,{renderElement:$,renderLeaf:P,placeholder:r,readOnly:!1,onFocus:l,onBlur:u,style:{minHeight:"inherit",outline:"none",fontSize:`${S}px`}})})},O)}):Q.jsx(ld,{theme:w,$size:o,children:Q.jsx(xc,{editor:D,initialValue:k,onChange:()=>{},children:Q.jsx(sd,{theme:w,children:Q.jsx(Cc,{renderElement:$,renderLeaf:P,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${S}px`}})})},O)})}};return Q.jsx($9,{theme:w,$isEditing:t,className:v,style:g,children:q()})};/**
702
+ * @license lucide-react v0.456.0 - ISC
703
+ *
704
+ * This source code is licensed under the ISC license.
705
+ * See the LICENSE file in the root directory of this source tree.
706
+ */const B9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Lw=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
707
+ * @license lucide-react v0.456.0 - ISC
708
+ *
709
+ * This source code is licensed under the ISC license.
710
+ * See the LICENSE file in the root directory of this source tree.
711
+ */var O9={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"};/**
712
+ * @license lucide-react v0.456.0 - ISC
713
+ *
714
+ * This source code is licensed under the ISC license.
715
+ * See the LICENSE file in the root directory of this source tree.
716
+ */const A9=fn(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},u)=>Ss("svg",{ref:u,...O9,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Lw("lucide",o),...l},[...i.map(([s,c])=>Ss(s,c)),...Array.isArray(a)?a:[a]]));/**
717
+ * @license lucide-react v0.456.0 - ISC
718
+ *
719
+ * This source code is licensed under the ISC license.
720
+ * See the LICENSE file in the root directory of this source tree.
721
+ */const Fn=(e,t)=>{const r=fn(({className:n,...o},a)=>Ss(A9,{ref:a,iconNode:t,className:Lw(`lucide-${B9(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
722
+ * @license lucide-react v0.456.0 - ISC
723
+ *
724
+ * This source code is licensed under the ISC license.
725
+ * See the LICENSE file in the root directory of this source tree.
726
+ */const rs=Fn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
727
+ * @license lucide-react v0.456.0 - ISC
728
+ *
729
+ * This source code is licensed under the ISC license.
730
+ * See the LICENSE file in the root directory of this source tree.
731
+ */const ns=Fn("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
732
+ * @license lucide-react v0.456.0 - ISC
733
+ *
734
+ * This source code is licensed under the ISC license.
735
+ * See the LICENSE file in the root directory of this source tree.
736
+ */const F9=Fn("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"}]]);/**
737
+ * @license lucide-react v0.456.0 - ISC
738
+ *
739
+ * This source code is licensed under the ISC license.
740
+ * See the LICENSE file in the root directory of this source tree.
741
+ */const P9=Fn("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"}]]);/**
742
+ * @license lucide-react v0.456.0 - ISC
743
+ *
744
+ * This source code is licensed under the ISC license.
745
+ * See the LICENSE file in the root directory of this source tree.
746
+ */const N9=Fn("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"}]]);/**
747
+ * @license lucide-react v0.456.0 - ISC
748
+ *
749
+ * This source code is licensed under the ISC license.
750
+ * See the LICENSE file in the root directory of this source tree.
751
+ */const j9=Fn("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"}]]);/**
752
+ * @license lucide-react v0.456.0 - ISC
753
+ *
754
+ * This source code is licensed under the ISC license.
755
+ * See the LICENSE file in the root directory of this source tree.
756
+ */const I9=Fn("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
757
+ * @license lucide-react v0.456.0 - ISC
758
+ *
759
+ * This source code is licensed under the ISC license.
760
+ * See the LICENSE file in the root directory of this source tree.
761
+ */const R9=Fn("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"}]]);/**
762
+ * @license lucide-react v0.456.0 - ISC
763
+ *
764
+ * This source code is licensed under the ISC license.
765
+ * See the LICENSE file in the root directory of this source tree.
766
+ */const T9=Fn("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"}]]);/**
767
+ * @license lucide-react v0.456.0 - ISC
768
+ *
769
+ * This source code is licensed under the ISC license.
770
+ * See the LICENSE file in the root directory of this source tree.
771
+ */const M9=Fn("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"}]]);/**
772
+ * @license lucide-react v0.456.0 - ISC
773
+ *
774
+ * This source code is licensed under the ISC license.
775
+ * See the LICENSE file in the root directory of this source tree.
776
+ */const z9=Fn("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"}]]);/**
777
+ * @license lucide-react v0.456.0 - ISC
778
+ *
779
+ * This source code is licensed under the ISC license.
780
+ * See the LICENSE file in the root directory of this source tree.
781
+ */const _9=Fn("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 Ob(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":["mp4","avi","mov","wmv","flv","webm","mkv"].includes(t)?"rag/video":"rag/file"}function Fi(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Fi(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=pr.div`
782
+ display: flex;
783
+ flex-direction: column;
784
+ margin-bottom: 0.5rem;
785
+ animation: fadeIn 0.3s ease-in-out;
786
+ width: 100%;
787
+ text-wrap: wrap;
788
+
789
+ ${e=>e.$align==="right"&&`
790
+ align-items: flex-end;
791
+ `}
792
+
793
+ ${e=>e.$align==="center"&&`
794
+ align-items: center;
795
+ `}
796
+
797
+ @keyframes fadeIn {
798
+ from { opacity: 0; transform: translateY(10px); }
799
+ to { opacity: 1; transform: translateY(0); }
800
+ }
801
+ `,W9=pr.div`
802
+ display: flex;
803
+ align-items: center;
804
+ gap: 0.5rem;
805
+ margin-bottom: 0.5rem;
806
+ width: 100%;
807
+
808
+ ${e=>e.$isUser&&`
809
+ flex-direction: row-reverse;
810
+ justify-content: end;
811
+ `}
812
+ `,K9=pr.div`
813
+ background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
814
+ border-radius: 50%;
815
+ width: 2rem;
816
+ height: 2rem;
817
+
818
+ flex-shrink: 0;
819
+ display: flex;
820
+ align-items: center;
821
+ justify-content: center;
822
+ font-size: 1rem;
823
+ `,q9=pr.div`
824
+ width: 100%;
825
+ margin-top: 0.5rem;
826
+ .message-time {
827
+ font-size: 0.75rem;
828
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
829
+ }
830
+
831
+ .message-card {
832
+ background: ${e=>e.$isUser?"#E3ECFF":"#ffffff"};
833
+ border: 1px solid ${e=>(e.$isUser,"transparent")};
834
+ border-radius: 0.5rem;
835
+
836
+ overflow: hidden;
837
+ max-width: ${e=>e.$isUser?"fit-content":"100%"};
838
+ margin-left: ${e=>e.$isUser?"auto":"0"};
839
+
840
+ .message-text {
841
+ width: 100%;
842
+ line-height: 1.6;
843
+ padding: 0.75rem 1rem;
844
+ border-radius: 0.5rem;
845
+ min-height: ${e=>e.$isUser?"auto":"40px"};
846
+ font-size: 0.875rem;
847
+ }
848
+ }
849
+ `,V9=pr.div`
850
+ margin-top: 0.5rem;
851
+ display: flex;
852
+ padding: 0.5rem;
853
+ align-items: center;
854
+
855
+ gap: 0.75rem;
856
+
857
+ button {
858
+ display: flex;
859
+ align-items: center;
860
+ gap: 0.25rem;
861
+ font-size: 0.875rem;
862
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
863
+ background: none;
864
+ border: none;
865
+ cursor: pointer;
866
+ transition: color 0.2s;
867
+
868
+ &:hover {
869
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
870
+ }
871
+
872
+ &.active {
873
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
874
+ }
875
+ }
876
+ `,X9=pr.div`
877
+ margin-top: 1rem;
878
+ padding: 1rem;
879
+
880
+ border-radius: 0.5rem;
881
+
882
+ @keyframes followUpIn {
883
+ from {
884
+ opacity: 0;
885
+ transform: translateY(6px);
886
+ }
887
+ to {
888
+ opacity: 1;
889
+ transform: translateY(0);
890
+ }
891
+ }
892
+
893
+ .follow-up-title {
894
+ font-size: 0.875rem;
895
+ font-weight: 600;
896
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
897
+ margin-bottom: 0.75rem;
898
+ }
899
+
900
+ .follow-up-list {
901
+ display: flex;
902
+ flex-direction: column;
903
+ gap: 0.5rem;
904
+ }
905
+
906
+ .follow-up-item {
907
+ width: fit-content;
908
+ background: #ffffff;
909
+ border: 1px solid #e5e7eb;
910
+ border-radius: 0.375rem;
911
+ padding: 0.75rem 1rem;
912
+ cursor: pointer;
913
+ transition: all 0.2s ease;
914
+ text-align: left;
915
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
916
+ font-size: 0.875rem;
917
+ line-height: 1.4;
918
+ opacity: 0;
919
+ transform: translateY(6px);
920
+ animation: followUpIn 280ms ease forwards;
921
+ animation-play-state: running;
922
+
923
+ &:hover {
924
+ background: #e5e7eb;
925
+ border-color: #d1d5db;
926
+ }
927
+
928
+ &:active {
929
+ transform: translateY(1px);
930
+ }
931
+ }
932
+ `,os=pr.div`
933
+
934
+ padding: 1rem;
935
+ background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
936
+
937
+ border-radius: 0.5rem;
938
+
939
+
940
+ .reference-title {
941
+ font-size: 0.875rem;
942
+ font-weight: 600;
943
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
944
+ margin-bottom: 0.75rem;
945
+ }
946
+
947
+ .reference-list {
948
+ display: flex;
949
+ flex-direction: column;
950
+ gap: 0.5rem;
951
+ }
952
+
953
+ .reference-item {
954
+ background: #ffffff;
955
+
956
+ border-radius: 0.375rem;
957
+ padding: 0.75rem 0;
958
+ display: flex;
959
+ align-items: center;
960
+ gap: 0.5rem;
961
+
962
+ .file-icon {
963
+ width: 2rem;
964
+ height: 2rem;
965
+ background: #e2e8f0;
966
+ border-radius: 0.25rem;
967
+ display: flex;
968
+ align-items: center;
969
+ justify-content: center;
970
+ font-size: 0.75rem;
971
+ color: #64748b;
972
+ }
973
+
974
+ .file-info {
975
+ flex: 1;
976
+
977
+ .file-name {
978
+ font-size: 0.875rem;
979
+ font-weight: 500;
980
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
981
+ margin-bottom: 0.25rem;
982
+ }
983
+
984
+ .file-meta {
985
+ font-size: 0.75rem;
986
+ color: #64748b;
987
+ }
988
+ }
989
+
990
+ .file-score {
991
+ font-size: 0.75rem;
992
+ color: #059669;
993
+ font-weight: 500;
994
+ }
995
+ }
996
+ `,U9=pr.div`
997
+ position: fixed;
998
+ top: 0;
999
+ left: 0;
1000
+ right: 0;
1001
+ bottom: 0;
1002
+ background: rgba(0, 0, 0, 0.8);
1003
+ display: ${e=>e.$show?"flex":"none"};
1004
+ align-items: center;
1005
+ justify-content: center;
1006
+ z-index: 1000;
1007
+ cursor: pointer;
1008
+
1009
+ .modal-content {
1010
+ max-width: 90vw;
1011
+ max-height: 90vh;
1012
+ position: relative;
1013
+ cursor: default;
1014
+ display: flex;
1015
+ flex-direction: column;
1016
+ align-items: center;
1017
+ }
1018
+
1019
+ .modal-image {
1020
+ max-width: 100%;
1021
+ max-height: calc(90vh - 60px);
1022
+ object-fit: contain;
1023
+ border-radius: 8px;
1024
+ }
1025
+
1026
+ .modal-close {
1027
+ margin-top: 16px;
1028
+ background: rgba(255, 255, 255, 0.3);
1029
+ border: none;
1030
+ border-radius: 20px;
1031
+ padding: 8px 20px;
1032
+ display: flex;
1033
+ align-items: center;
1034
+ justify-content: center;
1035
+ cursor: pointer;
1036
+ font-size: 14px;
1037
+ color: #333;
1038
+ font-weight: 500;
1039
+ transition: all 0.2s ease;
1040
+
1041
+ &:hover {
1042
+ background: rgba(255, 255, 255, 1);
1043
+ transform: translateY(-1px);
1044
+ }
1045
+ }
1046
+ `,Ab=pr.div`
1047
+
1048
+ padding:0rem 1rem;
1049
+ background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
1050
+
1051
+ .gallery-grid {
1052
+ display: grid;
1053
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
1054
+ gap: 0.75rem;
1055
+ }
1056
+
1057
+ .gallery-item {
1058
+ position: relative;
1059
+ aspect-ratio: 1;
1060
+ border-radius: 0.375rem;
1061
+ overflow: hidden;
1062
+ cursor: pointer;
1063
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
1064
+ border: 2px solid transparent;
1065
+
1066
+ &:hover {
1067
+ transform: translateY(-2px);
1068
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1069
+ border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
1070
+ }
1071
+
1072
+ .gallery-image {
1073
+ width: 100%;
1074
+ height: 100%;
1075
+ object-fit: cover;
1076
+ background: #f3f4f6;
1077
+ }
1078
+
1079
+ .gallery-overlay {
1080
+ position: absolute;
1081
+ bottom: 0;
1082
+ left: 0;
1083
+ right: 0;
1084
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
1085
+ color: white;
1086
+ padding: 0.5rem;
1087
+ font-size: 0.75rem;
1088
+ text-align: center;
1089
+ opacity: 0;
1090
+ transition: opacity 0.2s ease;
1091
+ }
1092
+
1093
+ &:hover .gallery-overlay {
1094
+ opacity: 1;
1095
+ }
1096
+ }
1097
+ `,lz=({is_download:e,content:t,contentType:r="plainText",align:n="left",displayStatus:o="ready",avatar:a,isUser:i=!1,userAvatar:l,aiAvatar:u,date:s,time:c,timestamp:p,showTime:f=!0,errorMessage:h,styles:v,reference:g,webReference:m,databaseReference:b,graphReference:y,filePaths:C,currentFiles:w,fileManagerData:E,audioUrl:D,feedbackResult:k,queryId:x,defaultAnswer:O,isWelcome:j=!1,isLast:B=!1,respTime:N,tokens:A,resultType:S,followUpQuestions:$=[],tools:P={},eventsEmit:F})=>{Bt(()=>{console.log("isUser",i),console.log("isLast",B)},[B,i]);const I=ou(),T=Ct(()=>{var pe,Oe,Se,Ce,we,fe,le,ee,te,se,Pe;return{colors:{primary:((pe=I==null?void 0:I.colors)==null?void 0:pe.primary)||"#3b82f6",background:((Oe=I==null?void 0:I.colors)==null?void 0:Oe.background)||"#ffffff",userBackground:((Se=I==null?void 0:I.colors)==null?void 0:Se.primary)||"#3b82f6",border:((Ce=I==null?void 0:I.colors)==null?void 0:Ce.border)||"#e5e7eb",text:((we=I==null?void 0:I.colors)==null?void 0:we.text)||"#374151",disabled:((fe=I==null?void 0:I.colors)==null?void 0:fe.disabled)||"#6b7280",info:((le=I==null?void 0:I.colors)==null?void 0:le.info)||"#3b82f6",warning:((ee=I==null?void 0:I.colors)==null?void 0:ee.warning)||"#f59e0b",error:((te=I==null?void 0:I.colors)==null?void 0:te.error)||"#ef4444",...(se=v==null?void 0:v.theme)==null?void 0:se.colors},icons:{aiAvatar:u||"/vite.svg",userAvatar:l||"/default-user-avatar.png",...(Pe=v==null?void 0:v.theme)==null?void 0:Pe.icons}}},[I,v,u,l]),q=Ct(()=>{const pe=c||s||p;return!pe||!f?null:OI(pe).format("YY-MM-DD HH:mm:ss")},[c,s,p,f]),[L,_]=xt([]),[V,Z]=xt(null),[J,z]=xt(!1),[Y,G]=xt(!1),[X,W]=xt(!1),[H,ne]=xt(!1),[U,ae]=xt(!1),re=()=>{const pe={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:Q.jsx(jl,{type:"rag/think",size:16})}}[o]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},Oe=N?`(\u7528\u65F6 ${Math.round(N/1e3)} \u79D2)`:"";return Q.jsx("div",{className:"think-header",children:Q.jsx("div",{className:"think-header-left ml-[16px]",children:Q.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-fit",children:[Q.jsx("div",{className:"think-icon",children:pe.icon}),Q.jsx("div",{className:"think-title",children:pe.text}),Oe&&Q.jsx("div",{className:"think-time",children:Oe}),ke&&Q.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{ae(!U)},children:Q.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:U?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:Q.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},[de,ge]=xt([]),[ye,Ne]=xt(null),xe=Ct(()=>{try{if(!g)return[];const pe=JSON.parse(g);return Array.isArray(pe)?pe:[]}catch{return[]}},[g]),be=(pe,Oe)=>{var le,ee,te;const Se=((le=pe==null?void 0:pe.metadata)==null?void 0:le.source)||(pe==null?void 0:pe.file_path)||(pe==null?void 0:pe.path)||(pe==null?void 0:pe.convertedFilePath)||(pe==null?void 0:pe.parsedFilePath)||"",Ce=((ee=pe==null?void 0:pe.metadata)==null?void 0:ee.title)||(pe==null?void 0:pe.file_name)||"",we=((te=pe==null?void 0:pe.metadata)==null?void 0:te.id)||(pe==null?void 0:pe.id)||(pe==null?void 0:pe.file_id)||"",fe=xe.find(se=>{var $e,Xe,wt;const Pe=(($e=se==null?void 0:se.metadata)==null?void 0:$e.source)||(se==null?void 0:se.file_path)||(se==null?void 0:se.path)||(se==null?void 0:se.convertedFilePath)||(se==null?void 0:se.parsedFilePath)||"",ot=((Xe=se==null?void 0:se.metadata)==null?void 0:Xe.title)||(se==null?void 0:se.file_name)||"",He=((wt=se==null?void 0:se.metadata)==null?void 0:wt.id)||(se==null?void 0:se.id)||"";return we&&He&&String(we)===String(He)||Se&&Pe&&Pe===Se||Ce&&ot&&ot===Ce});if(fe){const se=(fe!=null&&fe.references&&Array.isArray(fe.references)?fe.references:[fe]).find(Pe=>String(Pe.order_num)===String(Oe)||String(Pe.id)===String(Oe));if(se)return se}for(const se of xe){if(se!=null&&se.references&&Array.isArray(se.references)){const Pe=se.references.find(ot=>String(ot.order_num)===String(Oe)||String(ot.id)===String(Oe));if(Pe)return Pe}if(String(se.order_num)===String(Oe)||String(se.id)===String(Oe))return se}return null},Ae=(pe,Oe)=>{function Se(fe,le){for(const ee of fe){if(ee.references&&Array.isArray(ee.references)){const te=ee.references.find(se=>String(se.order_num)===String(le)||String(se.id)===String(le));if(te)return te}if(String(ee.order_num)===String(le)||String(ee.id)===String(le))return ee}return null}let Ce=[];try{g&&(Ce=JSON.parse(g))}catch(fe){console.error("Failed to parse reference:",fe)}const we=Se(Ce,pe.id);F==null||F("action_retrive_tag",{tagInfo:we,fromtype:pe.fromtype,leaf:pe,attributes:Oe})},me=pe=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",pe),console.log("databaseReference available:",!!b),pe.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:pe.id,databaseReference:b}});console.log("Dispatching event:",Oe),window.dispatchEvent(Oe)}else console.log("Cannot send response - missing id or databaseReference")};oe.useEffect(()=>{const pe=Oe=>{me(Oe.detail)};return window.addEventListener("retrieve-sql-data:request-data",pe),()=>{window.removeEventListener("retrieve-sql-data:request-data",pe)}},[b]),oe.useEffect(()=>{const pe=Oe=>{Ee(Oe.detail)};return window.addEventListener("rtext_pagination_click",pe),()=>{window.removeEventListener("rtext_pagination_click",pe)}},[ye]);const Ee=pe=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",pe),pe.replacePredataFunction&&ye){const Oe={...ye,rows:ye.rows};pe.replacePredataFunction(Oe)}F==null||F("rtext_pagination_click",pe)},je=qe(new Map),Be=qe(1),Ye=qe(""),Re=qe({0:1,1:1,2:1,3:1}),Te=Ct(()=>{if(r==="stream"&&typeof t=="string"){let pe=t;const Oe=[];return x&&x!==Ye.current&&(je.current.clear(),Be.current=1,Re.current={0:1,1:1,2:1,3:1},Ye.current=x),pe=pe.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Se,Ce)=>{const we=Ce.match(/id=['"]([^'"]+)['"]/),fe=Ce.match(/fromType=['"]([^'"]+)['"]/);if(we){const le=we[1],ee=fe?fe[1]:"0";if(!je.current.has(le)){const se=Re.current,Pe=ee==="1"?"1":ee==="2"?"2":ee==="3"?"3":"0",ot=se[Pe]??1;je.current.set(le,ot),se[Pe]=ot+1,Re.current=se}const te=je.current.get(le);return`[retrive-tag${Ce}][${te}][/retrive-tag]`}return Se}),pe=pe.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Se=>{const Ce=Se.match(/image_urls=['"]([^'"]+)['"]/);if(Ce){const we=Ce[1].split(";").map(fe=>fe.trim()).filter(Boolean);Oe.push(...we)}return Se}),_(Oe),pe}return t},[t,r,x]),ue=Ct(()=>{if(r==="stream"&&typeof Te=="string")try{return _w(Te)}catch(pe){return console.error("Failed to deserialize markdown:",pe),[]}return[]},[Te,r]);Bt(()=>{try{r==="stream"&&b&&(pe=>{try{const Oe=typeof pe=="string"?JSON.parse(pe):pe;return Oe?Array.isArray(Oe)?Oe:[Oe]:[]}catch{return[]}})(b).forEach(pe=>{const Oe=pe==null?void 0:pe.id;if(!Oe)return;const Se=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Oe,databaseReference:pe}});window.dispatchEvent(Se)})}catch{}},[r,b]);const ke=Ct(()=>{if(!Array.isArray(ue))return!1;const pe=Se=>{for(const Ce of Se)if(Ce.type==="think"||Array.isArray(Ce.children)&&pe(Ce.children))return!0;return!1},Oe=pe(ue);return console.log("Think detection:",{slateContent:ue,hasThinkElement:Oe,displayStatus:o,isUser:i}),Oe},[ue,o,i]),Ke=Ct(()=>({databaseReference:b,...ke&&{isThinkCollapsed:U}}),[b,ke,U]),Ze=Ct(()=>a||(i?T.icons.userAvatar:T.icons.aiAvatar),[a,i,T.icons]),We=Ct(()=>typeof t=="string"?t:Array.isArray(t)?t.map(pe=>typeof pe=="string"?pe:pe.text||"").join(""):O||"",[t,O]),_e=()=>{if(j)return null;const pe=[{key:"copy",show:P.copy!==!1,icon:F9,label:"\u590D\u5236",onClick:()=>F==null?void 0:F("chatbox:copy",{content:We})},{key:"like",show:P.like!==!1,icon:z9,label:"\u8D5E",onClick:()=>F==null?void 0:F("chatbox:like",{result:k,queryId:x}),active:k===1},{key:"dislike",show:P.dislike!==!1,icon:M9,label:"\u8E29",onClick:()=>F==null?void 0:F("chatbox:dislike",{result:k,queryId:x}),active:k===0},{key:"repeat",show:!i&&B,icon:R9,label:"\u91CD\u590D",onClick:()=>F==null?void 0:F("chatbox:repeat",{content:t,queryId:x,filePaths:C,audioUrl:D})},{key:"forward",show:P.forward,icon:T9,label:"\u8F6C\u53D1",onClick:()=>F==null?void 0:F("chatbox:forward",{content:We,queryId:x})},{key:"delete",show:P.delete,icon:_9,label:"\u5220\u9664",onClick:()=>F==null?void 0:F("chatbox:delete",{queryId:x})},{key:"edit",show:P.edit,icon:j9,label:"\u7F16\u8F91",onClick:()=>F==null?void 0:F("chatbox:edit",{content:We,queryId:x})}];return Q.jsxs("div",{className:"flex justify-between items-center px-6",children:[Q.jsx(V9,{$theme:T,children:pe.filter(Oe=>Oe.show).map(Oe=>{const Se=Oe.icon;return Q.jsx(hl,{title:Oe.label,placement:"top",children:Q.jsx("button",{className:Oe.active?"active":"",onClick:Oe.onClick,children:Q.jsx(Se,{size:18})})},Oe.key)})}),!i&&o=="ready"&&!j&&Q.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017"," ",Q.jsx("span",{style:{color:T.colors.primary},children:A||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",Q.jsx("span",{style:{color:T.colors.primary},children:Math.round((N||0)/1e3)}),"\u79D2"]})]})},nt=Ct(()=>{if(!g)return[];let pe=[];try{const we=JSON.parse(g);pe=Array.isArray(we)?we:[]}catch{return[]}let Oe=pe.map(we=>{try{const fe=we.metadata||{};let le="";fe.type==="video"&&fe.source_name&&typeof fe.source_name=="string"?le=fe.source_name:we.name&&typeof we.name=="string"?le=we.name:we.file_name&&typeof we.file_name=="string"?le=we.file_name:fe.title&&typeof fe.title=="string"?le=fe.title:fe.source&&typeof fe.source=="string"?le=fe.source.split("/").pop()||"":we.order_num?le=String(we.order_num):le="\u672A\u77E5\u6587\u6863";let ee="pdf";if(fe.type&&typeof fe.type=="string")ee=fe.type.toLowerCase();else if(we.name&&typeof we.name=="string"){const se=we.name.split(".").pop();se&&(ee=se.toLowerCase())}else if(fe.source&&typeof fe.source=="string"){const se=fe.source.split(".").pop();se&&(ee=se.toLowerCase())}else if(we.file_path&&typeof we.file_path=="string"){const se=we.file_path.split(".").pop();se&&(ee=se.toLowerCase())}const te=we.parsedFilePath||fe.file_path||we.file_path||we.convertedFilePath||fe.link||fe.source_link||"";return{file_id:fe.id||we.uid||"",file_name:le,file_type:ee,path:te,score:Number(we.score||fe.score)||0,tags:[],parsedFilePath:we.parsedFilePath,...we}}catch(fe){return console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",fe,we),{file_id:we.uid||"",file_name:we.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:we.convertedFilePath||we.file_path||"",score:0,tags:[],parsedFilePath:we.parsedFilePath,...we}}});const Se=Fi(ue||[]);if(Se&&Se.length){const we=Se.filter(le=>le.fromtype==="0"),fe=Se.filter(le=>le.fromtype==="3");Oe=Oe.map(le=>{const ee=we.filter(se=>{var ot,He;const Pe=pe.find($e=>String($e.order_num)===String(se.id));return((ot=Pe==null?void 0:Pe.metadata)==null?void 0:ot.source)&&((He=le==null?void 0:le.metadata)==null?void 0:He.source)&&Pe.metadata.source===le.metadata.source}).map(se=>({id:se.id||"",index:se.indexId||"",image_urls:se.imageUrls?Array.isArray(se.imageUrls)?se.imageUrls:[se.imageUrls]:se.image_urls?se.image_urls.split(";").map(Pe=>Pe.trim()).filter(Boolean):[]})),te=fe.filter(se=>{var ot,He;const Pe=pe.find($e=>String($e.order_num)===String(se.id));return((ot=Pe==null?void 0:Pe.metadata)==null?void 0:ot.source)&&((He=le==null?void 0:le.metadata)==null?void 0:He.source)&&Pe.metadata.source===le.metadata.source}).map(se=>({id:se.id||"",index:se.indexId||"",image_urls:se.imageUrls?Array.isArray(se.imageUrls)?se.imageUrls:[se.imageUrls]:se.image_urls?se.image_urls.split(";").map(Pe=>Pe.trim()).filter(Boolean):[]}));return{...le,tags:[...ee,...te]}})}const Ce=new Map;return Oe.filter(we=>{var le;const fe=((le=we==null?void 0:we.metadata)==null?void 0:le.source)||we.file_name;return fe?Ce.has(fe)?!1:(Ce.set(fe,!0),!0):!0}).sort((we,fe)=>((fe==null?void 0:fe.score)||0)-((we==null?void 0:we.score)||0))},[g,ue]),Ue=Ct(()=>{if(!m)return[];let pe=[];try{const Ce=JSON.parse(m);pe=Array.isArray(Ce)?Ce:[]}catch{return[]}if(!(pe!=null&&pe.length))return[];let Oe=pe.map(Ce=>{var we,fe,le;return{link:(we=Ce==null?void 0:Ce.metadata)==null?void 0:we.link,file_name:(fe=Ce==null?void 0:Ce.metadata)==null?void 0:fe.title,score:(le=Ce==null?void 0:Ce.metadata)==null?void 0:le.score,tags:[]}});const Se=Fi(ue||[]);if(Se&&Se.length){const Ce=Se.filter(we=>we.fromtype==="1");Oe=Oe.map(we=>{const fe=Ce.filter(le=>{var te;const ee=pe.find(se=>String(se.order_num)===String(le.id));return((te=ee==null?void 0:ee.metadata)==null?void 0:te.title)&&ee.metadata.title===we.file_name}).map(le=>({id:le.id||"",index:le.indexId||"",image_urls:le.imageUrls?Array.isArray(le.imageUrls)?le.imageUrls:[le.imageUrls]:le.image_urls?le.image_urls.split(";").map(ee=>ee.trim()).filter(Boolean):[]}));return{...we,tags:fe}})}return Oe.sort((Ce,we)=>((we==null?void 0:we.score)||0)-((Ce==null?void 0:Ce.score)||0))},[m,ue]),et=Ct(()=>{if(!y)return[];let pe=[];try{const Ce=JSON.parse(y);pe=Array.isArray(Ce)?Ce:[]}catch(Ce){return console.error("Failed to parse graphReference:",Ce),[]}let Oe=pe.map((Ce,we)=>({id:Ce.id||`graph-${we}`,graphName:Ce.graphName||`\u56FE\u8C31${we+1}`,tags:[],...Ce}));const Se=Fi(ue||[]);if(Se&&Se.length){const Ce=Se.filter(we=>we.fromtype==="2");Oe=Oe.map(we=>{const fe=Ce.filter(le=>String(le.id)===String(we.id)).map(le=>({id:le.id||"",index:le.indexId||"",image_urls:le.imageUrls?Array.isArray(le.imageUrls)?le.imageUrls:[le.imageUrls]:le.image_urls?le.image_urls.split(";").map(ee=>ee.trim()).filter(Boolean):[]}));return{...we,tags:fe}})}return Oe},[y,ue]),yt=Ct(()=>{const pe=[...Fi(ue||[]).filter(Oe=>Oe.imageUrls&&Array.isArray(Oe.imageUrls)).flatMap(Oe=>Oe.imageUrls),...L];return Array.from(new Set(pe))},[ue,L]),kt=Ct(()=>typeof t!="string"?[]:L9(t),[t]),dt=Ct(()=>{var pe,Oe,Se,Ce,we,fe,le,ee;if(!b)return null;try{const te=typeof b=="string"?JSON.parse(b):b;if(Array.isArray(te)&&te.length>0){const se=te[0];if(se.retrieveSqlData)return{dataFetchUrl:se.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:se.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:se.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:se.retrieveSqlData.total||0,type:se.retrieveSqlData.type||"COLLECTION",preData:{columns:((Oe=(pe=se.retrieveSqlData.preData)==null?void 0:pe[0])==null?void 0:Oe.columns)||[],rows:((Ce=(Se=se.retrieveSqlData.preData)==null?void 0:Se[0])==null?void 0:Ce.data)||[]}}}return te.retrieveSqlData?{dataFetchUrl:te.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:te.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:te.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:te.retrieveSqlData.total||0,type:te.retrieveSqlData.type||"COLLECTION",preData:{columns:((fe=(we=te.retrieveSqlData.preData)==null?void 0:we[0])==null?void 0:fe.columns)||[],rows:((ee=(le=te.retrieveSqlData.preData)==null?void 0:le[0])==null?void 0:ee.data)||[]}}:{dataFetchUrl:te.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:te.databaseName||"\u6570\u636E\u5E93",tableName:te.tableName||"\u6570\u636E\u8868",total:te.total||0,type:te.type||"COLLECTION",preData:te.preData||{columns:[],rows:[]}}}catch(te){return console.error("Failed to parse databaseReference:",te),null}},[b]),ht=pe=>{const{dataSourceType:Oe,databaseName:Se,businessTableName:Ce,tableName:we}=pe;return Oe==="DataTable"?`${Se||"\u6570\u636E\u5E93"} - ${Ce||"\u6570\u636E\u8868"}`:Oe==="DirectDB"?`${Se||"\u6570\u636E\u5E93"} - ${we||"\u6570\u636E\u8868"}`:Se||Ce||we||"\u6570\u636E\u5E93"};oe.useEffect(()=>{var pe,Oe,Se,Ce,we,fe,le,ee;if(b)try{const te=typeof b=="string"?JSON.parse(b):b;if(Array.isArray(te)&&te.length>0){const se=te[0];if(se.retrieveTableDataList&&Array.isArray(se.retrieveTableDataList)){ge(se.retrieveTableDataList);return}if((Se=(Oe=(pe=se.retrieveSqlData)==null?void 0:pe.preData)==null?void 0:Oe[0])!=null&&Se.data&&Array.isArray(se.retrieveSqlData.preData[0].data)){ge(se.retrieveSqlData.preData[0].data);return}}if(te.retrieveTableDataList&&Array.isArray(te.retrieveTableDataList)){ge(te.retrieveTableDataList);return}if((fe=(we=(Ce=te.retrieveSqlData)==null?void 0:Ce.preData)==null?void 0:we[0])!=null&&fe.data&&Array.isArray(te.retrieveSqlData.preData[0].data)){ge(te.retrieveSqlData.preData[0].data);return}(le=dt==null?void 0:dt.preData)!=null&&le.rows&&ge(dt.preData.rows)}catch(te){console.error("Failed to parse databaseReference for retrieveTableDataList:",te),(ee=dt==null?void 0:dt.preData)!=null&&ee.rows&&ge(dt.preData.rows)}},[b,dt]);const Mt=Ct(()=>{if(!i)return[];if(Array.isArray(w))return w;if(typeof w=="string"&&w)try{return JSON.parse(w)}catch{return[]}return[]},[i,w]),Pt=()=>{if(!i||Mt.length===0)return null;const pe=ee=>ee!=null&&ee.status&&(String(ee.status).toLowerCase()==="uploading"||String(ee.status).toLowerCase()==="parsing")?!1:!!(ee!=null&&ee.url||ee!=null&&ee.filePath||ee!=null&&ee.convertedFilePath),Oe=Mt.filter(ee=>{const te=(ee.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(te.toLowerCase())}),Se=Mt.filter(ee=>{const te=(ee.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(te.toLowerCase())}),Ce=Oe.filter(pe),we=Oe.filter(ee=>!pe(ee)),fe=Se.filter(pe),le=Se.filter(ee=>!pe(ee));return Q.jsxs("div",{className:"w-full mt-4",children:[(Ce.length>0||we.length>0)&&Q.jsx(Ab,{$theme:T,children:Q.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[we.map((ee,te)=>{var se;return Q.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:Q.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((se=T.colors)==null?void 0:se.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${te}`)}),Ce.map(ee=>Q.jsxs("div",{className:"gallery-item",onClick:()=>{Z(ee.url||ee.filePath||null),F==null||F("reference_file:click",{file:ee.name,file_type:"image",url:ee.url||ee.filePath,parse_url:ee.parseUrl||ee.convertedFilePath,retrieve_tags:ee.retrieveTags||[],file_id:ee.uid,parsed_file_type:"image",references:ee,type:"image",isUploadFile:!0,pdfPages:ee.pdfPages||0})},children:[Q.jsx("img",{src:ee.url||ee.filePath,alt:ee.name,className:"gallery-image",onError:te=>{const se=te.target;se.style.display="none"}}),Q.jsx("div",{className:"gallery-overlay",children:ee.name})]},ee.uid||ee.name))]})}),(fe.length>0||le.length>0)&&Q.jsxs("div",{className:"w-full",children:[Q.jsxs("div",{className:"text-sm font-semibold text-gray-700 mb-3 px-4",children:["\u4E0A\u4F20\u6587\u6863 (",fe.length,")"]}),Q.jsxs("div",{className:"flex flex-col gap-2 px-4",style:{direction:"ltr"},children:[le.map((ee,te)=>{var se;return Q.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 bg-gray-50/40",children:[Q.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded bg-gray-200"}),Q.jsx("div",{className:"flex-1 min-w-0",children:Q.jsx("div",{className:"h-3 rounded bg-gray-200 w-[60%]"})}),Q.jsx("div",{className:"w-6 h-6",children:Q.jsx("div",{className:"animate-spin",style:{width:18,height:18,border:"2px solid #d1d5db",borderTopColor:((se=T.colors)==null?void 0:se.primary)||"#3b82f6",borderRadius:"9999px"}})})]},`pending-doc-${te}`)}),fe.map(ee=>{const te=(ee.name||"").split(".").pop()||"";return Q.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:()=>{F==null||F("reference_file:click",{file:ee.name,file_type:te,url:ee.url||ee.filePath,parse_url:ee.parseUrl||ee.convertedFilePath,retrieve_tags:ee.retrieveTags||[],file_id:ee.uid,parsed_file_type:te,references:ee,type:"file",isUploadFile:!0,pdfPages:ee.pdfPages||0})},children:[Q.jsx("div",{className:"flex-shrink-0",children:Q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center ",children:Q.jsx(jl,{type:Ob(te),size:16})})}),Q.jsx("div",{className:"flex-1 min-w-0",children:Q.jsx("div",{className:"text-sm font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:se=>{se.stopPropagation(),F==null||F("referenceFile_question",{data:{...ee,file_type:te,file_name:ee.name,metadata:ee,parsedFilePath:ee.url||ee.filePath}})},children:ee.name})}),ee.size&&Q.jsx("div",{className:"text-sm text-gray-600",children:ee.size})]},ee.uid||ee.name)})]})]})]})},ft=()=>{if(i)return null;const pe=Array.isArray(nt)?nt:[],Oe=Array.isArray(Ue)?Ue:[],Se=Array.isArray(et)?et:[],Ce=pe.length>0&&S!==5,we=Oe.length>0,fe=Se.length>0,le=((yt==null?void 0:yt.length)||0)>0||((kt==null?void 0:kt.length)||0)>0,ee=de&&de.length>0;return!Ce&&!we&&!fe&&!le&&!ee?null:Q.jsxs(Q.Fragment,{children:[le&&Q.jsx(Ab,{$theme:T,children:Q.jsx("div",{className:"gallery-grid",children:[...yt,...kt].map((te,se)=>Q.jsxs("div",{className:"gallery-item",onClick:()=>{Z(te),F==null||F("reference_file:click",{file:`\u56FE${se+1}`,file_type:"image",url:te,parse_url:te,retrieve_tags:[],references:{url:te},type:"image",isUploadFile:!1})},children:[Q.jsx("img",{src:te,alt:`\u56FE${se+1}`,className:"gallery-image",onError:Pe=>{const ot=Pe.target;ot.style.display="none"}}),Q.jsxs("div",{className:"gallery-overlay",children:["\u56FE",se+1]})]},te+se))})}),Ce&&Q.jsxs(os,{$theme:T,children:[Q.jsx("div",{className:"reference-title justify-between items-center flex",children:Q.jsxs("div",{className:"flex items-center gap-2",children:[Q.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),Q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${pe.length})`}),pe.length>2&&Q.jsx("div",{onClick:()=>z(!J),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:J?Q.jsx(ns,{size:16,className:"text-[#b4b4b4]"}):Q.jsx(rs,{size:16,className:"text-[#b4b4b4]"})})]})}),Q.jsx("div",{className:"reference-list",children:(J?pe:pe.slice(0,2)).map((te,se)=>te&&Q.jsx("div",{className:"reference-item",children:Q.jsxs("div",{className:"file-info flex items-end gap-2",children:[Q.jsx("div",{className:"flex-shrink-0",children:(()=>{const Pe=te.file_type||(te.file_name||"").split(".").pop()||"pdf",ot=(te.file_name||"").split(".").pop()||"file";return Pe==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(Pe)?Q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:Q.jsx(I9,{size:16,className:"text-red-600"})}):Q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Q.jsx(jl,{type:Ob(ot),size:16})})})()}),Q.jsx("div",{className:"flex-1 min-w-0",children:Q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Pe=>{Pe.stopPropagation(),F==null||F("knowledge_referenceFile_title:click",{data:{...te,file_type:te.file_type,file_name:te.file_name,metadata:te.metadata,parsedFilePath:te.parsedFilePath}})},children:te.file_name})}),Q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Pe=new Set,ot=(te.tags||[]).filter($e=>Pe.has($e.id)?!1:(Pe.add($e.id),!0)).sort(($e,Xe)=>Number($e.index)-Number(Xe.index)),He=$e=>{if(typeof Te!="string")return $e;const Xe=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${$e}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Te);return Xe?Xe[1]:$e};return ot.slice(0,10).map($e=>Q.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:Xe=>{Xe.stopPropagation();const wt=be(te,$e.id),St=te.file_type==="video"?"3":"0";F==null||F("retrive_tag:click",{tagInfo:wt||te,fromtype:St,leaf:{id:$e.id,fromtype:St},attributes:{}})},children:He($e.id)},$e.id))})()}),Q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",te.score?Number(te.score).toFixed(2):"N/A"]}),te.file_type!=="video"&&Q.jsx("div",{className:"flex items-center gap-2",children:Q.jsx(N9,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:e?"pointer":"not-allowed"},onClick:Pe=>{e&&(Pe.stopPropagation(),F==null||F("referenceFile_download",{data:{...te,file_type:te.file_type,file_name:te.file_name,metadata:te.metadata,parsedFilePath:te.parsedFilePath}}))}})})]})},te.file_id||se))})]}),ee&&Q.jsxs(os,{$theme:T,children:[Q.jsx("div",{className:"reference-title justify-between items-center flex",children:Q.jsxs("div",{className:"flex items-center gap-2",children:[Q.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),Q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${de.length||0})`}),de.length>2&&Q.jsx("div",{onClick:()=>W(!X),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:X?Q.jsx(ns,{size:16,className:"text-[#b4b4b4]"}):Q.jsx(rs,{size:16,className:"text-[#b4b4b4]"})})]})}),Q.jsx("div",{className:"reference-list",children:(X?de:de.slice(0,2)).map((te,se)=>Q.jsx("div",{className:"reference-item",children:Q.jsxs("div",{className:"file-info flex items-end gap-2",children:[Q.jsx("div",{className:"flex-shrink-0",children:Q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Q.jsx(P9,{size:20,className:"text-blue-600"})})}),Q.jsx("div",{className:"flex-1 min-w-0",children:Q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Pe=>{Pe.stopPropagation(),F==null||F("database_referenceFile_title:click",{data:{...te,file_type:"database",file_name:ht(te),metadata:te,parsedFilePath:te.fetchUrl||(dt==null?void 0:dt.dataFetchUrl)||"",file:te.databaseName||"database",url:te.fetchUrl||(dt==null?void 0:dt.dataFetchUrl)||"",parse_url:te.fetchUrl||(dt==null?void 0:dt.dataFetchUrl)||"",retrieve_tags:[],references:te,type:"database",isUploadFile:!1}})},children:ht(te)})}),Q.jsx("div",{className:"flex items-center gap-1",children:Q.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:se+1})}),Q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",te.score?Number(te.score).toFixed(2):"N/A"]})]})},te.tableName||se))})]}),we&&Q.jsxs(os,{$theme:T,children:[Q.jsx("div",{className:"reference-title justify-between items-center flex",children:Q.jsxs("div",{className:"flex items-center gap-2",children:[Q.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),Q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Oe.length})`}),Oe.length>2&&Q.jsx("div",{onClick:()=>G(!Y),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Y?Q.jsx(ns,{size:16,className:"text-[#b4b4b4]"}):Q.jsx(rs,{size:16,className:"text-[#b4b4b4]"})})]})}),Q.jsx("div",{className:"reference-list",children:(Y?Oe:Oe.slice(0,2)).map((te,se)=>Q.jsx("div",{className:"reference-item",children:Q.jsxs("div",{className:"file-info flex items-end gap-2",children:[Q.jsx("div",{className:"flex-shrink-0",children:Q.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:Q.jsx(jl,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),Q.jsx("div",{className:"flex-1 min-w-0",children:Q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Pe=>{Pe.stopPropagation(),F==null||F("web_referenceFile_title:click",{data:{...te,file_type:te.file_type,file_name:te.file_name,metadata:te.metadata,parsedFilePath:te.parsedFilePath,file:te.file_name,url:te.link,parse_url:te.link,retrieve_tags:te.tags||[],references:te,type:"file",isUploadFile:!1}})},children:te.file_name})}),Q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Pe=new Set,ot=(te.tags||[]).filter($e=>Pe.has($e.id)?!1:(Pe.add($e.id),!0)).sort(($e,Xe)=>Number($e.index)-Number(Xe.index)),He=$e=>{if(typeof Te!="string")return $e;const Xe=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${$e}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Te);return Xe?Xe[1]:$e};return ot.slice(0,1).map($e=>Q.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:Xe=>{Xe.stopPropagation();const wt=be(te,$e.id);F==null||F("retrive_tag:click",{tagInfo:wt||te,fromtype:"1",leaf:{id:$e.id,fromtype:"1"},attributes:{}})},children:He($e.id)},$e.id))})()}),Q.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",te.score?te.score.toFixed(2):"N/A"]})]})},(te.link||"")+se))})]}),fe&&Q.jsxs(os,{$theme:T,children:[Q.jsx("div",{className:"reference-title justify-between items-center flex",children:Q.jsxs("div",{className:"flex items-center gap-2",children:[Q.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),Q.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Se.length})`}),Se.length>2&&Q.jsx("div",{onClick:()=>ne(!H),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:H?Q.jsx(ns,{size:16,className:"text-[#b4b4b4]"}):Q.jsx(rs,{size:16,className:"text-[#b4b4b4]"})})]})}),Q.jsx("div",{className:"reference-list",children:(H?Se:Se.slice(0,2)).map((te,se)=>Q.jsx("div",{className:"reference-item",children:Q.jsxs("div",{className:"file-info flex items-end gap-2",children:[Q.jsx("div",{className:"flex-shrink-0",children:Q.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Q.jsx("div",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center",children:"\u56FE"})})}),Q.jsx("div",{className:"flex-1 min-w-0",children:Q.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-purple-600 cursor-pointer",onClick:Pe=>{Pe.stopPropagation(),F==null||F("graph_reference:click",te)},children:te.graphName||`\u56FE\u8C31${se+1}`})}),Q.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Pe=new Set,ot=(te.tags||[]).filter($e=>Pe.has($e.id)?!1:(Pe.add($e.id),!0)).sort(($e,Xe)=>Number($e.index)-Number(Xe.index)),He=$e=>{if(typeof Te!="string")return $e;const Xe=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${$e}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Te);return Xe?Xe[1]:$e};return ot.slice(0,10).map($e=>Q.jsx("span",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-purple-200 transition-colors",onClick:Xe=>{Xe.stopPropagation(),F==null||F("retrive_tag:click",{tagInfo:{id:$e.id,index:$e.index,image_urls:$e.image_urls||[]}})},children:He($e.id)},$e.id))})()})]})},te.id||se))})]})]})},ut=()=>i||!B||!$||$.length===0?null:Q.jsx(X9,{$theme:T,children:Q.jsx("div",{className:"follow-up-list",children:$.map((pe,Oe)=>Q.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Oe*260}ms`},onClick:()=>{F==null||F("chatbox:follow_up_question_click",{question:pe,queryId:x})},children:pe},`${String(pe)}-${Oe}`))})});return Q.jsxs(H9,{$align:n,$isUser:i,children:[Q.jsxs(W9,{$isUser:i,children:[Q.jsx(K9,{$src:Ze,$isUser:i}),q&&Q.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:q})]}),Q.jsx(q9,{$isUser:i,$theme:T,children:Q.jsx("div",{className:"message-card",children:Q.jsx("div",{className:"message-text",children:r==="stream"?Q.jsxs(Q.Fragment,{children:[!i&&re(),Q.jsx(Pm,{dataSource:{type:nu.MARKDOWN,content:Te},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:Ae,eventsEmit:F,extraProps:Ke},`md-${(Te||"").length}-think-${U}`)]}):Q.jsx("div",{children:We})})})}),Pt(),ft(),!i&&_e(),ut(),typeof document<"u"&&Ib(Q.jsx(U9,{$show:V!==null,onClick:()=>Z(null),children:V&&Q.jsxs("div",{className:"modal-content",onClick:pe=>pe.stopPropagation(),children:[Q.jsx("img",{src:V,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),Q.jsx("button",{className:"modal-close",onClick:()=>Z(null),children:"\u5173\u95ED"})]})}),document.body)]})},G9=pr.div`
1098
+ position: relative;
1099
+ width: 100%;
1100
+ height: 100%;
1101
+ overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
1102
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
1103
+ border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
1104
+
1105
+ /* 自定义滚动条 */
1106
+ &::-webkit-scrollbar {
1107
+ width: 8px;
1108
+ }
1109
+
1110
+ &::-webkit-scrollbar-track {
1111
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
1112
+ border-radius: 4px;
1113
+ }
1114
+
1115
+ &::-webkit-scrollbar-thumb {
1116
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
1117
+ border-radius: 4px;
1118
+
1119
+ &:hover {
1120
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
1121
+ }
1122
+ }
1123
+ `,Y9=pr.div`
1124
+ position: relative;
1125
+ width: 100%;
1126
+ height: 100%;
1127
+ overflow: auto;
1128
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
1129
+
1130
+ /* 自定义滚动条 */
1131
+ &::-webkit-scrollbar {
1132
+ width: 8px;
1133
+ }
1134
+
1135
+ &::-webkit-scrollbar-track {
1136
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
1137
+ border-radius: 4px;
1138
+ }
1139
+
1140
+ &::-webkit-scrollbar-thumb {
1141
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
1142
+ border-radius: 4px;
1143
+
1144
+ &:hover {
1145
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
1146
+ }
1147
+ }
1148
+ `,Fb=pr.div`
1149
+ padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
1150
+ min-height: ${e=>e.height||"auto"};
1151
+
1152
+ /* 富文本内容样式增强 */
1153
+ & h1, & h2, & h3, & h4, & h5, & h6 {
1154
+ scroll-margin-top: 2rem;
1155
+ }
1156
+
1157
+ & img {
1158
+ max-width: 100%;
1159
+ height: auto;
1160
+ border-radius: 0.5rem;
1161
+ margin: 1rem 0;
1162
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
1163
+ transition: transform 0.2s ease-in-out;
1164
+
1165
+ &:hover {
1166
+ transform: scale(1.02);
1167
+ }
1168
+ }
1169
+
1170
+ /* 表格样式 - 主题感知 */
1171
+ & .table-container {
1172
+ overflow: auto;
1173
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
1174
+ border-radius: 6px;
1175
+ margin: 1rem 0;
1176
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
1177
+ }
1178
+
1179
+ & .table-container table {
1180
+ width: 100%;
1181
+ border-collapse: collapse;
1182
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
1183
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
1184
+ }
1185
+
1186
+ & .table-container th,
1187
+ & .table-container td {
1188
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
1189
+ padding: 8px 12px;
1190
+ text-align: left;
1191
+ }
1192
+
1193
+ & .table-container th {
1194
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
1195
+ font-weight: 600;
1196
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
1197
+ }
1198
+
1199
+ & .table-container td {
1200
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
1201
+ }
1202
+
1203
+ & .table-container tr:nth-child(even) {
1204
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
1205
+ }
1206
+
1207
+ & pre {
1208
+ position: relative;
1209
+
1210
+ &::before {
1211
+ content: '';
1212
+ position: absolute;
1213
+ top: 0;
1214
+ left: 0;
1215
+ right: 0;
1216
+ height: 2px;
1217
+ background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
1218
+ border-radius: 2px 2px 0 0;
1219
+ }
1220
+ }
1221
+
1222
+ & blockquote {
1223
+ position: relative;
1224
+
1225
+ &::before {
1226
+ content: '"';
1227
+ position: absolute;
1228
+ top: -0.5rem;
1229
+ left: -1rem;
1230
+ font-size: 3rem;
1231
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
1232
+ opacity: 0.3;
1233
+ }
1234
+ }
1235
+
1236
+
1237
+ `,Z9=pr.div`
1238
+ display: flex;
1239
+ align-items: center;
1240
+ justify-content: center;
1241
+ padding: 2rem;
1242
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
1243
+ font-size: 0.875rem;
1244
+
1245
+ &::before {
1246
+ content: '';
1247
+ width: 20px;
1248
+ height: 20px;
1249
+ border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
1250
+ border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
1251
+ border-radius: 50%;
1252
+ animation: spin 1s linear infinite;
1253
+ margin-right: 0.5rem;
1254
+ }
1255
+
1256
+ @keyframes spin {
1257
+ 0% { transform: rotate(0deg); }
1258
+ 100% { transform: rotate(360deg); }
1259
+ }
1260
+ `,J9=pr.div`
1261
+ display: flex;
1262
+ flex-direction: column;
1263
+ align-items: center;
1264
+ justify-content: center;
1265
+ padding: 3rem;
1266
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
1267
+ text-align: center;
1268
+
1269
+ &::before {
1270
+ content: '📄';
1271
+ font-size: 3rem;
1272
+ margin-bottom: 1rem;
1273
+ }
1274
+ `,Q9=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:i=!1,size:l="sm",basePath:u,theme:s={},onChange:c,onScroll:p,onScrollToTop:f,onScrollToBottom:h,onSegmentClick:v,className:g,style:m,height:b="100%"})=>{const y=ou(),C=Ct(()=>{var W,H,ne,U,ae,re,de,ge,ye;return{primaryColor:(s==null?void 0:s.primaryColor)||((W=y==null?void 0:y.colors)==null?void 0:W.primary)||"#007bff",secondaryColor:(s==null?void 0:s.secondaryColor)||((H=y==null?void 0:y.colors)==null?void 0:H.secondary)||"#6c757d",backgroundColor:(s==null?void 0:s.backgroundColor)||((ne=y==null?void 0:y.colors)==null?void 0:ne.background)||"#ffffff",textColor:(s==null?void 0:s.textColor)||((U=y==null?void 0:y.colors)==null?void 0:U.text)||"#24292f",borderColor:(s==null?void 0:s.borderColor)||((ae=y==null?void 0:y.colors)==null?void 0:ae.border)||"#dee2e6",disabledBackground:(s==null?void 0:s.disabledBackground)||((re=y==null?void 0:y.colors)==null?void 0:re.disabledBackground)||"#f8f9fa",hoverBackground:(s==null?void 0:s.hoverBackground)||((de=y==null?void 0:y.colors)==null?void 0:de.hoverBackground)||"#e9ecef",borderRadius:(s==null?void 0:s.borderRadius)||((ge=y==null?void 0:y.space)==null?void 0:ge.radius)||"8px",padding:(s==null?void 0:s.padding)||((ye=y==null?void 0:y.space)==null?void 0:ye.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}},[y,s]),w=qe(0);w.current+=1,console.log("[Markdownit] render count:",w.current);const[E,D]=xt([]),[k,x]=xt({start:0,end:10}),[O,j]=xt(0),[B,N]=xt(0),[A,S]=xt(!1),[$,P]=xt(!1),[F,I]=xt(!1),T=qe(null),q=qe(null),L=qe(null),_=Ct(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);Bt(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(_)?_.length:"n/a"),D(_)},[_]);const V=Ct(()=>t?`${E.length*r}px`:"auto",[E.length,r,t]),Z=Ct(()=>{if(!t)return E;const W=Math.max(0,k.start-n),H=Math.min(E.length,k.end+n);return E.slice(W,H).map((ne,U)=>({...ne,virtualIndex:W+U}))},[E,k,t,n]),J=mt(W=>{const{scrollTop:H,scrollHeight:ne,clientHeight:U}=W.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:H,scrollHeight:ne,clientHeight:U});const ae=!t&&!p&&!f&&!h&&!o;if(console.log("[Markdownit] passiveOnly:",ae),ae||j(re=>re!==H?(console.log("[Markdownit] setScrollTop:",H),H):re),t&&!ae){const re=Math.floor(H/r),de=Math.min(E.length,re+Math.ceil(B/r)+1);x(ge=>ge.start!==re||ge.end!==de?(console.log("[Markdownit] setVisibleRange:",{start:re,end:de}),{start:re,end:de}):ge)}if(!ae){const re=H<=10;re!==$&&(console.log("[Markdownit] isAtTop ->",re),P(re),re&&f&&(console.log("[Markdownit] onScrollToTop callback"),f()))}if(!ae){const re=H+U>=ne-10;re!==F&&(console.log("[Markdownit] isAtBottom ->",re),I(re),re&&h&&(console.log("[Markdownit] onScrollToBottom callback"),h()))}p&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:H,scrollHeight:ne}),p(H,ne)),o&&a&&!A&&!i&&ne-H-B<100&&z()},[t,r,E.length,B,o,a,A,i,$,F,f,h,p]),z=mt(async()=>{if(!(!a||A||i)){S(!0);try{const W=E[E.length-1],H=await a(W.id);D(ne=>[...ne,...H])}catch(W){console.error("Failed to load more segments:",W)}finally{S(!1)}}},[a,E,A,i]);Bt(()=>{const W=()=>{T.current&&N(T.current.clientHeight)};return W(),window.addEventListener("resize",W),()=>window.removeEventListener("resize",W)},[]);const Y=mt((W,H)=>{const ne={type:W.type,content:W.content},U=t?{position:"absolute",top:`${(W.virtualIndex||H)*r}px`,left:0,right:0,height:`${r}px`}:{};return Q.jsx("div",{style:U,onClick:()=>v==null?void 0:v(W.id,W),className:v?"cursor-pointer hover:bg-gray-50":"",children:Q.jsx(Pm,{dataSource:ne,isEditing:!1,size:l,basePath:u,theme:C,onChange:c,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},W.id)},[t,r,C,c,v]),G=()=>(console.log("[Markdownit] renderContent segments.len:",E.length,"enableVirtualScroll:",t),E.length===0?Q.jsxs(J9,{theme:C,children:[Q.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),Q.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?Q.jsx("div",{ref:L,style:{height:V,position:"relative"},children:Z.map(Y)}):Q.jsx("div",{ref:L,children:E.map(Y)})),X=()=>!A&&!i?null:Q.jsx(Z9,{theme:C,children:i?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return Q.jsx(G9,{ref:T,theme:C,$isVirtualized:t,className:g,style:{height:b,...m},children:t?Q.jsx(Y9,{ref:q,theme:C,onScroll:J,children:Q.jsx(Fb,{theme:C,height:V,children:G()})}):Q.jsxs(Fb,{theme:C,onScroll:J,children:[G(),X()]})})},sz=e=>{const{onRendered:t}=e;return Bt(()=>{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]),Q.jsx("div",{"data-markdownit-root":"1",children:Q.jsx(Q9,{...e})})};pr.div`
1275
+ background: #f6f8fa;
1276
+ border: 1px solid #d0d7de;
1277
+ border-radius: 6px;
1278
+ padding: 16px;
1279
+ margin-bottom: 20px;
1280
+ `;pr.p`
1281
+ margin: 0 0 16px 0;
1282
+ color: #656d76;
1283
+ font-size: 14px;
1284
+ line-height: 1.5;
1285
+ `;const Pb=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]||"",u=(o[2]||"").trim(),s=o.index,c=s+i.length;if(s>n){const b=e.slice(n,s);b.trim()!==""&&(r.push({text:b}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:b}))}const p=b=>{const y=new RegExp(`${b}\\s*=\\s*(["'])((?:\\\\.|[^\\
1286
+ ])*?)\\1`,"i"),C=l.match(y);return C?C[2]:void 0},f=/\S/.test(l),h=p("key"),v=p("placeholder"),g=h||`template-${Date.now()}-${a++}`,m={type:"template",key:g,placeholder:f?v||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":u||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:f?u:"",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)},ud=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||"",u=` key="${String(a)}" placeholder="${String(i)}"`;r+=`<template${u}>${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\`\`\`
1287
+ ${n.value||n.placeholder}\`\`\`
1288
+ \`\`\`
1289
+ `)}),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,w,E,D,k,x,O,j,B,N,A,S,$,P,F,I,T,q,L,_,V,Z,J,z,Y,G,X,W,H,ne,U,ae,re,de,ge,ye,Ne,xe,be,Ae,me,Ee,je,Be,Ye,Re;const a=ou(),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:((w=a==null?void 0:a.colors)==null?void 0:w.error)||"#FF0000",info:((E=a==null?void 0:a.colors)==null?void 0:E.info)||"#0000FF",disabled:((D=a==null?void 0:a.colors)==null?void 0:D.disabled)||"#808080",disabledBackground:((k=a==null?void 0:a.colors)==null?void 0:k.disabledBackground)||"#F5F5F5",disabledText:((x=a==null?void 0:a.colors)==null?void 0:x.disabledText)||"#808080",shadow:((O=a==null?void 0:a.colors)==null?void 0:O.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((j=a==null?void 0:a.colors)==null?void 0:j.appBackground)||"transparent",listBackground:((B=a==null?void 0:a.colors)==null?void 0:B.listBackground)||"#f9f9f9",dashboardBackground:((N=a==null?void 0:a.colors)==null?void 0:N.dashboardBackground)||"#ffffff",textSecondary:((A=a==null?void 0:a.colors)==null?void 0:A.textSecondary)||"#6b7280"},space:{sidebar:((S=a==null?void 0:a.space)==null?void 0:S.sidebar)||"260px",size:(($=a==null?void 0:a.space)==null?void 0:$.size)||"12px",radius:((P=a==null?void 0:a.space)==null?void 0:P.radius)||"6px",padding:((F=a==null?void 0:a.space)==null?void 0:F.padding)||"16px",margin:((I=a==null?void 0:a.space)==null?void 0:I.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:((q=a==null?void 0:a.space)==null?void 0:q.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((_=(L=a==null?void 0:a.fonts)==null?void 0:L.body)==null?void 0:_.size)||"14px",weight:((Z=(V=a==null?void 0:a.fonts)==null?void 0:V.body)==null?void 0:Z.weight)||"normal",family:((z=(J=a==null?void 0:a.fonts)==null?void 0:J.body)==null?void 0:z.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((G=(Y=a==null?void 0:a.fonts)==null?void 0:Y.heading)==null?void 0:G.size)||"16px",weight:((W=(X=a==null?void 0:a.fonts)==null?void 0:X.heading)==null?void 0:W.weight)||"600",family:((ne=(H=a==null?void 0:a.fonts)==null?void 0:H.heading)==null?void 0:ne.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:((ae=a==null?void 0:a.colors)==null?void 0:ae.background)||"#E5EEFF",borderColor:((re=a==null?void 0:a.colors)==null?void 0:re.border)||"#84ADFF",borderRadius:((de=a==null?void 0:a.space)==null?void 0:de.radius)||"6px",padding:((ge=a==null?void 0:a.space)==null?void 0:ge.padding)||"8px 12px",margin:"2px",fontSize:((Ne=(ye=a==null?void 0:a.fonts)==null?void 0:ye.body)==null?void 0:Ne.size)||"14px",fontWeight:((be=(xe=a==null?void 0:a.fonts)==null?void 0:xe.body)==null?void 0:be.weight)||"500",minWidth:"30px",textColor:((Ae=a==null?void 0:a.colors)==null?void 0:Ae.text)||"#84ADFF"},u={...i,...n,theme:{...i.theme,...n==null?void 0:n.theme,colors:{...(me=i.theme)==null?void 0:me.colors,...(Ee=n==null?void 0:n.theme)==null?void 0:Ee.colors},space:{...(je=i.theme)==null?void 0:je.space,...(Be=n==null?void 0:n.theme)==null?void 0:Be.space},fonts:{...(Ye=i.theme)==null?void 0:Ye.fonts,...(Re=n==null?void 0:n.theme)==null?void 0:Re.fonts}},templateField:{...l,...n==null?void 0:n.templateField}},[s,c]=xt(()=>Pb(e));Bt(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const Te=Pb(e);console.log("\u65B0\u7684Slate\u6570\u636E:",Te),c(Te)},[e]),Bt(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",s)},[s]);const p=mt((Te,ue)=>{if(ue===nu.SLATE&&Te){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",Te),c(Te);const ke=ud(Te);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",ke),t==null||t(ke)}},[t]),f=mt(Te=>{if(!s||s.length===0)return"";switch(Te){case"pure_string":return ez(s);case"string":return ud(s);case"markdown":return tz(s);case"html":return rz(s);default:return ud(s)}},[s]);return Bt(()=>{o==null||o(f)},[f,o]),Q.jsx(Pm,{dataSource:{type:nu.SLATE,content:s},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:p,size:"md",styles:u,enableTemplateInput:!0})};export{lz as A,uz as F,sz as I,nu as S};