@cyberskill/cyber-editor 3.8.9 → 3.9.0

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.
@@ -1,4 +1,4 @@
1
- "use strict";const kw=require("./with-props-CuGIah2q.cjs"),ie=require("./chunk-D4RADZKF-sLhgGPy5.cjs"),E=require("react"),G=require("./index-HJNgKdvE.cjs"),Ar=require("react-dom");function sb(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const h=sb(E),lb=sb(Ar);function In(t){this.content=t}In.prototype={constructor:In,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new In(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new In(n)},addToStart:function(t,e){return new In([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new In(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new In(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=In.from(t),t.size?new In(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=In.from(t),t.size?new In(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=In.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};In.from=function(t){if(t instanceof In)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new In(e)};function cb(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){let a=cb(o.content,i.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function ub(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let a=t.child(--o),s=e.child(--i),l=a.nodeSize;if(a==s){n-=l,r-=l;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,u=Math.min(a.text.length,s.text.length);for(;c<u&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=ub(a.content,s.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class fe{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let a=0,s=0;s<n;a++){let l=this.content[a],c=s+l.nodeSize;if(c>e&&r(l,o+s,i||null,a)!==!1&&l.content.size){let u=s+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,o+u)}s=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",a=!0;return this.nodesBetween(e,n,(s,l)=>{let c=s.isText?s.text.slice(Math.max(e,l)-l,n-l):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&r&&(a?a=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new fe(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,a=0;a<n;i++){let s=this.content[i],l=a+s.nodeSize;l>e&&((a<e||l>n)&&(s.isText?s=s.cut(Math.max(0,e-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,e-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=l}return new fe(r,o)}cutByIndex(e,n){return e==n?fe.empty:e==0&&n==this.content.length?this:new fe(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new fe(o,i)}addToStart(e){return new fe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new fe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return cb(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return ub(this,e,n,r)}findIndex(e,n=-1){if(e==0)return Gs(0,e);if(e==this.size)return Gs(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),a=o+i.nodeSize;if(a>=e)return a==e||n>0?Gs(r+1,a):Gs(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return fe.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new fe(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return fe.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new fe(n||e,r)}static from(e){if(!e)return fe.empty;if(e instanceof fe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new fe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}fe.empty=new fe([],0);const mu={index:0,offset:0};function Gs(t,e){return mu.index=t,mu.offset=e,mu}function Bl(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Bl(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Bl(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let qt=class Ed{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Bl(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ed.none;if(e instanceof Ed)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};qt.none=[];class zl extends Error{}class Me{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=fb(this.content,e+this.openStart,n);return r&&new Me(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Me(db(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Me.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Me(fe.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new Me(e,r,o)}}Me.empty=new Me(fe.empty,0,0);function db(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:a,offset:s}=t.findIndex(n);if(o==e||i.isText){if(s!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(db(i.content,e-o-1,n-o-1)))}function fb(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),a=t.maybeChild(o);if(i==e||a.isText)return t.cut(0,e).append(n).append(t.cut(e));let s=fb(a.content,e-i-1,n);return s&&t.replaceChild(o,a.copy(s))}function Dw(t,e,n){if(n.openStart>t.depth)throw new zl("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new zl("Inconsistent open depths");return hb(t,e,n,0)}function hb(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let a=hb(t,e,n,r+1);return i.copy(i.content.replaceChild(o,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,s=a.content;return di(a,s.cut(0,t.parentOffset).append(n.content).append(s.cut(e.parentOffset)))}else{let{start:a,end:s}=_w(n,t);return di(i,mb(t,a,s,e,r))}else return di(i,Ll(t,e,r))}function pb(t,e){if(!e.type.compatibleContent(t.type))throw new zl("Cannot join "+e.type.name+" onto "+t.type.name)}function $d(t,e,n){let r=t.node(n);return pb(r,e.node(n)),r}function ui(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Wa(t,e,n,r){let o=(e||t).node(n),i=0,a=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(ui(t.nodeAfter,r),i++));for(let s=i;s<a;s++)ui(o.child(s),r);e&&e.depth==n&&e.textOffset&&ui(e.nodeBefore,r)}function di(t,e){return t.type.checkContent(e),t.copy(e)}function mb(t,e,n,r,o){let i=t.depth>o&&$d(t,e,o+1),a=r.depth>o&&$d(n,r,o+1),s=[];return Wa(null,t,o,s),i&&a&&e.index(o)==n.index(o)?(pb(i,a),ui(di(i,mb(t,e,n,r,o+1)),s)):(i&&ui(di(i,Ll(t,e,o+1)),s),Wa(e,n,o,s),a&&ui(di(a,Ll(n,r,o+1)),s)),Wa(r,null,o,s),new fe(s)}function Ll(t,e,n){let r=[];if(Wa(null,t,n,r),t.depth>n){let o=$d(t,e,n+1);ui(di(o,Ll(t,e,n+1)),r)}return Wa(e,null,n,r),new fe(r)}function _w(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(fe.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Za{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return qt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let s=r;r=o,o=s}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!o||!i[a].isInSet(o.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Fl(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let a=e;;){let{index:s,offset:l}=a.content.findIndex(i),c=i-l;if(r.push(a,s,o+l),!c||(a=a.child(s),a.isText))break;i=c-1,o+=l+1}return new Za(n,r,i)}static resolveCached(e,n){let r=qp.get(e);if(r)for(let i=0;i<r.elts.length;i++){let a=r.elts[i];if(a.pos==n)return a}else qp.set(e,r=new jw);let o=r.elts[r.i]=Za.resolve(e,n);return r.i=(r.i+1)%Bw,o}}class jw{constructor(){this.elts=[],this.i=0}}const Bw=12,qp=new WeakMap;class Fl{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const zw=Object.create(null);let _o=class Od{constructor(e,n,r,o=qt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||fe.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Bl(this.attrs,n||e.defaultAttrs||zw)&&qt.sameSet(this.marks,r||qt.none)}copy(e=null){return e==this.content?this:new Od(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Od(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Me.empty;let o=this.resolve(e),i=this.resolve(n),a=r?0:o.sharedDepth(n),s=o.start(a),c=o.node(a).content.cut(o.pos-s,i.pos-s);return new Me(c,o.depth-a,i.depth-a)}replace(e,n,r){return Dw(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return Za.resolveCached(this,e)}resolveNoCache(e){return Za.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),gb(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=fe.empty,o=0,i=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,o,i),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=qt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!qt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=fe.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};_o.prototype.text=void 0;class Hl extends _o{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):gb(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Hl(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Hl(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function gb(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class bi{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Lw(e,n);if(r.next==null)return bi.empty;let o=vb(r);r.next&&r.err("Unexpected trailing text");let i=Gw(Kw(o));return Uw(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(a,s){let l=a.matchFragment(e,r);if(l&&(!n||l.validEnd))return fe.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:u,next:d}=a.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,s.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let a=[];for(let s=o;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:s,next:l}=i.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!o.type||l.validEnd)&&(r.push({match:s.contentMatch,type:s,via:o}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return i}).join(`
1
+ "use strict";const kw=require("./with-props-CuGIah2q.cjs"),oe=require("./chunk-D4RADZKF-sLhgGPy5.cjs"),E=require("react"),G=require("./index-HJNgKdvE.cjs"),Ar=require("react-dom");function sb(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const h=sb(E),lb=sb(Ar);function In(t){this.content=t}In.prototype={constructor:In,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new In(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new In(n)},addToStart:function(t,e){return new In([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new In(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new In(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=In.from(t),t.size?new In(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=In.from(t),t.size?new In(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=In.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};In.from=function(t){if(t instanceof In)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new In(e)};function cb(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){let a=cb(o.content,i.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function ub(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let a=t.child(--o),s=e.child(--i),l=a.nodeSize;if(a==s){n-=l,r-=l;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,u=Math.min(a.text.length,s.text.length);for(;c<u&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=ub(a.content,s.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class fe{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let a=0,s=0;s<n;a++){let l=this.content[a],c=s+l.nodeSize;if(c>e&&r(l,o+s,i||null,a)!==!1&&l.content.size){let u=s+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,o+u)}s=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",a=!0;return this.nodesBetween(e,n,(s,l)=>{let c=s.isText?s.text.slice(Math.max(e,l)-l,n-l):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&r&&(a?a=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new fe(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,a=0;a<n;i++){let s=this.content[i],l=a+s.nodeSize;l>e&&((a<e||l>n)&&(s.isText?s=s.cut(Math.max(0,e-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,e-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=l}return new fe(r,o)}cutByIndex(e,n){return e==n?fe.empty:e==0&&n==this.content.length?this:new fe(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new fe(o,i)}addToStart(e){return new fe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new fe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return cb(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return ub(this,e,n,r)}findIndex(e,n=-1){if(e==0)return Gs(0,e);if(e==this.size)return Gs(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),a=o+i.nodeSize;if(a>=e)return a==e||n>0?Gs(r+1,a):Gs(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return fe.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new fe(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return fe.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new fe(n||e,r)}static from(e){if(!e)return fe.empty;if(e instanceof fe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new fe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}fe.empty=new fe([],0);const mu={index:0,offset:0};function Gs(t,e){return mu.index=t,mu.offset=e,mu}function Bl(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Bl(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Bl(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let qt=class Ed{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Bl(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ed.none;if(e instanceof Ed)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};qt.none=[];class zl extends Error{}class Me{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=fb(this.content,e+this.openStart,n);return r&&new Me(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Me(db(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Me.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Me(fe.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new Me(e,r,o)}}Me.empty=new Me(fe.empty,0,0);function db(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:a,offset:s}=t.findIndex(n);if(o==e||i.isText){if(s!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(db(i.content,e-o-1,n-o-1)))}function fb(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),a=t.maybeChild(o);if(i==e||a.isText)return t.cut(0,e).append(n).append(t.cut(e));let s=fb(a.content,e-i-1,n);return s&&t.replaceChild(o,a.copy(s))}function Dw(t,e,n){if(n.openStart>t.depth)throw new zl("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new zl("Inconsistent open depths");return hb(t,e,n,0)}function hb(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let a=hb(t,e,n,r+1);return i.copy(i.content.replaceChild(o,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,s=a.content;return di(a,s.cut(0,t.parentOffset).append(n.content).append(s.cut(e.parentOffset)))}else{let{start:a,end:s}=_w(n,t);return di(i,mb(t,a,s,e,r))}else return di(i,Ll(t,e,r))}function pb(t,e){if(!e.type.compatibleContent(t.type))throw new zl("Cannot join "+e.type.name+" onto "+t.type.name)}function $d(t,e,n){let r=t.node(n);return pb(r,e.node(n)),r}function ui(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Wa(t,e,n,r){let o=(e||t).node(n),i=0,a=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(ui(t.nodeAfter,r),i++));for(let s=i;s<a;s++)ui(o.child(s),r);e&&e.depth==n&&e.textOffset&&ui(e.nodeBefore,r)}function di(t,e){return t.type.checkContent(e),t.copy(e)}function mb(t,e,n,r,o){let i=t.depth>o&&$d(t,e,o+1),a=r.depth>o&&$d(n,r,o+1),s=[];return Wa(null,t,o,s),i&&a&&e.index(o)==n.index(o)?(pb(i,a),ui(di(i,mb(t,e,n,r,o+1)),s)):(i&&ui(di(i,Ll(t,e,o+1)),s),Wa(e,n,o,s),a&&ui(di(a,Ll(n,r,o+1)),s)),Wa(r,null,o,s),new fe(s)}function Ll(t,e,n){let r=[];if(Wa(null,t,n,r),t.depth>n){let o=$d(t,e,n+1);ui(di(o,Ll(t,e,n+1)),r)}return Wa(e,null,n,r),new fe(r)}function _w(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(fe.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Za{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return qt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let s=r;r=o,o=s}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!o||!i[a].isInSet(o.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Fl(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let a=e;;){let{index:s,offset:l}=a.content.findIndex(i),c=i-l;if(r.push(a,s,o+l),!c||(a=a.child(s),a.isText))break;i=c-1,o+=l+1}return new Za(n,r,i)}static resolveCached(e,n){let r=qp.get(e);if(r)for(let i=0;i<r.elts.length;i++){let a=r.elts[i];if(a.pos==n)return a}else qp.set(e,r=new jw);let o=r.elts[r.i]=Za.resolve(e,n);return r.i=(r.i+1)%Bw,o}}class jw{constructor(){this.elts=[],this.i=0}}const Bw=12,qp=new WeakMap;class Fl{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const zw=Object.create(null);let _o=class Od{constructor(e,n,r,o=qt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||fe.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Bl(this.attrs,n||e.defaultAttrs||zw)&&qt.sameSet(this.marks,r||qt.none)}copy(e=null){return e==this.content?this:new Od(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Od(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Me.empty;let o=this.resolve(e),i=this.resolve(n),a=r?0:o.sharedDepth(n),s=o.start(a),c=o.node(a).content.cut(o.pos-s,i.pos-s);return new Me(c,o.depth-a,i.depth-a)}replace(e,n,r){return Dw(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return Za.resolveCached(this,e)}resolveNoCache(e){return Za.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),gb(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=fe.empty,o=0,i=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,o,i),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=qt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!qt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=fe.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};_o.prototype.text=void 0;class Hl extends _o{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):gb(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Hl(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Hl(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function gb(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class bi{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Lw(e,n);if(r.next==null)return bi.empty;let o=vb(r);r.next&&r.err("Unexpected trailing text");let i=Gw(Kw(o));return Uw(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(a,s){let l=a.matchFragment(e,r);if(l&&(!n||l.validEnd))return fe.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:u,next:d}=a.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,s.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let a=[];for(let s=o;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:s,next:l}=i.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!o.type||l.validEnd)&&(r.push({match:s.contentMatch,type:s,via:o}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return i}).join(`
2
2
  `)}}bi.empty=new bi(!0);class Lw{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function vb(t){let e=[];do e.push(Fw(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Fw(t){let e=[];do e.push(Hw(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Hw(t){let e=qw(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Vw(t,e);else break;return e}function Kp(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Vw(t,e){let n=Kp(t),r=n;return t.eat(",")&&(t.next!="}"?r=Kp(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Ww(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let a=n[i];a.isInGroup(e)&&o.push(a)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function qw(t){if(t.eat("(")){let e=vb(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Ww(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Kw(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(a,s,l){let c={term:l,to:s};return e[a].push(c),c}function o(a,s){a.forEach(l=>l.to=s)}function i(a,s){if(a.type=="choice")return a.exprs.reduce((l,c)=>l.concat(i(c,s)),[]);if(a.type=="seq")for(let l=0;;l++){let c=i(a.exprs[l],s);if(l==a.exprs.length-1)return c;o(c,s=n())}else if(a.type=="star"){let l=n();return r(s,l),o(i(a.expr,l),l),[r(l)]}else if(a.type=="plus"){let l=n();return o(i(a.expr,s),l),o(i(a.expr,l),l),[r(l)]}else{if(a.type=="opt")return[r(s)].concat(i(a.expr,s));if(a.type=="range"){let l=s;for(let c=0;c<a.min;c++){let u=n();o(i(a.expr,l),u),l=u}if(a.max==-1)o(i(a.expr,l),l);else for(let c=a.min;c<a.max;c++){let u=n();r(l,u),o(i(a.expr,l),u),l=u}return[r(l)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function bb(t,e){return e-t}function Gp(t,e){let n=[];return r(e),n.sort(bb);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let a=0;a<i.length;a++){let{term:s,to:l}=i[a];!s&&n.indexOf(l)==-1&&r(l)}}}function Gw(t){let e=Object.create(null);return n(Gp(t,0));function n(r){let o=[];r.forEach(a=>{t[a].forEach(({term:s,to:l})=>{if(!s)return;let c;for(let u=0;u<o.length;u++)o[u][0]==s&&(c=o[u][1]);Gp(t,l).forEach(u=>{c||o.push([s,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new bi(r.indexOf(t.length-1)>-1);for(let a=0;a<o.length;a++){let s=o[a][1].sort(bb);i.next.push({type:o[a][0],next:e[s.join(",")]||n(s)})}return i}}function Uw(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,a=[];for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];a.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function yb(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Cb(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function Sb(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function xb(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Yw(t,r,e[r]);return n}let Up=class wb{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=xb(e,r.attrs),this.defaultAttrs=yb(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==bi.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Cb(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new _o(this,this.computeAttrs(e),fe.from(n),qt.setFrom(r))}createChecked(e=null,n,r){return n=fe.from(n),this.checkContent(n),new _o(this,this.computeAttrs(e),n,qt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=fe.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(fe.empty,!0);return i?new _o(this,e,n.append(i),qt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Sb(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:qt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,a)=>r[i]=new wb(i,n,a));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Xw(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class Yw{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Xw(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class bc{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=xb(e,o.attrs),this.excluded=null;let i=yb(this.attrs);this.instance=i?new qt(this,i):null}create(e=null){return!e&&this.instance?this.instance:new qt(this,Cb(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,a)=>r[i]=new bc(i,o++,n,a)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Sb(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let Eb=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=In.from(e.nodes),n.marks=In.from(e.marks||{}),this.nodes=Up.compile(this.spec.nodes,this),this.marks=bc.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],a=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=r[a]||(r[a]=bi.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?Xp(this,s.split(" ")):s==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:Xp(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Up){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Hl(r,r.defaultAttrs,e,qt.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return _o.fromJSON(this,e)}markFromJSON(e){return qt.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function Xp(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],a=i;if(i)n.push(i);else for(let s in t.marks){let l=t.marks[s];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Jw(t){return t.tag!=null}function Zw(t){return t.style!=null}class jo{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(Jw(o))this.tags.push(o);else if(Zw(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new Jp(this,n,!1);return r.addAll(e,qt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Jp(this,n,!0);return r.addAll(e,qt.none,n.from,n.to),Me.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(tE(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(e);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let a=this.styles[i],s=a.style;if(!(s.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=n))){if(a.getAttrs){let l=a.getAttrs(n);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<i)break}n.splice(a,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(a=>{r(a=Zp(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(a=>{r(a=Zp(a)),a.node||a.ignore||a.mark||(a.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new jo(e,jo.schemaRules(e)))}}const $b={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Qw={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ob={ol:!0,ul:!0},Qa=1,Md=2,gl=4;function Yp(t,e,n){return e!=null?(e?Qa:0)|(e==="full"?Md:0):t&&t.whitespace=="pre"?Qa|Md:n&-5}class Us{constructor(e,n,r,o,i,a){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=qt.none,this.match=i||(a&gl?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(fe.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Qa)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=fe.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(fe.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!$b.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Jp{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,a=Yp(null,n.preserveWhitespace,0)|(r?gl:0);o?i=new Us(o.type,o.attrs,qt.none,!0,n.topMatch||o.type.contentMatch,a):r?i=new Us(null,null,qt.none,!0,null,a):i=new Us(e.schema.topNodeType,null,qt.none,!0,null,a),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&Md?"full":this.localPreserveWS||(o.options&Qa)>0;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
3
3
  `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=o.content[o.content.length-1],s=e.previousSibling;(!a||s&&s.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),s;Ob.hasOwnProperty(a)&&this.parser.normalizeLists&&eE(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:Qw.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if($b.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?s:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],a=r.getPropertyValue(i);if(a)for(let s=void 0;;){let l=this.parser.matchStyle(i,a,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return n}addElementByRule(e,n,r,o){let i,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(a,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let s=this.top;if(a&&a.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(s)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let a=r?e.childNodes[r]:e.firstChild,s=o==null?null:e.childNodes[o];a!=s;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let a=this.open,s=0;a>=0;a--){let l=this.nodes[a],c=l.findWrapping(e);if(c&&(!o||o.length>c.length+s)&&(o=c,i=l,!c.length))break;if(l.solid){if(r)break;s+=2}}if(!o)return null;this.sync(i);for(let a=0;a<o.length;a++)n=this.enterInner(o[a],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let a=qt.none;for(let s of o.concat(e.marks))(i.type?i.type.allowsMarkType(s.type):Qp(s.type,e.type))&&(a=s.addToSet(a));return i.content.push(e.mark(a)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let s=Yp(e,i,a.options);a.options&gl&&a.content.length==0&&(s|=gl);let l=qt.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):Qp(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Us(e,n,l,o,null,s)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Qa)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=(s,l)=>{for(;s>=0;s--){let c=n[s];if(c==""){if(s==n.length-1||s==0)continue;for(;l>=i;l--)if(a(s-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function eE(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ob.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function tE(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Zp(t){let e={};for(let n in t)e[n]=t[n];return e}function Qp(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],a=s=>{i.push(s);for(let l=0;l<s.edgeCount;l++){let{type:c,next:u}=s.edge(l);if(c==e||i.indexOf(u)<0&&a(u))return!0}};if(a(o.contentMatch))return!0}}class Mi{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=gu(n).createDocumentFragment());let o=r,i=[];return e.forEach(a=>{if(i.length||a.marks.length){let s=0,l=0;for(;s<i.length&&l<a.marks.length;){let c=a.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(i[s][0])||c.type.spec.spanning===!1)break;s++,l++}for(;s<i.length;)o=i.pop()[1];for(;l<a.marks.length;){let c=a.marks[l++],u=this.serializeMark(c,a.isInline,n);u&&(i.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=vl(gu(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&vl(gu(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return vl(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Mi(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=em(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return em(e.marks)}}function em(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function gu(t){return t.document||window.document}const tm=new WeakMap;function nE(t){let e=tm.get(t);return e===void 0&&tm.set(t,e=rE(t)),e}function rE(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function vl(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=nE(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let s,l=n?t.createElementNS(n,o):t.createElement(o),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:m}=vl(t,f,n,r);if(l.appendChild(p),m){if(s)throw new RangeError("Multiple content holes");s=m}}}return{dom:l,contentDOM:s}}const Mb=65535,Nb=Math.pow(2,16);function oE(t,e){return t+e*Nb}function nm(t){return t&Mb}function iE(t){return(t-(t&Mb))/Nb}const Rb=1,Ib=2,bl=4,Pb=8;class Nd{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Pb)>0}get deletedBefore(){return(this.delInfo&(Rb|bl))>0}get deletedAfter(){return(this.delInfo&(Ib|bl))>0}get deletedAcross(){return(this.delInfo&bl)>0}}class ar{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&ar.empty)return ar.empty}recover(e){let n=0,r=nm(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+iE(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?o:0);if(l>e)break;let c=this.ranges[s+i],u=this.ranges[s+a],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:n:n,p=l+o+(f<0?0:u);if(r)return p;let m=e==(n<0?l:d)?null:oE(s/3,e-l),g=e==l?Ib:e==d?Rb:bl;return(n<0?e!=l:e!=d)&&(g|=Pb),new Nd(p,g,m)}o+=u-c}return r?e+o:new Nd(e+o,0,null)}touches(e,n){let r=0,o=nm(n),i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[s+i],u=l+c;if(e<=u&&s==o*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let a=this.ranges[o],s=a-(this.inverted?i:0),l=a+(this.inverted?0:i),c=this.ranges[o+n],u=this.ranges[o+r];e(s,s+c,l,l+u),i+=u-c}}invert(){return new ar(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ar.empty:new ar(e<0?[0,-e,0]:[0,0,e])}}ar.empty=new ar([]);class es{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new es(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new es;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let a=this._maps[i],s=a.mapResult(e,n);if(s.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(s.recover);continue}}o|=s.delInfo,e=s.pos}return r?e:new Nd(e,o,null)}}const vu=Object.create(null);class Hn{getMap(){return ar.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=vu[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in vu)throw new RangeError("Duplicate use of step JSON ID "+e);return vu[e]=n,n.prototype.jsonID=e,n}}class hn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new hn(e,null)}static fail(e){return new hn(null,e)}static fromReplace(e,n,r,o){try{return hn.ok(e.replace(n,r,o))}catch(i){if(i instanceof zl)return hn.fail(i.message);throw i}}}function fh(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(fh(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return fe.fromArray(r)}class Po extends Hn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Me(fh(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),n.openStart,n.openEnd);return hn.fromReplace(e,this.from,this.to,i)}invert(){return new Wr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Po(n.pos,r.pos,this.mark)}merge(e){return e instanceof Po&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Po(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Po(n.from,n.to,e.markFromJSON(n.mark))}}Hn.jsonID("addMark",Po);class Wr extends Hn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Me(fh(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return hn.fromReplace(e,this.from,this.to,r)}invert(){return new Po(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Wr(n.pos,r.pos,this.mark)}merge(e){return e instanceof Wr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Wr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Wr(n.from,n.to,e.markFromJSON(n.mark))}}Hn.jsonID("removeMark",Wr);class To extends Hn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return hn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return hn.fromReplace(e,this.pos,this.pos+1,new Me(fe.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new To(this.pos,n.marks[o]);return new To(this.pos,this.mark)}}return new yi(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new To(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new To(n.pos,e.markFromJSON(n.mark))}}Hn.jsonID("addNodeMark",To);class yi extends Hn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return hn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return hn.fromReplace(e,this.pos,this.pos+1,new Me(fe.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new To(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new yi(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new yi(n.pos,e.markFromJSON(n.mark))}}Hn.jsonID("removeNodeMark",yi);class En extends Hn{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Rd(e,this.from,this.to)?hn.fail("Structure replace would overwrite content"):hn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ar([this.from,this.to-this.from,this.slice.size])}invert(e){return new En(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new En(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof En)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Me.empty:new Me(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new En(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Me.empty:new Me(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new En(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new En(n.from,n.to,Me.fromJSON(e,n.slice),!!n.structure)}}Hn.jsonID("replace",En);class $n extends Hn{constructor(e,n,r,o,i,a,s=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=s}apply(e){if(this.structure&&(Rd(e,this.from,this.gapFrom)||Rd(e,this.gapTo,this.to)))return hn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return hn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?hn.fromReplace(e,this.from,this.to,r):hn.fail("Content does not fit in gap")}getMap(){return new ar([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new $n(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new $n(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new $n(n.from,n.to,n.gapFrom,n.gapTo,Me.fromJSON(e,n.slice),n.insert,!!n.structure)}}Hn.jsonID("replaceAround",$n);function Rd(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let a=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function aE(t,e,n,r){let o=[],i=[],a,s;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),p=Math.min(c+l.nodeSize,n),m=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(m)||(a&&a.to==f&&a.mark.eq(d[g])?a.to=p:o.push(a=new Wr(f,p,d[g])));s&&s.to==f?s.to=p:i.push(s=new Po(f,p,r))}}),o.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function sE(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(a,s)=>{if(!a.isInline)return;i++;let l=null;if(r instanceof bc){let c=a.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(a.marks)&&(l=[r]):l=a.marks;if(l&&l.length){let c=Math.min(s+a.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],f;for(let p=0;p<o.length;p++){let m=o[p];m.step==i-1&&d.eq(o[p].style)&&(f=m)}f?(f.to=c,f.step=i):o.push({style:d,from:Math.max(s,e),to:c,step:i})}}}),o.forEach(a=>t.step(new Wr(a.from,a.to,a.style)))}function hh(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),a=[],s=e+1;for(let l=0;l<i.childCount;l++){let c=i.child(l),u=s+c.nodeSize,d=r.matchType(c.type);if(!d)a.push(new En(s,u,Me.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new Wr(s,u,c.marks[f]));if(o&&c.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,m;for(;f=p.exec(c.text);)m||(m=new Me(fe.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new En(s+f.index,s+f.index+f[0].length,m))}}s=u}if(!r.validEnd){let l=r.fillBefore(fe.empty,!0);t.replace(s,s,new Me(l,0,0))}for(let l=a.length-1;l>=0;l--)t.step(a[l])}function lE(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Ca(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),a=t.$to.indexAfter(r);if(r<t.depth&&o.canReplace(i,a,n))return r;if(r==0||o.type.spec.isolating||!lE(o,i,a))break}return null}function cE(t,e,n){let{$from:r,$to:o,depth:i}=e,a=r.before(i+1),s=o.after(i+1),l=a,c=s,u=fe.empty,d=0;for(let m=i,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,u=fe.from(r.node(m).copy(u)),d++):l--;let f=fe.empty,p=0;for(let m=i,g=!1;m>n;m--)g||o.after(m+1)<o.end(m)?(g=!0,f=fe.from(o.node(m).copy(f)),p++):c++;t.step(new $n(l,c,a,s,new Me(u.append(f),d,p),u.size-d,!0))}function ph(t,e,n=null,r=t){let o=uE(t,e),i=o&&dE(r,e);return i?o.map(rm).concat({type:e,attrs:n}).concat(i.map(rm)):null}function rm(t){return{type:t,attrs:null}}function uE(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let a=i.length?i[0]:e;return n.canReplaceWith(r,o,a)?i:null}function dE(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),a=e.contentMatch.findWrapping(i.type);if(!a)return null;let l=(a.length?a[a.length-1]:e).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:a}function fE(t,e,n){let r=fe.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let s=n[a].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=fe.from(n[a].type.create(n[a].attrs,r))}let o=e.start,i=e.end;t.step(new $n(o,i,o,i,new Me(r,0,0),n.length,!0))}function hE(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(a,s)=>{let l=typeof o=="function"?o(a):o;if(a.isTextblock&&!a.hasMarkup(r,l)&&pE(t.doc,t.mapping.slice(i).map(s),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?c=!1:!p&&m&&(c=!0)}c===!1&&Ab(t,a,s,i),hh(t,t.mapping.slice(i).map(s,1),r,void 0,c===null);let u=t.mapping.slice(i),d=u.map(s,1),f=u.map(s+a.nodeSize,1);return t.step(new $n(d,f,d+1,f-1,new Me(fe.from(r.create(l,null,a.marks)),0,0),1,!0)),c===!0&&Tb(t,a,s,i),!1}})}function Tb(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let a,s=/\r?\n|\r/g;for(;a=s.exec(o.text);){let l=t.mapping.slice(r).map(n+1+i+a.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Ab(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let a=t.mapping.slice(r).map(n+1+i);t.replaceWith(a,a+1,e.type.schema.text(`
@@ -134,7 +134,7 @@ img.ProseMirror-separator {
134
134
  *
135
135
  * This source code is licensed under the MIT license found in the
136
136
  * LICENSE file in the root directory of this source tree.
137
- */var ig;function sR(){return ig||(ig=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=!1,g=!1,v=!1,b=!1,y=!1,C;C=Symbol.for("react.module.reference");function S(Z){return!!(typeof Z=="string"||typeof Z=="function"||Z===n||Z===o||y||Z===r||Z===c||Z===u||b||Z===p||m||g||v||typeof Z=="object"&&Z!==null&&(Z.$$typeof===f||Z.$$typeof===d||Z.$$typeof===i||Z.$$typeof===a||Z.$$typeof===l||Z.$$typeof===C||Z.getModuleId!==void 0))}function x(Z){if(typeof Z=="object"&&Z!==null){var Q=Z.$$typeof;switch(Q){case t:var oe=Z.type;switch(oe){case n:case o:case r:case c:case u:return oe;default:var ce=oe&&oe.$$typeof;switch(ce){case s:case a:case l:case f:case d:case i:return ce;default:return Q}}case e:return Q}}}var w=a,$=i,R=t,M=l,O=n,N=f,I=d,T=e,P=o,A=r,k=c,B=u,_=!1,F=!1;function H(Z){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function K(Z){return F||(F=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function V(Z){return x(Z)===a}function W(Z){return x(Z)===i}function z(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function L(Z){return x(Z)===l}function J(Z){return x(Z)===n}function ne(Z){return x(Z)===f}function q(Z){return x(Z)===d}function re(Z){return x(Z)===e}function ae(Z){return x(Z)===o}function ee(Z){return x(Z)===r}function Y(Z){return x(Z)===c}function te(Z){return x(Z)===u}jt.ContextConsumer=w,jt.ContextProvider=$,jt.Element=R,jt.ForwardRef=M,jt.Fragment=O,jt.Lazy=N,jt.Memo=I,jt.Portal=T,jt.Profiler=P,jt.StrictMode=A,jt.Suspense=k,jt.SuspenseList=B,jt.isAsyncMode=H,jt.isConcurrentMode=K,jt.isContextConsumer=V,jt.isContextProvider=W,jt.isElement=z,jt.isForwardRef=L,jt.isFragment=J,jt.isLazy=ne,jt.isMemo=q,jt.isPortal=re,jt.isProfiler=ae,jt.isStrictMode=ee,jt.isSuspense=Y,jt.isSuspenseList=te,jt.isValidElementType=S,jt.typeOf=x}()),jt}var ag;function lR(){return ag||(ag=1,process.env.NODE_ENV==="production"?Qs.exports=aR():Qs.exports=sR()),Qs.exports}var ju=lR();function Es(t,e,n){var r=h.useRef({});return(!("value"in r.current)||n(r.current.condition,e))&&(r.current.value=t(),r.current.condition=e),r.current.value}var cR=Number(E.version.split(".")[0]),Bh=function(e,n){typeof e=="function"?e(n):Ue(e)==="object"&&e&&"current"in e&&(e.current=n)},Qn=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n.filter(Boolean);return o.length<=1?o[0]:function(i){n.forEach(function(a){Bh(a,i)})}},Yo=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Es(function(){return Qn.apply(void 0,n)},n,function(o,i){return o.length!==i.length||o.every(function(a,s){return a!==i[s]})})},Jo=function(e){var n,r;if(!e)return!1;if(zh(e)&&cR>=19)return!0;var o=ju.isMemo(e)?e.type.type:e.type;return!(typeof o=="function"&&!((n=o.prototype)!==null&&n!==void 0&&n.render)&&o.$$typeof!==ju.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==ju.ForwardRef)};function zh(t){return E.isValidElement(t)&&!Zy(t)}var uR=function(e){return zh(e)&&Jo(e)},Ni=function(e){if(e&&zh(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},Xd=h.createContext(null);function dR(t){var e=t.children,n=t.onBatchResize,r=h.useRef(0),o=h.useRef([]),i=h.useContext(Xd),a=h.useCallback(function(s,l,c){r.current+=1;var u=r.current;o.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(o.current),o.current=[])}),i==null||i(s,l,c)},[n,i]);return h.createElement(Xd.Provider,{value:a},e)}var nC=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(o,i){return o[0]===n?(r=i,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},e.prototype.set=function(n,r){var o=t(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,o=t(r,n);~o&&r.splice(o,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var o=0,i=this.__entries__;o<i.length;o++){var a=i[o];n.call(r,a[1],a[0])}},e}()}(),Yd=typeof window<"u"&&typeof document<"u"&&window.document===document,Zl=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")()}(),fR=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Zl):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),hR=2;function pR(t,e){var n=!1,r=!1,o=0;function i(){n&&(n=!1,t()),r&&s()}function a(){fR(i)}function s(){var l=Date.now();if(n){if(l-o<hR)return;r=!0}else n=!0,r=!1,setTimeout(a,e);o=l}return s}var mR=20,gR=["top","right","bottom","left","width","height","size","weight"],vR=typeof MutationObserver<"u",bR=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=pR(this.refresh.bind(this),mR)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!Yd||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),vR?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!Yd||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,o=gR.some(function(i){return!!~r.indexOf(i)});o&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),rC=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},ua=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Zl},oC=Ac(0,0,0,0);function Ql(t){return parseFloat(t)||0}function sg(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(r,o){var i=t["border-"+o+"-width"];return r+Ql(i)},0)}function yR(t){for(var e=["top","right","bottom","left"],n={},r=0,o=e;r<o.length;r++){var i=o[r],a=t["padding-"+i];n[i]=Ql(a)}return n}function CR(t){var e=t.getBBox();return Ac(0,0,e.width,e.height)}function SR(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return oC;var r=ua(t).getComputedStyle(t),o=yR(r),i=o.left+o.right,a=o.top+o.bottom,s=Ql(r.width),l=Ql(r.height);if(r.boxSizing==="border-box"&&(Math.round(s+i)!==e&&(s-=sg(r,"left","right")+i),Math.round(l+a)!==n&&(l-=sg(r,"top","bottom")+a)),!wR(t)){var c=Math.round(s+i)-e,u=Math.round(l+a)-n;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return Ac(o.left,o.top,s,l)}var xR=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof ua(t).SVGGraphicsElement}:function(t){return t instanceof ua(t).SVGElement&&typeof t.getBBox=="function"}}();function wR(t){return t===ua(t).document.documentElement}function ER(t){return Yd?xR(t)?CR(t):SR(t):oC}function $R(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(i.prototype);return rC(a,{x:e,y:n,width:r,height:o,top:n,right:e+r,bottom:o+n,left:e}),a}function Ac(t,e,n,r){return{x:t,y:e,width:n,height:r}}var OR=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ac(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=ER(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),MR=function(){function t(e,n){var r=$R(n);rC(this,{target:e,contentRect:r})}return t}(),NR=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new nC,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ua(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new OR(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ua(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new MR(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),iC=typeof WeakMap<"u"?new WeakMap:new nC,aC=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=bR.getInstance(),r=new NR(e,n,this);iC.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){aC.prototype[t]=function(){var e;return(e=iC.get(this))[t].apply(e,arguments)}});var RR=function(){return typeof Zl.ResizeObserver<"u"?Zl.ResizeObserver:aC}(),co=new Map;function sC(t){t.forEach(function(e){var n,r=e.target;(n=co.get(r))===null||n===void 0||n.forEach(function(o){return o(r)})})}var lC=new RR(sC);process.env.NODE_ENV;process.env.NODE_ENV;function IR(t,e){co.has(t)||(co.set(t,new Set),lC.observe(t)),co.get(t).add(e)}function PR(t,e){co.has(t)&&(co.get(t).delete(e),co.get(t).size||(lC.unobserve(t),co.delete(t)))}function ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,tC(r.key),r)}}function cn(t,e,n){return e&&lg(t.prototype,e),n&&lg(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ls(t,e){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ls(t,e)}function go(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ls(t,e)}function cs(t){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cs(t)}function Lh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lh=function(){return!!t})()}function yt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function TR(t,e){if(e&&(Ue(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yt(t)}function vo(t){var e=Lh();return function(){var n,r=cs(t);if(e){var o=cs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return TR(this,n)}}var AR=function(t){go(n,t);var e=vo(n);function n(){return ln(this,n),e.apply(this,arguments)}return cn(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component);function kR(t,e){var n=t.children,r=t.disabled,o=h.useRef(null),i=h.useRef(null),a=h.useContext(Xd),s=typeof n=="function",l=s?n(o):n,c=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&h.isValidElement(l)&&Jo(l),d=u?Ni(l):null,f=Yo(d,o),p=function(){var b;return Cl(o.current)||(o.current&&Ue(o.current)==="object"?Cl((b=o.current)===null||b===void 0?void 0:b.nativeElement):null)||Cl(i.current)};h.useImperativeHandle(e,function(){return p()});var m=h.useRef(t);m.current=t;var g=h.useCallback(function(v){var b=m.current,y=b.onResize,C=b.data,S=v.getBoundingClientRect(),x=S.width,w=S.height,$=v.offsetWidth,R=v.offsetHeight,M=Math.floor(x),O=Math.floor(w);if(c.current.width!==M||c.current.height!==O||c.current.offsetWidth!==$||c.current.offsetHeight!==R){var N={width:M,height:O,offsetWidth:$,offsetHeight:R};c.current=N;var I=$===Math.round(x)?x:$,T=R===Math.round(w)?w:R,P=j(j({},N),{},{offsetWidth:I,offsetHeight:T});a==null||a(P,v,C),y&&Promise.resolve().then(function(){y(P,v)})}},[]);return h.useEffect(function(){var v=p();return v&&!r&&IR(v,g),function(){return PR(v,g)}},[o.current,r]),h.createElement(AR,{ref:i},u?h.cloneElement(l,{ref:f}):l)}var cC=h.forwardRef(kR);process.env.NODE_ENV!=="production"&&(cC.displayName="SingleObserver");var DR="rc-observer-key";function _R(t,e){var n=t.children,r=typeof n=="function"?[n]:dr(n);return process.env.NODE_ENV!=="production"&&(r.length>1?Xr(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&Xr(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(o,i){var a=(o==null?void 0:o.key)||"".concat(DR,"-").concat(i);return h.createElement(cC,ge({},t,{key:a,ref:i===0?e:void 0}),o)})}var bo=h.forwardRef(_R);process.env.NODE_ENV!=="production"&&(bo.displayName="ResizeObserver");bo.Collection=dR;function Jd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function jR(t){if(Array.isArray(t))return Jd(t)}function uC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Fh(t,e){if(t){if(typeof t=="string")return Jd(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jd(t,e):void 0}}function BR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
137
+ */var ig;function sR(){return ig||(ig=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=!1,g=!1,v=!1,b=!1,y=!1,C;C=Symbol.for("react.module.reference");function S(Z){return!!(typeof Z=="string"||typeof Z=="function"||Z===n||Z===o||y||Z===r||Z===c||Z===u||b||Z===p||m||g||v||typeof Z=="object"&&Z!==null&&(Z.$$typeof===f||Z.$$typeof===d||Z.$$typeof===i||Z.$$typeof===a||Z.$$typeof===l||Z.$$typeof===C||Z.getModuleId!==void 0))}function x(Z){if(typeof Z=="object"&&Z!==null){var Q=Z.$$typeof;switch(Q){case t:var ie=Z.type;switch(ie){case n:case o:case r:case c:case u:return ie;default:var ce=ie&&ie.$$typeof;switch(ce){case s:case a:case l:case f:case d:case i:return ce;default:return Q}}case e:return Q}}}var w=a,$=i,R=t,M=l,O=n,N=f,I=d,T=e,P=o,A=r,k=c,B=u,_=!1,F=!1;function H(Z){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function K(Z){return F||(F=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function V(Z){return x(Z)===a}function W(Z){return x(Z)===i}function z(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function L(Z){return x(Z)===l}function J(Z){return x(Z)===n}function ne(Z){return x(Z)===f}function q(Z){return x(Z)===d}function re(Z){return x(Z)===e}function ae(Z){return x(Z)===o}function ee(Z){return x(Z)===r}function Y(Z){return x(Z)===c}function te(Z){return x(Z)===u}jt.ContextConsumer=w,jt.ContextProvider=$,jt.Element=R,jt.ForwardRef=M,jt.Fragment=O,jt.Lazy=N,jt.Memo=I,jt.Portal=T,jt.Profiler=P,jt.StrictMode=A,jt.Suspense=k,jt.SuspenseList=B,jt.isAsyncMode=H,jt.isConcurrentMode=K,jt.isContextConsumer=V,jt.isContextProvider=W,jt.isElement=z,jt.isForwardRef=L,jt.isFragment=J,jt.isLazy=ne,jt.isMemo=q,jt.isPortal=re,jt.isProfiler=ae,jt.isStrictMode=ee,jt.isSuspense=Y,jt.isSuspenseList=te,jt.isValidElementType=S,jt.typeOf=x}()),jt}var ag;function lR(){return ag||(ag=1,process.env.NODE_ENV==="production"?Qs.exports=aR():Qs.exports=sR()),Qs.exports}var ju=lR();function Es(t,e,n){var r=h.useRef({});return(!("value"in r.current)||n(r.current.condition,e))&&(r.current.value=t(),r.current.condition=e),r.current.value}var cR=Number(E.version.split(".")[0]),Bh=function(e,n){typeof e=="function"?e(n):Ue(e)==="object"&&e&&"current"in e&&(e.current=n)},Qn=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n.filter(Boolean);return o.length<=1?o[0]:function(i){n.forEach(function(a){Bh(a,i)})}},Yo=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Es(function(){return Qn.apply(void 0,n)},n,function(o,i){return o.length!==i.length||o.every(function(a,s){return a!==i[s]})})},Jo=function(e){var n,r;if(!e)return!1;if(zh(e)&&cR>=19)return!0;var o=ju.isMemo(e)?e.type.type:e.type;return!(typeof o=="function"&&!((n=o.prototype)!==null&&n!==void 0&&n.render)&&o.$$typeof!==ju.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==ju.ForwardRef)};function zh(t){return E.isValidElement(t)&&!Zy(t)}var uR=function(e){return zh(e)&&Jo(e)},Ni=function(e){if(e&&zh(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},Xd=h.createContext(null);function dR(t){var e=t.children,n=t.onBatchResize,r=h.useRef(0),o=h.useRef([]),i=h.useContext(Xd),a=h.useCallback(function(s,l,c){r.current+=1;var u=r.current;o.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(o.current),o.current=[])}),i==null||i(s,l,c)},[n,i]);return h.createElement(Xd.Provider,{value:a},e)}var nC=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(o,i){return o[0]===n?(r=i,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},e.prototype.set=function(n,r){var o=t(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,o=t(r,n);~o&&r.splice(o,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var o=0,i=this.__entries__;o<i.length;o++){var a=i[o];n.call(r,a[1],a[0])}},e}()}(),Yd=typeof window<"u"&&typeof document<"u"&&window.document===document,Zl=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")()}(),fR=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Zl):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),hR=2;function pR(t,e){var n=!1,r=!1,o=0;function i(){n&&(n=!1,t()),r&&s()}function a(){fR(i)}function s(){var l=Date.now();if(n){if(l-o<hR)return;r=!0}else n=!0,r=!1,setTimeout(a,e);o=l}return s}var mR=20,gR=["top","right","bottom","left","width","height","size","weight"],vR=typeof MutationObserver<"u",bR=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=pR(this.refresh.bind(this),mR)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!Yd||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),vR?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!Yd||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,o=gR.some(function(i){return!!~r.indexOf(i)});o&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),rC=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},ua=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Zl},oC=Ac(0,0,0,0);function Ql(t){return parseFloat(t)||0}function sg(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(r,o){var i=t["border-"+o+"-width"];return r+Ql(i)},0)}function yR(t){for(var e=["top","right","bottom","left"],n={},r=0,o=e;r<o.length;r++){var i=o[r],a=t["padding-"+i];n[i]=Ql(a)}return n}function CR(t){var e=t.getBBox();return Ac(0,0,e.width,e.height)}function SR(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return oC;var r=ua(t).getComputedStyle(t),o=yR(r),i=o.left+o.right,a=o.top+o.bottom,s=Ql(r.width),l=Ql(r.height);if(r.boxSizing==="border-box"&&(Math.round(s+i)!==e&&(s-=sg(r,"left","right")+i),Math.round(l+a)!==n&&(l-=sg(r,"top","bottom")+a)),!wR(t)){var c=Math.round(s+i)-e,u=Math.round(l+a)-n;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return Ac(o.left,o.top,s,l)}var xR=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof ua(t).SVGGraphicsElement}:function(t){return t instanceof ua(t).SVGElement&&typeof t.getBBox=="function"}}();function wR(t){return t===ua(t).document.documentElement}function ER(t){return Yd?xR(t)?CR(t):SR(t):oC}function $R(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(i.prototype);return rC(a,{x:e,y:n,width:r,height:o,top:n,right:e+r,bottom:o+n,left:e}),a}function Ac(t,e,n,r){return{x:t,y:e,width:n,height:r}}var OR=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ac(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=ER(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),MR=function(){function t(e,n){var r=$R(n);rC(this,{target:e,contentRect:r})}return t}(),NR=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new nC,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ua(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new OR(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ua(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new MR(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),iC=typeof WeakMap<"u"?new WeakMap:new nC,aC=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=bR.getInstance(),r=new NR(e,n,this);iC.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){aC.prototype[t]=function(){var e;return(e=iC.get(this))[t].apply(e,arguments)}});var RR=function(){return typeof Zl.ResizeObserver<"u"?Zl.ResizeObserver:aC}(),co=new Map;function sC(t){t.forEach(function(e){var n,r=e.target;(n=co.get(r))===null||n===void 0||n.forEach(function(o){return o(r)})})}var lC=new RR(sC);process.env.NODE_ENV;process.env.NODE_ENV;function IR(t,e){co.has(t)||(co.set(t,new Set),lC.observe(t)),co.get(t).add(e)}function PR(t,e){co.has(t)&&(co.get(t).delete(e),co.get(t).size||(lC.unobserve(t),co.delete(t)))}function ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,tC(r.key),r)}}function cn(t,e,n){return e&&lg(t.prototype,e),n&&lg(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ls(t,e){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ls(t,e)}function go(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ls(t,e)}function cs(t){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cs(t)}function Lh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lh=function(){return!!t})()}function yt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function TR(t,e){if(e&&(Ue(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yt(t)}function vo(t){var e=Lh();return function(){var n,r=cs(t);if(e){var o=cs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return TR(this,n)}}var AR=function(t){go(n,t);var e=vo(n);function n(){return ln(this,n),e.apply(this,arguments)}return cn(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component);function kR(t,e){var n=t.children,r=t.disabled,o=h.useRef(null),i=h.useRef(null),a=h.useContext(Xd),s=typeof n=="function",l=s?n(o):n,c=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&h.isValidElement(l)&&Jo(l),d=u?Ni(l):null,f=Yo(d,o),p=function(){var b;return Cl(o.current)||(o.current&&Ue(o.current)==="object"?Cl((b=o.current)===null||b===void 0?void 0:b.nativeElement):null)||Cl(i.current)};h.useImperativeHandle(e,function(){return p()});var m=h.useRef(t);m.current=t;var g=h.useCallback(function(v){var b=m.current,y=b.onResize,C=b.data,S=v.getBoundingClientRect(),x=S.width,w=S.height,$=v.offsetWidth,R=v.offsetHeight,M=Math.floor(x),O=Math.floor(w);if(c.current.width!==M||c.current.height!==O||c.current.offsetWidth!==$||c.current.offsetHeight!==R){var N={width:M,height:O,offsetWidth:$,offsetHeight:R};c.current=N;var I=$===Math.round(x)?x:$,T=R===Math.round(w)?w:R,P=j(j({},N),{},{offsetWidth:I,offsetHeight:T});a==null||a(P,v,C),y&&Promise.resolve().then(function(){y(P,v)})}},[]);return h.useEffect(function(){var v=p();return v&&!r&&IR(v,g),function(){return PR(v,g)}},[o.current,r]),h.createElement(AR,{ref:i},u?h.cloneElement(l,{ref:f}):l)}var cC=h.forwardRef(kR);process.env.NODE_ENV!=="production"&&(cC.displayName="SingleObserver");var DR="rc-observer-key";function _R(t,e){var n=t.children,r=typeof n=="function"?[n]:dr(n);return process.env.NODE_ENV!=="production"&&(r.length>1?Xr(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&Xr(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(o,i){var a=(o==null?void 0:o.key)||"".concat(DR,"-").concat(i);return h.createElement(cC,ge({},t,{key:a,ref:i===0?e:void 0}),o)})}var bo=h.forwardRef(_R);process.env.NODE_ENV!=="production"&&(bo.displayName="ResizeObserver");bo.Collection=dR;function Jd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function jR(t){if(Array.isArray(t))return Jd(t)}function uC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Fh(t,e){if(t){if(typeof t=="string")return Jd(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jd(t,e):void 0}}function BR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
138
138
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function he(t){return jR(t)||uC(t)||Fh(t)||BR()}var dC=function(e){return+setTimeout(e,16)},fC=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(dC=function(e){return window.requestAnimationFrame(e)},fC=function(e){return window.cancelAnimationFrame(e)});var cg=0,kc=new Map;function hC(t){kc.delete(t)}var wt=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;cg+=1;var r=cg;function o(i){if(i===0)hC(r),e();else{var a=dC(function(){o(i-1)});kc.set(r,a)}}return o(n),r};wt.cancel=function(t){var e=kc.get(t);return hC(t),fC(e)};process.env.NODE_ENV!=="production"&&(wt.ids=function(){return kc});function pC(t){if(Array.isArray(t))return t}function zR(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function mC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
139
139
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X(t,e){return pC(t)||zR(t,e)||Fh(t,e)||mC()}function us(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function zn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Zd(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var ug="data-rc-order",dg="data-rc-priority",LR="rc-util-key",Qd=new Map;function gC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):LR}function Dc(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function FR(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Hh(t){return Array.from((Qd.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function vC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!zn())return null;var n=e.csp,r=e.prepend,o=e.priority,i=o===void 0?0:o,a=FR(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(ug,a),s&&i&&l.setAttribute(dg,"".concat(i)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Dc(e),u=c.firstChild;if(r){if(s){var d=(e.styles||Hh(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(ug)))return!1;var p=Number(f.getAttribute(dg)||0);return i>=p});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function bC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Dc(e);return(e.styles||Hh(n)).find(function(r){return r.getAttribute(gC(e))===t})}function ds(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=bC(t,e);if(n){var r=Dc(e);r.removeChild(n)}}function HR(t,e){var n=Qd.get(t);if(!n||!Zd(document,n)){var r=vC("",e),o=r.parentNode;Qd.set(t,o),t.removeChild(r)}}function po(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Dc(n),o=Hh(r),i=j(j({},n),{},{styles:o});HR(r,i);var a=bC(e,i);if(a){var s,l;if((s=i.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=i.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=i.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==t&&(a.innerHTML=t),a}var u=vC(t,i);return u.setAttribute(gC(i),e),u}function VR(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function lt(t,e){if(t==null)return{};var n,r,o=VR(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function da(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(i,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(i);if(at(!l,"Warning: There may be circular references"),l)return!1;if(i===a)return!0;if(n&&s>1)return!1;r.add(i);var c=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(var u=0;u<i.length;u++)if(!o(i[u],a[u],c))return!1;return!0}if(i&&a&&Ue(i)==="object"&&Ue(a)==="object"){var d=Object.keys(i);return d.length!==Object.keys(a).length?!1:d.every(function(f){return o(i[f],a[f],c)})}return!1}return o(t,e)}var WR="%";function ef(t){return t.join(WR)}var qR=function(){function t(e){ln(this,t),D(this,"instanceId",void 0),D(this,"cache",new Map),this.instanceId=e}return cn(t,[{key:"get",value:function(n){return this.opGet(ef(n))}},{key:"opGet",value:function(n){return this.cache.get(n)||null}},{key:"update",value:function(n,r){return this.opUpdate(ef(n),r)}},{key:"opUpdate",value:function(n,r){var o=this.cache.get(n),i=r(o);i===null?this.cache.delete(n):this.cache.set(n,i)}}]),t}(),fa="data-token-hash",Pr="data-css-hash",KR="data-cache-path",ko="__cssinjs_instance__";function GR(){var t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var e=document.body.querySelectorAll("style[".concat(Pr,"]"))||[],n=document.head.firstChild;Array.from(e).forEach(function(o){o[ko]=o[ko]||t,o[ko]===t&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Pr,"]"))).forEach(function(o){var i=o.getAttribute(Pr);if(r[i]){if(o[ko]===t){var a;(a=o.parentNode)===null||a===void 0||a.removeChild(o)}}else r[i]=!0})}return new qR(t)}var $s=h.createContext({hashPriority:"low",cache:GR(),defaultCache:!0});function UR(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var Vh=function(){function t(){ln(this,t),D(this,"cache",void 0),D(this,"keys",void 0),D(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return cn(t,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(s){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(s)}}),(r=a)!==null&&r!==void 0&&r.value&&i&&(a.value[1]=this.cacheCallTimes++),(o=a)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(c,u){var d=X(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),a=X(i,1),s=a[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var i;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(i=o.value)===null||i===void 0?void 0:i[0]}var a=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),a}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!UR(r,n)}),this.deleteByPath(this.cache,n)}}]),t}();D(Vh,"MAX_CACHE_SIZE",20);D(Vh,"MAX_CACHE_OFFSET",5);var fg=0,yC=function(){function t(e){ln(this,t),D(this,"derivatives",void 0),D(this,"id",void 0),this.derivatives=Array.isArray(e)?e:[e],this.id=fg,e.length===0&&Xr(e.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),fg+=1}return cn(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),t}(),Bu=new Vh;function tf(t){var e=Array.isArray(t)?t:[t];return Bu.has(e)||Bu.set(e,new yC(e)),Bu.get(e)}var XR=new WeakMap,zu={};function YR(t,e){for(var n=XR,r=0;r<e.length;r+=1){var o=e[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(zu)||n.set(zu,t()),n.get(zu)}var hg=new WeakMap;function Ga(t){var e=hg.get(t)||"";return e||(Object.keys(t).forEach(function(n){var r=t[n];e+=n,r instanceof yC?e+=r.id:r&&Ue(r)==="object"?e+=Ga(r):e+=r}),e=us(e),hg.set(t,e)),e}function pg(t,e){return us("".concat(e,"_").concat(Ga(t)))}var nf=zn();function U(t){return typeof t=="number"?"".concat(t,"px"):t}function ec(t,e,n){var r,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return t;var a=j(j({},o),{},(r={},D(r,fa,e),D(r,Pr,n),r)),s=Object.keys(a).map(function(l){var c=a[l];return c?"".concat(l,'="').concat(c,'"'):null}).filter(function(l){return l}).join(" ");return"<style ".concat(s,">").concat(t,"</style>")}var Sl=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").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()},JR=function(e,n,r){return Object.keys(e).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(e).map(function(o){var i=X(o,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},CC=function(e,n,r){var o={},i={};return Object.entries(e).forEach(function(a){var s,l,c=X(a,2),u=c[0],d=c[1];if(r!=null&&(s=r.preserve)!==null&&s!==void 0&&s[u])i[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,p=Sl(u,r==null?void 0:r.prefix);o[p]=typeof d=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),i[u]="var(".concat(p,")")}}),[i,JR(o,n,{scope:r==null?void 0:r.scope})]},mg=process.env.NODE_ENV!=="test"&&zn()?h.useLayoutEffect:h.useEffect,zt=function(e,n){var r=h.useRef(!0);mg(function(){return e(r.current)},n),mg(function(){return r.current=!1,function(){r.current=!0}},[])},Ua=function(e,n){zt(function(r){if(!r)return e()},n)},ZR=j({},h),gg=ZR.useInsertionEffect,QR=function(e,n,r){h.useMemo(e,r),zt(function(){return n(!0)},r)},eI=gg?function(t,e,n){return gg(function(){return t(),e()},n)}:QR,tI=j({},h),nI=tI.useInsertionEffect,rI=function(e){var n=[],r=!1;function o(i){if(r){process.env.NODE_ENV!=="production"&&Xr(!1,"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");return}n.push(i)}return h.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(i){return i()})}},e),o},oI=function(){return function(e){e()}},iI=typeof nI<"u"?rI:oI;function aI(){return!1}var rf=!1;function sI(){return rf}const lI=process.env.NODE_ENV==="production"?aI:sI;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){var el=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(el&&typeof el.webpackHotUpdate=="function"){var cI=el.webpackHotUpdate;el.webpackHotUpdate=function(){return rf=!0,setTimeout(function(){rf=!1},0),cI.apply(void 0,arguments)}}}function Wh(t,e,n,r,o){var i=h.useContext($s),a=i.cache,s=[t].concat(he(e)),l=ef(s),c=iI([l]),u=lI(),d=function(g){a.opUpdate(l,function(v){var b=v||[void 0,void 0],y=X(b,2),C=y[0],S=C===void 0?0:C,x=y[1],w=x;process.env.NODE_ENV!=="production"&&x&&u&&(r==null||r(w,u),w=null);var $=w||n(),R=[S,$];return g?g(R):R})};h.useMemo(function(){d()},[l]);var f=a.opGet(l);process.env.NODE_ENV!=="production"&&!f&&(d(),f=a.opGet(l));var p=f[1];return eI(function(){o==null||o(p)},function(m){return d(function(g){var v=X(g,2),b=v[0],y=v[1];return m&&b===0&&(o==null||o(p)),[b+1,y]}),function(){a.opUpdate(l,function(g){var v=g||[],b=X(v,2),y=b[0],C=y===void 0?0:y,S=b[1],x=C-1;return x===0?(c(function(){(m||!a.opGet(l))&&(r==null||r(S,!1))}),null):[C-1,S]})}},[l]),p}var uI={},dI=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",ni=new Map;function fI(t){ni.set(t,(ni.get(t)||0)+1)}function hI(t,e){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(fa,'="').concat(t,'"]'));n.forEach(function(r){if(r[ko]===e){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var pI=0;function mI(t,e){ni.set(t,(ni.get(t)||0)-1);var n=Array.from(ni.keys()),r=n.filter(function(o){var i=ni.get(o)||0;return i<=0});n.length-r.length>pI&&r.forEach(function(o){hI(o,e),ni.delete(o)})}var gI=function(e,n,r,o){var i=r.getDerivativeToken(e),a=j(j({},i),n);return o&&(a=o(a)),a},SC="token";function vI(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.useContext($s),o=r.cache.instanceId,i=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?uI:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,p=YR(function(){return Object.assign.apply(Object,[{}].concat(he(e)))},e),m=Ga(p),g=Ga(c),v=f?Ga(f):"",b=Wh(SC,[s,t.id,m,g,v],function(){var y,C=d?d(p,c,t):gI(p,c,t,u),S=j({},C),x="";if(f){var w=CC(C,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),$=X(w,2);C=$[0],x=$[1]}var R=pg(C,s);C._tokenKey=R,S._tokenKey=pg(S,s);var M=(y=f==null?void 0:f.key)!==null&&y!==void 0?y:R;C._themeKey=M,fI(M);var O="".concat(dI,"-").concat(us(R));return C._hashId=O,[C,O,S,x,(f==null?void 0:f.key)||""]},function(y){mI(y[0]._themeKey,o)},function(y){var C=X(y,4),S=C[0],x=C[3];if(f&&x){var w=po(x,us("css-variables-".concat(S._themeKey)),{mark:Pr,prepend:"queue",attachTo:i,priority:-999});w[ko]=o,w.setAttribute(fa,S._themeKey)}});return b}var bI=function(e,n,r){var o=X(e,5),i=o[2],a=o[3],s=o[4],l=r||{},c=l.plain;if(!a)return null;var u=i._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},p=ec(a,s,u,f,c);return[d,u,p]},yI={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},xC="comm",wC="rule",EC="decl",CI="@import",SI="@namespace",xI="@keyframes",wI="@layer",$C=Math.abs,qh=String.fromCharCode;function OC(t){return t.trim()}function xl(t,e,n){return t.replace(e,n)}function EI(t,e,n){return t.indexOf(e,n)}function ta(t,e){return t.charCodeAt(e)|0}function ha(t,e,n){return t.slice(e,n)}function Vr(t){return t.length}function $I(t){return t.length}function tl(t,e){return e.push(t),t}var _c=1,pa=1,MC=0,Sr=0,fn=0,Sa="";function Kh(t,e,n,r,o,i,a,s){return{value:t,root:e,parent:n,type:r,props:o,children:i,line:_c,column:pa,length:a,return:"",siblings:s}}function OI(){return fn}function MI(){return fn=Sr>0?ta(Sa,--Sr):0,pa--,fn===10&&(pa=1,_c--),fn}function Tr(){return fn=Sr<MC?ta(Sa,Sr++):0,pa++,fn===10&&(pa=1,_c++),fn}function Do(){return ta(Sa,Sr)}function wl(){return Sr}function jc(t,e){return ha(Sa,t,e)}function fs(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function NI(t){return _c=pa=1,MC=Vr(Sa=t),Sr=0,[]}function RI(t){return Sa="",t}function Lu(t){return OC(jc(Sr-1,of(t===91?t+2:t===40?t+1:t)))}function II(t){for(;(fn=Do())&&fn<33;)Tr();return fs(t)>2||fs(fn)>3?"":" "}function PI(t,e){for(;--e&&Tr()&&!(fn<48||fn>102||fn>57&&fn<65||fn>70&&fn<97););return jc(t,wl()+(e<6&&Do()==32&&Tr()==32))}function of(t){for(;Tr();)switch(fn){case t:return Sr;case 34:case 39:t!==34&&t!==39&&of(fn);break;case 40:t===41&&of(t);break;case 92:Tr();break}return Sr}function TI(t,e){for(;Tr()&&t+fn!==57;)if(t+fn===84&&Do()===47)break;return"/*"+jc(e,Sr-1)+"*"+qh(t===47?t:Tr())}function AI(t){for(;!fs(Do());)Tr();return jc(t,Sr)}function kI(t){return RI(El("",null,null,null,[""],t=NI(t),0,[0],t))}function El(t,e,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,g=1,v=1,b=1,y=0,C="",S=o,x=i,w=r,$=C;v;)switch(m=y,y=Tr()){case 40:if(m!=108&&ta($,d-1)==58){EI($+=xl(Lu(y),"&","&\f"),"&\f",$C(c?s[c-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:$+=Lu(y);break;case 9:case 10:case 13:case 32:$+=II(m);break;case 92:$+=PI(wl()-1,7);continue;case 47:switch(Do()){case 42:case 47:tl(DI(TI(Tr(),wl()),e,n,l),l),(fs(m||1)==5||fs(Do()||1)==5)&&Vr($)&&ha($,-1,void 0)!==" "&&($+=" ");break;default:$+="/"}break;case 123*g:s[c++]=Vr($)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+u:b==-1&&($=xl($,/\f/g,"")),p>0&&(Vr($)-d||g===0&&m===47)&&tl(p>32?bg($+";",r,n,d-1,l):bg(xl($," ","")+";",r,n,d-2,l),l);break;case 59:$+=";";default:if(tl(w=vg($,e,n,c,u,o,s,C,S=[],x=[],d,i),i),y===123)if(u===0)El($,e,w,w,S,i,d,s,x);else{switch(f){case 99:if(ta($,3)===110)break;case 108:if(ta($,2)===97)break;default:u=0;case 100:case 109:case 115:}u?El(t,w,w,r&&tl(vg(t,w,w,0,0,o,s,C,o,S=[],d,x),x),o,x,d,s,r?S:x):El($,w,w,w,[""],x,0,s,x)}}c=u=p=0,g=b=1,C=$="",d=a;break;case 58:d=1+Vr($),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&MI()==125)continue}switch($+=qh(y),y*g){case 38:b=u>0?1:($+="\f",-1);break;case 44:s[c++]=(Vr($)-1)*b,b=1;break;case 64:Do()===45&&($+=Lu(Tr())),f=Do(),u=d=Vr(C=$+=AI(wl())),y++;break;case 45:m===45&&Vr($)==2&&(g=0)}}return i}function vg(t,e,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,p=o===0?i:[""],m=$I(p),g=0,v=0,b=0;g<r;++g)for(var y=0,C=ha(t,f+1,f=$C(v=a[g])),S=t;y<m;++y)(S=OC(v>0?p[y]+" "+C:xl(C,/&\f/g,p[y])))&&(l[b++]=S);return Kh(t,e,n,o===0?wC:s,l,c,u,d)}function DI(t,e,n,r){return Kh(t,e,n,xC,qh(OI()),ha(t,2,-2),0,r)}function bg(t,e,n,r,o){return Kh(t,e,n,EC,ha(t,0,r),ha(t,r+1,-1),r,o)}function af(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function _I(t,e,n,r){switch(t.type){case wI:if(t.children.length)break;case CI:case SI:case EC:return t.return=t.return||t.value;case xC:return"";case xI:return t.return=t.value+"{"+af(t.children,r)+"}";case wC:if(!Vr(t.value=t.props.join(",")))return""}return Vr(n=af(t.children,r))?t.return=t.value+"{"+n+"}":""}function NC(t,e){var n=e.path,r=e.parentSelectors;at(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(t).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var jI=function(e,n,r){if(e==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,i=["normal","none","initial","inherit","unset"];(typeof n!="string"||i.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&NC("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},BI=function(e,n,r){e==="animation"&&r.hashId&&n!=="none"&&NC("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},yg="data-ant-cssinjs-cache-path",RC="_FILE_STYLE__",pi,IC=!0;function zI(){if(!pi&&(pi={},zn())){var t=document.createElement("div");t.className=yg,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);var e=getComputedStyle(t).content||"";e=e.replace(/^"/,"").replace(/"$/,""),e.split(";").forEach(function(o){var i=o.split(":"),a=X(i,2),s=a[0],l=a[1];pi[s]=l});var n=document.querySelector("style[".concat(yg,"]"));if(n){var r;IC=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(t)}}function LI(t){return zI(),!!pi[t]}function FI(t){var e=pi[t],n=null;if(e&&zn())if(IC)n=RC;else{var r=document.querySelector("style[".concat(Pr,'="').concat(pi[t],'"]'));r?n=r.innerHTML:delete pi[t]}return[n,e]}var PC="_skip_check_",TC="_multi_value_";function $l(t){var e=af(kI(t),_I);return e.replace(/\{%%%\:[^;];}/g,";")}function HI(t){return Ue(t)==="object"&&t&&(PC in t||TC in t)}function Cg(t,e,n){if(!e)return t;var r=".".concat(e),o=n==="low"?":where(".concat(r,")"):r,i=t.split(",").map(function(a){var s,l=a.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(he(l.slice(1))).join(" ")});return i.join(",")}var VI=function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,i=r.injectHash,a=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,f=d===void 0?[]:d,p=n.linters,m=p===void 0?[]:p,g="",v={};function b(S){var x=S.getName(s);if(!v[x]){var w=t(S.style,n,{root:!1,parentSelectors:a}),$=X(w,1),R=$[0];v[x]="@keyframes ".concat(S.getName(s)).concat(R)}}function y(S){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return S.forEach(function(w){Array.isArray(w)?y(w,x):w&&x.push(w)}),x}var C=y(Array.isArray(e)?e:[e]);return C.forEach(function(S){var x=typeof S=="string"&&!o?{}:S;if(typeof x=="string")g+="".concat(x,`
140
140
  `);else if(x._keyframe)b(x);else{var w=f.reduce(function($,R){var M;return(R==null||(M=R.visit)===null||M===void 0?void 0:M.call(R,$))||$},x);Object.keys(w).forEach(function($){var R=w[$];if(Ue(R)==="object"&&R&&($!=="animationName"||!R._keyframe)&&!HI(R)){var M=!1,O=$.trim(),N=!1;(o||i)&&s?O.startsWith("@")?M=!0:O==="&"?O=Cg("",s,u):O=Cg($,s,u):o&&!s&&(O==="&"||O==="")&&(O="",N=!0);var I=t(R,n,{root:N,injectHash:M,parentSelectors:[].concat(he(a),[O])}),T=X(I,2),P=T[0],A=T[1];v=j(j({},v),A),g+="".concat(O).concat(P)}else{let _=function(F,H){process.env.NODE_ENV!=="production"&&(Ue(R)!=="object"||!(R!=null&&R[PC]))&&[jI,BI].concat(he(m)).forEach(function(W){return W(F,H,{path:c,hashId:s,parentSelectors:a})});var K=F.replace(/[A-Z]/g,function(W){return"-".concat(W.toLowerCase())}),V=H;!yI[F]&&typeof V=="number"&&V!==0&&(V="".concat(V,"px")),F==="animationName"&&H!==null&&H!==void 0&&H._keyframe&&(b(H),V=H.getName(s)),g+="".concat(K,":").concat(V,";")};var k,B=(k=R==null?void 0:R.value)!==null&&k!==void 0?k:R;Ue(R)==="object"&&R!==null&&R!==void 0&&R[TC]&&Array.isArray(B)?B.forEach(function(F){_($,F)}):_($,B)}})}}),o?l&&(g&&(g="@layer ".concat(l.name," {").concat(g,"}")),l.dependencies&&(v["@layer ".concat(l.name)]=l.dependencies.map(function(S){return"@layer ".concat(S,", ").concat(l.name,";")}).join(`
@@ -177,7 +177,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
177
177
  0 -6px 16px 0 rgba(0, 0, 0, 0.08),
178
178
  0 -3px 6px -4px rgba(0, 0, 0, 0.12),
179
179
  0 -9px 28px 8px rgba(0, 0, 0, 0.05)
180
- `,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)"}),r)}var Dg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const eS={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},jP={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},BP={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},tS=(t,e,n)=>{const r=n.getDerivativeToken(t),{override:o}=e,i=Dg(e,["override"]);let a=Object.assign(Object.assign({},r),{override:o});return a=QC(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c}=l,u=Dg(l,["theme"]);let d=u;c&&(d=tS(Object.assign(Object.assign({},a),u),{override:u},c)),a[s]=d}),a};function er(){const{token:t,hashed:e,theme:n,override:r,cssVar:o}=E.useContext(UC),i=`${DP}-${e||""}`,a=n||GC,[s,l,c]=vI(a,[hs,t],{salt:i,override:r,getComputedToken:tS,formatToken:QC,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:eS,ignore:jP,preserve:BP}});return[a,c,e?l:"",s,o]}const gs={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},An=(t,e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}),Ii=()=>({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"}}),nc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),zP=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),LP=(t,e,n,r)=>{const o=`[class^="${e}"], [class*=" ${e}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},s),a),{[o]:a})}},Yh=(t,e)=>({outline:`${U(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),va=(t,e)=>({"&:focus-visible":Object.assign({},Yh(t,e))}),nS=t=>({[`.${t}`]:Object.assign(Object.assign({},Ii()),{[`.${t} .${t}-icon`]:{display:"block"}})}),{genStyleHooks:Yt,genComponentStyleHook:FP,genSubStyleComponent:rS}=kP({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=E.useContext(gt);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,r,o]=er();return{theme:t,realToken:e,hashId:n,token:r,cssVar:o}},useCSP:()=>{const{csp:t}=E.useContext(gt);return t??{}},getResetStyles:(t,e)=>{var n;const r=zP(t);return[r,{"&":r},nS((n=e==null?void 0:e.prefix.iconPrefixCls)!==null&&n!==void 0?n:Bc)]},getCommonStyle:LP,getCompUnitless:()=>eS});function HP(t,e){return Vo.reduce((n,r)=>{const o=t[`${r}1`],i=t[`${r}3`],a=t[`${r}6`],s=t[`${r}7`];return Object.assign(Object.assign({},n),e(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s}))},{})}const VP=(t,e)=>{const[n,r]=er();return sf({token:r,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>[nS(t)])},WP=Object.assign({},h),{useId:_g}=WP,qP=()=>"",KP=typeof _g>"u"?qP:_g;function GP(t,e,n){var r,o;const i=Kt("ConfigProvider"),a=t||{},s=a.inherit===!1||!e?Object.assign(Object.assign({},Cf),{hashed:(r=e==null?void 0:e.hashed)!==null&&r!==void 0?r:Cf.hashed,cssVar:e==null?void 0:e.cssVar}):e,l=KP();if(process.env.NODE_ENV!=="production"){const c=a.cssVar||s.cssVar,u=!!(typeof a.cssVar=="object"&&(!((o=a.cssVar)===null||o===void 0)&&o.key)||l);process.env.NODE_ENV!=="production"&&i(!c||u,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Es(()=>{var c,u;if(!t)return e;const d=Object.assign({},s.components);Object.keys(t.components||{}).forEach(m=>{d[m]=Object.assign(Object.assign({},d[m]),t.components[m])});const f=`css-var-${l.replace(/:/g,"")}`,p=((c=a.cssVar)!==null&&c!==void 0?c:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof s.cssVar=="object"?s.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((u=a.cssVar)===null||u===void 0?void 0:u.key)||f});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:d,cssVar:p})},[a,s],(c,u)=>c.some((d,f)=>{const p=u[f];return!da(d,p,!0)}))}var UP=["children"],oS=h.createContext({});function XP(t){var e=t.children,n=lt(t,UP);return h.createElement(oS.Provider,{value:n},e)}var YP=function(t){go(n,t);var e=vo(n);function n(){return ln(this,n),e.apply(this,arguments)}return cn(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component);function JP(t){var e=h.useReducer(function(s){return s+1},0),n=X(e,2),r=n[1],o=h.useRef(t),i=At(function(){return o.current}),a=At(function(s){o.current=typeof s=="function"?s(o.current):s,r()});return[i,a]}var $o="none",rl="appear",ol="enter",il="leave",jg="none",Rr="prepare",Ji="start",Zi="active",Jh="end",iS="prepared";function Bg(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function ZP(t,e){var n={animationend:Bg("Animation","AnimationEnd"),transitionend:Bg("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var QP=ZP(zn(),typeof window<"u"?window:{}),aS={};if(zn()){var eT=document.createElement("div");aS=eT.style}var al={};function sS(t){if(al[t])return al[t];var e=QP[t];if(e)for(var n=Object.keys(e),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(e,i)&&i in aS)return al[t]=e[i],al[t]}return""}var lS=sS("animationend"),cS=sS("transitionend"),uS=!!(lS&&cS),zg=lS||"animationend",Lg=cS||"transitionend";function Fg(t,e){if(!t)return null;if(Ue(t)==="object"){var n=e.replace(/-\w/g,function(r){return r[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const tT=function(t){var e=E.useRef();function n(o){o&&(o.removeEventListener(Lg,t),o.removeEventListener(zg,t))}function r(o){e.current&&e.current!==o&&n(e.current),o&&o!==e.current&&(o.addEventListener(Lg,t),o.addEventListener(zg,t),e.current=o)}return h.useEffect(function(){return function(){n(e.current)}},[]),[r,n]};var dS=zn()?E.useLayoutEffect:E.useEffect;const nT=function(){var t=h.useRef(null);function e(){wt.cancel(t.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var i=wt(function(){o<=1?r({isCanceled:function(){return i!==t.current}}):n(r,o-1)});t.current=i}return h.useEffect(function(){return function(){e()}},[]),[n,e]};var rT=[Rr,Ji,Zi,Jh],oT=[Rr,iS],fS=!1,iT=!0;function hS(t){return t===Zi||t===Jh}const aT=function(t,e,n){var r=ga(jg),o=X(r,2),i=o[0],a=o[1],s=nT(),l=X(s,2),c=l[0],u=l[1];function d(){a(Rr,!0)}var f=e?oT:rT;return dS(function(){if(i!==jg&&i!==Jh){var p=f.indexOf(i),m=f[p+1],g=n(i);g===fS?a(m,!0):m&&c(function(v){function b(){v.isCanceled()||a(m,!0)}g===!0?b():Promise.resolve(g).then(b)})}},[t,i]),h.useEffect(function(){return function(){u()}},[]),[d,i]};function sT(t,e,n,r){var o=r.motionEnter,i=o===void 0?!0:o,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,p=r.onEnterPrepare,m=r.onLeavePrepare,g=r.onAppearStart,v=r.onEnterStart,b=r.onLeaveStart,y=r.onAppearActive,C=r.onEnterActive,S=r.onLeaveActive,x=r.onAppearEnd,w=r.onEnterEnd,$=r.onLeaveEnd,R=r.onVisibleChanged,M=ga(),O=X(M,2),N=O[0],I=O[1],T=JP($o),P=X(T,2),A=P[0],k=P[1],B=ga(null),_=X(B,2),F=_[0],H=_[1],K=A(),V=E.useRef(!1),W=E.useRef(null);function z(){return n()}var L=E.useRef(!1);function J(){k($o),H(null,!0)}var ne=At(function(ye){var Be=A();if(Be!==$o){var de=z();if(!(ye&&!ye.deadline&&ye.target!==de)){var ue=L.current,pe;Be===rl&&ue?pe=x==null?void 0:x(de,ye):Be===ol&&ue?pe=w==null?void 0:w(de,ye):Be===il&&ue&&(pe=$==null?void 0:$(de,ye)),ue&&pe!==!1&&J()}}}),q=tT(ne),re=X(q,1),ae=re[0],ee=function(Be){switch(Be){case rl:return D(D(D({},Rr,f),Ji,g),Zi,y);case ol:return D(D(D({},Rr,p),Ji,v),Zi,C);case il:return D(D(D({},Rr,m),Ji,b),Zi,S);default:return{}}},Y=h.useMemo(function(){return ee(K)},[K]),te=aT(K,!t,function(ye){if(ye===Rr){var Be=Y[Rr];return Be?Be(z()):fS}if(oe in Y){var de;H(((de=Y[oe])===null||de===void 0?void 0:de.call(Y,z(),null))||null)}return oe===Zi&&K!==$o&&(ae(z()),u>0&&(clearTimeout(W.current),W.current=setTimeout(function(){ne({deadline:!0})},u))),oe===iS&&J(),iT}),Z=X(te,2),Q=Z[0],oe=Z[1],ce=hS(oe);L.current=ce;var se=E.useRef(null);dS(function(){if(!(V.current&&se.current===e)){I(e);var ye=V.current;V.current=!0;var Be;!ye&&e&&s&&(Be=rl),ye&&e&&i&&(Be=ol),(ye&&!e&&c||!ye&&d&&!e&&c)&&(Be=il);var de=ee(Be);Be&&(t||de[Rr])?(k(Be),Q()):k($o),se.current=e}},[e]),E.useEffect(function(){(K===rl&&!s||K===ol&&!i||K===il&&!c)&&k($o)},[s,i,c]),E.useEffect(function(){return function(){V.current=!1,clearTimeout(W.current)}},[]);var le=h.useRef(!1);E.useEffect(function(){N&&(le.current=!0),N!==void 0&&K===$o&&((le.current||N)&&(R==null||R(N)),le.current=!0)},[N,K]);var be=F;return Y[Rr]&&oe===Ji&&(be=j({transition:"none"},be)),[K,oe,be,N??e]}function lT(t){var e=t;Ue(t)==="object"&&(e=t.transitionSupport);function n(o,i){return!!(o.motionName&&e&&i!==!1)}var r=h.forwardRef(function(o,i){var a=o.visible,s=a===void 0?!0:a,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,p=o.leavedClassName,m=o.eventProps,g=h.useContext(oS),v=g.motion,b=n(o,v),y=E.useRef(),C=E.useRef();function S(){try{return y.current instanceof HTMLElement?y.current:Cl(C.current)}catch{return null}}var x=sT(b,s,S,o),w=X(x,4),$=w[0],R=w[1],M=w[2],O=w[3],N=h.useRef(O);O&&(N.current=!0);var I=h.useCallback(function(_){y.current=_,Bh(i,_)},[i]),T,P=j(j({},m),{},{visible:s});if(!d)T=null;else if($===$o)O?T=d(j({},P),I):!c&&N.current&&p?T=d(j(j({},P),{},{className:p}),I):u||!c&&!p?T=d(j(j({},P),{},{style:{display:"none"}}),I):T=null;else{var A;R===Rr?A="prepare":hS(R)?A="active":R===Ji&&(A="start");var k=Fg(f,"".concat($,"-").concat(A));T=d(j(j({},P),{},{className:G.cn(Fg(f,$),D(D({},k,k&&A),f,typeof f=="string")),style:M}),I)}if(h.isValidElement(T)&&Jo(T)){var B=Ni(T);B||(T=h.cloneElement(T,{ref:I}))}return h.createElement(YP,{ref:C},T)});return r.displayName="CSSMotion",r}const eo=lT(uS);var xf="add",wf="keep",Ef="remove",Gu="removed";function cT(t){var e;return t&&Ue(t)==="object"&&"key"in t?e=t:e={key:t},j(j({},e),{},{key:String(e.key)})}function $f(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(cT)}function uT(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=e.length,i=$f(t),a=$f(e);i.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=a[d];if(f.key===c.key){r<d&&(n=n.concat(a.slice(r,d).map(function(p){return j(j({},p),{},{status:xf})})),r=d),n.push(j(j({},f),{},{status:wf})),r+=1,u=!0;break}}u||n.push(j(j({},c),{},{status:Ef}))}),r<o&&(n=n.concat(a.slice(r).map(function(c){return j(j({},c),{},{status:xf})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Ef}),n.forEach(function(u){u.key===c&&(u.status=wf)})}),n}var dT=["component","children","onVisibleChanged","onAllRemoved"],fT=["status"],hT=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function pT(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eo,n=function(r){go(i,r);var o=vo(i);function i(){var a;ln(this,i);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return a=o.call.apply(o,[this].concat(l)),D(yt(a),"state",{keyEntities:[]}),D(yt(a),"removeKey",function(u){a.setState(function(d){var f=d.keyEntities.map(function(p){return p.key!==u?p:j(j({},p),{},{status:Gu})});return{keyEntities:f}},function(){var d=a.state.keyEntities,f=d.filter(function(p){var m=p.status;return m!==Gu}).length;f===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return cn(i,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged;c.onAllRemoved;var p=lt(c,dT),m=u||h.Fragment,g={};return hT.forEach(function(v){g[v]=p[v],delete p[v]}),delete p.keys,h.createElement(m,p,l.map(function(v,b){var y=v.status,C=lt(v,fT),S=y===xf||y===wf;return h.createElement(e,ge({},g,{key:C.key,visible:S,eventProps:C,onVisibleChanged:function(w){f==null||f(w,{key:C.key}),w||s.removeKey(C.key)}}),function(x,w){return d(j(j({},x),{},{index:b}),w)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=$f(c),f=uT(u,d);return{keyEntities:f.filter(function(p){var m=u.find(function(g){var v=g.key;return p.key===v});return!(m&&m.status===Gu&&p.status===Ef)})}}}]),i}(h.Component);return D(n,"defaultProps",{component:"div"}),n}pT(uS);function mT(t){const{children:e}=t,[,n]=er(),{motion:r}=n,o=h.useRef(!1);return o.current=o.current||r===!1,o.current?h.createElement(XP,{motion:r},e):e}const pS=h.memo(({dropdownMatchSelectWidth:t})=>(Kt("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null));process.env.NODE_ENV!=="production"&&(pS.displayName="PropWarning");const gT=process.env.NODE_ENV!=="production"?pS:()=>null;var vT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};let Of=!1;const bT=process.env.NODE_ENV!=="production"?t=>{process.env.NODE_ENV!=="production"&&Ri(!Of,t,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,yT=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let rc,mS,gS,vS;function Rl(){return rc||ms}function CT(){return mS||Bc}function ST(t){return Object.keys(t).some(e=>e.endsWith("Color"))}const xT=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:o}=t;e!==void 0&&(rc=e),n!==void 0&&(mS=n),"holderRender"in t&&(vS=o),r&&(ST(r)?(process.env.NODE_ENV!=="production"&&Ri(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),CP(Rl(),r)):gS=r)},wT=()=>({getPrefixCls:(t,e)=>e||(t?`${Rl()}-${t}`:Rl()),getIconPrefixCls:CT,getRootPrefixCls:()=>rc||Rl(),getTheme:()=>gS,holderRender:vS}),ET=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:o,anchor:i,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:p,popupMatchSelectWidth:m,popupOverflow:g,legacyLocale:v,parentContext:b,iconPrefixCls:y,theme:C,componentDisabled:S,segmented:x,statistic:w,spin:$,calendar:R,carousel:M,cascader:O,collapse:N,typography:I,checkbox:T,descriptions:P,divider:A,drawer:k,skeleton:B,steps:_,image:F,layout:H,list:K,mentions:V,modal:W,progress:z,result:L,slider:J,breadcrumb:ne,menu:q,pagination:re,input:ae,textArea:ee,empty:Y,badge:te,radio:Z,rate:Q,switch:oe,transfer:ce,avatar:se,message:le,tag:be,table:ye,card:Be,tabs:de,timeline:ue,timePicker:pe,upload:Ae,notification:_e,tree:Re,colorPicker:$e,datePicker:We,rangePicker:ke,flex:De,wave:me,dropdown:Ne,warning:Ze,tour:Ie,tooltip:xe,popover:ot,popconfirm:ft,floatButtonGroup:Tt,variant:Bt,inputNumber:Pe,treeSelect:Se}=t,Xe=h.useCallback((Fe,Qe)=>{const{prefixCls:Et}=t;if(Qe)return Qe;const vt=Et||b.getPrefixCls("");return Fe?`${vt}-${Fe}`:vt},[b.getPrefixCls,t.prefixCls]),Ge=y||b.iconPrefixCls||Bc,et=n||b.csp;VP(Ge,et);const je=GP(C,b.theme,{prefixCls:Xe("")});process.env.NODE_ENV!=="production"&&(Of=Of||!!je);const we={csp:et,autoInsertSpaceInButton:r,alert:o,anchor:i,locale:s||v,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:m??p,popupOverflow:g,getPrefixCls:Xe,iconPrefixCls:Ge,theme:je,segmented:x,statistic:w,spin:$,calendar:R,carousel:M,cascader:O,collapse:N,typography:I,checkbox:T,descriptions:P,divider:A,drawer:k,skeleton:B,steps:_,image:F,input:ae,textArea:ee,layout:H,list:K,mentions:V,modal:W,progress:z,result:L,slider:J,breadcrumb:ne,menu:q,pagination:re,empty:Y,badge:te,radio:Z,rate:Q,switch:oe,transfer:ce,avatar:se,message:le,tag:be,table:ye,card:Be,tabs:de,timeline:ue,timePicker:pe,upload:Ae,notification:_e,tree:Re,colorPicker:$e,datePicker:We,rangePicker:ke,flex:De,wave:me,dropdown:Ne,warning:Ze,tour:Ie,tooltip:xe,popover:ot,popconfirm:ft,floatButtonGroup:Tt,variant:Bt,inputNumber:Pe,treeSelect:Se};process.env.NODE_ENV!=="production"&&Kt("ConfigProvider")(!("autoInsertSpaceInButton"in t),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Ee=Object.assign({},b);Object.keys(we).forEach(Fe=>{we[Fe]!==void 0&&(Ee[Fe]=we[Fe])}),yT.forEach(Fe=>{const Qe=t[Fe];Qe&&(Ee[Fe]=Qe)}),typeof r<"u"&&(Ee.button=Object.assign({autoInsertSpace:r},Ee.button));const ut=Es(()=>Ee,Ee,(Fe,Qe)=>{const Et=Object.keys(Fe),vt=Object.keys(Qe);return Et.length!==vt.length||Et.some(Ht=>Fe[Ht]!==Qe[Ht])}),{layer:ht}=h.useContext($s),ze=h.useMemo(()=>({prefixCls:Ge,csp:et,layer:ht?"antd":void 0}),[Ge,et,ht]);let Ce=h.createElement(h.Fragment,null,h.createElement(gT,{dropdownMatchSelectWidth:p}),e);const Ke=h.useMemo(()=>{var Fe,Qe,Et,vt;return Yi(((Fe=Ho.Form)===null||Fe===void 0?void 0:Fe.defaultValidateMessages)||{},((Et=(Qe=ut.locale)===null||Qe===void 0?void 0:Qe.Form)===null||Et===void 0?void 0:Et.defaultValidateMessages)||{},((vt=ut.form)===null||vt===void 0?void 0:vt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[ut,a==null?void 0:a.validateMessages]);Object.keys(Ke).length>0&&(Ce=h.createElement(JI.Provider,{value:Ke},Ce)),s&&(Ce=h.createElement(VC,{locale:s,_ANT_MARK__:HC},Ce)),Ce=h.createElement(Gh.Provider,{value:ze},Ce),l&&(Ce=h.createElement(SP,{size:l},Ce)),Ce=h.createElement(mT,null,Ce);const Le=h.useMemo(()=>{const Fe=je||{},{algorithm:Qe,token:Et,components:vt,cssVar:Ht}=Fe,Ct=vT(Fe,["algorithm","token","components","cssVar"]),Nt=Qe&&(!Array.isArray(Qe)||Qe.length>0)?tf(Qe):GC,Dt={};Object.entries(vt||{}).forEach(([Nn,Wt])=>{const It=Object.assign({},Wt);"algorithm"in It&&(It.algorithm===!0?It.theme=Nt:(Array.isArray(It.algorithm)||typeof It.algorithm=="function")&&(It.theme=tf(It.algorithm)),delete It.algorithm),Dt[Nn]=It});const Vt=Object.assign(Object.assign({},hs),Et);return Object.assign(Object.assign({},Ct),{theme:Nt,token:Vt,components:Dt,override:Object.assign({override:Vt},Dt),cssVar:Ht})},[je]);return C&&(Ce=h.createElement(UC.Provider,{value:Le},Ce)),ut.warning&&(Ce=h.createElement(zC.Provider,{value:ut.warning},Ce)),S!==void 0&&(Ce=h.createElement(XC,{disabled:S},Ce)),h.createElement(gt.Provider,{value:ut},Ce)},to=t=>{const e=h.useContext(gt),n=h.useContext(Xh);return h.createElement(ET,Object.assign({parentContext:e,legacyLocale:n},t))};to.ConfigContext=gt;to.SizeContext=ma;to.config=xT;to.useConfig=xP;Object.defineProperty(to,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&Ri(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),ma)});process.env.NODE_ENV!=="production"&&(to.displayName="ConfigProvider");var $T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function bS(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function OT(t){return bS(t)instanceof ShadowRoot}function oc(t){return OT(t)?bS(t):null}function MT(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function NT(t,e){at(t,"[@ant-design/icons] ".concat(e))}function Hg(t){return Ue(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(Ue(t.icon)==="object"||typeof t.icon=="function")}function Vg(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[MT(n)]=r}return e},{})}function Mf(t,e,n){return n?E.createElement(t.tag,j(j({key:e},Vg(t.attrs)),n),(t.children||[]).map(function(r,o){return Mf(r,"".concat(e,"-").concat(t.tag,"-").concat(o))})):E.createElement(t.tag,j({key:e},Vg(t.attrs)),(t.children||[]).map(function(r,o){return Mf(r,"".concat(e,"-").concat(t.tag,"-").concat(o))}))}function yS(t){return ps(t)[0]}function CS(t){return t?Array.isArray(t)?t:[t]:[]}var RT=`
180
+ `,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)"}),r)}var Dg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const eS={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},jP={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},BP={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},tS=(t,e,n)=>{const r=n.getDerivativeToken(t),{override:o}=e,i=Dg(e,["override"]);let a=Object.assign(Object.assign({},r),{override:o});return a=QC(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c}=l,u=Dg(l,["theme"]);let d=u;c&&(d=tS(Object.assign(Object.assign({},a),u),{override:u},c)),a[s]=d}),a};function er(){const{token:t,hashed:e,theme:n,override:r,cssVar:o}=E.useContext(UC),i=`${DP}-${e||""}`,a=n||GC,[s,l,c]=vI(a,[hs,t],{salt:i,override:r,getComputedToken:tS,formatToken:QC,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:eS,ignore:jP,preserve:BP}});return[a,c,e?l:"",s,o]}const gs={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},An=(t,e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}),Ii=()=>({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"}}),nc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),zP=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),LP=(t,e,n,r)=>{const o=`[class^="${e}"], [class*=" ${e}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},s),a),{[o]:a})}},Yh=(t,e)=>({outline:`${U(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),va=(t,e)=>({"&:focus-visible":Object.assign({},Yh(t,e))}),nS=t=>({[`.${t}`]:Object.assign(Object.assign({},Ii()),{[`.${t} .${t}-icon`]:{display:"block"}})}),{genStyleHooks:Yt,genComponentStyleHook:FP,genSubStyleComponent:rS}=kP({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=E.useContext(gt);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,r,o]=er();return{theme:t,realToken:e,hashId:n,token:r,cssVar:o}},useCSP:()=>{const{csp:t}=E.useContext(gt);return t??{}},getResetStyles:(t,e)=>{var n;const r=zP(t);return[r,{"&":r},nS((n=e==null?void 0:e.prefix.iconPrefixCls)!==null&&n!==void 0?n:Bc)]},getCommonStyle:LP,getCompUnitless:()=>eS});function HP(t,e){return Vo.reduce((n,r)=>{const o=t[`${r}1`],i=t[`${r}3`],a=t[`${r}6`],s=t[`${r}7`];return Object.assign(Object.assign({},n),e(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s}))},{})}const VP=(t,e)=>{const[n,r]=er();return sf({token:r,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>[nS(t)])},WP=Object.assign({},h),{useId:_g}=WP,qP=()=>"",KP=typeof _g>"u"?qP:_g;function GP(t,e,n){var r,o;const i=Kt("ConfigProvider"),a=t||{},s=a.inherit===!1||!e?Object.assign(Object.assign({},Cf),{hashed:(r=e==null?void 0:e.hashed)!==null&&r!==void 0?r:Cf.hashed,cssVar:e==null?void 0:e.cssVar}):e,l=KP();if(process.env.NODE_ENV!=="production"){const c=a.cssVar||s.cssVar,u=!!(typeof a.cssVar=="object"&&(!((o=a.cssVar)===null||o===void 0)&&o.key)||l);process.env.NODE_ENV!=="production"&&i(!c||u,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Es(()=>{var c,u;if(!t)return e;const d=Object.assign({},s.components);Object.keys(t.components||{}).forEach(m=>{d[m]=Object.assign(Object.assign({},d[m]),t.components[m])});const f=`css-var-${l.replace(/:/g,"")}`,p=((c=a.cssVar)!==null&&c!==void 0?c:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof s.cssVar=="object"?s.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((u=a.cssVar)===null||u===void 0?void 0:u.key)||f});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:d,cssVar:p})},[a,s],(c,u)=>c.some((d,f)=>{const p=u[f];return!da(d,p,!0)}))}var UP=["children"],oS=h.createContext({});function XP(t){var e=t.children,n=lt(t,UP);return h.createElement(oS.Provider,{value:n},e)}var YP=function(t){go(n,t);var e=vo(n);function n(){return ln(this,n),e.apply(this,arguments)}return cn(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component);function JP(t){var e=h.useReducer(function(s){return s+1},0),n=X(e,2),r=n[1],o=h.useRef(t),i=At(function(){return o.current}),a=At(function(s){o.current=typeof s=="function"?s(o.current):s,r()});return[i,a]}var $o="none",rl="appear",ol="enter",il="leave",jg="none",Rr="prepare",Ji="start",Zi="active",Jh="end",iS="prepared";function Bg(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function ZP(t,e){var n={animationend:Bg("Animation","AnimationEnd"),transitionend:Bg("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var QP=ZP(zn(),typeof window<"u"?window:{}),aS={};if(zn()){var eT=document.createElement("div");aS=eT.style}var al={};function sS(t){if(al[t])return al[t];var e=QP[t];if(e)for(var n=Object.keys(e),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(e,i)&&i in aS)return al[t]=e[i],al[t]}return""}var lS=sS("animationend"),cS=sS("transitionend"),uS=!!(lS&&cS),zg=lS||"animationend",Lg=cS||"transitionend";function Fg(t,e){if(!t)return null;if(Ue(t)==="object"){var n=e.replace(/-\w/g,function(r){return r[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const tT=function(t){var e=E.useRef();function n(o){o&&(o.removeEventListener(Lg,t),o.removeEventListener(zg,t))}function r(o){e.current&&e.current!==o&&n(e.current),o&&o!==e.current&&(o.addEventListener(Lg,t),o.addEventListener(zg,t),e.current=o)}return h.useEffect(function(){return function(){n(e.current)}},[]),[r,n]};var dS=zn()?E.useLayoutEffect:E.useEffect;const nT=function(){var t=h.useRef(null);function e(){wt.cancel(t.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var i=wt(function(){o<=1?r({isCanceled:function(){return i!==t.current}}):n(r,o-1)});t.current=i}return h.useEffect(function(){return function(){e()}},[]),[n,e]};var rT=[Rr,Ji,Zi,Jh],oT=[Rr,iS],fS=!1,iT=!0;function hS(t){return t===Zi||t===Jh}const aT=function(t,e,n){var r=ga(jg),o=X(r,2),i=o[0],a=o[1],s=nT(),l=X(s,2),c=l[0],u=l[1];function d(){a(Rr,!0)}var f=e?oT:rT;return dS(function(){if(i!==jg&&i!==Jh){var p=f.indexOf(i),m=f[p+1],g=n(i);g===fS?a(m,!0):m&&c(function(v){function b(){v.isCanceled()||a(m,!0)}g===!0?b():Promise.resolve(g).then(b)})}},[t,i]),h.useEffect(function(){return function(){u()}},[]),[d,i]};function sT(t,e,n,r){var o=r.motionEnter,i=o===void 0?!0:o,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,p=r.onEnterPrepare,m=r.onLeavePrepare,g=r.onAppearStart,v=r.onEnterStart,b=r.onLeaveStart,y=r.onAppearActive,C=r.onEnterActive,S=r.onLeaveActive,x=r.onAppearEnd,w=r.onEnterEnd,$=r.onLeaveEnd,R=r.onVisibleChanged,M=ga(),O=X(M,2),N=O[0],I=O[1],T=JP($o),P=X(T,2),A=P[0],k=P[1],B=ga(null),_=X(B,2),F=_[0],H=_[1],K=A(),V=E.useRef(!1),W=E.useRef(null);function z(){return n()}var L=E.useRef(!1);function J(){k($o),H(null,!0)}var ne=At(function(ye){var Be=A();if(Be!==$o){var de=z();if(!(ye&&!ye.deadline&&ye.target!==de)){var ue=L.current,pe;Be===rl&&ue?pe=x==null?void 0:x(de,ye):Be===ol&&ue?pe=w==null?void 0:w(de,ye):Be===il&&ue&&(pe=$==null?void 0:$(de,ye)),ue&&pe!==!1&&J()}}}),q=tT(ne),re=X(q,1),ae=re[0],ee=function(Be){switch(Be){case rl:return D(D(D({},Rr,f),Ji,g),Zi,y);case ol:return D(D(D({},Rr,p),Ji,v),Zi,C);case il:return D(D(D({},Rr,m),Ji,b),Zi,S);default:return{}}},Y=h.useMemo(function(){return ee(K)},[K]),te=aT(K,!t,function(ye){if(ye===Rr){var Be=Y[Rr];return Be?Be(z()):fS}if(ie in Y){var de;H(((de=Y[ie])===null||de===void 0?void 0:de.call(Y,z(),null))||null)}return ie===Zi&&K!==$o&&(ae(z()),u>0&&(clearTimeout(W.current),W.current=setTimeout(function(){ne({deadline:!0})},u))),ie===iS&&J(),iT}),Z=X(te,2),Q=Z[0],ie=Z[1],ce=hS(ie);L.current=ce;var se=E.useRef(null);dS(function(){if(!(V.current&&se.current===e)){I(e);var ye=V.current;V.current=!0;var Be;!ye&&e&&s&&(Be=rl),ye&&e&&i&&(Be=ol),(ye&&!e&&c||!ye&&d&&!e&&c)&&(Be=il);var de=ee(Be);Be&&(t||de[Rr])?(k(Be),Q()):k($o),se.current=e}},[e]),E.useEffect(function(){(K===rl&&!s||K===ol&&!i||K===il&&!c)&&k($o)},[s,i,c]),E.useEffect(function(){return function(){V.current=!1,clearTimeout(W.current)}},[]);var le=h.useRef(!1);E.useEffect(function(){N&&(le.current=!0),N!==void 0&&K===$o&&((le.current||N)&&(R==null||R(N)),le.current=!0)},[N,K]);var be=F;return Y[Rr]&&ie===Ji&&(be=j({transition:"none"},be)),[K,ie,be,N??e]}function lT(t){var e=t;Ue(t)==="object"&&(e=t.transitionSupport);function n(o,i){return!!(o.motionName&&e&&i!==!1)}var r=h.forwardRef(function(o,i){var a=o.visible,s=a===void 0?!0:a,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,p=o.leavedClassName,m=o.eventProps,g=h.useContext(oS),v=g.motion,b=n(o,v),y=E.useRef(),C=E.useRef();function S(){try{return y.current instanceof HTMLElement?y.current:Cl(C.current)}catch{return null}}var x=sT(b,s,S,o),w=X(x,4),$=w[0],R=w[1],M=w[2],O=w[3],N=h.useRef(O);O&&(N.current=!0);var I=h.useCallback(function(_){y.current=_,Bh(i,_)},[i]),T,P=j(j({},m),{},{visible:s});if(!d)T=null;else if($===$o)O?T=d(j({},P),I):!c&&N.current&&p?T=d(j(j({},P),{},{className:p}),I):u||!c&&!p?T=d(j(j({},P),{},{style:{display:"none"}}),I):T=null;else{var A;R===Rr?A="prepare":hS(R)?A="active":R===Ji&&(A="start");var k=Fg(f,"".concat($,"-").concat(A));T=d(j(j({},P),{},{className:G.cn(Fg(f,$),D(D({},k,k&&A),f,typeof f=="string")),style:M}),I)}if(h.isValidElement(T)&&Jo(T)){var B=Ni(T);B||(T=h.cloneElement(T,{ref:I}))}return h.createElement(YP,{ref:C},T)});return r.displayName="CSSMotion",r}const eo=lT(uS);var xf="add",wf="keep",Ef="remove",Gu="removed";function cT(t){var e;return t&&Ue(t)==="object"&&"key"in t?e=t:e={key:t},j(j({},e),{},{key:String(e.key)})}function $f(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(cT)}function uT(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=e.length,i=$f(t),a=$f(e);i.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=a[d];if(f.key===c.key){r<d&&(n=n.concat(a.slice(r,d).map(function(p){return j(j({},p),{},{status:xf})})),r=d),n.push(j(j({},f),{},{status:wf})),r+=1,u=!0;break}}u||n.push(j(j({},c),{},{status:Ef}))}),r<o&&(n=n.concat(a.slice(r).map(function(c){return j(j({},c),{},{status:xf})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Ef}),n.forEach(function(u){u.key===c&&(u.status=wf)})}),n}var dT=["component","children","onVisibleChanged","onAllRemoved"],fT=["status"],hT=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function pT(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eo,n=function(r){go(i,r);var o=vo(i);function i(){var a;ln(this,i);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return a=o.call.apply(o,[this].concat(l)),D(yt(a),"state",{keyEntities:[]}),D(yt(a),"removeKey",function(u){a.setState(function(d){var f=d.keyEntities.map(function(p){return p.key!==u?p:j(j({},p),{},{status:Gu})});return{keyEntities:f}},function(){var d=a.state.keyEntities,f=d.filter(function(p){var m=p.status;return m!==Gu}).length;f===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return cn(i,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged;c.onAllRemoved;var p=lt(c,dT),m=u||h.Fragment,g={};return hT.forEach(function(v){g[v]=p[v],delete p[v]}),delete p.keys,h.createElement(m,p,l.map(function(v,b){var y=v.status,C=lt(v,fT),S=y===xf||y===wf;return h.createElement(e,ge({},g,{key:C.key,visible:S,eventProps:C,onVisibleChanged:function(w){f==null||f(w,{key:C.key}),w||s.removeKey(C.key)}}),function(x,w){return d(j(j({},x),{},{index:b}),w)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=$f(c),f=uT(u,d);return{keyEntities:f.filter(function(p){var m=u.find(function(g){var v=g.key;return p.key===v});return!(m&&m.status===Gu&&p.status===Ef)})}}}]),i}(h.Component);return D(n,"defaultProps",{component:"div"}),n}pT(uS);function mT(t){const{children:e}=t,[,n]=er(),{motion:r}=n,o=h.useRef(!1);return o.current=o.current||r===!1,o.current?h.createElement(XP,{motion:r},e):e}const pS=h.memo(({dropdownMatchSelectWidth:t})=>(Kt("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null));process.env.NODE_ENV!=="production"&&(pS.displayName="PropWarning");const gT=process.env.NODE_ENV!=="production"?pS:()=>null;var vT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};let Of=!1;const bT=process.env.NODE_ENV!=="production"?t=>{process.env.NODE_ENV!=="production"&&Ri(!Of,t,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,yT=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let rc,mS,gS,vS;function Rl(){return rc||ms}function CT(){return mS||Bc}function ST(t){return Object.keys(t).some(e=>e.endsWith("Color"))}const xT=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:o}=t;e!==void 0&&(rc=e),n!==void 0&&(mS=n),"holderRender"in t&&(vS=o),r&&(ST(r)?(process.env.NODE_ENV!=="production"&&Ri(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),CP(Rl(),r)):gS=r)},wT=()=>({getPrefixCls:(t,e)=>e||(t?`${Rl()}-${t}`:Rl()),getIconPrefixCls:CT,getRootPrefixCls:()=>rc||Rl(),getTheme:()=>gS,holderRender:vS}),ET=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:o,anchor:i,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:p,popupMatchSelectWidth:m,popupOverflow:g,legacyLocale:v,parentContext:b,iconPrefixCls:y,theme:C,componentDisabled:S,segmented:x,statistic:w,spin:$,calendar:R,carousel:M,cascader:O,collapse:N,typography:I,checkbox:T,descriptions:P,divider:A,drawer:k,skeleton:B,steps:_,image:F,layout:H,list:K,mentions:V,modal:W,progress:z,result:L,slider:J,breadcrumb:ne,menu:q,pagination:re,input:ae,textArea:ee,empty:Y,badge:te,radio:Z,rate:Q,switch:ie,transfer:ce,avatar:se,message:le,tag:be,table:ye,card:Be,tabs:de,timeline:ue,timePicker:pe,upload:Ae,notification:_e,tree:Re,colorPicker:$e,datePicker:We,rangePicker:ke,flex:De,wave:me,dropdown:Ne,warning:Ze,tour:Ie,tooltip:xe,popover:ot,popconfirm:ft,floatButtonGroup:Tt,variant:Bt,inputNumber:Pe,treeSelect:Se}=t,Xe=h.useCallback((Fe,Qe)=>{const{prefixCls:Et}=t;if(Qe)return Qe;const vt=Et||b.getPrefixCls("");return Fe?`${vt}-${Fe}`:vt},[b.getPrefixCls,t.prefixCls]),Ge=y||b.iconPrefixCls||Bc,et=n||b.csp;VP(Ge,et);const je=GP(C,b.theme,{prefixCls:Xe("")});process.env.NODE_ENV!=="production"&&(Of=Of||!!je);const we={csp:et,autoInsertSpaceInButton:r,alert:o,anchor:i,locale:s||v,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:m??p,popupOverflow:g,getPrefixCls:Xe,iconPrefixCls:Ge,theme:je,segmented:x,statistic:w,spin:$,calendar:R,carousel:M,cascader:O,collapse:N,typography:I,checkbox:T,descriptions:P,divider:A,drawer:k,skeleton:B,steps:_,image:F,input:ae,textArea:ee,layout:H,list:K,mentions:V,modal:W,progress:z,result:L,slider:J,breadcrumb:ne,menu:q,pagination:re,empty:Y,badge:te,radio:Z,rate:Q,switch:ie,transfer:ce,avatar:se,message:le,tag:be,table:ye,card:Be,tabs:de,timeline:ue,timePicker:pe,upload:Ae,notification:_e,tree:Re,colorPicker:$e,datePicker:We,rangePicker:ke,flex:De,wave:me,dropdown:Ne,warning:Ze,tour:Ie,tooltip:xe,popover:ot,popconfirm:ft,floatButtonGroup:Tt,variant:Bt,inputNumber:Pe,treeSelect:Se};process.env.NODE_ENV!=="production"&&Kt("ConfigProvider")(!("autoInsertSpaceInButton"in t),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Ee=Object.assign({},b);Object.keys(we).forEach(Fe=>{we[Fe]!==void 0&&(Ee[Fe]=we[Fe])}),yT.forEach(Fe=>{const Qe=t[Fe];Qe&&(Ee[Fe]=Qe)}),typeof r<"u"&&(Ee.button=Object.assign({autoInsertSpace:r},Ee.button));const ut=Es(()=>Ee,Ee,(Fe,Qe)=>{const Et=Object.keys(Fe),vt=Object.keys(Qe);return Et.length!==vt.length||Et.some(Ht=>Fe[Ht]!==Qe[Ht])}),{layer:ht}=h.useContext($s),ze=h.useMemo(()=>({prefixCls:Ge,csp:et,layer:ht?"antd":void 0}),[Ge,et,ht]);let Ce=h.createElement(h.Fragment,null,h.createElement(gT,{dropdownMatchSelectWidth:p}),e);const Ke=h.useMemo(()=>{var Fe,Qe,Et,vt;return Yi(((Fe=Ho.Form)===null||Fe===void 0?void 0:Fe.defaultValidateMessages)||{},((Et=(Qe=ut.locale)===null||Qe===void 0?void 0:Qe.Form)===null||Et===void 0?void 0:Et.defaultValidateMessages)||{},((vt=ut.form)===null||vt===void 0?void 0:vt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[ut,a==null?void 0:a.validateMessages]);Object.keys(Ke).length>0&&(Ce=h.createElement(JI.Provider,{value:Ke},Ce)),s&&(Ce=h.createElement(VC,{locale:s,_ANT_MARK__:HC},Ce)),Ce=h.createElement(Gh.Provider,{value:ze},Ce),l&&(Ce=h.createElement(SP,{size:l},Ce)),Ce=h.createElement(mT,null,Ce);const Le=h.useMemo(()=>{const Fe=je||{},{algorithm:Qe,token:Et,components:vt,cssVar:Ht}=Fe,Ct=vT(Fe,["algorithm","token","components","cssVar"]),Nt=Qe&&(!Array.isArray(Qe)||Qe.length>0)?tf(Qe):GC,Dt={};Object.entries(vt||{}).forEach(([Nn,Wt])=>{const It=Object.assign({},Wt);"algorithm"in It&&(It.algorithm===!0?It.theme=Nt:(Array.isArray(It.algorithm)||typeof It.algorithm=="function")&&(It.theme=tf(It.algorithm)),delete It.algorithm),Dt[Nn]=It});const Vt=Object.assign(Object.assign({},hs),Et);return Object.assign(Object.assign({},Ct),{theme:Nt,token:Vt,components:Dt,override:Object.assign({override:Vt},Dt),cssVar:Ht})},[je]);return C&&(Ce=h.createElement(UC.Provider,{value:Le},Ce)),ut.warning&&(Ce=h.createElement(zC.Provider,{value:ut.warning},Ce)),S!==void 0&&(Ce=h.createElement(XC,{disabled:S},Ce)),h.createElement(gt.Provider,{value:ut},Ce)},to=t=>{const e=h.useContext(gt),n=h.useContext(Xh);return h.createElement(ET,Object.assign({parentContext:e,legacyLocale:n},t))};to.ConfigContext=gt;to.SizeContext=ma;to.config=xT;to.useConfig=xP;Object.defineProperty(to,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&Ri(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),ma)});process.env.NODE_ENV!=="production"&&(to.displayName="ConfigProvider");var $T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function bS(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function OT(t){return bS(t)instanceof ShadowRoot}function oc(t){return OT(t)?bS(t):null}function MT(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function NT(t,e){at(t,"[@ant-design/icons] ".concat(e))}function Hg(t){return Ue(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(Ue(t.icon)==="object"||typeof t.icon=="function")}function Vg(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[MT(n)]=r}return e},{})}function Mf(t,e,n){return n?E.createElement(t.tag,j(j({key:e},Vg(t.attrs)),n),(t.children||[]).map(function(r,o){return Mf(r,"".concat(e,"-").concat(t.tag,"-").concat(o))})):E.createElement(t.tag,j({key:e},Vg(t.attrs)),(t.children||[]).map(function(r,o){return Mf(r,"".concat(e,"-").concat(t.tag,"-").concat(o))}))}function yS(t){return ps(t)[0]}function CS(t){return t?Array.isArray(t)?t:[t]:[]}var RT=`
181
181
  .anticon {
182
182
  display: inline-flex;
183
183
  align-items: center;
@@ -278,7 +278,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
278
278
  & > ${e}-header`]:{borderRadius:`0 0 ${U(l)} ${U(l)}`}},[`> ${e}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:p,lineHeight:v,cursor:"pointer",transition:`all ${w}, visibility 0s`},va(t)),{[`> ${e}-header-text`]:{flex:"auto"},[`${e}-expand-icon`]:{height:M,display:"flex",alignItems:"center",paddingInlineEnd:y},[`${e}-arrow`]:Object.assign(Object.assign({},Ii()),{fontSize:$,transition:`transform ${w}`,svg:{transition:`transform ${w}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}}),[`${e}-collapsible-header`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"}},[`${e}-collapsible-icon`]:{cursor:"unset",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-content`]:{color:f,backgroundColor:n,borderTop:N,[`& > ${e}-content-box`]:{padding:R},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:a,paddingInlineStart:x,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(C).sub(x).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:C}}},"&-large":{[`> ${e}-item`]:{fontSize:g,lineHeight:b,[`> ${e}-header`]:{padding:s,paddingInlineStart:r,[`> ${e}-expand-icon`]:{height:O,marginInlineStart:t.calc(S).sub(r).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:S}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-content`]:{borderRadius:`0 0 ${U(l)} ${U(l)}`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:y}}}}})}},kk=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},Dk=t=>{const{componentCls:e,headerBg:n,borderlessContentPadding:r,borderlessContentBg:o,colorBorder:i}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${i}`},[`
279
279
  > ${e}-item:last-child,
280
280
  > ${e}-item:last-child ${e}-header
281
- `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:o,borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{padding:r}}}},_k=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},jk=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer,borderlessContentPadding:`${t.paddingXXS}px 16px ${t.padding}px`,borderlessContentBg:"transparent"}),Bk=Yt("Collapse",t=>{const e=Mt(t,{collapseHeaderPaddingSM:`${U(t.paddingXS)} ${U(t.paddingSM)}`,collapseHeaderPaddingLG:`${U(t.padding)} ${U(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[Ak(e),Dk(e),_k(e),kk(e),qS(e)]},jk),KS=h.forwardRef((t,e)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:a}=hr("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:p,expandIconPosition:m="start",children:g,destroyInactivePanel:v,destroyOnHidden:b,expandIcon:y}=t,C=Er(A=>{var k;return(k=p??A)!==null&&k!==void 0?k:"middle"}),S=n("collapse",s),x=n(),[w,$,R]=Bk(S);if(process.env.NODE_ENV!=="production"){const A=Kt("Collapse");process.env.NODE_ENV!=="production"&&A(m!=="left"&&m!=="right","deprecated","`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead."),A.deprecated(!("destroyInactivePanel"in t),"destroyInactivePanel","destroyOnHidden")}const M=h.useMemo(()=>m==="left"?"start":m==="right"?"end":m,[m]),O=y??o,N=h.useCallback((A={})=>{const k=typeof O=="function"?O(A):h.createElement(vs,{rotate:A.isActive?r==="rtl"?-90:90:void 0,"aria-label":A.isActive?"expanded":"collapsed"});return xr(k,()=>{var B;return{className:G.cn((B=k==null?void 0:k.props)===null||B===void 0?void 0:B.className,`${S}-arrow`)}})},[O,S]),I=G.cn(`${S}-icon-position-${M}`,{[`${S}-borderless`]:!d,[`${S}-rtl`]:r==="rtl",[`${S}-ghost`]:!!f,[`${S}-${C}`]:C!=="middle"},i,l,c,$,R),T=Object.assign(Object.assign({},RS(x)),{motionAppear:!1,leavedClassName:`${S}-content-hidden`}),P=h.useMemo(()=>g?dr(g).map((A,k)=>{var B,_;const F=A.props;if(F!=null&&F.disabled){const H=(B=A.key)!==null&&B!==void 0?B:String(k),K=Object.assign(Object.assign({},vn(A.props,["disabled"])),{key:H,collapsible:(_=F.collapsible)!==null&&_!==void 0?_:"disabled"});return xr(A,K)}return A}):null,[g]);return w(h.createElement(tp,Object.assign({ref:e,openMotion:T},vn(t,["rootClassName"]),{expandIcon:N,prefixCls:S,className:I,style:Object.assign(Object.assign({},a),u),destroyInactivePanel:b??v}),P))});process.env.NODE_ENV!=="production"&&(KS.displayName="Collapse");const zk=Object.assign(KS,{Panel:nk}),Ln=t=>t instanceof lr?t:new lr(t),Il=t=>Math.round(Number(t||0)),ap=t=>Il(t.toHsb().a*100),Pl=(t,e)=>{const n=t.toRgb();if(!n.r&&!n.g&&!n.b){const r=t.toHsb();return r.a=1,Ln(r)}return n.a=1,Ln(n)},GS=(t,e)=>{const n=[{percent:0,color:t[0].color}].concat(he(t),[{percent:100,color:t[t.length-1].color}]);for(let r=0;r<n.length-1;r+=1){const o=n[r].percent,i=n[r+1].percent,a=n[r].color,s=n[r+1].color;if(o<=e&&e<=i){const l=i-o;if(l===0)return a;const c=(e-o)/l*100,u=new _r(a),d=new _r(s);return u.mix(d,c).toRgbString()}}return""},nd=t=>t.map(e=>(e.colors=e.colors.map(Ln),e)),US=(t,e)=>{const{r:n,g:r,b:o,a:i}=t.toRgb(),a=new _r(t.toRgbString()).onBackground(e).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},ev=(t,e)=>{var n;return`panel-${(n=t.key)!==null&&n!==void 0?n:e}`},Lk=({prefixCls:t,presets:e,value:n,onChange:r})=>{const[o]=Qr("ColorPicker"),[,i]=er(),[a]=en(nd(e),{value:nd(e),postState:nd}),s=`${t}-presets`,l=E.useMemo(()=>a.reduce((d,f,p)=>{const{defaultOpen:m=!0}=f;return m&&d.push(ev(f,p)),d},[]),[a]),c=d=>{r==null||r(d)},u=a.map((d,f)=>{var p;return{key:ev(d,f),label:E.createElement("div",{className:`${s}-label`},d==null?void 0:d.label),children:E.createElement("div",{className:`${s}-items`},Array.isArray(d==null?void 0:d.colors)&&((p=d.colors)===null||p===void 0?void 0:p.length)>0?d.colors.map((m,g)=>E.createElement(ep,{key:`preset-${g}-${m.toHexString()}`,color:Ln(m).toRgbString(),prefixCls:t,className:G.cn(`${s}-color`,{[`${s}-color-checked`]:m.toHexString()===(n==null?void 0:n.toHexString()),[`${s}-color-bright`]:US(m,i.colorBgElevated)}),onClick:()=>c(m)})):E.createElement("span",{className:`${s}-empty`},o.presetEmpty))}});return E.createElement("div",{className:s},E.createElement(zk,{defaultActiveKey:l,ghost:!0,items:u}))},XS=t=>{const{paddingInline:e,onlyIconSize:n}=t;return Mt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},YS=t=>{var e,n,r,o,i,a;const s=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,c=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(o=t.contentLineHeight)!==null&&o!==void 0?o:Nl(s),d=(i=t.contentLineHeightSM)!==null&&i!==void 0?i:Nl(l),f=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:Nl(c),p=US(new lr(t.colorBgSolid),"#fff")?"#000":"#fff",m=Vo.reduce((g,v)=>Object.assign(Object.assign({},g),{[`${v}ShadowColor`]:`0 ${U(t.controlOutlineWidth)} 0 ${La(t[`${v}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},m),{fontWeight:400,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:p,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((t.controlHeight-s*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*f)/2-t.lineWidth,0)})},Fk=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,marginXS:s,calc:l}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:t.marginXS,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${U(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:Ii(),"> a":{color:"currentColor"},"&:not(:disabled)":va(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"},[`&${e}-round`]:{width:"auto"}},[`&${e}-loading`]:{opacity:o,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},JS=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),Hk=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Vk=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.calc(t.controlHeight).div(2).equal(),paddingInlineEnd:t.calc(t.controlHeight).div(2).equal()}),Wk=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Vc=(t,e,n,r,o,i,a,s)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},JS(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),qk=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},Wk(t))}),Kk=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),Wc=(t,e,n,r)=>{const i=r&&["link","text"].includes(r)?Kk:qk;return Object.assign(Object.assign({},i(t)),JS(t.componentCls,e,n))},qc=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},Wc(t,r,o))}),Kc=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},Wc(t,r,o))}),Gc=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Uc=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},Wc(t,n,r))}),Jr=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},Wc(t,r,o,n))}),Gk=t=>{const{componentCls:e}=t;return Vo.reduce((n,r)=>{const o=t[`${r}6`],i=t[`${r}1`],a=t[`${r}5`],s=t[`${r}2`],l=t[`${r}3`],c=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:o,boxShadow:t[`${r}ShadowColor`]},qc(t,t.colorTextLightSolid,o,{background:a},{background:c})),Kc(t,o,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),Gc(t)),Uc(t,i,{background:s},{background:l})),Jr(t,o,"link",{color:a},{color:c})),Jr(t,o,"text",{color:a,background:i},{color:c,background:l}))})},{})},Uk=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},qc(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),Gc(t)),Uc(t,t.colorFillTertiary,{background:t.colorFillSecondary},{background:t.colorFill})),Vc(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),Jr(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),Xk=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Kc(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),Gc(t)),Uc(t,t.colorPrimaryBg,{background:t.colorPrimaryBgHover},{background:t.colorPrimaryBorder})),Jr(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),Jr(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Vc(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),Yk=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},qc(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Kc(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Gc(t)),Uc(t,t.colorErrorBg,{background:t.colorErrorBgFilledHover},{background:t.colorErrorBgActive})),Jr(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Jr(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Vc(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Jk=t=>Object.assign(Object.assign({},Jr(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Vc(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),Zk=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:Uk(t),[`${e}-color-primary`]:Xk(t),[`${e}-color-dangerous`]:Yk(t),[`${e}-color-link`]:Jk(t)},Gk(t))},Qk=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Kc(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Jr(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),qc(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Jr(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),sp=(t,e="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=t;return[{[e]:{fontSize:o,height:r,padding:`${U(l)} ${U(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${e}`]:Hk(t)},{[`${n}${n}-round${e}`]:Vk(t)}]},eD=t=>{const e=Mt(t,{fontSize:t.contentFontSize});return sp(e,t.componentCls)},tD=t=>{const e=Mt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return sp(e,`${t.componentCls}-sm`)},nD=t=>{const e=Mt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return sp(e,`${t.componentCls}-lg`)},rD=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},oD=Yt("Button",t=>{const e=XS(t);return[Fk(e),eD(e),tD(e),nD(e),rD(e),Zk(e),Qk(e),AA(e)]},YS,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function iD(t,e,n){const{focusElCls:r,focus:o,borderElCls:i}=n,a=i?"> *":"",s=["hover",o?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function aD(t,e,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Ps(t,e={focus:!0}){const{componentCls:n}=t,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},iD(t,r,e)),aD(n,r,e))}}function sD(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function lD(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function cD(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},sD(t,e)),lD(t.componentCls,e))}}const uD=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:o}=t,i=o(r).mul(-1).equal(),a=s=>{const l=`${e}-compact${s?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?i:0,insetInlineStart:s?0:i,backgroundColor:n,content:'""',width:s?"100%":r,height:s?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},dD=rS(["Button","compact"],t=>{const e=XS(t);return[Ps(e),cD(e),uD(e)]},YS);var fD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function hD(t){if(typeof t=="object"&&t){let e=t==null?void 0:t.delay;return e=!Number.isNaN(e)&&typeof e=="number"?e:0,{loading:e<=0,delay:e}}return{loading:!!t,delay:0}}const pD={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},mD=E.forwardRef((t,e)=>{var n,r;const{loading:o=!1,prefixCls:i,color:a,variant:s,type:l,danger:c=!1,shape:u="default",size:d,styles:f,disabled:p,className:m,rootClassName:g,children:v,icon:b,iconPosition:y="start",ghost:C=!1,block:S=!1,htmlType:x="button",classNames:w,style:$={},autoInsertSpace:R,autoFocus:M}=t,O=fD(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),N=l||"default",{button:I}=E.useContext(gt),[T,P]=E.useMemo(()=>{if(a&&s)return[a,s];if(l||c){const Ie=pD[N]||[];return c?["danger",Ie[1]]:Ie}return I!=null&&I.color&&(I!=null&&I.variant)?[I.color,I.variant]:["default","outlined"]},[l,a,s,c,I==null?void 0:I.variant,I==null?void 0:I.color]),k=T==="danger"?"dangerous":T,{getPrefixCls:B,direction:_,autoInsertSpace:F,className:H,style:K,classNames:V,styles:W}=hr("button"),z=(n=R??F)!==null&&n!==void 0?n:!0,L=B("btn",i),[J,ne,q]=oD(L),re=E.useContext(Dr),ae=p??re,ee=E.useContext(kS),Y=E.useMemo(()=>hD(o),[o]),[te,Z]=E.useState(Y.loading),[Q,oe]=E.useState(!1),ce=E.useRef(null),se=Yo(e,ce),le=E.Children.count(v)===1&&!b&&!sl(P),be=E.useRef(!0);E.useEffect(()=>(be.current=!1,()=>{be.current=!0}),[]),E.useEffect(()=>{let Ie=null;Y.delay>0?Ie=setTimeout(()=>{Ie=null,Z(!0)},Y.delay):Z(Y.loading);function xe(){Ie&&(clearTimeout(Ie),Ie=null)}return xe},[Y]),E.useEffect(()=>{if(!ce.current||!z)return;const Ie=ce.current.textContent||"";le&&If(Ie)?Q||oe(!0):Q&&oe(!1)}),E.useEffect(()=>{M&&ce.current&&ce.current.focus()},[]);const ye=E.useCallback(Ie=>{var xe;if(te||ae){Ie.preventDefault();return}(xe=t.onClick)===null||xe===void 0||xe.call(t,("href"in t,Ie))},[t.onClick,te,ae]);if(process.env.NODE_ENV!=="production"){const Ie=Kt("Button");process.env.NODE_ENV!=="production"&&Ie(!(typeof b=="string"&&b.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${b}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&Ie(!(C&&sl(P)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:Be,compactItemClassnames:de}=Zo(L,_),ue={large:"lg",small:"sm",middle:void 0},pe=Er(Ie=>{var xe,ot;return(ot=(xe=d??Be)!==null&&xe!==void 0?xe:ee)!==null&&ot!==void 0?ot:Ie}),Ae=pe&&(r=ue[pe])!==null&&r!==void 0?r:"",_e=te?"loading":b,Re=vn(O,["navigate"]),$e=G.cn(L,ne,q,{[`${L}-${u}`]:u!=="default"&&u,[`${L}-${N}`]:N,[`${L}-dangerous`]:c,[`${L}-color-${k}`]:k,[`${L}-variant-${P}`]:P,[`${L}-${Ae}`]:Ae,[`${L}-icon-only`]:!v&&v!==0&&!!_e,[`${L}-background-ghost`]:C&&!sl(P),[`${L}-loading`]:te,[`${L}-two-chinese-chars`]:Q&&z&&!te,[`${L}-block`]:S,[`${L}-rtl`]:_==="rtl",[`${L}-icon-end`]:y==="end"},de,m,g,H),We=Object.assign(Object.assign({},K),$),ke=G.cn(w==null?void 0:w.icon,V.icon),De=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),W.icon||{}),me=b&&!te?E.createElement(Pf,{prefixCls:L,className:ke,style:De},b):o&&typeof o=="object"&&o.icon?E.createElement(Pf,{prefixCls:L,className:ke,style:De},o.icon):E.createElement(TA,{existIcon:!!b,prefixCls:L,loading:te,mount:be.current}),Ne=v||v===0?PA(v,le&&z):null;if(Re.href!==void 0)return J(E.createElement("a",Object.assign({},Re,{className:G.cn($e,{[`${L}-disabled`]:ae}),href:ae?void 0:Re.href,style:We,onClick:ye,ref:se,tabIndex:ae?-1:0}),me,Ne));let Ze=E.createElement("button",Object.assign({},O,{type:x,className:$e,style:We,onClick:ye,disabled:ae,ref:se}),me,Ne,de&&E.createElement(dD,{prefixCls:L}));return sl(P)||(Ze=E.createElement(PS,{component:"Button",disabled:te},Ze)),J(Ze)}),mo=mD;mo.Group=RA;mo.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(mo.displayName="Button");function rd(t){return!!(t!=null&&t.then)}const ZS=t=>{const{type:e,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=t,d=h.useRef(!1),f=h.useRef(null),[p,m]=ga(!1),g=(...y)=>{i==null||i.apply(void 0,y)};h.useEffect(()=>{let y=null;return a&&(y=setTimeout(()=>{var C;(C=f.current)===null||C===void 0||C.focus({preventScroll:!0})})),()=>{y&&clearTimeout(y)}},[]);const v=y=>{rd(y)&&(m(!0),y.then((...C)=>{m(!1,!0),g.apply(void 0,C),d.current=!1},C=>{if(m(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(C)}))},b=y=>{if(d.current)return;if(d.current=!0,!u){g();return}let C;if(s){if(C=u(y),c&&!rd(C)){d.current=!1,g(y);return}}else if(u.length)C=u(i),d.current=!1;else if(C=u(),!rd(C)){g();return}v(C)};return h.createElement(mo,Object.assign({},DS(e),{onClick:b,loading:p,prefixCls:r},o,{ref:f}),n)},Ts=E.createContext({}),{Provider:QS}=Ts,tv=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:s,onConfirm:l}=E.useContext(Ts);return o?E.createElement(ZS,{isSilent:r,actionFn:s,close:(...c)=>{a==null||a.apply(void 0,c),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${i}-btn`},n):null},nv=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:s,onOk:l}=E.useContext(Ts);return E.createElement(ZS,{isSilent:n,type:a||"primary",actionFn:l,close:(...c)=>{e==null||e.apply(void 0,c),s==null||s(!0)},autoFocus:t==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)};var ex=h.createContext(null),rv=[];function gD(t,e){var n=h.useState(function(){if(!zn())return null;var m=document.createElement("div");return process.env.NODE_ENV!=="production"&&e&&m.setAttribute("data-debug",e),m}),r=X(n,1),o=r[0],i=h.useRef(!1),a=h.useContext(ex),s=h.useState(rv),l=X(s,2),c=l[0],u=l[1],d=a||(i.current?void 0:function(m){u(function(g){var v=[m].concat(he(g));return v})});function f(){o.parentElement||document.body.appendChild(o),i.current=!0}function p(){var m;(m=o.parentElement)===null||m===void 0||m.removeChild(o),i.current=!1}return zt(function(){return t?a?a(f):f():p(),p},[t]),zt(function(){c.length&&(c.forEach(function(m){return m()}),u(rv))},[c]),[o,d]}function vD(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var o,i;if(t){var a=getComputedStyle(t);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";po(`
281
+ `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:o,borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{padding:r}}}},_k=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},jk=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer,borderlessContentPadding:`${t.paddingXXS}px 16px ${t.padding}px`,borderlessContentBg:"transparent"}),Bk=Yt("Collapse",t=>{const e=Mt(t,{collapseHeaderPaddingSM:`${U(t.paddingXS)} ${U(t.paddingSM)}`,collapseHeaderPaddingLG:`${U(t.padding)} ${U(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[Ak(e),Dk(e),_k(e),kk(e),qS(e)]},jk),KS=h.forwardRef((t,e)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:a}=hr("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:p,expandIconPosition:m="start",children:g,destroyInactivePanel:v,destroyOnHidden:b,expandIcon:y}=t,C=Er(A=>{var k;return(k=p??A)!==null&&k!==void 0?k:"middle"}),S=n("collapse",s),x=n(),[w,$,R]=Bk(S);if(process.env.NODE_ENV!=="production"){const A=Kt("Collapse");process.env.NODE_ENV!=="production"&&A(m!=="left"&&m!=="right","deprecated","`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead."),A.deprecated(!("destroyInactivePanel"in t),"destroyInactivePanel","destroyOnHidden")}const M=h.useMemo(()=>m==="left"?"start":m==="right"?"end":m,[m]),O=y??o,N=h.useCallback((A={})=>{const k=typeof O=="function"?O(A):h.createElement(vs,{rotate:A.isActive?r==="rtl"?-90:90:void 0,"aria-label":A.isActive?"expanded":"collapsed"});return xr(k,()=>{var B;return{className:G.cn((B=k==null?void 0:k.props)===null||B===void 0?void 0:B.className,`${S}-arrow`)}})},[O,S]),I=G.cn(`${S}-icon-position-${M}`,{[`${S}-borderless`]:!d,[`${S}-rtl`]:r==="rtl",[`${S}-ghost`]:!!f,[`${S}-${C}`]:C!=="middle"},i,l,c,$,R),T=Object.assign(Object.assign({},RS(x)),{motionAppear:!1,leavedClassName:`${S}-content-hidden`}),P=h.useMemo(()=>g?dr(g).map((A,k)=>{var B,_;const F=A.props;if(F!=null&&F.disabled){const H=(B=A.key)!==null&&B!==void 0?B:String(k),K=Object.assign(Object.assign({},vn(A.props,["disabled"])),{key:H,collapsible:(_=F.collapsible)!==null&&_!==void 0?_:"disabled"});return xr(A,K)}return A}):null,[g]);return w(h.createElement(tp,Object.assign({ref:e,openMotion:T},vn(t,["rootClassName"]),{expandIcon:N,prefixCls:S,className:I,style:Object.assign(Object.assign({},a),u),destroyInactivePanel:b??v}),P))});process.env.NODE_ENV!=="production"&&(KS.displayName="Collapse");const zk=Object.assign(KS,{Panel:nk}),Ln=t=>t instanceof lr?t:new lr(t),Il=t=>Math.round(Number(t||0)),ap=t=>Il(t.toHsb().a*100),Pl=(t,e)=>{const n=t.toRgb();if(!n.r&&!n.g&&!n.b){const r=t.toHsb();return r.a=1,Ln(r)}return n.a=1,Ln(n)},GS=(t,e)=>{const n=[{percent:0,color:t[0].color}].concat(he(t),[{percent:100,color:t[t.length-1].color}]);for(let r=0;r<n.length-1;r+=1){const o=n[r].percent,i=n[r+1].percent,a=n[r].color,s=n[r+1].color;if(o<=e&&e<=i){const l=i-o;if(l===0)return a;const c=(e-o)/l*100,u=new _r(a),d=new _r(s);return u.mix(d,c).toRgbString()}}return""},nd=t=>t.map(e=>(e.colors=e.colors.map(Ln),e)),US=(t,e)=>{const{r:n,g:r,b:o,a:i}=t.toRgb(),a=new _r(t.toRgbString()).onBackground(e).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},ev=(t,e)=>{var n;return`panel-${(n=t.key)!==null&&n!==void 0?n:e}`},Lk=({prefixCls:t,presets:e,value:n,onChange:r})=>{const[o]=Qr("ColorPicker"),[,i]=er(),[a]=en(nd(e),{value:nd(e),postState:nd}),s=`${t}-presets`,l=E.useMemo(()=>a.reduce((d,f,p)=>{const{defaultOpen:m=!0}=f;return m&&d.push(ev(f,p)),d},[]),[a]),c=d=>{r==null||r(d)},u=a.map((d,f)=>{var p;return{key:ev(d,f),label:E.createElement("div",{className:`${s}-label`},d==null?void 0:d.label),children:E.createElement("div",{className:`${s}-items`},Array.isArray(d==null?void 0:d.colors)&&((p=d.colors)===null||p===void 0?void 0:p.length)>0?d.colors.map((m,g)=>E.createElement(ep,{key:`preset-${g}-${m.toHexString()}`,color:Ln(m).toRgbString(),prefixCls:t,className:G.cn(`${s}-color`,{[`${s}-color-checked`]:m.toHexString()===(n==null?void 0:n.toHexString()),[`${s}-color-bright`]:US(m,i.colorBgElevated)}),onClick:()=>c(m)})):E.createElement("span",{className:`${s}-empty`},o.presetEmpty))}});return E.createElement("div",{className:s},E.createElement(zk,{defaultActiveKey:l,ghost:!0,items:u}))},XS=t=>{const{paddingInline:e,onlyIconSize:n}=t;return Mt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},YS=t=>{var e,n,r,o,i,a;const s=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,c=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(o=t.contentLineHeight)!==null&&o!==void 0?o:Nl(s),d=(i=t.contentLineHeightSM)!==null&&i!==void 0?i:Nl(l),f=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:Nl(c),p=US(new lr(t.colorBgSolid),"#fff")?"#000":"#fff",m=Vo.reduce((g,v)=>Object.assign(Object.assign({},g),{[`${v}ShadowColor`]:`0 ${U(t.controlOutlineWidth)} 0 ${La(t[`${v}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},m),{fontWeight:400,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:p,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((t.controlHeight-s*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*f)/2-t.lineWidth,0)})},Fk=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,marginXS:s,calc:l}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:t.marginXS,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${U(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:Ii(),"> a":{color:"currentColor"},"&:not(:disabled)":va(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"},[`&${e}-round`]:{width:"auto"}},[`&${e}-loading`]:{opacity:o,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},JS=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),Hk=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Vk=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.calc(t.controlHeight).div(2).equal(),paddingInlineEnd:t.calc(t.controlHeight).div(2).equal()}),Wk=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Vc=(t,e,n,r,o,i,a,s)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},JS(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),qk=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},Wk(t))}),Kk=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),Wc=(t,e,n,r)=>{const i=r&&["link","text"].includes(r)?Kk:qk;return Object.assign(Object.assign({},i(t)),JS(t.componentCls,e,n))},qc=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},Wc(t,r,o))}),Kc=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},Wc(t,r,o))}),Gc=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Uc=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},Wc(t,n,r))}),Jr=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},Wc(t,r,o,n))}),Gk=t=>{const{componentCls:e}=t;return Vo.reduce((n,r)=>{const o=t[`${r}6`],i=t[`${r}1`],a=t[`${r}5`],s=t[`${r}2`],l=t[`${r}3`],c=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:o,boxShadow:t[`${r}ShadowColor`]},qc(t,t.colorTextLightSolid,o,{background:a},{background:c})),Kc(t,o,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),Gc(t)),Uc(t,i,{background:s},{background:l})),Jr(t,o,"link",{color:a},{color:c})),Jr(t,o,"text",{color:a,background:i},{color:c,background:l}))})},{})},Uk=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},qc(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),Gc(t)),Uc(t,t.colorFillTertiary,{background:t.colorFillSecondary},{background:t.colorFill})),Vc(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),Jr(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),Xk=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Kc(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),Gc(t)),Uc(t,t.colorPrimaryBg,{background:t.colorPrimaryBgHover},{background:t.colorPrimaryBorder})),Jr(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),Jr(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Vc(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),Yk=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},qc(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Kc(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Gc(t)),Uc(t,t.colorErrorBg,{background:t.colorErrorBgFilledHover},{background:t.colorErrorBgActive})),Jr(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Jr(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Vc(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Jk=t=>Object.assign(Object.assign({},Jr(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Vc(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),Zk=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:Uk(t),[`${e}-color-primary`]:Xk(t),[`${e}-color-dangerous`]:Yk(t),[`${e}-color-link`]:Jk(t)},Gk(t))},Qk=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Kc(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Jr(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),qc(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Jr(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),sp=(t,e="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=t;return[{[e]:{fontSize:o,height:r,padding:`${U(l)} ${U(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${e}`]:Hk(t)},{[`${n}${n}-round${e}`]:Vk(t)}]},eD=t=>{const e=Mt(t,{fontSize:t.contentFontSize});return sp(e,t.componentCls)},tD=t=>{const e=Mt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return sp(e,`${t.componentCls}-sm`)},nD=t=>{const e=Mt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return sp(e,`${t.componentCls}-lg`)},rD=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},oD=Yt("Button",t=>{const e=XS(t);return[Fk(e),eD(e),tD(e),nD(e),rD(e),Zk(e),Qk(e),AA(e)]},YS,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function iD(t,e,n){const{focusElCls:r,focus:o,borderElCls:i}=n,a=i?"> *":"",s=["hover",o?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function aD(t,e,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Ps(t,e={focus:!0}){const{componentCls:n}=t,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},iD(t,r,e)),aD(n,r,e))}}function sD(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function lD(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function cD(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},sD(t,e)),lD(t.componentCls,e))}}const uD=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:o}=t,i=o(r).mul(-1).equal(),a=s=>{const l=`${e}-compact${s?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?i:0,insetInlineStart:s?0:i,backgroundColor:n,content:'""',width:s?"100%":r,height:s?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},dD=rS(["Button","compact"],t=>{const e=XS(t);return[Ps(e),cD(e),uD(e)]},YS);var fD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function hD(t){if(typeof t=="object"&&t){let e=t==null?void 0:t.delay;return e=!Number.isNaN(e)&&typeof e=="number"?e:0,{loading:e<=0,delay:e}}return{loading:!!t,delay:0}}const pD={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},mD=E.forwardRef((t,e)=>{var n,r;const{loading:o=!1,prefixCls:i,color:a,variant:s,type:l,danger:c=!1,shape:u="default",size:d,styles:f,disabled:p,className:m,rootClassName:g,children:v,icon:b,iconPosition:y="start",ghost:C=!1,block:S=!1,htmlType:x="button",classNames:w,style:$={},autoInsertSpace:R,autoFocus:M}=t,O=fD(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),N=l||"default",{button:I}=E.useContext(gt),[T,P]=E.useMemo(()=>{if(a&&s)return[a,s];if(l||c){const Ie=pD[N]||[];return c?["danger",Ie[1]]:Ie}return I!=null&&I.color&&(I!=null&&I.variant)?[I.color,I.variant]:["default","outlined"]},[l,a,s,c,I==null?void 0:I.variant,I==null?void 0:I.color]),k=T==="danger"?"dangerous":T,{getPrefixCls:B,direction:_,autoInsertSpace:F,className:H,style:K,classNames:V,styles:W}=hr("button"),z=(n=R??F)!==null&&n!==void 0?n:!0,L=B("btn",i),[J,ne,q]=oD(L),re=E.useContext(Dr),ae=p??re,ee=E.useContext(kS),Y=E.useMemo(()=>hD(o),[o]),[te,Z]=E.useState(Y.loading),[Q,ie]=E.useState(!1),ce=E.useRef(null),se=Yo(e,ce),le=E.Children.count(v)===1&&!b&&!sl(P),be=E.useRef(!0);E.useEffect(()=>(be.current=!1,()=>{be.current=!0}),[]),E.useEffect(()=>{let Ie=null;Y.delay>0?Ie=setTimeout(()=>{Ie=null,Z(!0)},Y.delay):Z(Y.loading);function xe(){Ie&&(clearTimeout(Ie),Ie=null)}return xe},[Y]),E.useEffect(()=>{if(!ce.current||!z)return;const Ie=ce.current.textContent||"";le&&If(Ie)?Q||ie(!0):Q&&ie(!1)}),E.useEffect(()=>{M&&ce.current&&ce.current.focus()},[]);const ye=E.useCallback(Ie=>{var xe;if(te||ae){Ie.preventDefault();return}(xe=t.onClick)===null||xe===void 0||xe.call(t,("href"in t,Ie))},[t.onClick,te,ae]);if(process.env.NODE_ENV!=="production"){const Ie=Kt("Button");process.env.NODE_ENV!=="production"&&Ie(!(typeof b=="string"&&b.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${b}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&Ie(!(C&&sl(P)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:Be,compactItemClassnames:de}=Zo(L,_),ue={large:"lg",small:"sm",middle:void 0},pe=Er(Ie=>{var xe,ot;return(ot=(xe=d??Be)!==null&&xe!==void 0?xe:ee)!==null&&ot!==void 0?ot:Ie}),Ae=pe&&(r=ue[pe])!==null&&r!==void 0?r:"",_e=te?"loading":b,Re=vn(O,["navigate"]),$e=G.cn(L,ne,q,{[`${L}-${u}`]:u!=="default"&&u,[`${L}-${N}`]:N,[`${L}-dangerous`]:c,[`${L}-color-${k}`]:k,[`${L}-variant-${P}`]:P,[`${L}-${Ae}`]:Ae,[`${L}-icon-only`]:!v&&v!==0&&!!_e,[`${L}-background-ghost`]:C&&!sl(P),[`${L}-loading`]:te,[`${L}-two-chinese-chars`]:Q&&z&&!te,[`${L}-block`]:S,[`${L}-rtl`]:_==="rtl",[`${L}-icon-end`]:y==="end"},de,m,g,H),We=Object.assign(Object.assign({},K),$),ke=G.cn(w==null?void 0:w.icon,V.icon),De=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),W.icon||{}),me=b&&!te?E.createElement(Pf,{prefixCls:L,className:ke,style:De},b):o&&typeof o=="object"&&o.icon?E.createElement(Pf,{prefixCls:L,className:ke,style:De},o.icon):E.createElement(TA,{existIcon:!!b,prefixCls:L,loading:te,mount:be.current}),Ne=v||v===0?PA(v,le&&z):null;if(Re.href!==void 0)return J(E.createElement("a",Object.assign({},Re,{className:G.cn($e,{[`${L}-disabled`]:ae}),href:ae?void 0:Re.href,style:We,onClick:ye,ref:se,tabIndex:ae?-1:0}),me,Ne));let Ze=E.createElement("button",Object.assign({},O,{type:x,className:$e,style:We,onClick:ye,disabled:ae,ref:se}),me,Ne,de&&E.createElement(dD,{prefixCls:L}));return sl(P)||(Ze=E.createElement(PS,{component:"Button",disabled:te},Ze)),J(Ze)}),mo=mD;mo.Group=RA;mo.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(mo.displayName="Button");function rd(t){return!!(t!=null&&t.then)}const ZS=t=>{const{type:e,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=t,d=h.useRef(!1),f=h.useRef(null),[p,m]=ga(!1),g=(...y)=>{i==null||i.apply(void 0,y)};h.useEffect(()=>{let y=null;return a&&(y=setTimeout(()=>{var C;(C=f.current)===null||C===void 0||C.focus({preventScroll:!0})})),()=>{y&&clearTimeout(y)}},[]);const v=y=>{rd(y)&&(m(!0),y.then((...C)=>{m(!1,!0),g.apply(void 0,C),d.current=!1},C=>{if(m(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(C)}))},b=y=>{if(d.current)return;if(d.current=!0,!u){g();return}let C;if(s){if(C=u(y),c&&!rd(C)){d.current=!1,g(y);return}}else if(u.length)C=u(i),d.current=!1;else if(C=u(),!rd(C)){g();return}v(C)};return h.createElement(mo,Object.assign({},DS(e),{onClick:b,loading:p,prefixCls:r},o,{ref:f}),n)},Ts=E.createContext({}),{Provider:QS}=Ts,tv=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:s,onConfirm:l}=E.useContext(Ts);return o?E.createElement(ZS,{isSilent:r,actionFn:s,close:(...c)=>{a==null||a.apply(void 0,c),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${i}-btn`},n):null},nv=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:s,onOk:l}=E.useContext(Ts);return E.createElement(ZS,{isSilent:n,type:a||"primary",actionFn:l,close:(...c)=>{e==null||e.apply(void 0,c),s==null||s(!0)},autoFocus:t==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)};var ex=h.createContext(null),rv=[];function gD(t,e){var n=h.useState(function(){if(!zn())return null;var m=document.createElement("div");return process.env.NODE_ENV!=="production"&&e&&m.setAttribute("data-debug",e),m}),r=X(n,1),o=r[0],i=h.useRef(!1),a=h.useContext(ex),s=h.useState(rv),l=X(s,2),c=l[0],u=l[1],d=a||(i.current?void 0:function(m){u(function(g){var v=[m].concat(he(g));return v})});function f(){o.parentElement||document.body.appendChild(o),i.current=!0}function p(){var m;(m=o.parentElement)===null||m===void 0||m.removeChild(o),i.current=!1}return zt(function(){return t?a?a(f):f():p(),p},[t]),zt(function(){c.length&&(c.forEach(function(m){return m()}),u(rv))},[c]),[o,d]}function vD(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var o,i;if(t){var a=getComputedStyle(t);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";po(`
282
282
  #`.concat(e,`::-webkit-scrollbar {
283
283
  `).concat(u,`
284
284
  `).concat(d,`
@@ -286,7 +286,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
286
286
  html body {
287
287
  overflow-y: hidden;
288
288
  `.concat(a?"width: calc(100% - ".concat(i,"px);"):"",`
289
- }`),o)}else ds(o);return function(){ds(o)}},[e,o])}var xD=!1;function wD(t){return xD}var iv=function(e){return e===!1?!1:!zn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},Xc=h.forwardRef(function(t,e){var n=t.open,r=t.autoLock,o=t.getContainer,i=t.debug,a=t.autoDestroy,s=a===void 0?!0:a,l=t.children,c=h.useState(n),u=X(c,2),d=u[0],f=u[1],p=d||n;process.env.NODE_ENV!=="production"&&at(zn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),h.useEffect(function(){(s||n)&&f(n)},[n,s]);var m=h.useState(function(){return iv(o)}),g=X(m,2),v=g[0],b=g[1];h.useEffect(function(){var I=iv(o);b(I??null)});var y=gD(p&&!v,i),C=X(y,2),S=C[0],x=C[1],w=v??S;SD(r&&n&&zn()&&(w===S||w===document.body));var $=null;if(l&&Jo(l)&&e){var R=l;$=R.ref}var M=Yo($,e);if(!p||!zn()||v===void 0)return null;var O=w===!1||wD(),N=l;return e&&(N=h.cloneElement(l,{ref:M})),h.createElement(ex.Provider,{value:x},O?N:Ar.createPortal(N,w))});process.env.NODE_ENV!=="production"&&(Xc.displayName="Portal");var tx=h.createContext({});function ED(){var t=j({},h);return t.useId}var av=0,sv=ED();const Yc=sv?function(e){var n=sv();return e||(process.env.NODE_ENV==="test"?"test-id":n)}:function(e){var n=h.useState("ssr-id"),r=X(n,2),o=r[0],i=r[1];return h.useEffect(function(){var a=av;av+=1,i("rc_unique_".concat(a))},[]),e||(process.env.NODE_ENV==="test"?"test-id":o)};function lv(t,e,n){var r=e;return!r&&n&&(r="".concat(t,"-").concat(n)),r}function cv(t,e){var n=t["page".concat(e?"Y":"X","Offset")],r="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var o=t.document;n=o.documentElement[r],typeof n!="number"&&(n=o.body[r])}return n}function $D(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},r=t.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=cv(o),n.top+=cv(o,!0),n}const OD=h.memo(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var MD={width:0,height:0,overflow:"hidden",outline:"none"},ND={outline:"none"},lp=E.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,o=t.style,i=t.title,a=t.ariaId,s=t.footer,l=t.closable,c=t.closeIcon,u=t.onClose,d=t.children,f=t.bodyStyle,p=t.bodyProps,m=t.modalRender,g=t.onMouseDown,v=t.onMouseUp,b=t.holderRef,y=t.visible,C=t.forceRender,S=t.width,x=t.height,w=t.classNames,$=t.styles,R=E.useContext(tx),M=R.panel,O=Yo(b,M),N=E.useRef(),I=E.useRef();E.useImperativeHandle(e,function(){return{focus:function(){var V;(V=N.current)===null||V===void 0||V.focus({preventScroll:!0})},changeActive:function(V){var W=document,z=W.activeElement;V&&z===I.current?N.current.focus({preventScroll:!0}):!V&&z===N.current&&I.current.focus({preventScroll:!0})}}});var T={};S!==void 0&&(T.width=S),x!==void 0&&(T.height=x);var P=s?E.createElement("div",{className:G.cn("".concat(n,"-footer"),w==null?void 0:w.footer),style:j({},$==null?void 0:$.footer)},s):null,A=i?E.createElement("div",{className:G.cn("".concat(n,"-header"),w==null?void 0:w.header),style:j({},$==null?void 0:$.header)},E.createElement("div",{className:"".concat(n,"-title"),id:a},i)):null,k=E.useMemo(function(){return Ue(l)==="object"&&l!==null?l:l?{closeIcon:c??E.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),B=Yr(k,!0),_=Ue(l)==="object"&&l.disabled,F=l?E.createElement("button",ge({type:"button",onClick:u,"aria-label":"Close"},B,{className:"".concat(n,"-close"),disabled:_}),k.closeIcon):null,H=E.createElement("div",{className:G.cn("".concat(n,"-content"),w==null?void 0:w.content),style:$==null?void 0:$.content},F,A,E.createElement("div",ge({className:G.cn("".concat(n,"-body"),w==null?void 0:w.body),style:j(j({},f),$==null?void 0:$.body)},p),d),P);return E.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:O,style:j(j({},o),T),className:G.cn(n,r),onMouseDown:g,onMouseUp:v},E.createElement("div",{ref:N,tabIndex:0,style:ND},E.createElement(OD,{shouldUpdate:y||C},m?m(H):H)),E.createElement("div",{tabIndex:0,ref:I,style:MD}))});process.env.NODE_ENV!=="production"&&(lp.displayName="Panel");var nx=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.title,o=t.style,i=t.className,a=t.visible,s=t.forceRender,l=t.destroyOnClose,c=t.motionName,u=t.ariaId,d=t.onVisibleChanged,f=t.mousePosition,p=E.useRef(),m=h.useState(),g=X(m,2),v=g[0],b=g[1],y={};v&&(y.transformOrigin=v);function C(){var S=$D(p.current);b(f&&(f.x||f.y)?"".concat(f.x-S.left,"px ").concat(f.y-S.top,"px"):"")}return h.createElement(eo,{visible:a,onVisibleChanged:d,onAppearPrepare:C,onEnterPrepare:C,forceRender:s,motionName:c,removeOnLeave:l,ref:p},function(S,x){var w=S.className,$=S.style;return h.createElement(lp,ge({},t,{ref:e,title:r,ariaId:u,prefixCls:n,holderRef:x,style:j(j(j({},$),o),y),className:G.cn(i,w)}))})});nx.displayName="Content";var RD=function(e){var n=e.prefixCls,r=e.style,o=e.visible,i=e.maskProps,a=e.motionName,s=e.className;return h.createElement(eo,{key:"mask",visible:o,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return h.createElement("div",ge({ref:c,style:j(j({},d),r),className:G.cn("".concat(n,"-mask"),u,s)},i))})},ID=function(e){var n=e.prefixCls,r=n===void 0?"rc-dialog":n,o=e.zIndex,i=e.visible,a=i===void 0?!1:i,s=e.keyboard,l=s===void 0?!0:s,c=e.focusTriggerAfterClose,u=c===void 0?!0:c,d=e.wrapStyle,f=e.wrapClassName,p=e.wrapProps,m=e.onClose,g=e.afterOpenChange,v=e.afterClose,b=e.transitionName,y=e.animation,C=e.closable,S=C===void 0?!0:C,x=e.mask,w=x===void 0?!0:x,$=e.maskTransitionName,R=e.maskAnimation,M=e.maskClosable,O=M===void 0?!0:M,N=e.maskStyle,I=e.maskProps,T=e.rootClassName,P=e.classNames,A=e.styles;process.env.NODE_ENV!=="production"&&(["wrapStyle","bodyStyle","maskStyle"].forEach(function(Q){Xr(!(Q in e),"".concat(Q," is deprecated, please use styles instead."))}),"wrapClassName"in e&&Xr(!1,"wrapClassName is deprecated, please use classNames instead."));var k=E.useRef(),B=E.useRef(),_=E.useRef(),F=h.useState(a),H=X(F,2),K=H[0],V=H[1],W=Yc();function z(){Zd(B.current,document.activeElement)||(k.current=document.activeElement)}function L(){if(!Zd(B.current,document.activeElement)){var Q;(Q=_.current)===null||Q===void 0||Q.focus()}}function J(Q){if(Q)L();else{if(V(!1),w&&k.current&&u){try{k.current.focus({preventScroll:!0})}catch{}k.current=null}K&&(v==null||v())}g==null||g(Q)}function ne(Q){m==null||m(Q)}var q=E.useRef(!1),re=E.useRef(),ae=function(){clearTimeout(re.current),q.current=!0},ee=function(){re.current=setTimeout(function(){q.current=!1})},Y=null;O&&(Y=function(oe){q.current?q.current=!1:B.current===oe.target&&ne(oe)});function te(Q){if(l&&Q.keyCode===Te.ESC){Q.stopPropagation(),ne(Q);return}a&&Q.keyCode===Te.TAB&&_.current.changeActive(!Q.shiftKey)}E.useEffect(function(){a&&(V(!0),z())},[a]),E.useEffect(function(){return function(){clearTimeout(re.current)}},[]);var Z=j(j(j({zIndex:o},d),A==null?void 0:A.wrapper),{},{display:K?null:"none"});return h.createElement("div",ge({className:G.cn("".concat(r,"-root"),T)},Yr(e,{data:!0})),h.createElement(RD,{prefixCls:r,visible:w&&a,motionName:lv(r,$,R),style:j(j({zIndex:o},N),A==null?void 0:A.mask),maskProps:I,className:P==null?void 0:P.mask}),h.createElement("div",ge({tabIndex:-1,onKeyDown:te,className:G.cn("".concat(r,"-wrap"),f,P==null?void 0:P.wrapper),ref:B,onClick:Y,style:Z},p),h.createElement(nx,ge({},e,{onMouseDown:ae,onMouseUp:ee,ref:_,closable:S,ariaId:W,prefixCls:r,visible:a&&K,onClose:ne,onVisibleChanged:J,motionName:lv(r,b,y)}))))},rx=function(e){var n=e.visible,r=e.getContainer,o=e.forceRender,i=e.destroyOnClose,a=i===void 0?!1:i,s=e.afterClose,l=e.panelRef,c=h.useState(n),u=X(c,2),d=u[0],f=u[1],p=h.useMemo(function(){return{panel:l}},[l]);return h.useEffect(function(){n&&f(!0)},[n]),!o&&a&&!d?null:h.createElement(tx.Provider,{value:p},h.createElement(Xc,{open:n||o||d,autoDestroy:!1,getContainer:r,autoLock:n||d},h.createElement(ID,ge({},e,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};rx.displayName="Dialog";var si="RC_FORM_INTERNAL_HOOKS",Lt=function(){at(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},ya=h.createContext({getFieldValue:Lt,getFieldsValue:Lt,getFieldError:Lt,getFieldWarning:Lt,getFieldsError:Lt,isFieldsTouched:Lt,isFieldTouched:Lt,isFieldValidating:Lt,isFieldsValidating:Lt,resetFields:Lt,setFields:Lt,setFieldValue:Lt,setFieldsValue:Lt,validateFields:Lt,submit:Lt,getInternalHooks:function(){return Lt(),{dispatch:Lt,initEntityValue:Lt,registerField:Lt,useSubscribe:Lt,setInitialValues:Lt,destroyForm:Lt,setCallbacks:Lt,registerWatch:Lt,getFields:Lt,setValidateMessages:Lt,setPreserve:Lt,getInitialValue:Lt}}}),sc=h.createContext(null);function Tf(t){return t==null?[]:Array.isArray(t)?t:[t]}function PD(t){return t&&!!t._init}function Af(){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 kf=Af();function TD(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function AD(t,e,n){if(Lh())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&ls(o,n.prototype),o}function Df(t){var e=typeof Map=="function"?new Map:void 0;return Df=function(r){if(r===null||!TD(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,o)}function o(){return AD(r,arguments,cs(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),ls(o,r)},Df(t)}var kD=/%[sdj%]/g,ox=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(ox=function(e,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(e,n)});function _f(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function cr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=0,i=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var a=t.replace(kD,function(s){if(s==="%%")return"%";if(o>=i)return s;switch(s){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function DD(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function bn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||DD(e)&&typeof t=="string"&&!t)}function _D(t,e,n){var r=[],o=0,i=t.length;function a(s){r.push.apply(r,he(s||[])),o++,o===i&&n(r)}t.forEach(function(s){e(s,a)})}function uv(t,e,n){var r=0,o=t.length;function i(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<o?e(t[s],i):n([])}i([])}function jD(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,he(t[n]||[]))}),e}var dv=function(t){go(n,t);var e=vo(n);function n(r,o){var i;return ln(this,n),i=e.call(this,"Async Validation Error"),D(yt(i),"errors",void 0),D(yt(i),"fields",void 0),i.errors=r,i.fields=o,i}return cn(n)}(Df(Error));function BD(t,e,n,r,o){if(e.first){var i=new Promise(function(f,p){var m=function(b){return r(b),b.length?p(new dv(b,_f(b))):f(o)},g=jD(t);uv(g,n,m)});return i.catch(function(f){return f}),i}var a=e.firstFields===!0?Object.keys(t):e.firstFields||[],s=Object.keys(t),l=s.length,c=0,u=[],d=new Promise(function(f,p){var m=function(v){if(u.push.apply(u,v),c++,c===l)return r(u),u.length?p(new dv(u,_f(u))):f(o)};s.length||(r(u),f(o)),s.forEach(function(g){var v=t[g];a.indexOf(g)!==-1?uv(v,n,m):_D(v,n,m)})});return d.catch(function(f){return f}),d}function zD(t){return!!(t&&t.message!==void 0)}function LD(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function fv(t,e){return function(n){var r;return t.fullFields?r=LD(e,t.fullFields):r=e[n.field||t.fullField],zD(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function hv(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];Ue(r)==="object"&&Ue(t[n])==="object"?t[n]=j(j({},t[n]),r):t[n]=r}}return t}var Bi="enum",FD=function(e,n,r,o,i){e[Bi]=Array.isArray(e[Bi])?e[Bi]:[],e[Bi].indexOf(n)===-1&&o.push(cr(i.messages[Bi],e.fullField,e[Bi].join(", ")))},HD=function(e,n,r,o,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||o.push(cr(i.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||o.push(cr(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},VD=function(e,n,r,o,i){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(f?d="number":p?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),p&&(u=n.replace(c,"_").length),a?u!==e.len&&o.push(cr(i.messages[d].len,e.fullField,e.len)):s&&!l&&u<e.min?o.push(cr(i.messages[d].min,e.fullField,e.min)):l&&!s&&u>e.max?o.push(cr(i.messages[d].max,e.fullField,e.max)):s&&l&&(u<e.min||u>e.max)&&o.push(cr(i.messages[d].range,e.fullField,e.min,e.max))},ix=function(e,n,r,o,i,a){e.required&&(!r.hasOwnProperty(e.field)||bn(n,a||e.type))&&o.push(cr(i.messages.required,e.fullField))},ll;const WD=function(){if(ll)return ll;var t="[a-fA-F\\d:]",e=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(o.join("|"),")").concat(i),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(a,"$")),u=function(w){return w&&w.exact?s:new RegExp("(?:".concat(e(w)).concat(n).concat(e(w),")|(?:").concat(e(w)).concat(a).concat(e(w),")"),"g")};u.v4=function(x){return x&&x.exact?l:new RegExp("".concat(e(x)).concat(n).concat(e(x)),"g")},u.v6=function(x){return x&&x.exact?c:new RegExp("".concat(e(x)).concat(a).concat(e(x)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,m=u.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",b="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",C='(?:[/?#][^\\s"]*)?',S="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(p,"|").concat(m,"|").concat(g).concat(v).concat(b,")").concat(y).concat(C);return ll=new RegExp("(?:^".concat(S,"$)"),"i"),ll};var pv={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},Ha={integer:function(e){return Ha.number(e)&&parseInt(e,10)===e},float:function(e){return Ha.number(e)&&!Ha.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 Ue(e)==="object"&&!Ha.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(pv.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(WD())},hex:function(e){return typeof e=="string"&&!!e.match(pv.hex)}},qD=function(e,n,r,o,i){if(e.required&&n===void 0){ix(e,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?Ha[s](n)||o.push(cr(i.messages.types[s],e.fullField,e.type)):s&&Ue(n)!==e.type&&o.push(cr(i.messages.types[s],e.fullField,e.type))},KD=function(e,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(cr(i.messages.whitespace,e.fullField))};const $t={required:ix,whitespace:KD,type:qD,range:VD,enum:FD,pattern:HD};var GD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i)}r(a)},UD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();$t.required(e,n,o,a,i,"array"),n!=null&&($t.type(e,n,o,a,i),$t.range(e,n,o,a,i))}r(a)},XD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&$t.type(e,n,o,a,i)}r(a)},YD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n,"date")&&!e.required)return r();if($t.required(e,n,o,a,i),!bn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),$t.type(e,l,o,a,i),l&&$t.range(e,l.getTime(),o,a,i)}}r(a)},JD="enum",ZD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&$t[JD](e,n,o,a,i)}r(a)},QD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&($t.type(e,n,o,a,i),$t.range(e,n,o,a,i))}r(a)},e2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&($t.type(e,n,o,a,i),$t.range(e,n,o,a,i))}r(a)},t2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&$t.type(e,n,o,a,i)}r(a)},n2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&($t.type(e,n,o,a,i),$t.range(e,n,o,a,i))}r(a)},r2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&$t.type(e,n,o,a,i)}r(a)},o2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n,"string")&&!e.required)return r();$t.required(e,n,o,a,i),bn(n,"string")||$t.pattern(e,n,o,a,i)}r(a)},i2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),bn(n)||$t.type(e,n,o,a,i)}r(a)},a2=function(e,n,r,o,i){var a=[],s=Array.isArray(n)?"array":Ue(n);$t.required(e,n,o,a,i,s),r(a)},s2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n,"string")&&!e.required)return r();$t.required(e,n,o,a,i,"string"),bn(n,"string")||($t.type(e,n,o,a,i),$t.range(e,n,o,a,i),$t.pattern(e,n,o,a,i),e.whitespace===!0&&$t.whitespace(e,n,o,a,i))}r(a)},od=function(e,n,r,o,i){var a=e.type,s=[],l=e.required||!e.required&&o.hasOwnProperty(e.field);if(l){if(bn(n,a)&&!e.required)return r();$t.required(e,n,o,s,i,a),bn(n,a)||$t.type(e,n,o,s,i)}r(s)};const Ya={string:s2,method:t2,number:n2,boolean:XD,regexp:i2,integer:e2,float:QD,array:UD,object:r2,enum:ZD,pattern:o2,date:YD,url:od,hex:od,email:od,required:a2,any:GD};var As=function(){function t(e){ln(this,t),D(this,"rules",null),D(this,"_messages",kf),this.define(e)}return cn(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(Ue(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var i=n[o];r.rules[o]=Array.isArray(i)?i:[i]})}},{key:"messages",value:function(n){return n&&(this._messages=hv(Af(),n)),this._messages}},{key:"validate",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,s=o,l=i;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(m){var g=[],v={};function b(C){if(Array.isArray(C)){var S;g=(S=g).concat.apply(S,he(C))}else g.push(C)}for(var y=0;y<m.length;y++)b(m[y]);g.length?(v=_f(g),l(g,v)):l(null,a)}if(s.messages){var u=this.messages();u===kf&&(u=Af()),hv(u,s.messages),s.messages=u}else s.messages=this.messages();var d={},f=s.keys||Object.keys(this.rules);f.forEach(function(m){var g=r.rules[m],v=a[m];g.forEach(function(b){var y=b;typeof y.transform=="function"&&(a===n&&(a=j({},a)),v=a[m]=y.transform(v),v!=null&&(y.type=y.type||(Array.isArray(v)?"array":Ue(v)))),typeof y=="function"?y={validator:y}:y=j({},y),y.validator=r.getValidationMethod(y),y.validator&&(y.field=m,y.fullField=y.fullField||m,y.type=r.getType(y),d[m]=d[m]||[],d[m].push({rule:y,value:v,source:a,field:m}))})});var p={};return BD(d,s,function(m,g){var v=m.rule,b=(v.type==="object"||v.type==="array")&&(Ue(v.fields)==="object"||Ue(v.defaultField)==="object");b=b&&(v.required||!v.required&&m.value),v.field=m.field;function y($,R){return j(j({},R),{},{fullField:"".concat(v.fullField,".").concat($),fullFields:v.fullFields?[].concat(he(v.fullFields),[$]):[$]})}function C(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],R=Array.isArray($)?$:[$];!s.suppressWarning&&R.length&&t.warning("async-validator:",R),R.length&&v.message!==void 0&&(R=[].concat(v.message));var M=R.map(fv(v,a));if(s.first&&M.length)return p[v.field]=1,g(M);if(!b)g(M);else{if(v.required&&!m.value)return v.message!==void 0?M=[].concat(v.message).map(fv(v,a)):s.error&&(M=[s.error(v,cr(s.messages.required,v.field))]),g(M);var O={};v.defaultField&&Object.keys(m.value).map(function(T){O[T]=v.defaultField}),O=j(j({},O),m.rule.fields);var N={};Object.keys(O).forEach(function(T){var P=O[T],A=Array.isArray(P)?P:[P];N[T]=A.map(y.bind(null,T))});var I=new t(N);I.messages(s.messages),m.rule.options&&(m.rule.options.messages=s.messages,m.rule.options.error=s.error),I.validate(m.value,m.rule.options||s,function(T){var P=[];M&&M.length&&P.push.apply(P,he(M)),T&&T.length&&P.push.apply(P,he(T)),g(P.length?P:null)})}}var S;if(v.asyncValidator)S=v.asyncValidator(v,m.value,C,m.source,s);else if(v.validator){try{S=v.validator(v,m.value,C,m.source,s)}catch($){var x,w;(x=(w=console).error)===null||x===void 0||x.call(w,$),s.suppressValidatorError||setTimeout(function(){throw $},0),C($.message)}S===!0?C():S===!1?C(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||"".concat(v.fullField||v.field," fails")):S instanceof Array?C(S):S instanceof Error&&C(S.message)}S&&S.then&&S.then(function(){return C()},function($){return C($)})},function(m){c(m)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!Ya.hasOwnProperty(n.type))throw new Error(cr("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?Ya.required:Ya[this.getType(n)]||void 0}}]),t}();D(As,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Ya[e]=n});D(As,"warning",ox);D(As,"messages",kf);D(As,"validators",Ya);var rr="'${name}' is not a valid ${type}",ax={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:rr,method:rr,array:rr,object:rr,number:rr,date:rr,boolean:rr,integer:rr,float:rr,regexp:rr,email:rr,url:rr,hex:rr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},mv=As;function l2(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var gv="CODE_LOGIC_ERROR";function jf(t,e,n,r,o){return Bf.apply(this,arguments)}function Bf(){return Bf=Pi(Un().mark(function t(e,n,r,o,i){var a,s,l,c,u,d,f,p,m;return Un().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return a=j({},r),delete a.ruleIndex,mv.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(b){return console.error(b),Promise.reject(gv)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new mv(D({},e,[a])),u=Yi(ax,o.validateMessages),c.messages(u),d=[],v.prev=10,v.next=13,Promise.resolve(c.validate(D({},e,n),j({},o)));case 13:v.next=18;break;case 15:v.prev=15,v.t0=v.catch(10),v.t0.errors&&(d=v.t0.errors.map(function(b,y){var C=b.message,S=C===gv?u.default:C;return h.isValidElement(S)?h.cloneElement(S,{key:"error_".concat(y)}):S}));case 18:if(!(!d.length&&l)){v.next=23;break}return v.next=21,Promise.all(n.map(function(b,y){return jf("".concat(e,".").concat(y),b,l,o,i)}));case 21:return f=v.sent,v.abrupt("return",f.reduce(function(b,y){return[].concat(he(b),he(y))},[]));case 23:return p=j(j({},r),{},{name:e,enum:(r.enum||[]).join(", ")},i),m=d.map(function(b){return typeof b=="string"?l2(b,p):b}),v.abrupt("return",m);case 26:case"end":return v.stop()}},t,null,[[10,15]])})),Bf.apply(this,arguments)}function c2(t,e,n,r,o,i){var a=t.join("."),s=n.map(function(u,d){var f=u.validator,p=j(j({},u),{},{ruleIndex:d});return f&&(p.validator=function(m,g,v){var b=!1,y=function(){for(var x=arguments.length,w=new Array(x),$=0;$<x;$++)w[$]=arguments[$];Promise.resolve().then(function(){at(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||v.apply(void 0,w)})},C=f(m,g,y);b=C&&typeof C.then=="function"&&typeof C.catch=="function",at(b,"`callback` is deprecated. Please return a promise instead."),b&&C.then(function(){v()}).catch(function(S){v(S||" ")})}),p}).sort(function(u,d){var f=u.warningOnly,p=u.ruleIndex,m=d.warningOnly,g=d.ruleIndex;return!!f==!!m?p-g:f?1:-1}),l;if(o===!0)l=new Promise(function(){var u=Pi(Un().mark(function d(f,p){var m,g,v;return Un().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:m=0;case 1:if(!(m<s.length)){y.next=12;break}return g=s[m],y.next=5,jf(a,e,g,r,i);case 5:if(v=y.sent,!v.length){y.next=9;break}return p([{errors:v,rule:g}]),y.abrupt("return");case 9:m+=1,y.next=1;break;case 12:f([]);case 13:case"end":return y.stop()}},d)}));return function(d,f){return u.apply(this,arguments)}}());else{var c=s.map(function(u){return jf(a,e,u,r,i).then(function(d){return{errors:d,rule:u}})});l=(o?d2(c):u2(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function u2(t){return zf.apply(this,arguments)}function zf(){return zf=Pi(Un().mark(function t(e){return Un().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(e).then(function(o){var i,a=(i=[]).concat.apply(i,he(o));return a}));case 1:case"end":return r.stop()}},t)})),zf.apply(this,arguments)}function d2(t){return Lf.apply(this,arguments)}function Lf(){return Lf=Pi(Un().mark(function t(e){var n;return Un().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=0,o.abrupt("return",new Promise(function(i){e.forEach(function(a){a.then(function(s){s.errors.length&&i([s]),n+=1,n===e.length&&i([])})})}));case 2:case"end":return o.stop()}},t)})),Lf.apply(this,arguments)}function un(t){return Tf(t)}function vv(t,e){var n={};return e.forEach(function(r){var o=qr(t,r);n=Nr(n,r,o)}),n}function ra(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return sx(e,r,n)})}function sx(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,o){return t[o]===r})}function f2(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||Ue(t)!=="object"||Ue(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),o=new Set([].concat(n,r));return he(o).every(function(i){var a=t[i],s=e[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function h2(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&Ue(e.target)==="object"&&t in e.target?e.target[t]:e}function bv(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var o=t[e],i=e-n;return i>0?[].concat(he(t.slice(0,n)),[o],he(t.slice(n,e)),he(t.slice(e+1,r))):i<0?[].concat(he(t.slice(0,e)),he(t.slice(e+1,n+1)),[o],he(t.slice(n+1,r))):t}var p2=["name"],gr=[];function id(t,e,n,r,o,i){return typeof t=="function"?t(e,n,"source"in i?{source:i.source}:{}):r!==o}var cp=function(t){go(n,t);var e=vo(n);function n(r){var o;if(ln(this,n),o=e.call(this,r),D(yt(o),"state",{resetCount:0}),D(yt(o),"cancelRegisterFunc",null),D(yt(o),"mounted",!1),D(yt(o),"touched",!1),D(yt(o),"dirty",!1),D(yt(o),"validatePromise",void 0),D(yt(o),"prevValidating",void 0),D(yt(o),"errors",gr),D(yt(o),"warnings",gr),D(yt(o),"cancelRegister",function(){var l=o.props,c=l.preserve,u=l.isListField,d=l.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(u,c,un(d)),o.cancelRegisterFunc=null}),D(yt(o),"getNamePath",function(){var l=o.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat(he(f),he(c)):[]}),D(yt(o),"getRules",function(){var l=o.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),D(yt(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),D(yt(o),"metaCache",null),D(yt(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=j(j({},o.getMeta()),{},{destroy:l});da(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),D(yt(o),"onStoreChange",function(l,c,u){var d=o.props,f=d.shouldUpdate,p=d.dependencies,m=p===void 0?[]:p,g=d.onReset,v=u.store,b=o.getNamePath(),y=o.getValue(l),C=o.getValue(v),S=c&&ra(c,b);switch(u.type==="valueUpdate"&&u.source==="external"&&!da(y,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=gr,o.warnings=gr,o.triggerMetaEvent()),u.type){case"reset":if(!c||S){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=gr,o.warnings=gr,o.triggerMetaEvent(),g==null||g(),o.refresh();return}break;case"remove":{if(f&&id(f,l,v,y,C,u)){o.reRender();return}break}case"setField":{var x=u.data;if(S){"touched"in x&&(o.touched=x.touched),"validating"in x&&!("originRCField"in x)&&(o.validatePromise=x.validating?Promise.resolve([]):null),"errors"in x&&(o.errors=x.errors||gr),"warnings"in x&&(o.warnings=x.warnings||gr),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in x&&ra(c,b,!0)){o.reRender();return}if(f&&!b.length&&id(f,l,v,y,C,u)){o.reRender();return}break}case"dependenciesUpdate":{var w=m.map(un);if(w.some(function($){return ra(u.relatedFields,$)})){o.reRender();return}break}default:if(S||(!m.length||b.length||f)&&id(f,l,v,y,C,u)){o.reRender();return}break}f===!0&&o.reRender()}),D(yt(o),"validateRules",function(l){var c=o.getNamePath(),u=o.getValue(),d=l||{},f=d.triggerName,p=d.validateOnly,m=p===void 0?!1:p,g=Promise.resolve().then(Pi(Un().mark(function v(){var b,y,C,S,x,w,$;return Un().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(o.mounted){M.next=2;break}return M.abrupt("return",[]);case 2:if(b=o.props,y=b.validateFirst,C=y===void 0?!1:y,S=b.messageVariables,x=b.validateDebounce,w=o.getRules(),f&&(w=w.filter(function(O){return O}).filter(function(O){var N=O.validateTrigger;if(!N)return!0;var I=Tf(N);return I.includes(f)})),!(x&&f)){M.next=10;break}return M.next=8,new Promise(function(O){setTimeout(O,x)});case 8:if(o.validatePromise===g){M.next=10;break}return M.abrupt("return",[]);case 10:return $=c2(c,u,w,l,C,S),$.catch(function(O){return O}).then(function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gr;if(o.validatePromise===g){var N;o.validatePromise=null;var I=[],T=[];(N=O.forEach)===null||N===void 0||N.call(O,function(P){var A=P.rule.warningOnly,k=P.errors,B=k===void 0?gr:k;A?T.push.apply(T,he(B)):I.push.apply(I,he(B))}),o.errors=I,o.warnings=T,o.triggerMetaEvent(),o.reRender()}}),M.abrupt("return",$);case 13:case"end":return M.stop()}},v)})));return m||(o.validatePromise=g,o.dirty=!0,o.errors=gr,o.warnings=gr,o.triggerMetaEvent(),o.reRender()),g}),D(yt(o),"isFieldValidating",function(){return!!o.validatePromise}),D(yt(o),"isFieldTouched",function(){return o.touched}),D(yt(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var l=o.props.fieldContext,c=l.getInternalHooks(si),u=c.getInitialValue;return u(o.getNamePath())!==void 0}),D(yt(o),"getErrors",function(){return o.errors}),D(yt(o),"getWarnings",function(){return o.warnings}),D(yt(o),"isListField",function(){return o.props.isListField}),D(yt(o),"isList",function(){return o.props.isList}),D(yt(o),"isPreserve",function(){return o.props.preserve}),D(yt(o),"getMeta",function(){o.prevValidating=o.isFieldValidating();var l={touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:o.validatePromise===null};return l}),D(yt(o),"getOnlyChild",function(l){if(typeof l=="function"){var c=o.getMeta();return j(j({},o.getOnlyChild(l(o.getControlled(),c,o.props.fieldContext))),{},{isFunction:!0})}var u=dr(l);return u.length!==1||!h.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),D(yt(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return qr(l||c(!0),u)}),D(yt(o),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=o.props,u=c.name,d=c.trigger,f=c.validateTrigger,p=c.getValueFromEvent,m=c.normalize,g=c.valuePropName,v=c.getValueProps,b=c.fieldContext,y=f!==void 0?f:b.validateTrigger,C=o.getNamePath(),S=b.getInternalHooks,x=b.getFieldsValue,w=S(si),$=w.dispatch,R=o.getValue(),M=v||function(P){return D({},g,P)},O=l[d],N=u!==void 0?M(R):{};process.env.NODE_ENV!=="production"&&N&&Object.keys(N).forEach(function(P){at(typeof N[P]!="function","It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(P,")"))});var I=j(j({},l),N);I[d]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var P,A=arguments.length,k=new Array(A),B=0;B<A;B++)k[B]=arguments[B];p?P=p.apply(void 0,k):P=h2.apply(void 0,[g].concat(k)),m&&(P=m(P,R,x(!0))),P!==R&&$({type:"updateValue",namePath:C,value:P}),O&&O.apply(void 0,k)};var T=Tf(y||[]);return T.forEach(function(P){var A=I[P];I[P]=function(){A&&A.apply(void 0,arguments);var k=o.props.rules;k&&k.length&&$({type:"validateField",namePath:C,triggerName:P})}}),I}),r.fieldContext){var i=r.fieldContext.getInternalHooks,a=i(si),s=a.initEntityValue;s(yt(o))}return o}return cn(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.shouldUpdate,a=o.fieldContext;if(this.mounted=!0,a){var s=a.getInternalHooks,l=s(si),c=l.registerField;this.cancelRegisterFunc=c(this)}i===!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 o=this.state.resetCount,i=this.props.children,a=this.getOnlyChild(i),s=a.child,l=a.isFunction,c;return l?c=s:h.isValidElement(s)?c=h.cloneElement(s,this.getControlled(s.props)):(at(!s,"`children` of Field is not validate ReactElement."),c=s),h.createElement(h.Fragment,{key:o},c)}}]),n}(h.Component);D(cp,"contextType",ya);D(cp,"defaultProps",{trigger:"onChange",valuePropName:"value"});function lx(t){var e,n=t.name,r=lt(t,p2),o=h.useContext(ya),i=h.useContext(sc),a=n!==void 0?un(n):void 0,s=(e=r.isListField)!==null&&e!==void 0?e:!!i,l="keep";return s||(l="_".concat((a||[]).join("_"))),process.env.NODE_ENV!=="production"&&r.preserve===!1&&s&&a.length<=1&&at(!1,"`preserve` should not apply on Form.List fields."),h.createElement(cp,ge({key:l,name:a,isListField:s},r,{fieldContext:o}))}function m2(t){var e=t.name,n=t.initialValue,r=t.children,o=t.rules,i=t.validateTrigger,a=t.isListField,s=h.useContext(ya),l=h.useContext(sc),c=h.useRef({keys:[],id:0}),u=c.current,d=h.useMemo(function(){var g=un(s.prefixName)||[];return[].concat(he(g),he(un(e)))},[s.prefixName,e]),f=h.useMemo(function(){return j(j({},s),{},{prefixName:d})},[s,d]),p=h.useMemo(function(){return{getKey:function(v){var b=d.length,y=v[b];return[u.keys[y],v.slice(b+1)]}}},[d]);if(typeof r!="function")return at(!1,"Form.List only accepts function as children."),null;var m=function(v,b,y){var C=y.source;return C==="internal"?!1:v!==b};return h.createElement(sc.Provider,{value:p},h.createElement(ya.Provider,{value:f},h.createElement(lx,{name:[],shouldUpdate:m,rules:o,validateTrigger:i,initialValue:n,isList:!0,isListField:a??!!l},function(g,v){var b=g.value,y=b===void 0?[]:b,C=g.onChange,S=s.getFieldValue,x=function(){var M=S(d||[]);return M||[]},w={add:function(M,O){var N=x();O>=0&&O<=N.length?(u.keys=[].concat(he(u.keys.slice(0,O)),[u.id],he(u.keys.slice(O))),C([].concat(he(N.slice(0,O)),[M],he(N.slice(O))))):(process.env.NODE_ENV!=="production"&&(O<0||O>N.length)&&at(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(he(u.keys),[u.id]),C([].concat(he(N),[M]))),u.id+=1},remove:function(M){var O=x(),N=new Set(Array.isArray(M)?M:[M]);N.size<=0||(u.keys=u.keys.filter(function(I,T){return!N.has(T)}),C(O.filter(function(I,T){return!N.has(T)})))},move:function(M,O){if(M!==O){var N=x();M<0||M>=N.length||O<0||O>=N.length||(u.keys=bv(u.keys,M,O),C(bv(N,M,O)))}}},$=y||[];return Array.isArray($)||($=[],process.env.NODE_ENV!=="production"&&at(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),r($.map(function(R,M){var O=u.keys[M];return O===void 0&&(u.keys[M]=u.id,O=u.keys[M],u.id+=1),{name:M,key:O,isListField:!0}}),w,v)})))}function g2(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(o,i){t.forEach(function(a,s){a.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(e&&i(r),o(r))})})}):Promise.resolve([])}var cx="__@field_split__";function ad(t){return t.map(function(e){return"".concat(Ue(e),":").concat(e)}).join(cx)}var zi=function(){function t(){ln(this,t),D(this,"kvs",new Map)}return cn(t,[{key:"set",value:function(n,r){this.kvs.set(ad(n),r)}},{key:"get",value:function(n){return this.kvs.get(ad(n))}},{key:"update",value:function(n,r){var o=this.get(n),i=r(o);i?this.set(n,i):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(ad(n))}},{key:"map",value:function(n){return he(this.kvs.entries()).map(function(r){var o=X(r,2),i=o[0],a=o[1],s=i.split(cx);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=X(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var o=r.key,i=r.value;return n[o.join(".")]=i,null}),n}}]),t}(),v2=["name"],b2=cn(function t(e){var n=this;ln(this,t),D(this,"formHooked",!1),D(this,"forceRootUpdate",void 0),D(this,"subscribable",!0),D(this,"store",{}),D(this,"fieldEntities",[]),D(this,"initialValues",{}),D(this,"callbacks",{}),D(this,"validateMessages",null),D(this,"preserve",null),D(this,"lastValidatePromise",null),D(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),D(this,"getInternalHooks",function(r){return r===si?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(at(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),D(this,"useSubscribe",function(r){n.subscribable=r}),D(this,"prevWithoutPreserves",null),D(this,"setInitialValues",function(r,o){if(n.initialValues=r||{},o){var i,a=Yi(r,n.store);(i=n.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=Nr(a,l,qr(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),D(this,"destroyForm",function(r){if(r)n.updateStore({});else{var o=new zi;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||o.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=o}}),D(this,"getInitialValue",function(r){var o=qr(n.initialValues,r);return r.length?Yi(o):o}),D(this,"setCallbacks",function(r){n.callbacks=r}),D(this,"setValidateMessages",function(r){n.validateMessages=r}),D(this,"setPreserve",function(r){n.preserve=r}),D(this,"watchList",[]),D(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(o){return o!==r})}}),D(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var o=n.getFieldsValue(),i=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(o,i,r)})}}),D(this,"timeoutId",null),D(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||at(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),D(this,"updateStore",function(r){n.store=r}),D(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(o){return o.getNamePath().length}):n.fieldEntities}),D(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new zi;return n.getFieldEntities(r).forEach(function(i){var a=i.getNamePath();o.set(a,i)}),o}),D(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var o=n.getFieldsMap(!0);return r.map(function(i){var a=un(i);return o.get(a)||{INVALIDATE_NAME_PATH:un(i)}})}),D(this,"getFieldsValue",function(r,o){n.warningUnhooked();var i,a,s;if(r===!0||Array.isArray(r)?(i=r,a=o):r&&Ue(r)==="object"&&(s=r.strict,a=r.filter),i===!0&&!a)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(i)?i:null),c=[];return l.forEach(function(u){var d,f,p="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var m,g;if((m=(g=u).isList)!==null&&m!==void 0&&m.call(g))return}else if(!i&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(p);else{var v="getMeta"in u?u.getMeta():null;a(v)&&c.push(p)}}),vv(n.store,c.map(un))}),D(this,"getFieldValue",function(r){n.warningUnhooked();var o=un(r);return qr(n.store,o)}),D(this,"getFieldsError",function(r){n.warningUnhooked();var o=n.getFieldEntitiesForNamePathList(r);return o.map(function(i,a){return i&&!("INVALIDATE_NAME_PATH"in i)?{name:i.getNamePath(),errors:i.getErrors(),warnings:i.getWarnings()}:{name:un(r[a]),errors:[],warnings:[]}})}),D(this,"getFieldError",function(r){n.warningUnhooked();var o=un(r),i=n.getFieldsError([o])[0];return i.errors}),D(this,"getFieldWarning",function(r){n.warningUnhooked();var o=un(r),i=n.getFieldsError([o])[0];return i.warnings}),D(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o[0],s=o[1],l,c=!1;o.length===0?l=null:o.length===1?Array.isArray(a)?(l=a.map(un),c=!1):(l=null,c=a):(l=a.map(un),c=s);var u=n.getFieldEntities(!0),d=function(v){return v.isFieldTouched()};if(!l)return c?u.every(function(g){return d(g)||g.isList()}):u.some(d);var f=new zi;l.forEach(function(g){f.set(g,[])}),u.forEach(function(g){var v=g.getNamePath();l.forEach(function(b){b.every(function(y,C){return v[C]===y})&&f.update(b,function(y){return[].concat(he(y),[g])})})});var p=function(v){return v.some(d)},m=f.map(function(g){var v=g.value;return v});return c?m.every(p):m.some(p)}),D(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),D(this,"isFieldsValidating",function(r){n.warningUnhooked();var o=n.getFieldEntities();if(!r)return o.some(function(a){return a.isFieldValidating()});var i=r.map(un);return o.some(function(a){var s=a.getNamePath();return ra(i,s)&&a.isFieldValidating()})}),D(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),D(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=new zi,i=n.getFieldEntities(!0);i.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=o.get(u)||new Set;d.add({entity:l,value:c}),o.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),p=n.getInitialValue(f);if(p!==void 0)at(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var m=o.get(f);if(m&&m.size>1)at(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(m){var g=n.getFieldValue(f),v=u.isListField();!v&&(!r.skipExist||g===void 0)&&n.updateStore(Nr(n.store,f,he(m)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=o.get(l);if(c){var u;(u=s).push.apply(u,he(he(c).map(function(d){return d.entity})))}})):s=i,a(s)}),D(this,"resetFields",function(r){n.warningUnhooked();var o=n.store;if(!r){n.updateStore(Yi(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(o,null,{type:"reset"}),n.notifyWatch();return}var i=r.map(un);i.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(Nr(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:i}),n.notifyObservers(o,i,{type:"reset"}),n.notifyWatch(i)}),D(this,"setFields",function(r){n.warningUnhooked();var o=n.store,i=[];r.forEach(function(a){var s=a.name,l=lt(a,v2),c=un(s);i.push(c),"value"in l&&n.updateStore(Nr(n.store,c,l.value)),n.notifyObservers(o,[c],{type:"setField",data:a})}),n.notifyWatch(i)}),D(this,"getFields",function(){var r=n.getFieldEntities(!0),o=r.map(function(i){var a=i.getNamePath(),s=i.getMeta(),l=j(j({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return o}),D(this,"initEntityValue",function(r){var o=r.props.initialValue;if(o!==void 0){var i=r.getNamePath(),a=qr(n.store,i);a===void 0&&n.updateStore(Nr(n.store,i,o))}}),D(this,"isMergedPreserve",function(r){var o=r!==void 0?r:n.preserve;return o??!0}),D(this,"registerField",function(r){n.fieldEntities.push(r);var o=r.getNamePath();if(n.notifyWatch([o]),r.props.initialValue!==void 0){var i=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(i,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:n.getInitialValue(o);if(o.length&&n.getFieldValue(o)!==c&&n.fieldEntities.every(function(d){return!sx(d.getNamePath(),o)})){var u=n.store;n.updateStore(Nr(u,o,c,!0)),n.notifyObservers(u,[o],{type:"remove"}),n.triggerDependenciesUpdate(u,o)}}n.notifyWatch([o])}}),D(this,"dispatch",function(r){switch(r.type){case"updateValue":{var o=r.namePath,i=r.value;n.updateValue(o,i);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),D(this,"notifyObservers",function(r,o,i){if(n.subscribable){var a=j(j({},i),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,o,a)})}else n.forceRootUpdate()}),D(this,"triggerDependenciesUpdate",function(r,o){var i=n.getDependencyChildrenFields(o);return i.length&&n.validateFields(i),n.notifyObservers(r,i,{type:"dependenciesUpdate",relatedFields:[o].concat(he(i))}),i}),D(this,"updateValue",function(r,o){var i=un(r),a=n.store;n.updateStore(Nr(n.store,i,o)),n.notifyObservers(a,[i],{type:"valueUpdate",source:"internal"}),n.notifyWatch([i]);var s=n.triggerDependenciesUpdate(a,i),l=n.callbacks.onValuesChange;if(l){var c=vv(n.store,[i]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([i].concat(he(s)))}),D(this,"setFieldsValue",function(r){n.warningUnhooked();var o=n.store;if(r){var i=Yi(n.store,r);n.updateStore(i)}n.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),D(this,"setFieldValue",function(r,o){n.setFields([{name:r,value:o,errors:[],warnings:[]}])}),D(this,"getDependencyChildrenFields",function(r){var o=new Set,i=[],a=new zi;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=un(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!o.has(d)){o.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(i.push(f),l(f))}})};return s(r),i}),D(this,"triggerOnFieldsChange",function(r,o){var i=n.callbacks.onFieldsChange;if(i){var a=n.getFields();if(o){var s=new zi;o.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return ra(r,u)});l.length&&i(l,a)}}),D(this,"validateFields",function(r,o){n.warningUnhooked();var i,a;Array.isArray(r)||typeof r=="string"||typeof o=="string"?(i=r,a=o):a=r;var s=!!i,l=s?i.map(un):[],c=[],u=String(Date.now()),d=new Set,f=a||{},p=f.recursive,m=f.dirty;n.getFieldEntities(!0).forEach(function(y){if(s||l.push(y.getNamePath()),!(!y.props.rules||!y.props.rules.length)&&!(m&&!y.isFieldDirty())){var C=y.getNamePath();if(d.add(C.join(u)),!s||ra(l,C,p)){var S=y.validateRules(j({validateMessages:j(j({},ax),n.validateMessages)},a));c.push(S.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(x){var w,$=[],R=[];return(w=x.forEach)===null||w===void 0||w.call(x,function(M){var O=M.rule.warningOnly,N=M.errors;O?R.push.apply(R,he(N)):$.push.apply($,he(N))}),$.length?Promise.reject({name:C,errors:$,warnings:R}):{name:C,errors:$,warnings:R}}))}}});var g=g2(c);n.lastValidatePromise=g,g.catch(function(y){return y}).then(function(y){var C=y.map(function(S){var x=S.name;return x});n.notifyObservers(n.store,C,{type:"validateFinish"}),n.triggerOnFieldsChange(C,y)});var v=g.then(function(){return n.lastValidatePromise===g?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(y){var C=y.filter(function(S){return S&&S.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:C,outOfDate:n.lastValidatePromise!==g})});v.catch(function(y){return y});var b=l.filter(function(y){return d.has(y.join(u))});return n.triggerOnFieldsChange(b),v}),D(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var o=n.callbacks.onFinish;if(o)try{o(r)}catch(i){console.error(i)}}).catch(function(r){var o=n.callbacks.onFinishFailed;o&&o(r)})}),this.forceRootUpdate=e});function ux(t){var e=h.useRef(),n=h.useState({}),r=X(n,2),o=r[1];if(!e.current)if(t)e.current=t;else{var i=function(){o({})},a=new b2(i);e.current=a.getForm()}return[e.current]}var Ff=h.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),y2=function(e){var n=e.validateMessages,r=e.onFormChange,o=e.onFormFinish,i=e.children,a=h.useContext(Ff),s=h.useRef({});return h.createElement(Ff.Provider,{value:j(j({},a),{},{validateMessages:j(j({},a.validateMessages),n),triggerFormChange:function(c,u){r&&r(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){o&&o(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=j(j({},s.current),{},D({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=j({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},i)},C2=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],S2=function(e,n){var r=e.name,o=e.initialValues,i=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,d=e.validateMessages,f=e.validateTrigger,p=f===void 0?"onChange":f,m=e.onValuesChange,g=e.onFieldsChange,v=e.onFinish,b=e.onFinishFailed,y=e.clearOnDestroy,C=lt(e,C2),S=h.useRef(null),x=h.useContext(Ff),w=ux(a),$=X(w,1),R=$[0],M=R.getInternalHooks(si),O=M.useSubscribe,N=M.setInitialValues,I=M.setCallbacks,T=M.setValidateMessages,P=M.setPreserve,A=M.destroyForm;h.useImperativeHandle(n,function(){return j(j({},R),{},{nativeElement:S.current})}),h.useEffect(function(){return x.registerForm(r,R),function(){x.unregisterForm(r)}},[x,R,r]),T(j(j({},x.validateMessages),d)),I({onValuesChange:m,onFieldsChange:function(z){if(x.triggerFormChange(r,z),g){for(var L=arguments.length,J=new Array(L>1?L-1:0),ne=1;ne<L;ne++)J[ne-1]=arguments[ne];g.apply(void 0,[z].concat(J))}},onFinish:function(z){x.triggerFormFinish(r,z),v&&v(z)},onFinishFailed:b}),P(s);var k=h.useRef(null);N(o,!k.current),k.current||(k.current=!0),h.useEffect(function(){return function(){return A(y)}},[]);var B,_=typeof l=="function";if(_){var F=R.getFieldsValue(!0);B=l(F,R)}else B=l;O(!_);var H=h.useRef();h.useEffect(function(){f2(H.current||[],i||[])||R.setFields(i||[]),H.current=i},[i,R]);var K=h.useMemo(function(){return j(j({},R),{},{validateTrigger:p})},[R,p]),V=h.createElement(sc.Provider,{value:null},h.createElement(ya.Provider,{value:K},B));return u===!1?V:h.createElement(u,ge({},C,{ref:S,onSubmit:function(z){z.preventDefault(),z.stopPropagation(),R.submit()},onReset:function(z){var L;z.preventDefault(),R.resetFields(),(L=C.onReset)===null||L===void 0||L.call(C,z)}}),V)};function yv(t){try{return JSON.stringify(t)}catch{return Math.random()}}var x2=process.env.NODE_ENV!=="production"?function(t){var e=t.join("__RC_FIELD_FORM_SPLIT__"),n=E.useRef(e);at(n.current===e,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")}:function(){};function w2(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],o=e[1],i=o===void 0?{}:o,a=PD(i)?{form:i}:i,s=a.form,l=E.useState(),c=X(l,2),u=c[0],d=c[1],f=E.useMemo(function(){return yv(u)},[u]),p=E.useRef(f);p.current=f;var m=E.useContext(ya),g=s||m,v=g&&g._init;process.env.NODE_ENV!=="production"&&at(e.length===2?s?v:!0:v,"useWatch requires a form instance since it can not auto detect from context.");var b=un(r),y=E.useRef(b);return y.current=b,x2(b),E.useEffect(function(){if(v){var C=g.getFieldsValue,S=g.getInternalHooks,x=S(si),w=x.registerWatch,$=function(N,I){var T=a.preserve?I:N;return typeof r=="function"?r(T):qr(T,y.current)},R=w(function(O,N){var I=$(O,N),T=yv(I);p.current!==T&&(p.current=T,d(I))}),M=$(C(),C(!0));return u!==M&&d(M),R}},[v]),u}var E2=h.forwardRef(S2),ks=E2;ks.FormProvider=y2;ks.Field=lx;ks.List=m2;ks.useForm=ux;ks.useWatch=w2;const wr=h.createContext({});process.env.NODE_ENV!=="production"&&(wr.displayName="FormItemInputContext");const $2=({children:t,status:e,override:n})=>{const r=h.useContext(wr),o=h.useMemo(()=>{const i=Object.assign({},r);return n&&delete i.isFormItemInput,e&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[e,n,r]);return h.createElement(wr.Provider,{value:o},t)},O2=h.createContext(void 0),Wo=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let o=r;return n&&(o=E.createElement($2,{override:!0,status:!0},o)),e&&(o=E.createElement($A,null,o)),o};function Cv(...t){const e={};return t.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})}),e}function Sv(t){if(t)return{closable:t.closable,closeIcon:t.closeIcon}}function xv(t){const{closable:e,closeIcon:n}=t||{};return E.useMemo(()=>{if(!e&&(e===!1||n===!1||n===null))return!1;if(e===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return e&&typeof e=="object"&&(r=Object.assign(Object.assign({},r),e)),r},[e,n])}const M2={};function N2(t,e,n=M2){const r=xv(t),o=xv(e),[i]=Qr("global",Ho.global),a=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,s=E.useMemo(()=>Object.assign({closeIcon:E.createElement(Os,null)},n),[n]),l=E.useMemo(()=>r===!1?!1:r?Cv(s,o,r):o===!1?!1:o?Cv(s,o):s.closable?s:!1,[r,o,s]);return E.useMemo(()=>{if(l===!1)return[!1,null,a,{}];const{closeIconRender:c}=s,{closeIcon:u}=l;let d=u;const f=Yr(l,!0);return d!=null&&(c&&(d=c(u)),d=E.isValidElement(d)?E.cloneElement(d,Object.assign({"aria-label":i.close},f)):E.createElement("span",Object.assign({"aria-label":i.close},f),d)),[!0,d,a,f]},[l,s])}const R2=()=>zn()&&window.document.documentElement,Jc=t=>{const{prefixCls:e,className:n,style:r,size:o,shape:i}=t,a=G.cn({[`${e}-lg`]:o==="large",[`${e}-sm`]:o==="small"}),s=G.cn({[`${e}-circle`]:i==="circle",[`${e}-square`]:i==="square",[`${e}-round`]:i==="round"}),l=h.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return h.createElement("span",{className:G.cn(e,a,s,n),style:Object.assign(Object.assign({},l),r)})},I2=new kt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Zc=t=>({height:t,lineHeight:U(t)}),oa=t=>Object.assign({width:t},Zc(t)),P2=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:I2,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),sd=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},Zc(t)),T2=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},oa(r)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},oa(o)),[`${e}${e}-sm`]:Object.assign({},oa(i))}},A2=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=t;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},sd(e,s)),[`${r}-lg`]:Object.assign({},sd(o,s)),[`${r}-sm`]:Object.assign({},sd(i,s))}},wv=t=>Object.assign({width:t},Zc(t)),k2=t=>{const{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:o,calc:i}=t;return{[e]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:o},wv(i(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},wv(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},ld=(t,e,n)=>{const{skeletonButtonCls:r}=t;return{[`${n}${r}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:e}}},cd=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},Zc(t)),D2=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},cd(r,s))},ld(t,r,n)),{[`${n}-lg`]:Object.assign({},cd(o,s))}),ld(t,o,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},cd(i,s))}),ld(t,i,`${n}-sm`))},_2=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:p,borderRadius:m,titleHeight:g,blockRadius:v,paragraphLiHeight:b,controlHeightXS:y,paragraphMarginTop:C}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},oa(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},oa(c)),[`${n}-sm`]:Object.assign({},oa(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:g,background:d,borderRadius:v,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:d,borderRadius:v,"+ li":{marginBlockStart:y}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${r}, ${o} > li`]:{borderRadius:m}}},[`${e}-with-avatar ${e}-content`]:{[r]:{marginBlockStart:p,[`+ ${o}`]:{marginBlockStart:C}}},[`${e}${e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},D2(t)),T2(t)),A2(t)),k2(t)),[`${e}${e}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${e}${e}-active`]:{[`
289
+ }`),o)}else ds(o);return function(){ds(o)}},[e,o])}var xD=!1;function wD(t){return xD}var iv=function(e){return e===!1?!1:!zn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},Xc=h.forwardRef(function(t,e){var n=t.open,r=t.autoLock,o=t.getContainer,i=t.debug,a=t.autoDestroy,s=a===void 0?!0:a,l=t.children,c=h.useState(n),u=X(c,2),d=u[0],f=u[1],p=d||n;process.env.NODE_ENV!=="production"&&at(zn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),h.useEffect(function(){(s||n)&&f(n)},[n,s]);var m=h.useState(function(){return iv(o)}),g=X(m,2),v=g[0],b=g[1];h.useEffect(function(){var I=iv(o);b(I??null)});var y=gD(p&&!v,i),C=X(y,2),S=C[0],x=C[1],w=v??S;SD(r&&n&&zn()&&(w===S||w===document.body));var $=null;if(l&&Jo(l)&&e){var R=l;$=R.ref}var M=Yo($,e);if(!p||!zn()||v===void 0)return null;var O=w===!1||wD(),N=l;return e&&(N=h.cloneElement(l,{ref:M})),h.createElement(ex.Provider,{value:x},O?N:Ar.createPortal(N,w))});process.env.NODE_ENV!=="production"&&(Xc.displayName="Portal");var tx=h.createContext({});function ED(){var t=j({},h);return t.useId}var av=0,sv=ED();const Yc=sv?function(e){var n=sv();return e||(process.env.NODE_ENV==="test"?"test-id":n)}:function(e){var n=h.useState("ssr-id"),r=X(n,2),o=r[0],i=r[1];return h.useEffect(function(){var a=av;av+=1,i("rc_unique_".concat(a))},[]),e||(process.env.NODE_ENV==="test"?"test-id":o)};function lv(t,e,n){var r=e;return!r&&n&&(r="".concat(t,"-").concat(n)),r}function cv(t,e){var n=t["page".concat(e?"Y":"X","Offset")],r="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var o=t.document;n=o.documentElement[r],typeof n!="number"&&(n=o.body[r])}return n}function $D(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},r=t.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=cv(o),n.top+=cv(o,!0),n}const OD=h.memo(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var MD={width:0,height:0,overflow:"hidden",outline:"none"},ND={outline:"none"},lp=E.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,o=t.style,i=t.title,a=t.ariaId,s=t.footer,l=t.closable,c=t.closeIcon,u=t.onClose,d=t.children,f=t.bodyStyle,p=t.bodyProps,m=t.modalRender,g=t.onMouseDown,v=t.onMouseUp,b=t.holderRef,y=t.visible,C=t.forceRender,S=t.width,x=t.height,w=t.classNames,$=t.styles,R=E.useContext(tx),M=R.panel,O=Yo(b,M),N=E.useRef(),I=E.useRef();E.useImperativeHandle(e,function(){return{focus:function(){var V;(V=N.current)===null||V===void 0||V.focus({preventScroll:!0})},changeActive:function(V){var W=document,z=W.activeElement;V&&z===I.current?N.current.focus({preventScroll:!0}):!V&&z===N.current&&I.current.focus({preventScroll:!0})}}});var T={};S!==void 0&&(T.width=S),x!==void 0&&(T.height=x);var P=s?E.createElement("div",{className:G.cn("".concat(n,"-footer"),w==null?void 0:w.footer),style:j({},$==null?void 0:$.footer)},s):null,A=i?E.createElement("div",{className:G.cn("".concat(n,"-header"),w==null?void 0:w.header),style:j({},$==null?void 0:$.header)},E.createElement("div",{className:"".concat(n,"-title"),id:a},i)):null,k=E.useMemo(function(){return Ue(l)==="object"&&l!==null?l:l?{closeIcon:c??E.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),B=Yr(k,!0),_=Ue(l)==="object"&&l.disabled,F=l?E.createElement("button",ge({type:"button",onClick:u,"aria-label":"Close"},B,{className:"".concat(n,"-close"),disabled:_}),k.closeIcon):null,H=E.createElement("div",{className:G.cn("".concat(n,"-content"),w==null?void 0:w.content),style:$==null?void 0:$.content},F,A,E.createElement("div",ge({className:G.cn("".concat(n,"-body"),w==null?void 0:w.body),style:j(j({},f),$==null?void 0:$.body)},p),d),P);return E.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:O,style:j(j({},o),T),className:G.cn(n,r),onMouseDown:g,onMouseUp:v},E.createElement("div",{ref:N,tabIndex:0,style:ND},E.createElement(OD,{shouldUpdate:y||C},m?m(H):H)),E.createElement("div",{tabIndex:0,ref:I,style:MD}))});process.env.NODE_ENV!=="production"&&(lp.displayName="Panel");var nx=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.title,o=t.style,i=t.className,a=t.visible,s=t.forceRender,l=t.destroyOnClose,c=t.motionName,u=t.ariaId,d=t.onVisibleChanged,f=t.mousePosition,p=E.useRef(),m=h.useState(),g=X(m,2),v=g[0],b=g[1],y={};v&&(y.transformOrigin=v);function C(){var S=$D(p.current);b(f&&(f.x||f.y)?"".concat(f.x-S.left,"px ").concat(f.y-S.top,"px"):"")}return h.createElement(eo,{visible:a,onVisibleChanged:d,onAppearPrepare:C,onEnterPrepare:C,forceRender:s,motionName:c,removeOnLeave:l,ref:p},function(S,x){var w=S.className,$=S.style;return h.createElement(lp,ge({},t,{ref:e,title:r,ariaId:u,prefixCls:n,holderRef:x,style:j(j(j({},$),o),y),className:G.cn(i,w)}))})});nx.displayName="Content";var RD=function(e){var n=e.prefixCls,r=e.style,o=e.visible,i=e.maskProps,a=e.motionName,s=e.className;return h.createElement(eo,{key:"mask",visible:o,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return h.createElement("div",ge({ref:c,style:j(j({},d),r),className:G.cn("".concat(n,"-mask"),u,s)},i))})},ID=function(e){var n=e.prefixCls,r=n===void 0?"rc-dialog":n,o=e.zIndex,i=e.visible,a=i===void 0?!1:i,s=e.keyboard,l=s===void 0?!0:s,c=e.focusTriggerAfterClose,u=c===void 0?!0:c,d=e.wrapStyle,f=e.wrapClassName,p=e.wrapProps,m=e.onClose,g=e.afterOpenChange,v=e.afterClose,b=e.transitionName,y=e.animation,C=e.closable,S=C===void 0?!0:C,x=e.mask,w=x===void 0?!0:x,$=e.maskTransitionName,R=e.maskAnimation,M=e.maskClosable,O=M===void 0?!0:M,N=e.maskStyle,I=e.maskProps,T=e.rootClassName,P=e.classNames,A=e.styles;process.env.NODE_ENV!=="production"&&(["wrapStyle","bodyStyle","maskStyle"].forEach(function(Q){Xr(!(Q in e),"".concat(Q," is deprecated, please use styles instead."))}),"wrapClassName"in e&&Xr(!1,"wrapClassName is deprecated, please use classNames instead."));var k=E.useRef(),B=E.useRef(),_=E.useRef(),F=h.useState(a),H=X(F,2),K=H[0],V=H[1],W=Yc();function z(){Zd(B.current,document.activeElement)||(k.current=document.activeElement)}function L(){if(!Zd(B.current,document.activeElement)){var Q;(Q=_.current)===null||Q===void 0||Q.focus()}}function J(Q){if(Q)L();else{if(V(!1),w&&k.current&&u){try{k.current.focus({preventScroll:!0})}catch{}k.current=null}K&&(v==null||v())}g==null||g(Q)}function ne(Q){m==null||m(Q)}var q=E.useRef(!1),re=E.useRef(),ae=function(){clearTimeout(re.current),q.current=!0},ee=function(){re.current=setTimeout(function(){q.current=!1})},Y=null;O&&(Y=function(ie){q.current?q.current=!1:B.current===ie.target&&ne(ie)});function te(Q){if(l&&Q.keyCode===Te.ESC){Q.stopPropagation(),ne(Q);return}a&&Q.keyCode===Te.TAB&&_.current.changeActive(!Q.shiftKey)}E.useEffect(function(){a&&(V(!0),z())},[a]),E.useEffect(function(){return function(){clearTimeout(re.current)}},[]);var Z=j(j(j({zIndex:o},d),A==null?void 0:A.wrapper),{},{display:K?null:"none"});return h.createElement("div",ge({className:G.cn("".concat(r,"-root"),T)},Yr(e,{data:!0})),h.createElement(RD,{prefixCls:r,visible:w&&a,motionName:lv(r,$,R),style:j(j({zIndex:o},N),A==null?void 0:A.mask),maskProps:I,className:P==null?void 0:P.mask}),h.createElement("div",ge({tabIndex:-1,onKeyDown:te,className:G.cn("".concat(r,"-wrap"),f,P==null?void 0:P.wrapper),ref:B,onClick:Y,style:Z},p),h.createElement(nx,ge({},e,{onMouseDown:ae,onMouseUp:ee,ref:_,closable:S,ariaId:W,prefixCls:r,visible:a&&K,onClose:ne,onVisibleChanged:J,motionName:lv(r,b,y)}))))},rx=function(e){var n=e.visible,r=e.getContainer,o=e.forceRender,i=e.destroyOnClose,a=i===void 0?!1:i,s=e.afterClose,l=e.panelRef,c=h.useState(n),u=X(c,2),d=u[0],f=u[1],p=h.useMemo(function(){return{panel:l}},[l]);return h.useEffect(function(){n&&f(!0)},[n]),!o&&a&&!d?null:h.createElement(tx.Provider,{value:p},h.createElement(Xc,{open:n||o||d,autoDestroy:!1,getContainer:r,autoLock:n||d},h.createElement(ID,ge({},e,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};rx.displayName="Dialog";var si="RC_FORM_INTERNAL_HOOKS",Lt=function(){at(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},ya=h.createContext({getFieldValue:Lt,getFieldsValue:Lt,getFieldError:Lt,getFieldWarning:Lt,getFieldsError:Lt,isFieldsTouched:Lt,isFieldTouched:Lt,isFieldValidating:Lt,isFieldsValidating:Lt,resetFields:Lt,setFields:Lt,setFieldValue:Lt,setFieldsValue:Lt,validateFields:Lt,submit:Lt,getInternalHooks:function(){return Lt(),{dispatch:Lt,initEntityValue:Lt,registerField:Lt,useSubscribe:Lt,setInitialValues:Lt,destroyForm:Lt,setCallbacks:Lt,registerWatch:Lt,getFields:Lt,setValidateMessages:Lt,setPreserve:Lt,getInitialValue:Lt}}}),sc=h.createContext(null);function Tf(t){return t==null?[]:Array.isArray(t)?t:[t]}function PD(t){return t&&!!t._init}function Af(){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 kf=Af();function TD(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function AD(t,e,n){if(Lh())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&ls(o,n.prototype),o}function Df(t){var e=typeof Map=="function"?new Map:void 0;return Df=function(r){if(r===null||!TD(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,o)}function o(){return AD(r,arguments,cs(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),ls(o,r)},Df(t)}var kD=/%[sdj%]/g,ox=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(ox=function(e,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(e,n)});function _f(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function cr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=0,i=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var a=t.replace(kD,function(s){if(s==="%%")return"%";if(o>=i)return s;switch(s){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function DD(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function bn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||DD(e)&&typeof t=="string"&&!t)}function _D(t,e,n){var r=[],o=0,i=t.length;function a(s){r.push.apply(r,he(s||[])),o++,o===i&&n(r)}t.forEach(function(s){e(s,a)})}function uv(t,e,n){var r=0,o=t.length;function i(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<o?e(t[s],i):n([])}i([])}function jD(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,he(t[n]||[]))}),e}var dv=function(t){go(n,t);var e=vo(n);function n(r,o){var i;return ln(this,n),i=e.call(this,"Async Validation Error"),D(yt(i),"errors",void 0),D(yt(i),"fields",void 0),i.errors=r,i.fields=o,i}return cn(n)}(Df(Error));function BD(t,e,n,r,o){if(e.first){var i=new Promise(function(f,p){var m=function(b){return r(b),b.length?p(new dv(b,_f(b))):f(o)},g=jD(t);uv(g,n,m)});return i.catch(function(f){return f}),i}var a=e.firstFields===!0?Object.keys(t):e.firstFields||[],s=Object.keys(t),l=s.length,c=0,u=[],d=new Promise(function(f,p){var m=function(v){if(u.push.apply(u,v),c++,c===l)return r(u),u.length?p(new dv(u,_f(u))):f(o)};s.length||(r(u),f(o)),s.forEach(function(g){var v=t[g];a.indexOf(g)!==-1?uv(v,n,m):_D(v,n,m)})});return d.catch(function(f){return f}),d}function zD(t){return!!(t&&t.message!==void 0)}function LD(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function fv(t,e){return function(n){var r;return t.fullFields?r=LD(e,t.fullFields):r=e[n.field||t.fullField],zD(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function hv(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];Ue(r)==="object"&&Ue(t[n])==="object"?t[n]=j(j({},t[n]),r):t[n]=r}}return t}var Bi="enum",FD=function(e,n,r,o,i){e[Bi]=Array.isArray(e[Bi])?e[Bi]:[],e[Bi].indexOf(n)===-1&&o.push(cr(i.messages[Bi],e.fullField,e[Bi].join(", ")))},HD=function(e,n,r,o,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||o.push(cr(i.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||o.push(cr(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},VD=function(e,n,r,o,i){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(f?d="number":p?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),p&&(u=n.replace(c,"_").length),a?u!==e.len&&o.push(cr(i.messages[d].len,e.fullField,e.len)):s&&!l&&u<e.min?o.push(cr(i.messages[d].min,e.fullField,e.min)):l&&!s&&u>e.max?o.push(cr(i.messages[d].max,e.fullField,e.max)):s&&l&&(u<e.min||u>e.max)&&o.push(cr(i.messages[d].range,e.fullField,e.min,e.max))},ix=function(e,n,r,o,i,a){e.required&&(!r.hasOwnProperty(e.field)||bn(n,a||e.type))&&o.push(cr(i.messages.required,e.fullField))},ll;const WD=function(){if(ll)return ll;var t="[a-fA-F\\d:]",e=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(o.join("|"),")").concat(i),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(a,"$")),u=function(w){return w&&w.exact?s:new RegExp("(?:".concat(e(w)).concat(n).concat(e(w),")|(?:").concat(e(w)).concat(a).concat(e(w),")"),"g")};u.v4=function(x){return x&&x.exact?l:new RegExp("".concat(e(x)).concat(n).concat(e(x)),"g")},u.v6=function(x){return x&&x.exact?c:new RegExp("".concat(e(x)).concat(a).concat(e(x)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,m=u.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",b="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",C='(?:[/?#][^\\s"]*)?',S="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(p,"|").concat(m,"|").concat(g).concat(v).concat(b,")").concat(y).concat(C);return ll=new RegExp("(?:^".concat(S,"$)"),"i"),ll};var pv={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},Ha={integer:function(e){return Ha.number(e)&&parseInt(e,10)===e},float:function(e){return Ha.number(e)&&!Ha.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 Ue(e)==="object"&&!Ha.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(pv.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(WD())},hex:function(e){return typeof e=="string"&&!!e.match(pv.hex)}},qD=function(e,n,r,o,i){if(e.required&&n===void 0){ix(e,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?Ha[s](n)||o.push(cr(i.messages.types[s],e.fullField,e.type)):s&&Ue(n)!==e.type&&o.push(cr(i.messages.types[s],e.fullField,e.type))},KD=function(e,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(cr(i.messages.whitespace,e.fullField))};const $t={required:ix,whitespace:KD,type:qD,range:VD,enum:FD,pattern:HD};var GD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i)}r(a)},UD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();$t.required(e,n,o,a,i,"array"),n!=null&&($t.type(e,n,o,a,i),$t.range(e,n,o,a,i))}r(a)},XD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&$t.type(e,n,o,a,i)}r(a)},YD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n,"date")&&!e.required)return r();if($t.required(e,n,o,a,i),!bn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),$t.type(e,l,o,a,i),l&&$t.range(e,l.getTime(),o,a,i)}}r(a)},JD="enum",ZD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&$t[JD](e,n,o,a,i)}r(a)},QD=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&($t.type(e,n,o,a,i),$t.range(e,n,o,a,i))}r(a)},e2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&($t.type(e,n,o,a,i),$t.range(e,n,o,a,i))}r(a)},t2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&$t.type(e,n,o,a,i)}r(a)},n2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&($t.type(e,n,o,a,i),$t.range(e,n,o,a,i))}r(a)},r2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),n!==void 0&&$t.type(e,n,o,a,i)}r(a)},o2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n,"string")&&!e.required)return r();$t.required(e,n,o,a,i),bn(n,"string")||$t.pattern(e,n,o,a,i)}r(a)},i2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n)&&!e.required)return r();$t.required(e,n,o,a,i),bn(n)||$t.type(e,n,o,a,i)}r(a)},a2=function(e,n,r,o,i){var a=[],s=Array.isArray(n)?"array":Ue(n);$t.required(e,n,o,a,i,s),r(a)},s2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(bn(n,"string")&&!e.required)return r();$t.required(e,n,o,a,i,"string"),bn(n,"string")||($t.type(e,n,o,a,i),$t.range(e,n,o,a,i),$t.pattern(e,n,o,a,i),e.whitespace===!0&&$t.whitespace(e,n,o,a,i))}r(a)},od=function(e,n,r,o,i){var a=e.type,s=[],l=e.required||!e.required&&o.hasOwnProperty(e.field);if(l){if(bn(n,a)&&!e.required)return r();$t.required(e,n,o,s,i,a),bn(n,a)||$t.type(e,n,o,s,i)}r(s)};const Ya={string:s2,method:t2,number:n2,boolean:XD,regexp:i2,integer:e2,float:QD,array:UD,object:r2,enum:ZD,pattern:o2,date:YD,url:od,hex:od,email:od,required:a2,any:GD};var As=function(){function t(e){ln(this,t),D(this,"rules",null),D(this,"_messages",kf),this.define(e)}return cn(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(Ue(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var i=n[o];r.rules[o]=Array.isArray(i)?i:[i]})}},{key:"messages",value:function(n){return n&&(this._messages=hv(Af(),n)),this._messages}},{key:"validate",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,s=o,l=i;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(m){var g=[],v={};function b(C){if(Array.isArray(C)){var S;g=(S=g).concat.apply(S,he(C))}else g.push(C)}for(var y=0;y<m.length;y++)b(m[y]);g.length?(v=_f(g),l(g,v)):l(null,a)}if(s.messages){var u=this.messages();u===kf&&(u=Af()),hv(u,s.messages),s.messages=u}else s.messages=this.messages();var d={},f=s.keys||Object.keys(this.rules);f.forEach(function(m){var g=r.rules[m],v=a[m];g.forEach(function(b){var y=b;typeof y.transform=="function"&&(a===n&&(a=j({},a)),v=a[m]=y.transform(v),v!=null&&(y.type=y.type||(Array.isArray(v)?"array":Ue(v)))),typeof y=="function"?y={validator:y}:y=j({},y),y.validator=r.getValidationMethod(y),y.validator&&(y.field=m,y.fullField=y.fullField||m,y.type=r.getType(y),d[m]=d[m]||[],d[m].push({rule:y,value:v,source:a,field:m}))})});var p={};return BD(d,s,function(m,g){var v=m.rule,b=(v.type==="object"||v.type==="array")&&(Ue(v.fields)==="object"||Ue(v.defaultField)==="object");b=b&&(v.required||!v.required&&m.value),v.field=m.field;function y($,R){return j(j({},R),{},{fullField:"".concat(v.fullField,".").concat($),fullFields:v.fullFields?[].concat(he(v.fullFields),[$]):[$]})}function C(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],R=Array.isArray($)?$:[$];!s.suppressWarning&&R.length&&t.warning("async-validator:",R),R.length&&v.message!==void 0&&(R=[].concat(v.message));var M=R.map(fv(v,a));if(s.first&&M.length)return p[v.field]=1,g(M);if(!b)g(M);else{if(v.required&&!m.value)return v.message!==void 0?M=[].concat(v.message).map(fv(v,a)):s.error&&(M=[s.error(v,cr(s.messages.required,v.field))]),g(M);var O={};v.defaultField&&Object.keys(m.value).map(function(T){O[T]=v.defaultField}),O=j(j({},O),m.rule.fields);var N={};Object.keys(O).forEach(function(T){var P=O[T],A=Array.isArray(P)?P:[P];N[T]=A.map(y.bind(null,T))});var I=new t(N);I.messages(s.messages),m.rule.options&&(m.rule.options.messages=s.messages,m.rule.options.error=s.error),I.validate(m.value,m.rule.options||s,function(T){var P=[];M&&M.length&&P.push.apply(P,he(M)),T&&T.length&&P.push.apply(P,he(T)),g(P.length?P:null)})}}var S;if(v.asyncValidator)S=v.asyncValidator(v,m.value,C,m.source,s);else if(v.validator){try{S=v.validator(v,m.value,C,m.source,s)}catch($){var x,w;(x=(w=console).error)===null||x===void 0||x.call(w,$),s.suppressValidatorError||setTimeout(function(){throw $},0),C($.message)}S===!0?C():S===!1?C(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||"".concat(v.fullField||v.field," fails")):S instanceof Array?C(S):S instanceof Error&&C(S.message)}S&&S.then&&S.then(function(){return C()},function($){return C($)})},function(m){c(m)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!Ya.hasOwnProperty(n.type))throw new Error(cr("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?Ya.required:Ya[this.getType(n)]||void 0}}]),t}();D(As,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Ya[e]=n});D(As,"warning",ox);D(As,"messages",kf);D(As,"validators",Ya);var rr="'${name}' is not a valid ${type}",ax={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:rr,method:rr,array:rr,object:rr,number:rr,date:rr,boolean:rr,integer:rr,float:rr,regexp:rr,email:rr,url:rr,hex:rr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},mv=As;function l2(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var gv="CODE_LOGIC_ERROR";function jf(t,e,n,r,o){return Bf.apply(this,arguments)}function Bf(){return Bf=Pi(Un().mark(function t(e,n,r,o,i){var a,s,l,c,u,d,f,p,m;return Un().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return a=j({},r),delete a.ruleIndex,mv.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(b){return console.error(b),Promise.reject(gv)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new mv(D({},e,[a])),u=Yi(ax,o.validateMessages),c.messages(u),d=[],v.prev=10,v.next=13,Promise.resolve(c.validate(D({},e,n),j({},o)));case 13:v.next=18;break;case 15:v.prev=15,v.t0=v.catch(10),v.t0.errors&&(d=v.t0.errors.map(function(b,y){var C=b.message,S=C===gv?u.default:C;return h.isValidElement(S)?h.cloneElement(S,{key:"error_".concat(y)}):S}));case 18:if(!(!d.length&&l)){v.next=23;break}return v.next=21,Promise.all(n.map(function(b,y){return jf("".concat(e,".").concat(y),b,l,o,i)}));case 21:return f=v.sent,v.abrupt("return",f.reduce(function(b,y){return[].concat(he(b),he(y))},[]));case 23:return p=j(j({},r),{},{name:e,enum:(r.enum||[]).join(", ")},i),m=d.map(function(b){return typeof b=="string"?l2(b,p):b}),v.abrupt("return",m);case 26:case"end":return v.stop()}},t,null,[[10,15]])})),Bf.apply(this,arguments)}function c2(t,e,n,r,o,i){var a=t.join("."),s=n.map(function(u,d){var f=u.validator,p=j(j({},u),{},{ruleIndex:d});return f&&(p.validator=function(m,g,v){var b=!1,y=function(){for(var x=arguments.length,w=new Array(x),$=0;$<x;$++)w[$]=arguments[$];Promise.resolve().then(function(){at(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||v.apply(void 0,w)})},C=f(m,g,y);b=C&&typeof C.then=="function"&&typeof C.catch=="function",at(b,"`callback` is deprecated. Please return a promise instead."),b&&C.then(function(){v()}).catch(function(S){v(S||" ")})}),p}).sort(function(u,d){var f=u.warningOnly,p=u.ruleIndex,m=d.warningOnly,g=d.ruleIndex;return!!f==!!m?p-g:f?1:-1}),l;if(o===!0)l=new Promise(function(){var u=Pi(Un().mark(function d(f,p){var m,g,v;return Un().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:m=0;case 1:if(!(m<s.length)){y.next=12;break}return g=s[m],y.next=5,jf(a,e,g,r,i);case 5:if(v=y.sent,!v.length){y.next=9;break}return p([{errors:v,rule:g}]),y.abrupt("return");case 9:m+=1,y.next=1;break;case 12:f([]);case 13:case"end":return y.stop()}},d)}));return function(d,f){return u.apply(this,arguments)}}());else{var c=s.map(function(u){return jf(a,e,u,r,i).then(function(d){return{errors:d,rule:u}})});l=(o?d2(c):u2(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function u2(t){return zf.apply(this,arguments)}function zf(){return zf=Pi(Un().mark(function t(e){return Un().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(e).then(function(o){var i,a=(i=[]).concat.apply(i,he(o));return a}));case 1:case"end":return r.stop()}},t)})),zf.apply(this,arguments)}function d2(t){return Lf.apply(this,arguments)}function Lf(){return Lf=Pi(Un().mark(function t(e){var n;return Un().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=0,o.abrupt("return",new Promise(function(i){e.forEach(function(a){a.then(function(s){s.errors.length&&i([s]),n+=1,n===e.length&&i([])})})}));case 2:case"end":return o.stop()}},t)})),Lf.apply(this,arguments)}function un(t){return Tf(t)}function vv(t,e){var n={};return e.forEach(function(r){var o=qr(t,r);n=Nr(n,r,o)}),n}function ra(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return sx(e,r,n)})}function sx(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,o){return t[o]===r})}function f2(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||Ue(t)!=="object"||Ue(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),o=new Set([].concat(n,r));return he(o).every(function(i){var a=t[i],s=e[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function h2(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&Ue(e.target)==="object"&&t in e.target?e.target[t]:e}function bv(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var o=t[e],i=e-n;return i>0?[].concat(he(t.slice(0,n)),[o],he(t.slice(n,e)),he(t.slice(e+1,r))):i<0?[].concat(he(t.slice(0,e)),he(t.slice(e+1,n+1)),[o],he(t.slice(n+1,r))):t}var p2=["name"],gr=[];function id(t,e,n,r,o,i){return typeof t=="function"?t(e,n,"source"in i?{source:i.source}:{}):r!==o}var cp=function(t){go(n,t);var e=vo(n);function n(r){var o;if(ln(this,n),o=e.call(this,r),D(yt(o),"state",{resetCount:0}),D(yt(o),"cancelRegisterFunc",null),D(yt(o),"mounted",!1),D(yt(o),"touched",!1),D(yt(o),"dirty",!1),D(yt(o),"validatePromise",void 0),D(yt(o),"prevValidating",void 0),D(yt(o),"errors",gr),D(yt(o),"warnings",gr),D(yt(o),"cancelRegister",function(){var l=o.props,c=l.preserve,u=l.isListField,d=l.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(u,c,un(d)),o.cancelRegisterFunc=null}),D(yt(o),"getNamePath",function(){var l=o.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat(he(f),he(c)):[]}),D(yt(o),"getRules",function(){var l=o.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),D(yt(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),D(yt(o),"metaCache",null),D(yt(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=j(j({},o.getMeta()),{},{destroy:l});da(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),D(yt(o),"onStoreChange",function(l,c,u){var d=o.props,f=d.shouldUpdate,p=d.dependencies,m=p===void 0?[]:p,g=d.onReset,v=u.store,b=o.getNamePath(),y=o.getValue(l),C=o.getValue(v),S=c&&ra(c,b);switch(u.type==="valueUpdate"&&u.source==="external"&&!da(y,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=gr,o.warnings=gr,o.triggerMetaEvent()),u.type){case"reset":if(!c||S){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=gr,o.warnings=gr,o.triggerMetaEvent(),g==null||g(),o.refresh();return}break;case"remove":{if(f&&id(f,l,v,y,C,u)){o.reRender();return}break}case"setField":{var x=u.data;if(S){"touched"in x&&(o.touched=x.touched),"validating"in x&&!("originRCField"in x)&&(o.validatePromise=x.validating?Promise.resolve([]):null),"errors"in x&&(o.errors=x.errors||gr),"warnings"in x&&(o.warnings=x.warnings||gr),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in x&&ra(c,b,!0)){o.reRender();return}if(f&&!b.length&&id(f,l,v,y,C,u)){o.reRender();return}break}case"dependenciesUpdate":{var w=m.map(un);if(w.some(function($){return ra(u.relatedFields,$)})){o.reRender();return}break}default:if(S||(!m.length||b.length||f)&&id(f,l,v,y,C,u)){o.reRender();return}break}f===!0&&o.reRender()}),D(yt(o),"validateRules",function(l){var c=o.getNamePath(),u=o.getValue(),d=l||{},f=d.triggerName,p=d.validateOnly,m=p===void 0?!1:p,g=Promise.resolve().then(Pi(Un().mark(function v(){var b,y,C,S,x,w,$;return Un().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(o.mounted){M.next=2;break}return M.abrupt("return",[]);case 2:if(b=o.props,y=b.validateFirst,C=y===void 0?!1:y,S=b.messageVariables,x=b.validateDebounce,w=o.getRules(),f&&(w=w.filter(function(O){return O}).filter(function(O){var N=O.validateTrigger;if(!N)return!0;var I=Tf(N);return I.includes(f)})),!(x&&f)){M.next=10;break}return M.next=8,new Promise(function(O){setTimeout(O,x)});case 8:if(o.validatePromise===g){M.next=10;break}return M.abrupt("return",[]);case 10:return $=c2(c,u,w,l,C,S),$.catch(function(O){return O}).then(function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gr;if(o.validatePromise===g){var N;o.validatePromise=null;var I=[],T=[];(N=O.forEach)===null||N===void 0||N.call(O,function(P){var A=P.rule.warningOnly,k=P.errors,B=k===void 0?gr:k;A?T.push.apply(T,he(B)):I.push.apply(I,he(B))}),o.errors=I,o.warnings=T,o.triggerMetaEvent(),o.reRender()}}),M.abrupt("return",$);case 13:case"end":return M.stop()}},v)})));return m||(o.validatePromise=g,o.dirty=!0,o.errors=gr,o.warnings=gr,o.triggerMetaEvent(),o.reRender()),g}),D(yt(o),"isFieldValidating",function(){return!!o.validatePromise}),D(yt(o),"isFieldTouched",function(){return o.touched}),D(yt(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var l=o.props.fieldContext,c=l.getInternalHooks(si),u=c.getInitialValue;return u(o.getNamePath())!==void 0}),D(yt(o),"getErrors",function(){return o.errors}),D(yt(o),"getWarnings",function(){return o.warnings}),D(yt(o),"isListField",function(){return o.props.isListField}),D(yt(o),"isList",function(){return o.props.isList}),D(yt(o),"isPreserve",function(){return o.props.preserve}),D(yt(o),"getMeta",function(){o.prevValidating=o.isFieldValidating();var l={touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:o.validatePromise===null};return l}),D(yt(o),"getOnlyChild",function(l){if(typeof l=="function"){var c=o.getMeta();return j(j({},o.getOnlyChild(l(o.getControlled(),c,o.props.fieldContext))),{},{isFunction:!0})}var u=dr(l);return u.length!==1||!h.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),D(yt(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return qr(l||c(!0),u)}),D(yt(o),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=o.props,u=c.name,d=c.trigger,f=c.validateTrigger,p=c.getValueFromEvent,m=c.normalize,g=c.valuePropName,v=c.getValueProps,b=c.fieldContext,y=f!==void 0?f:b.validateTrigger,C=o.getNamePath(),S=b.getInternalHooks,x=b.getFieldsValue,w=S(si),$=w.dispatch,R=o.getValue(),M=v||function(P){return D({},g,P)},O=l[d],N=u!==void 0?M(R):{};process.env.NODE_ENV!=="production"&&N&&Object.keys(N).forEach(function(P){at(typeof N[P]!="function","It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(P,")"))});var I=j(j({},l),N);I[d]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var P,A=arguments.length,k=new Array(A),B=0;B<A;B++)k[B]=arguments[B];p?P=p.apply(void 0,k):P=h2.apply(void 0,[g].concat(k)),m&&(P=m(P,R,x(!0))),P!==R&&$({type:"updateValue",namePath:C,value:P}),O&&O.apply(void 0,k)};var T=Tf(y||[]);return T.forEach(function(P){var A=I[P];I[P]=function(){A&&A.apply(void 0,arguments);var k=o.props.rules;k&&k.length&&$({type:"validateField",namePath:C,triggerName:P})}}),I}),r.fieldContext){var i=r.fieldContext.getInternalHooks,a=i(si),s=a.initEntityValue;s(yt(o))}return o}return cn(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.shouldUpdate,a=o.fieldContext;if(this.mounted=!0,a){var s=a.getInternalHooks,l=s(si),c=l.registerField;this.cancelRegisterFunc=c(this)}i===!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 o=this.state.resetCount,i=this.props.children,a=this.getOnlyChild(i),s=a.child,l=a.isFunction,c;return l?c=s:h.isValidElement(s)?c=h.cloneElement(s,this.getControlled(s.props)):(at(!s,"`children` of Field is not validate ReactElement."),c=s),h.createElement(h.Fragment,{key:o},c)}}]),n}(h.Component);D(cp,"contextType",ya);D(cp,"defaultProps",{trigger:"onChange",valuePropName:"value"});function lx(t){var e,n=t.name,r=lt(t,p2),o=h.useContext(ya),i=h.useContext(sc),a=n!==void 0?un(n):void 0,s=(e=r.isListField)!==null&&e!==void 0?e:!!i,l="keep";return s||(l="_".concat((a||[]).join("_"))),process.env.NODE_ENV!=="production"&&r.preserve===!1&&s&&a.length<=1&&at(!1,"`preserve` should not apply on Form.List fields."),h.createElement(cp,ge({key:l,name:a,isListField:s},r,{fieldContext:o}))}function m2(t){var e=t.name,n=t.initialValue,r=t.children,o=t.rules,i=t.validateTrigger,a=t.isListField,s=h.useContext(ya),l=h.useContext(sc),c=h.useRef({keys:[],id:0}),u=c.current,d=h.useMemo(function(){var g=un(s.prefixName)||[];return[].concat(he(g),he(un(e)))},[s.prefixName,e]),f=h.useMemo(function(){return j(j({},s),{},{prefixName:d})},[s,d]),p=h.useMemo(function(){return{getKey:function(v){var b=d.length,y=v[b];return[u.keys[y],v.slice(b+1)]}}},[d]);if(typeof r!="function")return at(!1,"Form.List only accepts function as children."),null;var m=function(v,b,y){var C=y.source;return C==="internal"?!1:v!==b};return h.createElement(sc.Provider,{value:p},h.createElement(ya.Provider,{value:f},h.createElement(lx,{name:[],shouldUpdate:m,rules:o,validateTrigger:i,initialValue:n,isList:!0,isListField:a??!!l},function(g,v){var b=g.value,y=b===void 0?[]:b,C=g.onChange,S=s.getFieldValue,x=function(){var M=S(d||[]);return M||[]},w={add:function(M,O){var N=x();O>=0&&O<=N.length?(u.keys=[].concat(he(u.keys.slice(0,O)),[u.id],he(u.keys.slice(O))),C([].concat(he(N.slice(0,O)),[M],he(N.slice(O))))):(process.env.NODE_ENV!=="production"&&(O<0||O>N.length)&&at(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(he(u.keys),[u.id]),C([].concat(he(N),[M]))),u.id+=1},remove:function(M){var O=x(),N=new Set(Array.isArray(M)?M:[M]);N.size<=0||(u.keys=u.keys.filter(function(I,T){return!N.has(T)}),C(O.filter(function(I,T){return!N.has(T)})))},move:function(M,O){if(M!==O){var N=x();M<0||M>=N.length||O<0||O>=N.length||(u.keys=bv(u.keys,M,O),C(bv(N,M,O)))}}},$=y||[];return Array.isArray($)||($=[],process.env.NODE_ENV!=="production"&&at(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),r($.map(function(R,M){var O=u.keys[M];return O===void 0&&(u.keys[M]=u.id,O=u.keys[M],u.id+=1),{name:M,key:O,isListField:!0}}),w,v)})))}function g2(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(o,i){t.forEach(function(a,s){a.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(e&&i(r),o(r))})})}):Promise.resolve([])}var cx="__@field_split__";function ad(t){return t.map(function(e){return"".concat(Ue(e),":").concat(e)}).join(cx)}var zi=function(){function t(){ln(this,t),D(this,"kvs",new Map)}return cn(t,[{key:"set",value:function(n,r){this.kvs.set(ad(n),r)}},{key:"get",value:function(n){return this.kvs.get(ad(n))}},{key:"update",value:function(n,r){var o=this.get(n),i=r(o);i?this.set(n,i):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(ad(n))}},{key:"map",value:function(n){return he(this.kvs.entries()).map(function(r){var o=X(r,2),i=o[0],a=o[1],s=i.split(cx);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=X(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var o=r.key,i=r.value;return n[o.join(".")]=i,null}),n}}]),t}(),v2=["name"],b2=cn(function t(e){var n=this;ln(this,t),D(this,"formHooked",!1),D(this,"forceRootUpdate",void 0),D(this,"subscribable",!0),D(this,"store",{}),D(this,"fieldEntities",[]),D(this,"initialValues",{}),D(this,"callbacks",{}),D(this,"validateMessages",null),D(this,"preserve",null),D(this,"lastValidatePromise",null),D(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),D(this,"getInternalHooks",function(r){return r===si?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(at(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),D(this,"useSubscribe",function(r){n.subscribable=r}),D(this,"prevWithoutPreserves",null),D(this,"setInitialValues",function(r,o){if(n.initialValues=r||{},o){var i,a=Yi(r,n.store);(i=n.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=Nr(a,l,qr(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),D(this,"destroyForm",function(r){if(r)n.updateStore({});else{var o=new zi;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||o.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=o}}),D(this,"getInitialValue",function(r){var o=qr(n.initialValues,r);return r.length?Yi(o):o}),D(this,"setCallbacks",function(r){n.callbacks=r}),D(this,"setValidateMessages",function(r){n.validateMessages=r}),D(this,"setPreserve",function(r){n.preserve=r}),D(this,"watchList",[]),D(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(o){return o!==r})}}),D(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var o=n.getFieldsValue(),i=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(o,i,r)})}}),D(this,"timeoutId",null),D(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||at(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),D(this,"updateStore",function(r){n.store=r}),D(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(o){return o.getNamePath().length}):n.fieldEntities}),D(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new zi;return n.getFieldEntities(r).forEach(function(i){var a=i.getNamePath();o.set(a,i)}),o}),D(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var o=n.getFieldsMap(!0);return r.map(function(i){var a=un(i);return o.get(a)||{INVALIDATE_NAME_PATH:un(i)}})}),D(this,"getFieldsValue",function(r,o){n.warningUnhooked();var i,a,s;if(r===!0||Array.isArray(r)?(i=r,a=o):r&&Ue(r)==="object"&&(s=r.strict,a=r.filter),i===!0&&!a)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(i)?i:null),c=[];return l.forEach(function(u){var d,f,p="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var m,g;if((m=(g=u).isList)!==null&&m!==void 0&&m.call(g))return}else if(!i&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(p);else{var v="getMeta"in u?u.getMeta():null;a(v)&&c.push(p)}}),vv(n.store,c.map(un))}),D(this,"getFieldValue",function(r){n.warningUnhooked();var o=un(r);return qr(n.store,o)}),D(this,"getFieldsError",function(r){n.warningUnhooked();var o=n.getFieldEntitiesForNamePathList(r);return o.map(function(i,a){return i&&!("INVALIDATE_NAME_PATH"in i)?{name:i.getNamePath(),errors:i.getErrors(),warnings:i.getWarnings()}:{name:un(r[a]),errors:[],warnings:[]}})}),D(this,"getFieldError",function(r){n.warningUnhooked();var o=un(r),i=n.getFieldsError([o])[0];return i.errors}),D(this,"getFieldWarning",function(r){n.warningUnhooked();var o=un(r),i=n.getFieldsError([o])[0];return i.warnings}),D(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o[0],s=o[1],l,c=!1;o.length===0?l=null:o.length===1?Array.isArray(a)?(l=a.map(un),c=!1):(l=null,c=a):(l=a.map(un),c=s);var u=n.getFieldEntities(!0),d=function(v){return v.isFieldTouched()};if(!l)return c?u.every(function(g){return d(g)||g.isList()}):u.some(d);var f=new zi;l.forEach(function(g){f.set(g,[])}),u.forEach(function(g){var v=g.getNamePath();l.forEach(function(b){b.every(function(y,C){return v[C]===y})&&f.update(b,function(y){return[].concat(he(y),[g])})})});var p=function(v){return v.some(d)},m=f.map(function(g){var v=g.value;return v});return c?m.every(p):m.some(p)}),D(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),D(this,"isFieldsValidating",function(r){n.warningUnhooked();var o=n.getFieldEntities();if(!r)return o.some(function(a){return a.isFieldValidating()});var i=r.map(un);return o.some(function(a){var s=a.getNamePath();return ra(i,s)&&a.isFieldValidating()})}),D(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),D(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=new zi,i=n.getFieldEntities(!0);i.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=o.get(u)||new Set;d.add({entity:l,value:c}),o.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),p=n.getInitialValue(f);if(p!==void 0)at(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var m=o.get(f);if(m&&m.size>1)at(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(m){var g=n.getFieldValue(f),v=u.isListField();!v&&(!r.skipExist||g===void 0)&&n.updateStore(Nr(n.store,f,he(m)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=o.get(l);if(c){var u;(u=s).push.apply(u,he(he(c).map(function(d){return d.entity})))}})):s=i,a(s)}),D(this,"resetFields",function(r){n.warningUnhooked();var o=n.store;if(!r){n.updateStore(Yi(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(o,null,{type:"reset"}),n.notifyWatch();return}var i=r.map(un);i.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(Nr(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:i}),n.notifyObservers(o,i,{type:"reset"}),n.notifyWatch(i)}),D(this,"setFields",function(r){n.warningUnhooked();var o=n.store,i=[];r.forEach(function(a){var s=a.name,l=lt(a,v2),c=un(s);i.push(c),"value"in l&&n.updateStore(Nr(n.store,c,l.value)),n.notifyObservers(o,[c],{type:"setField",data:a})}),n.notifyWatch(i)}),D(this,"getFields",function(){var r=n.getFieldEntities(!0),o=r.map(function(i){var a=i.getNamePath(),s=i.getMeta(),l=j(j({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return o}),D(this,"initEntityValue",function(r){var o=r.props.initialValue;if(o!==void 0){var i=r.getNamePath(),a=qr(n.store,i);a===void 0&&n.updateStore(Nr(n.store,i,o))}}),D(this,"isMergedPreserve",function(r){var o=r!==void 0?r:n.preserve;return o??!0}),D(this,"registerField",function(r){n.fieldEntities.push(r);var o=r.getNamePath();if(n.notifyWatch([o]),r.props.initialValue!==void 0){var i=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(i,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:n.getInitialValue(o);if(o.length&&n.getFieldValue(o)!==c&&n.fieldEntities.every(function(d){return!sx(d.getNamePath(),o)})){var u=n.store;n.updateStore(Nr(u,o,c,!0)),n.notifyObservers(u,[o],{type:"remove"}),n.triggerDependenciesUpdate(u,o)}}n.notifyWatch([o])}}),D(this,"dispatch",function(r){switch(r.type){case"updateValue":{var o=r.namePath,i=r.value;n.updateValue(o,i);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),D(this,"notifyObservers",function(r,o,i){if(n.subscribable){var a=j(j({},i),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,o,a)})}else n.forceRootUpdate()}),D(this,"triggerDependenciesUpdate",function(r,o){var i=n.getDependencyChildrenFields(o);return i.length&&n.validateFields(i),n.notifyObservers(r,i,{type:"dependenciesUpdate",relatedFields:[o].concat(he(i))}),i}),D(this,"updateValue",function(r,o){var i=un(r),a=n.store;n.updateStore(Nr(n.store,i,o)),n.notifyObservers(a,[i],{type:"valueUpdate",source:"internal"}),n.notifyWatch([i]);var s=n.triggerDependenciesUpdate(a,i),l=n.callbacks.onValuesChange;if(l){var c=vv(n.store,[i]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([i].concat(he(s)))}),D(this,"setFieldsValue",function(r){n.warningUnhooked();var o=n.store;if(r){var i=Yi(n.store,r);n.updateStore(i)}n.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),D(this,"setFieldValue",function(r,o){n.setFields([{name:r,value:o,errors:[],warnings:[]}])}),D(this,"getDependencyChildrenFields",function(r){var o=new Set,i=[],a=new zi;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=un(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!o.has(d)){o.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(i.push(f),l(f))}})};return s(r),i}),D(this,"triggerOnFieldsChange",function(r,o){var i=n.callbacks.onFieldsChange;if(i){var a=n.getFields();if(o){var s=new zi;o.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return ra(r,u)});l.length&&i(l,a)}}),D(this,"validateFields",function(r,o){n.warningUnhooked();var i,a;Array.isArray(r)||typeof r=="string"||typeof o=="string"?(i=r,a=o):a=r;var s=!!i,l=s?i.map(un):[],c=[],u=String(Date.now()),d=new Set,f=a||{},p=f.recursive,m=f.dirty;n.getFieldEntities(!0).forEach(function(y){if(s||l.push(y.getNamePath()),!(!y.props.rules||!y.props.rules.length)&&!(m&&!y.isFieldDirty())){var C=y.getNamePath();if(d.add(C.join(u)),!s||ra(l,C,p)){var S=y.validateRules(j({validateMessages:j(j({},ax),n.validateMessages)},a));c.push(S.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(x){var w,$=[],R=[];return(w=x.forEach)===null||w===void 0||w.call(x,function(M){var O=M.rule.warningOnly,N=M.errors;O?R.push.apply(R,he(N)):$.push.apply($,he(N))}),$.length?Promise.reject({name:C,errors:$,warnings:R}):{name:C,errors:$,warnings:R}}))}}});var g=g2(c);n.lastValidatePromise=g,g.catch(function(y){return y}).then(function(y){var C=y.map(function(S){var x=S.name;return x});n.notifyObservers(n.store,C,{type:"validateFinish"}),n.triggerOnFieldsChange(C,y)});var v=g.then(function(){return n.lastValidatePromise===g?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(y){var C=y.filter(function(S){return S&&S.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:C,outOfDate:n.lastValidatePromise!==g})});v.catch(function(y){return y});var b=l.filter(function(y){return d.has(y.join(u))});return n.triggerOnFieldsChange(b),v}),D(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var o=n.callbacks.onFinish;if(o)try{o(r)}catch(i){console.error(i)}}).catch(function(r){var o=n.callbacks.onFinishFailed;o&&o(r)})}),this.forceRootUpdate=e});function ux(t){var e=h.useRef(),n=h.useState({}),r=X(n,2),o=r[1];if(!e.current)if(t)e.current=t;else{var i=function(){o({})},a=new b2(i);e.current=a.getForm()}return[e.current]}var Ff=h.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),y2=function(e){var n=e.validateMessages,r=e.onFormChange,o=e.onFormFinish,i=e.children,a=h.useContext(Ff),s=h.useRef({});return h.createElement(Ff.Provider,{value:j(j({},a),{},{validateMessages:j(j({},a.validateMessages),n),triggerFormChange:function(c,u){r&&r(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){o&&o(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=j(j({},s.current),{},D({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=j({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},i)},C2=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],S2=function(e,n){var r=e.name,o=e.initialValues,i=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,d=e.validateMessages,f=e.validateTrigger,p=f===void 0?"onChange":f,m=e.onValuesChange,g=e.onFieldsChange,v=e.onFinish,b=e.onFinishFailed,y=e.clearOnDestroy,C=lt(e,C2),S=h.useRef(null),x=h.useContext(Ff),w=ux(a),$=X(w,1),R=$[0],M=R.getInternalHooks(si),O=M.useSubscribe,N=M.setInitialValues,I=M.setCallbacks,T=M.setValidateMessages,P=M.setPreserve,A=M.destroyForm;h.useImperativeHandle(n,function(){return j(j({},R),{},{nativeElement:S.current})}),h.useEffect(function(){return x.registerForm(r,R),function(){x.unregisterForm(r)}},[x,R,r]),T(j(j({},x.validateMessages),d)),I({onValuesChange:m,onFieldsChange:function(z){if(x.triggerFormChange(r,z),g){for(var L=arguments.length,J=new Array(L>1?L-1:0),ne=1;ne<L;ne++)J[ne-1]=arguments[ne];g.apply(void 0,[z].concat(J))}},onFinish:function(z){x.triggerFormFinish(r,z),v&&v(z)},onFinishFailed:b}),P(s);var k=h.useRef(null);N(o,!k.current),k.current||(k.current=!0),h.useEffect(function(){return function(){return A(y)}},[]);var B,_=typeof l=="function";if(_){var F=R.getFieldsValue(!0);B=l(F,R)}else B=l;O(!_);var H=h.useRef();h.useEffect(function(){f2(H.current||[],i||[])||R.setFields(i||[]),H.current=i},[i,R]);var K=h.useMemo(function(){return j(j({},R),{},{validateTrigger:p})},[R,p]),V=h.createElement(sc.Provider,{value:null},h.createElement(ya.Provider,{value:K},B));return u===!1?V:h.createElement(u,ge({},C,{ref:S,onSubmit:function(z){z.preventDefault(),z.stopPropagation(),R.submit()},onReset:function(z){var L;z.preventDefault(),R.resetFields(),(L=C.onReset)===null||L===void 0||L.call(C,z)}}),V)};function yv(t){try{return JSON.stringify(t)}catch{return Math.random()}}var x2=process.env.NODE_ENV!=="production"?function(t){var e=t.join("__RC_FIELD_FORM_SPLIT__"),n=E.useRef(e);at(n.current===e,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")}:function(){};function w2(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[0],o=e[1],i=o===void 0?{}:o,a=PD(i)?{form:i}:i,s=a.form,l=E.useState(),c=X(l,2),u=c[0],d=c[1],f=E.useMemo(function(){return yv(u)},[u]),p=E.useRef(f);p.current=f;var m=E.useContext(ya),g=s||m,v=g&&g._init;process.env.NODE_ENV!=="production"&&at(e.length===2?s?v:!0:v,"useWatch requires a form instance since it can not auto detect from context.");var b=un(r),y=E.useRef(b);return y.current=b,x2(b),E.useEffect(function(){if(v){var C=g.getFieldsValue,S=g.getInternalHooks,x=S(si),w=x.registerWatch,$=function(N,I){var T=a.preserve?I:N;return typeof r=="function"?r(T):qr(T,y.current)},R=w(function(O,N){var I=$(O,N),T=yv(I);p.current!==T&&(p.current=T,d(I))}),M=$(C(),C(!0));return u!==M&&d(M),R}},[v]),u}var E2=h.forwardRef(S2),ks=E2;ks.FormProvider=y2;ks.Field=lx;ks.List=m2;ks.useForm=ux;ks.useWatch=w2;const wr=h.createContext({});process.env.NODE_ENV!=="production"&&(wr.displayName="FormItemInputContext");const $2=({children:t,status:e,override:n})=>{const r=h.useContext(wr),o=h.useMemo(()=>{const i=Object.assign({},r);return n&&delete i.isFormItemInput,e&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[e,n,r]);return h.createElement(wr.Provider,{value:o},t)},O2=h.createContext(void 0),Wo=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let o=r;return n&&(o=E.createElement($2,{override:!0,status:!0},o)),e&&(o=E.createElement($A,null,o)),o};function Cv(...t){const e={};return t.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})}),e}function Sv(t){if(t)return{closable:t.closable,closeIcon:t.closeIcon}}function xv(t){const{closable:e,closeIcon:n}=t||{};return E.useMemo(()=>{if(!e&&(e===!1||n===!1||n===null))return!1;if(e===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return e&&typeof e=="object"&&(r=Object.assign(Object.assign({},r),e)),r},[e,n])}const M2={};function N2(t,e,n=M2){const r=xv(t),o=xv(e),[i]=Qr("global",Ho.global),a=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,s=E.useMemo(()=>Object.assign({closeIcon:E.createElement(Os,null)},n),[n]),l=E.useMemo(()=>r===!1?!1:r?Cv(s,o,r):o===!1?!1:o?Cv(s,o):s.closable?s:!1,[r,o,s]);return E.useMemo(()=>{if(l===!1)return[!1,null,a,{}];const{closeIconRender:c}=s,{closeIcon:u}=l;let d=u;const f=Yr(l,!0);return d!=null&&(c&&(d=c(u)),d=E.isValidElement(d)?E.cloneElement(d,Object.assign({"aria-label":i.close},f)):E.createElement("span",Object.assign({"aria-label":i.close},f),d)),[!0,d,a,f]},[l,s])}const R2=()=>zn()&&window.document.documentElement,Jc=t=>{const{prefixCls:e,className:n,style:r,size:o,shape:i}=t,a=G.cn({[`${e}-lg`]:o==="large",[`${e}-sm`]:o==="small"}),s=G.cn({[`${e}-circle`]:i==="circle",[`${e}-square`]:i==="square",[`${e}-round`]:i==="round"}),l=h.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return h.createElement("span",{className:G.cn(e,a,s,n),style:Object.assign(Object.assign({},l),r)})},I2=new kt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Zc=t=>({height:t,lineHeight:U(t)}),oa=t=>Object.assign({width:t},Zc(t)),P2=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:I2,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),sd=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},Zc(t)),T2=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},oa(r)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},oa(o)),[`${e}${e}-sm`]:Object.assign({},oa(i))}},A2=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=t;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},sd(e,s)),[`${r}-lg`]:Object.assign({},sd(o,s)),[`${r}-sm`]:Object.assign({},sd(i,s))}},wv=t=>Object.assign({width:t},Zc(t)),k2=t=>{const{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:o,calc:i}=t;return{[e]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:o},wv(i(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},wv(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},ld=(t,e,n)=>{const{skeletonButtonCls:r}=t;return{[`${n}${r}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:e}}},cd=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},Zc(t)),D2=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},cd(r,s))},ld(t,r,n)),{[`${n}-lg`]:Object.assign({},cd(o,s))}),ld(t,o,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},cd(i,s))}),ld(t,i,`${n}-sm`))},_2=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:p,borderRadius:m,titleHeight:g,blockRadius:v,paragraphLiHeight:b,controlHeightXS:y,paragraphMarginTop:C}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},oa(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},oa(c)),[`${n}-sm`]:Object.assign({},oa(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:g,background:d,borderRadius:v,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:d,borderRadius:v,"+ li":{marginBlockStart:y}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${r}, ${o} > li`]:{borderRadius:m}}},[`${e}-with-avatar ${e}-content`]:{[r]:{marginBlockStart:p,[`+ ${o}`]:{marginBlockStart:C}}},[`${e}${e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},D2(t)),T2(t)),A2(t)),k2(t)),[`${e}${e}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${e}${e}-active`]:{[`
290
290
  ${r},
291
291
  ${o} > li,
292
292
  ${n},
@@ -296,9 +296,9 @@ html body {
296
296
  `]:Object.assign({},P2(t))}}},j2=t=>{const{colorFillContent:e,colorFill:n}=t,r=e,o=n;return{color:r,colorGradientEnd:o,gradientFromColor:r,gradientToColor:o,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},wa=Yt("Skeleton",t=>{const{componentCls:e,calc:n}=t,r=Mt(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.gradientFromColor} 25%, ${t.gradientToColor} 37%, ${t.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[_2(r)]},j2,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),B2=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,shape:i="circle",size:a="default"}=t,{getPrefixCls:s}=h.useContext(gt),l=s("skeleton",e),[c,u,d]=wa(l),f=vn(t,["prefixCls","className"]),p=G.cn(l,`${l}-element`,{[`${l}-active`]:o},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(Jc,Object.assign({prefixCls:`${l}-avatar`,shape:i,size:a},f))))},z2=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,block:i=!1,size:a="default"}=t,{getPrefixCls:s}=h.useContext(gt),l=s("skeleton",e),[c,u,d]=wa(l),f=vn(t,["prefixCls"]),p=G.cn(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(Jc,Object.assign({prefixCls:`${l}-button`,size:a},f))))},L2="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",F2=t=>{const{prefixCls:e,className:n,rootClassName:r,style:o,active:i}=t,{getPrefixCls:a}=h.useContext(gt),s=a("skeleton",e),[l,c,u]=wa(s),d=G.cn(s,`${s}-element`,{[`${s}-active`]:i},n,r,c,u);return l(h.createElement("div",{className:d},h.createElement("div",{className:G.cn(`${s}-image`,n),style:o},h.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},h.createElement("title",null,"Image placeholder"),h.createElement("path",{d:L2,className:`${s}-image-path`})))))},H2=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,block:i,size:a="default"}=t,{getPrefixCls:s}=h.useContext(gt),l=s("skeleton",e),[c,u,d]=wa(l),f=vn(t,["prefixCls"]),p=G.cn(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(Jc,Object.assign({prefixCls:`${l}-input`,size:a},f))))},V2=t=>{const{prefixCls:e,className:n,rootClassName:r,style:o,active:i,children:a}=t,{getPrefixCls:s}=h.useContext(gt),l=s("skeleton",e),[c,u,d]=wa(l),f=G.cn(l,`${l}-element`,{[`${l}-active`]:i},u,n,r,d);return c(h.createElement("div",{className:f},h.createElement("div",{className:G.cn(`${l}-image`,n),style:o},a)))},W2=(t,e)=>{const{width:n,rows:r=2}=e;if(Array.isArray(n))return n[t];if(r-1===t)return n},q2=t=>{const{prefixCls:e,className:n,style:r,rows:o=0}=t,i=Array.from({length:o}).map((a,s)=>h.createElement("li",{key:s,style:{width:W2(s,t)}}));return h.createElement("ul",{className:G.cn(e,n),style:r},i)},K2=({prefixCls:t,className:e,width:n,style:r})=>h.createElement("h3",{className:G.cn(t,e),style:Object.assign({width:n},r)});function ud(t){return t&&typeof t=="object"?t:{}}function G2(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function U2(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function X2(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Ti=t=>{const{prefixCls:e,loading:n,className:r,rootClassName:o,style:i,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=t,{getPrefixCls:f,direction:p,className:m,style:g}=hr("skeleton"),v=f("skeleton",e),[b,y,C]=wa(v);if(n||!("loading"in t)){const S=!!s,x=!!l,w=!!c;let $;if(S){const O=Object.assign(Object.assign({prefixCls:`${v}-avatar`},G2(x,w)),ud(s));$=h.createElement("div",{className:`${v}-header`},h.createElement(Jc,Object.assign({},O)))}let R;if(x||w){let O;if(x){const I=Object.assign(Object.assign({prefixCls:`${v}-title`},U2(S,w)),ud(l));O=h.createElement(K2,Object.assign({},I))}let N;if(w){const I=Object.assign(Object.assign({prefixCls:`${v}-paragraph`},X2(S,x)),ud(c));N=h.createElement(q2,Object.assign({},I))}R=h.createElement("div",{className:`${v}-content`},O,N)}const M=G.cn(v,{[`${v}-with-avatar`]:S,[`${v}-active`]:u,[`${v}-rtl`]:p==="rtl",[`${v}-round`]:d},m,r,o,y,C);return b(h.createElement("div",{className:M,style:Object.assign(Object.assign({},g),i)},$,R))}return a??null};Ti.Button=z2;Ti.Avatar=B2;Ti.Input=H2;Ti.Image=F2;Ti.Node=V2;process.env.NODE_ENV!=="production"&&(Ti.displayName="Skeleton");function Ev(){}const Y2=h.createContext({add:Ev,remove:Ev});function J2(t){const e=h.useContext(Y2),n=h.useRef(null);return At(o=>{if(o){const i=t?o.querySelector(t):o;e.add(i),n.current=i}else e.remove(n.current)})}const $v=()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:n}=E.useContext(Ts);return E.createElement(mo,Object.assign({onClick:n},t),e)},Ov=()=>{const{confirmLoading:t,okButtonProps:e,okType:n,okTextLocale:r,onOk:o}=E.useContext(Ts);return E.createElement(mo,Object.assign({},DS(n),{loading:t,onClick:o},e),r)};function dx(t,e){return E.createElement("span",{className:`${t}-close-x`},e||E.createElement(Os,{className:`${t}-close-icon`}))}const fx=t=>{const{okText:e,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=t,[u]=Qr("Modal",FC()),d=e||(u==null?void 0:u.okText),f=r||(u==null?void 0:u.cancelText),p={confirmLoading:o,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:i,onCancel:a},m=E.useMemo(()=>p,he(Object.values(p)));let g;return typeof c=="function"||typeof c>"u"?(g=E.createElement(E.Fragment,null,E.createElement($v,null),E.createElement(Ov,null)),typeof c=="function"&&(g=c(g,{OkBtn:Ov,CancelBtn:$v})),g=E.createElement(QS,{value:m},g)):g=c,E.createElement(XC,{disabled:!1},g)},Z2=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},Q2=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},e_=(t,e)=>{const{prefixCls:n,componentCls:r,gridColumns:o}=t,i={};for(let a=o;a>=0;a--)a===0?(i[`${r}${e}-${a}`]={display:"none"},i[`${r}-push-${a}`]={insetInlineStart:"auto"},i[`${r}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${e}-push-${a}`]={insetInlineStart:"auto"},i[`${r}${e}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${e}-offset-${a}`]={marginInlineStart:0},i[`${r}${e}-order-${a}`]={order:0}):(i[`${r}${e}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/o*100}%`,maxWidth:`${a/o*100}%`}],i[`${r}${e}-push-${a}`]={insetInlineStart:`${a/o*100}%`},i[`${r}${e}-pull-${a}`]={insetInlineEnd:`${a/o*100}%`},i[`${r}${e}-offset-${a}`]={marginInlineStart:`${a/o*100}%`},i[`${r}${e}-order-${a}`]={order:a});return i[`${r}${e}-flex`]={flex:`var(--${n}${e}-flex)`},i},Hf=(t,e)=>e_(t,e),t_=(t,e,n)=>({[`@media (min-width: ${U(e)})`]:Object.assign({},Hf(t,n))}),n_=()=>({}),r_=()=>({});Yt("Grid",Z2,n_);const hx=t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin});Yt("Grid",t=>{const e=Mt(t,{gridColumns:24}),n=hx(e);return delete n.xs,[Q2(e),Hf(e,""),Hf(e,"-xs"),Object.keys(n).map(r=>t_(e,n[r],`-${r}`)).reduce((r,o)=>Object.assign(Object.assign({},r),o),{})]},r_);function Mv(t){return{position:t,inset:0}}const o_=t=>{const{componentCls:e,antCls:n}=t;return[{[`${e}-root`]:{[`${e}${n}-zoom-enter, ${e}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${n}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:Object.assign(Object.assign({},Mv("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Object.assign(Object.assign({},Mv("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:sk(t)}]},i_=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${U(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Object.assign(Object.assign({},An(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${U(t.calc(t.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.titleFontSize,lineHeight:t.titleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.contentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadow,pointerEvents:"auto",padding:t.contentPadding},[`${e}-close`]:Object.assign({position:"absolute",top:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),insetInlineEnd:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),zIndex:t.calc(t.zIndexPopupBase).add(10).equal(),padding:0,color:t.modalCloseIconColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalCloseBtnSize,height:t.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"flex",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:U(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},va(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${U(t.borderRadiusLG)} ${U(t.borderRadiusLG)} 0 0`,marginBottom:t.headerMarginBottom,padding:t.headerPadding,borderBottom:t.headerBorderBottom},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word",padding:t.bodyPadding,[`${e}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${U(t.margin)} auto`}},[`${e}-footer`]:{textAlign:"end",background:t.footerBg,marginTop:t.footerMarginTop,padding:t.footerPadding,borderTop:t.footerBorderTop,borderRadius:t.footerBorderRadius,[`> ${t.antCls}-btn + ${t.antCls}-btn`]:{marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content,
297
297
  ${e}-body,
298
298
  ${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},a_=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},s_=t=>{const{componentCls:e}=t,n=hx(t);delete n.xs;const r=Object.keys(n).map(o=>({[`@media (min-width: ${U(n[o])})`]:{width:`var(--${e.replace(".","")}-${o}-width)`}}));return{[`${e}-root`]:{[e]:[{width:`var(--${e.replace(".","")}-xs-width)`}].concat(he(r))}}},px=t=>{const e=t.padding,n=t.fontSizeHeading5,r=t.lineHeightHeading5;return Mt(t,{modalHeaderHeight:t.calc(t.calc(r).mul(n).equal()).add(t.calc(e).mul(2).equal()).equal(),modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterBorderWidth:t.lineWidth,modalCloseIconColor:t.colorIcon,modalCloseIconHoverColor:t.colorIconHover,modalCloseBtnSize:t.controlHeight,modalConfirmIconSize:t.fontHeight,modalTitleHeight:t.calc(t.titleFontSize).mul(t.titleLineHeight).equal()})},mx=t=>({footerBg:"transparent",headerBg:t.colorBgElevated,titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${U(t.paddingMD)} ${U(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${U(t.padding)} ${U(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${U(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${U(t.paddingXS)} ${U(t.padding)}`:0,footerBorderTop:t.wireframe?`${U(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${U(t.borderRadiusLG)} ${U(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${U(t.padding*2)} ${U(t.padding*2)} ${U(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM}),gx=Yt("Modal",t=>{const e=px(t);return[i_(e),a_(e),o_(e),Is(e,"zoom"),s_(e)]},mx,{unitless:{titleLineHeight:!0}});var l_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};let Vf;const c_=t=>{Vf={x:t.pageX,y:t.pageY},setTimeout(()=>{Vf=null},100)};R2()&&document.documentElement.addEventListener("click",c_,!0);const vx=t=>{const{prefixCls:e,className:n,rootClassName:r,open:o,wrapClassName:i,centered:a,getContainer:s,focusTriggerAfterClose:l=!0,style:c,visible:u,width:d=520,footer:f,classNames:p,styles:m,children:g,loading:v,confirmLoading:b,zIndex:y,mousePosition:C,onOk:S,onCancel:x,destroyOnHidden:w,destroyOnClose:$}=t,R=l_(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose"]),{getPopupContainer:M,getPrefixCls:O,direction:N,modal:I}=h.useContext(gt),T=te=>{b||x==null||x(te)},P=te=>{S==null||S(te)};if(process.env.NODE_ENV!=="production"){const te=Kt("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"],["destroyOnClose","destroyOnHidden"]].forEach(([Z,Q])=>{te.deprecated(!(Z in t),Z,Q)})}const A=O("modal",e),k=O(),B=yo(A),[_,F,H]=gx(A,B),K=G.cn(i,{[`${A}-centered`]:a??(I==null?void 0:I.centered),[`${A}-wrap-rtl`]:N==="rtl"}),V=f!==null&&!v?h.createElement(fx,Object.assign({},t,{onOk:P,onCancel:T})):null,[W,z,L,J]=N2(Sv(t),Sv(I),{closable:!0,closeIcon:h.createElement(Os,{className:`${A}-close-icon`}),closeIconRender:te=>dx(A,te)}),ne=J2(`.${A}-content`),[q,re]=Ns("Modal",y),[ae,ee]=h.useMemo(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),Y=h.useMemo(()=>{const te={};return ee&&Object.keys(ee).forEach(Z=>{const Q=ee[Z];Q!==void 0&&(te[`--${A}-${Z}-width`]=typeof Q=="number"?`${Q}px`:Q)}),te},[ee]);return _(h.createElement(Wo,{form:!0,space:!0},h.createElement(Ms.Provider,{value:re},h.createElement(rx,Object.assign({width:ae},R,{zIndex:q,getContainer:s===void 0?M:s,prefixCls:A,rootClassName:G.cn(F,r,H,B),footer:V,visible:o??u,mousePosition:C??Vf,onClose:T,closable:W&&Object.assign({disabled:L,closeIcon:z},J),closeIcon:z,focusTriggerAfterClose:l,transitionName:Ei(k,"zoom",t.transitionName),maskTransitionName:Ei(k,"fade",t.maskTransitionName),className:G.cn(F,n,I==null?void 0:I.className),style:Object.assign(Object.assign(Object.assign({},I==null?void 0:I.style),c),Y),classNames:Object.assign(Object.assign(Object.assign({},I==null?void 0:I.classNames),p),{wrapper:G.cn(K,p==null?void 0:p.wrapper)}),styles:Object.assign(Object.assign({},I==null?void 0:I.styles),m),panelRef:ne,destroyOnClose:w??$}),v?h.createElement(Ti,{active:!0,title:!1,paragraph:{rows:4},className:`${A}-body-skeleton`}):g))))},u_=t=>{const{componentCls:e,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=t,u=`${e}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},nc()),[`&${e} ${e}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:t.confirmIconMarginInlineEnd,marginTop:t.calc(t.calc(l).sub(o).equal()).div(2).equal()},[`&-has-title > ${t.iconCls}`]:{marginTop:t.calc(t.calc(s).sub(o).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:t.marginXS,maxWidth:`calc(100% - ${U(t.marginSM)})`},[`${t.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${U(t.calc(t.modalConfirmIconSize).add(t.marginSM).equal())})`},[`${u}-title`]:{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:t.colorText,fontSize:i,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:t.confirmBtnsMarginTop,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${u}-error ${u}-body > ${t.iconCls}`]:{color:t.colorError},[`${u}-warning ${u}-body > ${t.iconCls},
299
- ${u}-confirm ${u}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${u}-info ${u}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${u}-success ${u}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},d_=rS(["Modal","confirm"],t=>{const e=px(t);return[u_(e)]},mx,{order:-1e3});var f_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function bx(t){const{prefixCls:e,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:s,footer:l,locale:c}=t,u=f_(t,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const $=Kt("Modal");process.env.NODE_ENV!=="production"&&$(!(typeof n=="string"&&n.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`)}let d=n;if(!n&&n!==null)switch(a){case"info":d=h.createElement(ES,null);break;case"success":d=h.createElement(xS,null);break;case"error":d=h.createElement(zc,null);break;default:d=h.createElement(wS,null)}const f=s??a==="confirm",p=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",[m]=Qr("Modal"),g=c||m,v=r||(f?g==null?void 0:g.okText:g==null?void 0:g.justOkText),b=o||(g==null?void 0:g.cancelText),y=Object.assign({autoFocusButton:p,cancelTextLocale:b,okTextLocale:v,mergedOkCancel:f},u),C=h.useMemo(()=>y,he(Object.values(y))),S=h.createElement(h.Fragment,null,h.createElement(tv,null),h.createElement(nv,null)),x=t.title!==void 0&&t.title!==null,w=`${i}-body`;return h.createElement("div",{className:`${i}-body-wrapper`},h.createElement("div",{className:G.cn(w,{[`${w}-has-title`]:x})},d,h.createElement("div",{className:`${i}-paragraph`},x&&h.createElement("span",{className:`${i}-title`},t.title),h.createElement("div",{className:`${i}-content`},t.content))),l===void 0||typeof l=="function"?h.createElement(QS,{value:C},h.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(S,{OkBtn:nv,CancelBtn:tv}):S)):l,h.createElement(d_,{prefixCls:e}))}const yx=t=>{const{close:e,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=t;if(process.env.NODE_ENV!=="production"){const S=Kt("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(([x,w])=>{S.deprecated(!(x in t),x,w)})}const f=`${i}-confirm`,p=t.width||416,m=t.style||{},g=t.mask===void 0?!0:t.mask,v=t.maskClosable===void 0?!1:t.maskClosable,b=G.cn(f,`${f}-${t.type}`,{[`${f}-rtl`]:o==="rtl"},t.className),[,y]=er(),C=h.useMemo(()=>n!==void 0?n:y.zIndexPopupBase+OS,[n,y]);return h.createElement(vx,Object.assign({},t,{className:b,wrapClassName:G.cn({[`${f}-centered`]:!!t.centered},a),onCancel:()=>{e==null||e({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:Ei(s||"","zoom",t.transitionName),maskTransitionName:Ei(s||"","fade",t.maskTransitionName),mask:g,maskClosable:v,style:m,styles:Object.assign({body:l,mask:r},d),width:p,zIndex:C,closable:c}),h.createElement(bx,Object.assign({},t,{confirmPrefixCls:f})))},up=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:r,theme:o}=t;return h.createElement(to,{prefixCls:e,iconPrefixCls:n,direction:r,theme:o},h.createElement(yx,Object.assign({},t)))};process.env.NODE_ENV!=="production"&&(yx.displayName="ConfirmDialog",up.displayName="ConfirmDialogWrapper");const li=[];let Cx="";function Sx(){return Cx}const h_=t=>{var e,n;const{prefixCls:r,getContainer:o,direction:i}=t,a=FC(),s=E.useContext(gt),l=Sx()||s.getPrefixCls(),c=r||`${l}-modal`;let u=o;return u===!1&&(u=void 0,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&Ri(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),E.createElement(up,Object.assign({},t,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:i??s.direction,locale:(n=(e=s.locale)===null||e===void 0?void 0:e.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function Ds(t){const e=wT();process.env.NODE_ENV!=="production"&&!e.holderRender&&bT("Modal");const n=document.createDocumentFragment();let r=Object.assign(Object.assign({},t),{close:l,open:!0}),o,i;function a(...u){var d;if(u.some(m=>m==null?void 0:m.triggerCancel)){var p;(d=t.onCancel)===null||d===void 0||(p=d).call.apply(p,[t,()=>{}].concat(he(u.slice(1))))}for(let m=0;m<li.length;m++)if(li[m]===l){li.splice(m,1);break}i()}function s(u){clearTimeout(o),o=setTimeout(()=>{const d=e.getPrefixCls(void 0,Sx()),f=e.getIconPrefixCls(),p=e.getTheme(),m=E.createElement(h_,Object.assign({},u));i=NS()(E.createElement(to,{prefixCls:d,iconPrefixCls:f,theme:p},e.holderRender?e.holderRender(m):m),n)})}function l(...u){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),a.apply(this,u)}}),r.visible&&delete r.visible,s(r)}function c(u){typeof u=="function"?r=u(r):r=Object.assign(Object.assign({},r),u),s(r)}return s(r),li.push(l),{destroy:l,update:c}}function xx(t){return Object.assign(Object.assign({},t),{type:"warning"})}function wx(t){return Object.assign(Object.assign({},t),{type:"info"})}function Ex(t){return Object.assign(Object.assign({},t),{type:"success"})}function $x(t){return Object.assign(Object.assign({},t),{type:"error"})}function Ox(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function p_({rootPrefixCls:t}){process.env.NODE_ENV!=="production"&&Ri(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),Cx=t}var m_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const g_=(t,e)=>{var n,{afterClose:r,config:o}=t,i=m_(t,["afterClose","config"]);const[a,s]=h.useState(!0),[l,c]=h.useState(o),{direction:u,getPrefixCls:d}=h.useContext(gt),f=d("modal"),p=d(),m=()=>{var y;r(),(y=l.afterClose)===null||y===void 0||y.call(l)},g=(...y)=>{var C;if(s(!1),y.some(w=>w==null?void 0:w.triggerCancel)){var x;(C=l.onCancel)===null||C===void 0||(x=C).call.apply(x,[l,()=>{}].concat(he(y.slice(1))))}};h.useImperativeHandle(e,()=>({destroy:g,update:y=>{c(C=>Object.assign(Object.assign({},C),y))}}));const v=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[b]=Qr("Modal",Ho.Modal);return h.createElement(up,Object.assign({prefixCls:f,rootPrefixCls:p},l,{close:g,open:a,afterClose:m,okText:l.okText||(v?b==null?void 0:b.okText:b==null?void 0:b.justOkText),direction:l.direction||u,cancelText:l.cancelText||(b==null?void 0:b.cancelText)},i))},v_=h.forwardRef(g_);let Nv=0;const b_=h.memo(h.forwardRef((t,e)=>{const[n,r]=rA();return h.useImperativeHandle(e,()=>({patchElement:r}),[]),h.createElement(h.Fragment,null,n)}));function y_(){const t=h.useRef(null),[e,n]=h.useState([]);h.useEffect(()=>{e.length&&(he(e).forEach(a=>{a()}),n([]))},[e]);const r=h.useCallback(i=>function(s){var l;Nv+=1;const c=h.createRef();let u;const d=new Promise(v=>{u=v});let f=!1,p;const m=h.createElement(v_,{key:`modal-${Nv}`,config:i(s),ref:c,afterClose:()=>{p==null||p()},isSilent:()=>f,onConfirm:v=>{u(v)}});return p=(l=t.current)===null||l===void 0?void 0:l.patchElement(m),p&&li.push(p),{destroy:()=>{function v(){var b;(b=c.current)===null||b===void 0||b.destroy()}c.current?v():n(b=>[].concat(he(b),[v]))},update:v=>{function b(){var y;(y=c.current)===null||y===void 0||y.update(v)}c.current?b():n(y=>[].concat(he(y),[b]))},then:v=>(f=!0,d.then(v))}},[]);return[h.useMemo(()=>({info:r(wx),success:r(Ex),error:r($x),warning:r(xx),confirm:r(Ox)}),[]),h.createElement(b_,{key:"modal-holder",ref:t})]}function Mx(t){return e=>h.createElement(to,{theme:{token:{motion:!1,zIndexPopupBase:0}}},h.createElement(t,Object.assign({},e)))}const dp=(t,e,n,r,o)=>Mx(a=>{const{prefixCls:s,style:l}=a,c=h.useRef(null),[u,d]=h.useState(0),[f,p]=h.useState(0),[m,g]=en(!1,{value:a.open}),{getPrefixCls:v}=h.useContext(gt),b=v(r||"select",s);h.useEffect(()=>{if(g(!0),typeof ResizeObserver<"u"){const S=new ResizeObserver(w=>{const $=w[0].target;d($.offsetHeight+8),p($.offsetWidth)}),x=setInterval(()=>{var w;const $=o?`.${o(b)}`:`.${b}-dropdown`,R=(w=c.current)===null||w===void 0?void 0:w.querySelector($);R&&(clearInterval(x),S.observe(R))},10);return()=>{clearInterval(x),S.disconnect()}}},[]);let y=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:m,visible:m,getPopupContainer:()=>c.current});n&&(y=n(y)),e&&Object.assign(y,{[e]:{overflow:{adjustX:!1,adjustY:!1}}});const C={paddingBottom:u,position:"relative",minWidth:f};return h.createElement("div",{ref:c,style:C},h.createElement(t,Object.assign({},y)))}),fp=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var Qc=function(e){var n=e.className,r=e.customizeIcon,o=e.customizeIconProps,i=e.children,a=e.onMouseDown,s=e.onClick,l=typeof r=="function"?r(o):r;return h.createElement("span",{className:n,onMouseDown:function(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:h.createElement("span",{className:G.cn(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},C_=function(e,n,r,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=E.useMemo(function(){if(Ue(o)==="object")return o.clearIcon;if(i)return i},[o,i]),u=E.useMemo(function(){return!!(!a&&o&&(r.length||s)&&!(l==="combobox"&&s===""))},[o,a,r.length,s,l]);return{allowClear:u,clearIcon:E.createElement(Qc,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},Nx=h.createContext(null);function S_(){return h.useContext(Nx)}function x_(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=h.useState(!1),n=X(e,2),r=n[0],o=n[1],i=h.useRef(null),a=function(){window.clearTimeout(i.current)};h.useEffect(function(){return a},[]);var s=function(c,u){a(),i.current=window.setTimeout(function(){o(c),u&&u()},t)};return[r,s,a]}function Rx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=h.useRef(null),n=h.useRef(null);h.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(o){(o||e.current===null)&&(e.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function w_(t,e,n,r){var o=h.useRef(null);o.current={open:e,triggerOpen:n,customizedTrigger:r},h.useEffect(function(){function i(a){var s;if(!((s=o.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),o.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",i),function(){return window.removeEventListener("mousedown",i)}},[])}function E_(t){return t&&![Te.ESC,Te.SHIFT,Te.BACKSPACE,Te.TAB,Te.WIN_KEY,Te.ALT,Te.META,Te.WIN_KEY_RIGHT,Te.CTRL,Te.SEMICOLON,Te.EQUALS,Te.CAPS_LOCK,Te.CONTEXT_MENU,Te.F1,Te.F2,Te.F3,Te.F4,Te.F5,Te.F6,Te.F7,Te.F8,Te.F9,Te.F10,Te.F11,Te.F12].includes(t)}var $_=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Li=void 0;function O_(t,e){var n=t.prefixCls,r=t.invalidate,o=t.item,i=t.renderItem,a=t.responsive,s=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,d=t.style,f=t.children,p=t.display,m=t.order,g=t.component,v=g===void 0?"div":g,b=lt(t,$_),y=a&&!p;function C(R){l(c,R)}h.useEffect(function(){return function(){C(null)}},[]);var S=i&&o!==Li?i(o,{index:m}):f,x;r||(x={opacity:y?0:1,height:y?0:Li,overflowY:y?"hidden":Li,order:a?m:Li,pointerEvents:y?"none":Li,position:y?"absolute":Li});var w={};y&&(w["aria-hidden"]=!0);var $=h.createElement(v,ge({className:G.cn(!r&&n,u),style:j(j({},x),d)},w,b,{ref:e}),S);return a&&($=h.createElement(bo,{onResize:function(M){var O=M.offsetWidth;C(O)},disabled:s},$)),$}var Ja=h.forwardRef(O_);Ja.displayName="Item";function M_(t){if(typeof MessageChannel>"u")wt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function N_(){var t=h.useRef(null),e=function(r){t.current||(t.current=[],M_(function(){Ar.unstable_batchedUpdates(function(){t.current.forEach(function(o){o()}),t.current=null})})),t.current.push(r)};return e}function Aa(t,e){var n=h.useState(e),r=X(n,2),o=r[0],i=r[1],a=At(function(s){t(function(){i(s)})});return[o,a]}var lc=E.createContext(null),R_=["component"],I_=["className"],P_=["className"],T_=function(e,n){var r=h.useContext(lc);if(!r){var o=e.component,i=o===void 0?"div":o,a=lt(e,R_);return h.createElement(i,ge({},a,{ref:n}))}var s=r.className,l=lt(r,I_),c=e.className,u=lt(e,P_);return h.createElement(lc.Provider,{value:null},h.createElement(Ja,ge({ref:n,className:G.cn(s,c)},l,u)))},Ix=h.forwardRef(T_);Ix.displayName="RawItem";var A_=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Px="responsive",Tx="invalidate";function k_(t){return"+ ".concat(t.length," ...")}function D_(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,o=t.data,i=o===void 0?[]:o,a=t.renderItem,s=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,d=t.ssr,f=t.style,p=t.className,m=t.maxCount,g=t.renderRest,v=t.renderRawRest,b=t.suffix,y=t.component,C=y===void 0?"div":y,S=t.itemComponent,x=t.onVisibleChange,w=lt(t,A_),$=d==="full",R=N_(),M=Aa(R,null),O=X(M,2),N=O[0],I=O[1],T=N||0,P=Aa(R,new Map),A=X(P,2),k=A[0],B=A[1],_=Aa(R,0),F=X(_,2),H=F[0],K=F[1],V=Aa(R,0),W=X(V,2),z=W[0],L=W[1],J=Aa(R,0),ne=X(J,2),q=ne[0],re=ne[1],ae=E.useState(null),ee=X(ae,2),Y=ee[0],te=ee[1],Z=E.useState(null),Q=X(Z,2),oe=Q[0],ce=Q[1],se=h.useMemo(function(){return oe===null&&$?Number.MAX_SAFE_INTEGER:oe||0},[oe,N]),le=E.useState(!1),be=X(le,2),ye=be[0],Be=be[1],de="".concat(r,"-item"),ue=Math.max(H,z),pe=m===Px,Ae=i.length&&pe,_e=m===Tx,Re=Ae||typeof m=="number"&&i.length>m,$e=E.useMemo(function(){var je=i;return Ae?N===null&&$?je=i:je=i.slice(0,Math.min(i.length,T/u)):typeof m=="number"&&(je=i.slice(0,m)),je},[i,u,N,m,Ae]),We=E.useMemo(function(){return Ae?i.slice(se+1):i.slice($e.length)},[i,$e,Ae,se]),ke=E.useCallback(function(je,we){var Ee;return typeof l=="function"?l(je):(Ee=l&&(je==null?void 0:je[l]))!==null&&Ee!==void 0?Ee:we},[l]),De=E.useCallback(a||function(je){return je},[a]);function me(je,we,Ee){oe===je&&(we===void 0||we===Y)||(ce(je),Ee||(Be(je<i.length-1),x==null||x(je)),we!==void 0&&te(we))}function Ne(je,we){I(we.clientWidth)}function Ze(je,we){B(function(Ee){var ut=new Map(Ee);return we===null?ut.delete(je):ut.set(je,we),ut})}function Ie(je,we){L(we),K(z)}function xe(je,we){re(we)}function ot(je){return k.get(ke($e[je],je))}zt(function(){if(T&&typeof ue=="number"&&$e){var je=q,we=$e.length,Ee=we-1;if(!we){me(0,null);return}for(var ut=0;ut<we;ut+=1){var ht=ot(ut);if($&&(ht=ht||0),ht===void 0){me(ut-1,void 0,!0);break}if(je+=ht,Ee===0&&je<=T||ut===Ee-1&&je+ot(Ee)<=T){me(Ee,null);break}else if(je+ue>T){me(ut-1,je-ht-q+z);break}}b&&ot(0)+q>T&&te(null)}},[T,k,z,q,ke,$e]);var ft=ye&&!!We.length,Tt={};Y!==null&&Ae&&(Tt={position:"absolute",left:Y,top:0});var Bt={prefixCls:de,responsive:Ae,component:S,invalidate:_e},Pe=s?function(je,we){var Ee=ke(je,we);return h.createElement(lc.Provider,{key:Ee,value:j(j({},Bt),{},{order:we,item:je,itemKey:Ee,registerSize:Ze,display:we<=se})},s(je,we))}:function(je,we){var Ee=ke(je,we);return h.createElement(Ja,ge({},Bt,{order:we,key:Ee,item:je,renderItem:De,itemKey:Ee,registerSize:Ze,display:we<=se}))},Se={order:ft?se:Number.MAX_SAFE_INTEGER,className:"".concat(de,"-rest"),registerSize:Ie,display:ft},Xe=g||k_,Ge=v?h.createElement(lc.Provider,{value:j(j({},Bt),Se)},v(We)):h.createElement(Ja,ge({},Bt,Se),typeof Xe=="function"?Xe(We):Xe),et=h.createElement(C,ge({className:G.cn(!_e&&r,p),style:f,ref:e},w),$e.map(Pe),Re?Ge:null,b&&h.createElement(Ja,ge({},Bt,{responsive:pe,responsiveDisabled:!Ae,order:se,className:"".concat(de,"-suffix"),registerSize:xe,display:!0,style:Tt}),b));return pe?h.createElement(bo,{onResize:Ne,disabled:!Ae},et):et}var Kr=h.forwardRef(D_);Kr.displayName="Overflow";Kr.Item=Ix;Kr.RESPONSIVE=Px;Kr.INVALIDATE=Tx;function __(t,e,n){var r=j(j({},t),e);return Object.keys(e).forEach(function(o){var i=e[o];typeof i=="function"&&(r[o]=function(){for(var a,s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i.apply(void 0,l),(a=t[o])===null||a===void 0?void 0:a.call.apply(a,[t].concat(l))})}),r}var j_=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],B_=function(e,n){var r=e.prefixCls,o=e.id,i=e.inputElement,a=e.autoFocus,s=e.autoComplete,l=e.editable,c=e.activeDescendantId,u=e.value,d=e.open,f=e.attrs,p=lt(e,j_),m=i||h.createElement("input",null),g=m,v=g.ref,b=g.props;return Xr(!("maxLength"in m.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),m=h.cloneElement(m,j(j(j({type:"search"},__(p,b)),{},{id:o,ref:Qn(n,v),autoComplete:s||"off",autoFocus:a,className:G.cn("".concat(r,"-selection-search-input"),b==null?void 0:b.className),role:"combobox","aria-expanded":d||!1,"aria-haspopup":"listbox","aria-owns":"".concat(o,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(o,"_list"),"aria-activedescendant":d?c:void 0},f),{},{value:l?u:"",readOnly:!l,unselectable:l?null:"on",style:j(j({},b.style),{},{opacity:l?null:0})})),m},hp=h.forwardRef(B_);process.env.NODE_ENV!=="production"&&(hp.displayName="Input");function pp(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}var z_=typeof window<"u"&&window.document&&window.document.documentElement,L_=process.env.NODE_ENV!=="test"&&z_;function F_(t){return t!=null}function H_(t){return!t&&t!==0}function Rv(t){return["string","number"].includes(Ue(t))}function Ax(t){var e=void 0;return t&&(Rv(t.title)?e=t.title.toString():Rv(t.label)&&(e=t.label.toString())),e}function V_(t,e){L_?h.useLayoutEffect(t,e):h.useEffect(t,e)}function W_(t){var e;return(e=t.key)!==null&&e!==void 0?e:t.value}var Iv=function(e){e.preventDefault(),e.stopPropagation()},q_=function(e){var n=e.id,r=e.prefixCls,o=e.values,i=e.open,a=e.searchValue,s=e.autoClearSearchValue,l=e.inputRef,c=e.placeholder,u=e.disabled,d=e.mode,f=e.showSearch,p=e.autoFocus,m=e.autoComplete,g=e.activeDescendantId,v=e.tabIndex,b=e.removeIcon,y=e.maxTagCount,C=e.maxTagTextLength,S=e.maxTagPlaceholder,x=S===void 0?function(Z){return"+ ".concat(Z.length," ...")}:S,w=e.tagRender,$=e.onToggleOpen,R=e.onRemove,M=e.onInputChange,O=e.onInputPaste,N=e.onInputKeyDown,I=e.onInputMouseDown,T=e.onInputCompositionStart,P=e.onInputCompositionEnd,A=e.onInputBlur,k=h.useRef(null),B=E.useState(0),_=X(B,2),F=_[0],H=_[1],K=E.useState(!1),V=X(K,2),W=V[0],z=V[1],L="".concat(r,"-selection"),J=i||d==="multiple"&&s===!1||d==="tags"?a:"",ne=d==="tags"||d==="multiple"&&s===!1||f&&(i||W);V_(function(){H(k.current.scrollWidth)},[J]);var q=function(Q,oe,ce,se,le){return h.createElement("span",{title:Ax(Q),className:G.cn("".concat(L,"-item"),D({},"".concat(L,"-item-disabled"),ce))},h.createElement("span",{className:"".concat(L,"-item-content")},oe),se&&h.createElement(Qc,{className:"".concat(L,"-item-remove"),onMouseDown:Iv,onClick:le,customizeIcon:b},"×"))},re=function(Q,oe,ce,se,le,be){var ye=function(de){Iv(de),$(!i)};return h.createElement("span",{onMouseDown:ye},w({label:oe,value:Q,disabled:ce,closable:se,onClose:le,isMaxTag:!!be}))},ae=function(Q){var oe=Q.disabled,ce=Q.label,se=Q.value,le=!u&&!oe,be=ce;if(typeof C=="number"&&(typeof ce=="string"||typeof ce=="number")){var ye=String(be);ye.length>C&&(be="".concat(ye.slice(0,C),"..."))}var Be=function(ue){ue&&ue.stopPropagation(),R(Q)};return typeof w=="function"?re(se,be,oe,le,Be):q(Q,be,oe,le,Be)},ee=function(Q){if(!o.length)return null;var oe=typeof x=="function"?x(Q):x;return typeof w=="function"?re(void 0,oe,!1,!1,void 0,!0):q({title:oe},oe,!1)},Y=h.createElement("div",{className:"".concat(L,"-search"),style:{width:F},onFocus:function(){z(!0)},onBlur:function(){z(!1)}},h.createElement(hp,{ref:l,open:i,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:p,autoComplete:m,editable:ne,activeDescendantId:g,value:J,onKeyDown:N,onMouseDown:I,onChange:M,onPaste:O,onCompositionStart:T,onCompositionEnd:P,onBlur:A,tabIndex:v,attrs:Yr(e,!0)}),h.createElement("span",{ref:k,className:"".concat(L,"-search-mirror"),"aria-hidden":!0},J," ")),te=h.createElement(Kr,{prefixCls:"".concat(L,"-overflow"),data:o,renderItem:ae,renderRest:ee,suffix:Y,itemKey:W_,maxCount:y});return h.createElement("span",{className:"".concat(L,"-wrap")},te,!o.length&&!J&&h.createElement("span",{className:"".concat(L,"-placeholder")},c))},K_=function(e){var n=e.inputElement,r=e.prefixCls,o=e.id,i=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,p=e.placeholder,m=e.tabIndex,g=e.showSearch,v=e.searchValue,b=e.activeValue,y=e.maxLength,C=e.onInputKeyDown,S=e.onInputMouseDown,x=e.onInputChange,w=e.onInputPaste,$=e.onInputCompositionStart,R=e.onInputCompositionEnd,M=e.onInputBlur,O=e.title,N=h.useState(!1),I=X(N,2),T=I[0],P=I[1],A=u==="combobox",k=A||g,B=f[0],_=v||"";A&&b&&!T&&(_=b),h.useEffect(function(){A&&P(!1)},[A,b]);var F=u!=="combobox"&&!d&&!g?!1:!!_,H=O===void 0?Ax(B):O,K=h.useMemo(function(){return B?null:h.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:F?{visibility:"hidden"}:void 0},p)},[B,F,p,r]);return h.createElement("span",{className:"".concat(r,"-selection-wrap")},h.createElement("span",{className:"".concat(r,"-selection-search")},h.createElement(hp,{ref:i,prefixCls:r,id:o,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:k,activeDescendantId:c,value:_,onKeyDown:C,onMouseDown:S,onChange:function(W){P(!0),x(W)},onPaste:w,onCompositionStart:$,onCompositionEnd:R,onBlur:M,tabIndex:m,attrs:Yr(e,!0),maxLength:A?y:void 0})),!A&&B?h.createElement("span",{className:"".concat(r,"-selection-item"),title:H,style:F?{visibility:"hidden"}:void 0},B.label):null,K)},G_=function(e,n){var r=E.useRef(null),o=E.useRef(!1),i=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,d=e.prefix,f=e.autoClearSearchValue,p=e.onSearch,m=e.onSearchSubmit,g=e.onToggleOpen,v=e.onInputKeyDown,b=e.onInputBlur,y=e.domRef;h.useImperativeHandle(n,function(){return{focus:function(H){r.current.focus(H)},blur:function(){r.current.blur()}}});var C=Rx(0),S=X(C,2),x=S[0],w=S[1],$=function(H){var K=H.which,V=r.current instanceof HTMLTextAreaElement;!V&&a&&(K===Te.UP||K===Te.DOWN)&&H.preventDefault(),v&&v(H),K===Te.ENTER&&s==="tags"&&!o.current&&!a&&(m==null||m(H.target.value)),!(V&&!a&&~[Te.UP,Te.DOWN,Te.LEFT,Te.RIGHT].indexOf(K))&&E_(K)&&g(!0)},R=function(){w(!0)},M=E.useRef(null),O=function(H){p(H,!0,o.current)!==!1&&g(!0)},N=function(){o.current=!0},I=function(H){o.current=!1,s!=="combobox"&&O(H.target.value)},T=function(H){var K=H.target.value;if(c&&M.current&&/[\r\n]/.test(M.current)){var V=M.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");K=K.replace(V,M.current)}M.current=null,O(K)},P=function(H){var K=H.clipboardData,V=K==null?void 0:K.getData("text");M.current=V||""},A=function(H){var K=H.target;if(K!==r.current){var V=document.body.style.msTouchAction!==void 0;V?setTimeout(function(){r.current.focus()}):r.current.focus()}},k=function(H){var K=x();H.target!==r.current&&!K&&!(s==="combobox"&&u)&&H.preventDefault(),(s!=="combobox"&&(!l||!K)||!a)&&(a&&f!==!1&&p("",!0,!1),g())},B={inputRef:r,onInputKeyDown:$,onInputMouseDown:R,onInputChange:T,onInputPaste:P,onInputCompositionStart:N,onInputCompositionEnd:I,onInputBlur:b},_=s==="multiple"||s==="tags"?h.createElement(q_,ge({},e,B)):h.createElement(K_,ge({},e,B));return h.createElement("div",{ref:y,className:"".concat(i,"-selector"),onClick:A,onMouseDown:k},d&&h.createElement("div",{className:"".concat(i,"-prefix")},d),_)},kx=h.forwardRef(G_);process.env.NODE_ENV!=="production"&&(kx.displayName="Selector");function U_(t){var e=t.prefixCls,n=t.align,r=t.arrow,o=t.arrowPos,i=r||{},a=i.className,s=i.content,l=o.x,c=l===void 0?0:l,u=o.y,d=u===void 0?0:u,f=h.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(n.autoArrow!==!1){var m=n.points[0],g=n.points[1],v=m[0],b=m[1],y=g[0],C=g[1];v===y||!["t","b"].includes(v)?p.top=d:v==="t"?p.top=0:p.bottom=0,b===C||!["l","r"].includes(b)?p.left=c:b==="l"?p.left=0:p.right=0}return h.createElement("div",{ref:f,className:G.cn("".concat(e,"-arrow"),a),style:p},s)}function X_(t){var e=t.prefixCls,n=t.open,r=t.zIndex,o=t.mask,i=t.motion;return o?h.createElement(eo,ge({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return h.createElement("div",{style:{zIndex:r},className:G.cn("".concat(e,"-mask"),s)})}):null}var Dx=h.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});process.env.NODE_ENV!=="production"&&(Dx.displayName="PopupContent");var _x=h.forwardRef(function(t,e){var n=t.popup,r=t.className,o=t.prefixCls,i=t.style,a=t.target,s=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,d=t.onClick,f=t.mask,p=t.arrow,m=t.arrowPos,g=t.align,v=t.motion,b=t.maskMotion,y=t.forceRender,C=t.getPopupContainer,S=t.autoDestroy,x=t.portal,w=t.zIndex,$=t.onMouseEnter,R=t.onMouseLeave,M=t.onPointerEnter,O=t.onPointerDownCapture,N=t.ready,I=t.offsetX,T=t.offsetY,P=t.offsetR,A=t.offsetB,k=t.onAlign,B=t.onPrepare,_=t.stretch,F=t.targetWidth,H=t.targetHeight,K=typeof n=="function"?n():n,V=l||c,W=(C==null?void 0:C.length)>0,z=h.useState(!C||!W),L=X(z,2),J=L[0],ne=L[1];if(zt(function(){!J&&W&&a&&ne(!0)},[J,W,a]),!J)return null;var q="auto",re={left:"-1000vw",top:"-1000vh",right:q,bottom:q};if(N||!l){var ae,ee=g.points,Y=g.dynamicInset||((ae=g._experimental)===null||ae===void 0?void 0:ae.dynamicInset),te=Y&&ee[0][1]==="r",Z=Y&&ee[0][0]==="b";te?(re.right=P,re.left=q):(re.left=I,re.right=q),Z?(re.bottom=A,re.top=q):(re.top=T,re.bottom=q)}var Q={};return _&&(_.includes("height")&&H?Q.height=H:_.includes("minHeight")&&H&&(Q.minHeight=H),_.includes("width")&&F?Q.width=F:_.includes("minWidth")&&F&&(Q.minWidth=F)),l||(Q.pointerEvents="none"),h.createElement(x,{open:y||V,getContainer:C&&function(){return C(a)},autoDestroy:S},h.createElement(X_,{prefixCls:o,open:l,zIndex:w,mask:f,motion:b}),h.createElement(bo,{onResize:k,disabled:!l},function(oe){return h.createElement(eo,ge({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:y,leavedClassName:"".concat(o,"-hidden")},v,{onAppearPrepare:B,onEnterPrepare:B,visible:l,onVisibleChanged:function(se){var le;v==null||(le=v.onVisibleChanged)===null||le===void 0||le.call(v,se),s(se)}}),function(ce,se){var le=ce.className,be=ce.style,ye=G.cn(o,le,r);return h.createElement("div",{ref:Qn(oe,e,se),className:ye,style:j(j(j(j({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},re),Q),be),{},{boxSizing:"border-box",zIndex:w},i),onMouseEnter:$,onMouseLeave:R,onPointerEnter:M,onClick:d,onPointerDownCapture:O},p&&h.createElement(U_,{prefixCls:o,arrow:p,arrowPos:m,align:g}),h.createElement(Dx,{cache:!l&&!u},K))})}))});process.env.NODE_ENV!=="production"&&(_x.displayName="Popup");var jx=h.forwardRef(function(t,e){var n=t.children,r=t.getTriggerDOMNode,o=Jo(n),i=h.useCallback(function(s){Bh(e,r?r(s):s)},[r]),a=Yo(i,Ni(n));return o?h.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(jx.displayName="TriggerWrapper");var Pv=h.createContext(null);function Tv(t){return t?Array.isArray(t)?t:[t]:[]}function Y_(t,e,n,r){return h.useMemo(function(){var o=Tv(n??e),i=Tv(r??e),a=new Set(o),s=new Set(i);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[t,e,n,r])}function J_(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function Z_(t,e,n,r){for(var o=n.points,i=Object.keys(t),a=0;a<i.length;a+=1){var s,l=i[a];if(J_((s=t[l])===null||s===void 0?void 0:s.points,o,r))return"".concat(e,"-placement-").concat(l)}return""}function Av(t,e,n,r){return e||(n?{motionName:"".concat(t,"-").concat(n)}:r?{motionName:r}:null)}function _s(t){return t.ownerDocument.defaultView}function Wf(t){for(var e=[],n=t==null?void 0:t.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=_s(n).getComputedStyle(n),i=o.overflowX,a=o.overflowY,s=o.overflow;[i,a,s].some(function(l){return r.includes(l)})&&e.push(n),n=n.parentElement}return e}function bs(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function ka(t){return bs(parseFloat(t),0)}function kv(t,e){var n=j({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var o=_s(r).getComputedStyle(r),i=o.overflow,a=o.overflowClipMargin,s=o.borderTopWidth,l=o.borderBottomWidth,c=o.borderLeftWidth,u=o.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,p=r.clientHeight,m=r.offsetWidth,g=r.clientWidth,v=ka(s),b=ka(l),y=ka(c),C=ka(u),S=bs(Math.round(d.width/m*1e3)/1e3),x=bs(Math.round(d.height/f*1e3)/1e3),w=(m-g-y-C)*S,$=(f-p-v-b)*x,R=v*x,M=b*x,O=y*S,N=C*S,I=0,T=0;if(i==="clip"){var P=ka(a);I=P*S,T=P*x}var A=d.x+O-I,k=d.y+R-T,B=A+d.width+2*I-O-N-w,_=k+d.height+2*T-R-M-$;n.left=Math.max(n.left,A),n.top=Math.max(n.top,k),n.right=Math.min(n.right,B),n.bottom=Math.min(n.bottom,_)}}),n}function Dv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function _v(t,e){var n=e||[],r=X(n,2),o=r[0],i=r[1];return[Dv(t.width,o),Dv(t.height,i)]}function jv(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function Fi(t,e){var n=e[0],r=e[1],o,i;return n==="t"?i=t.y:n==="b"?i=t.y+t.height:i=t.y+t.height/2,r==="l"?o=t.x:r==="r"?o=t.x+t.width:o=t.x+t.width/2,{x:o,y:i}}function wo(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,o){return o===e?n[r]||"c":r}).join("")}function Q_(t,e,n,r,o,i,a){var s=h.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),l=X(s,2),c=l[0],u=l[1],d=h.useRef(0),f=h.useMemo(function(){return e?Wf(e):[]},[e]),p=h.useRef({}),m=function(){p.current={}};t||m();var g=At(function(){if(e&&n&&t){let pr=function(ki,So){var xo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue,Na=z.x+ki,Ws=z.y+So,du=Na+te,fu=Ws+Y,hu=Math.max(Na,xo.left),Ye=Math.max(Ws,xo.top),st=Math.min(du,xo.right),Xt=Math.min(fu,xo.bottom);return Math.max(0,(st-hu)*(Xt-Ye))},Vs=function(){Nt=z.y+Ee,Dt=Nt+Y,Vt=z.x+we,Nn=Vt+te};var y,C,S,x,w=e,$=w.ownerDocument,R=_s(w),M=R.getComputedStyle(w),O=M.width,N=M.height,I=M.position,T=w.style.left,P=w.style.top,A=w.style.right,k=w.style.bottom,B=w.style.overflow,_=j(j({},o[r]),i),F=$.createElement("div");(y=w.parentElement)===null||y===void 0||y.appendChild(F),F.style.left="".concat(w.offsetLeft,"px"),F.style.top="".concat(w.offsetTop,"px"),F.style.position=I,F.style.height="".concat(w.offsetHeight,"px"),F.style.width="".concat(w.offsetWidth,"px"),w.style.left="0",w.style.top="0",w.style.right="auto",w.style.bottom="auto",w.style.overflow="hidden";var H;if(Array.isArray(n))H={x:n[0],y:n[1],width:0,height:0};else{var K,V,W=n.getBoundingClientRect();W.x=(K=W.x)!==null&&K!==void 0?K:W.left,W.y=(V=W.y)!==null&&V!==void 0?V:W.top,H={x:W.x,y:W.y,width:W.width,height:W.height}}var z=w.getBoundingClientRect();z.x=(C=z.x)!==null&&C!==void 0?C:z.left,z.y=(S=z.y)!==null&&S!==void 0?S:z.top;var L=$.documentElement,J=L.clientWidth,ne=L.clientHeight,q=L.scrollWidth,re=L.scrollHeight,ae=L.scrollTop,ee=L.scrollLeft,Y=z.height,te=z.width,Z=H.height,Q=H.width,oe={left:0,top:0,right:J,bottom:ne},ce={left:-ee,top:-ae,right:q-ee,bottom:re-ae},se=_.htmlRegion,le="visible",be="visibleFirst";se!=="scroll"&&se!==be&&(se=le);var ye=se===be,Be=kv(ce,f),de=kv(oe,f),ue=se===le?de:Be,pe=ye?de:ue;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";var Ae=w.getBoundingClientRect();w.style.left=T,w.style.top=P,w.style.right=A,w.style.bottom=k,w.style.overflow=B,(x=w.parentElement)===null||x===void 0||x.removeChild(F);var _e=bs(Math.round(te/parseFloat(O)*1e3)/1e3),Re=bs(Math.round(Y/parseFloat(N)*1e3)/1e3);if(_e===0||Re===0||ss(n)&&!Qh(n))return;var $e=_.offset,We=_.targetOffset,ke=_v(z,$e),De=X(ke,2),me=De[0],Ne=De[1],Ze=_v(H,We),Ie=X(Ze,2),xe=Ie[0],ot=Ie[1];H.x-=xe,H.y-=ot;var ft=_.points||[],Tt=X(ft,2),Bt=Tt[0],Pe=Tt[1],Se=jv(Pe),Xe=jv(Bt),Ge=Fi(H,Se),et=Fi(z,Xe),je=j({},_),we=Ge.x-et.x+me,Ee=Ge.y-et.y+Ne,ut=pr(we,Ee),ht=pr(we,Ee,de),ze=Fi(H,["t","l"]),Ce=Fi(z,["t","l"]),Ke=Fi(H,["b","r"]),Le=Fi(z,["b","r"]),Fe=_.overflow||{},Qe=Fe.adjustX,Et=Fe.adjustY,vt=Fe.shiftX,Ht=Fe.shiftY,Ct=function(So){return typeof So=="boolean"?So:So>=0},Nt,Dt,Vt,Nn;Vs();var Wt=Ct(Et),It=Xe[0]===Se[0];if(Wt&&Xe[0]==="t"&&(Dt>pe.bottom||p.current.bt)){var Oe=Ee;It?Oe-=Y-Z:Oe=ze.y-Le.y-Ne;var qe=pr(we,Oe),He=pr(we,Oe,de);qe>ut||qe===ut&&(!ye||He>=ht)?(p.current.bt=!0,Ee=Oe,Ne=-Ne,je.points=[wo(Xe,0),wo(Se,0)]):p.current.bt=!1}if(Wt&&Xe[0]==="b"&&(Nt<pe.top||p.current.tb)){var ve=Ee;It?ve+=Y-Z:ve=Ke.y-Ce.y-Ne;var nt=pr(we,ve),St=pr(we,ve,de);nt>ut||nt===ut&&(!ye||St>=ht)?(p.current.tb=!0,Ee=ve,Ne=-Ne,je.points=[wo(Xe,0),wo(Se,0)]):p.current.tb=!1}var bt=Ct(Qe),Jt=Xe[1]===Se[1];if(bt&&Xe[1]==="l"&&(Nn>pe.right||p.current.rl)){var Zt=we;Jt?Zt-=te-Q:Zt=ze.x-Le.x-me;var tn=pr(Zt,Ee),Ut=pr(Zt,Ee,de);tn>ut||tn===ut&&(!ye||Ut>=ht)?(p.current.rl=!0,we=Zt,me=-me,je.points=[wo(Xe,1),wo(Se,1)]):p.current.rl=!1}if(bt&&Xe[1]==="r"&&(Vt<pe.left||p.current.lr)){var Qt=we;Jt?Qt+=te-Q:Qt=Ke.x-Ce.x-me;var pn=pr(Qt,Ee),Rn=pr(Qt,Ee,de);pn>ut||pn===ut&&(!ye||Rn>=ht)?(p.current.lr=!0,we=Qt,me=-me,je.points=[wo(Xe,1),wo(Se,1)]):p.current.lr=!1}Vs();var dn=vt===!0?0:vt;typeof dn=="number"&&(Vt<de.left&&(we-=Vt-de.left-me,H.x+Q<de.left+dn&&(we+=H.x-de.left+Q-dn)),Nn>de.right&&(we-=Nn-de.right-me,H.x>de.right-dn&&(we+=H.x-de.right+dn)));var Cn=Ht===!0?0:Ht;typeof Cn=="number"&&(Nt<de.top&&(Ee-=Nt-de.top-Ne,H.y+Z<de.top+Cn&&(Ee+=H.y-de.top+Z-Cn)),Dt>de.bottom&&(Ee-=Dt-de.bottom-Ne,H.y>de.bottom-Cn&&(Ee+=H.y-de.bottom+Cn)));var Or=z.x+we,zr=Or+te,Xn=z.y+Ee,Co=Xn+Y,Lr=H.x,pt=Lr+Q,Ve=H.y,ct=Ve+Z,dt=Math.max(Or,Lr),xt=Math.min(zr,pt),Ot=(dt+xt)/2,Sn=Ot-Or,xn=Math.max(Xn,Ve),Yn=Math.min(Co,ct),tr=(xn+Yn)/2,Jn=tr-Xn;a==null||a(e,je);var Dn=Ae.right-z.x-(we+z.width),mn=Ae.bottom-z.y-(Ee+z.height);_e===1&&(we=Math.round(we),Dn=Math.round(Dn)),Re===1&&(Ee=Math.round(Ee),mn=Math.round(mn));var Ma={ready:!0,offsetX:we/_e,offsetY:Ee/Re,offsetR:Dn/_e,offsetB:mn/Re,arrowX:Sn/_e,arrowY:Jn/Re,scaleX:_e,scaleY:Re,align:je};u(Ma)}}),v=function(){d.current+=1;var C=d.current;Promise.resolve().then(function(){d.current===C&&g()})},b=function(){u(function(C){return j(j({},C),{},{ready:!1})})};return zt(b,[r]),zt(function(){t||b()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,v]}function ej(t,e,n,r,o){zt(function(){if(t&&e&&n){let d=function(){r(),o()};var i=e,a=n,s=Wf(i),l=Wf(a),c=_s(a),u=new Set([c].concat(he(s),he(l)));return u.forEach(function(f){f.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),r(),function(){u.forEach(function(f){f.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[t,e,n])}function tj(t,e,n,r,o,i,a,s){var l=h.useRef(t);l.current=t;var c=h.useRef(!1);h.useEffect(function(){if(e&&r&&(!o||i)){var d=function(){c.current=!1},f=function(S){var x;l.current&&!a(((x=S.composedPath)===null||x===void 0||(x=x.call(S))===null||x===void 0?void 0:x[0])||S.target)&&!c.current&&s(!1)},p=_s(r);p.addEventListener("pointerdown",d,!0),p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0);var m=oc(n);if(m&&(m.addEventListener("mousedown",f,!0),m.addEventListener("contextmenu",f,!0)),process.env.NODE_ENV!=="production"){var g,v,b=n==null||(g=n.getRootNode)===null||g===void 0?void 0:g.call(n),y=(v=r.getRootNode)===null||v===void 0?void 0:v.call(r);Xr(b===y,"trigger element and popup element should in same shadow root.")}return function(){p.removeEventListener("pointerdown",d,!0),p.removeEventListener("mousedown",f,!0),p.removeEventListener("contextmenu",f,!0),m&&(m.removeEventListener("mousedown",f,!0),m.removeEventListener("contextmenu",f,!0))}}},[e,n,r,o,i]);function u(){c.current=!0}return u}var nj=["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 rj(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xc,e=h.forwardRef(function(n,r){var o=n.prefixCls,i=o===void 0?"rc-trigger-popup":o,a=n.children,s=n.action,l=s===void 0?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,p=n.onPopupVisibleChange,m=n.afterPopupVisibleChange,g=n.mouseEnterDelay,v=n.mouseLeaveDelay,b=v===void 0?.1:v,y=n.focusDelay,C=n.blurDelay,S=n.mask,x=n.maskClosable,w=x===void 0?!0:x,$=n.getPopupContainer,R=n.forceRender,M=n.autoDestroy,O=n.destroyPopupOnHide,N=n.popup,I=n.popupClassName,T=n.popupStyle,P=n.popupPlacement,A=n.builtinPlacements,k=A===void 0?{}:A,B=n.popupAlign,_=n.zIndex,F=n.stretch,H=n.getPopupClassNameFromAlign,K=n.fresh,V=n.alignPoint,W=n.onPopupClick,z=n.onPopupAlign,L=n.arrow,J=n.popupMotion,ne=n.maskMotion,q=n.popupTransitionName,re=n.popupAnimation,ae=n.maskTransitionName,ee=n.maskAnimation,Y=n.className,te=n.getTriggerDOMNode,Z=lt(n,nj),Q=M||O||!1,oe=h.useState(!1),ce=X(oe,2),se=ce[0],le=ce[1];zt(function(){le(fp())},[]);var be=h.useRef({}),ye=h.useContext(Pv),Be=h.useMemo(function(){return{registerSubPopup:function(st,Xt){be.current[st]=Xt,ye==null||ye.registerSubPopup(st,Xt)}}},[ye]),de=Yc(),ue=h.useState(null),pe=X(ue,2),Ae=pe[0],_e=pe[1],Re=h.useRef(null),$e=At(function(Ye){Re.current=Ye,ss(Ye)&&Ae!==Ye&&_e(Ye),ye==null||ye.registerSubPopup(de,Ye)}),We=h.useState(null),ke=X(We,2),De=ke[0],me=ke[1],Ne=h.useRef(null),Ze=At(function(Ye){ss(Ye)&&De!==Ye&&(me(Ye),Ne.current=Ye)}),Ie=h.Children.only(a),xe=(Ie==null?void 0:Ie.props)||{},ot={},ft=At(function(Ye){var st,Xt,gn=De;return(gn==null?void 0:gn.contains(Ye))||((st=oc(gn))===null||st===void 0?void 0:st.host)===Ye||Ye===gn||(Ae==null?void 0:Ae.contains(Ye))||((Xt=oc(Ae))===null||Xt===void 0?void 0:Xt.host)===Ye||Ye===Ae||Object.values(be.current).some(function(nn){return(nn==null?void 0:nn.contains(Ye))||Ye===nn})}),Tt=Av(i,J,re,q),Bt=Av(i,ne,ee,ae),Pe=h.useState(f||!1),Se=X(Pe,2),Xe=Se[0],Ge=Se[1],et=d??Xe,je=At(function(Ye){d===void 0&&Ge(Ye)});zt(function(){Ge(d||!1)},[d]);var we=h.useRef(et);we.current=et;var Ee=h.useRef([]);Ee.current=[];var ut=At(function(Ye){var st;je(Ye),((st=Ee.current[Ee.current.length-1])!==null&&st!==void 0?st:et)!==Ye&&(Ee.current.push(Ye),p==null||p(Ye))}),ht=h.useRef(),ze=function(){clearTimeout(ht.current)},Ce=function(st){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;ze(),Xt===0?ut(st):ht.current=setTimeout(function(){ut(st)},Xt*1e3)};h.useEffect(function(){return ze},[]);var Ke=h.useState(!1),Le=X(Ke,2),Fe=Le[0],Qe=Le[1];zt(function(Ye){(!Ye||et)&&Qe(!0)},[et]);var Et=h.useState(null),vt=X(Et,2),Ht=vt[0],Ct=vt[1],Nt=h.useState(null),Dt=X(Nt,2),Vt=Dt[0],Nn=Dt[1],Wt=function(st){Nn([st.clientX,st.clientY])},It=Q_(et,Ae,V&&Vt!==null?Vt:De,P,k,B,z),Oe=X(It,11),qe=Oe[0],He=Oe[1],ve=Oe[2],nt=Oe[3],St=Oe[4],bt=Oe[5],Jt=Oe[6],Zt=Oe[7],tn=Oe[8],Ut=Oe[9],Qt=Oe[10],pn=Y_(se,l,c,u),Rn=X(pn,2),dn=Rn[0],Cn=Rn[1],Or=dn.has("click"),zr=Cn.has("click")||Cn.has("contextMenu"),Xn=At(function(){Fe||Qt()}),Co=function(){we.current&&V&&zr&&Ce(!1)};ej(et,De,Ae,Xn,Co),zt(function(){Xn()},[Vt,P]),zt(function(){et&&!(k!=null&&k[P])&&Xn()},[JSON.stringify(B)]);var Lr=h.useMemo(function(){var Ye=Z_(k,i,Ut,V);return G.cn(Ye,H==null?void 0:H(Ut))},[Ut,H,k,i,V]);h.useImperativeHandle(r,function(){return{nativeElement:Ne.current,popupElement:Re.current,forceAlign:Xn}});var pt=h.useState(0),Ve=X(pt,2),ct=Ve[0],dt=Ve[1],xt=h.useState(0),Ot=X(xt,2),Sn=Ot[0],xn=Ot[1],Yn=function(){if(F&&De){var st=De.getBoundingClientRect();dt(st.width),xn(st.height)}},tr=function(){Yn(),Xn()},Jn=function(st){Qe(!1),Qt(),m==null||m(st)},Dn=function(){return new Promise(function(st){Yn(),Ct(function(){return st})})};zt(function(){Ht&&(Qt(),Ht(),Ct(null))},[Ht]);function mn(Ye,st,Xt,gn){ot[Ye]=function(nn){var qs;gn==null||gn(nn),Ce(st,Xt);for(var pu=arguments.length,Wp=new Array(pu>1?pu-1:0),Ks=1;Ks<pu;Ks++)Wp[Ks-1]=arguments[Ks];(qs=xe[Ye])===null||qs===void 0||qs.call.apply(qs,[xe,nn].concat(Wp))}}(Or||zr)&&(ot.onClick=function(Ye){var st;we.current&&zr?Ce(!1):!we.current&&Or&&(Wt(Ye),Ce(!0));for(var Xt=arguments.length,gn=new Array(Xt>1?Xt-1:0),nn=1;nn<Xt;nn++)gn[nn-1]=arguments[nn];(st=xe.onClick)===null||st===void 0||st.call.apply(st,[xe,Ye].concat(gn))});var Ma=tj(et,zr,De,Ae,S,w,ft,Ce),pr=dn.has("hover"),Vs=Cn.has("hover"),ki,So;pr&&(mn("onMouseEnter",!0,g,function(Ye){Wt(Ye)}),mn("onPointerEnter",!0,g,function(Ye){Wt(Ye)}),ki=function(st){(et||Fe)&&Ae!==null&&Ae!==void 0&&Ae.contains(st.target)&&Ce(!0,g)},V&&(ot.onMouseMove=function(Ye){var st;(st=xe.onMouseMove)===null||st===void 0||st.call(xe,Ye)})),Vs&&(mn("onMouseLeave",!1,b),mn("onPointerLeave",!1,b),So=function(){Ce(!1,b)}),dn.has("focus")&&mn("onFocus",!0,y),Cn.has("focus")&&mn("onBlur",!1,C),dn.has("contextMenu")&&(ot.onContextMenu=function(Ye){var st;we.current&&Cn.has("contextMenu")?Ce(!1):(Wt(Ye),Ce(!0)),Ye.preventDefault();for(var Xt=arguments.length,gn=new Array(Xt>1?Xt-1:0),nn=1;nn<Xt;nn++)gn[nn-1]=arguments[nn];(st=xe.onContextMenu)===null||st===void 0||st.call.apply(st,[xe,Ye].concat(gn))}),Y&&(ot.className=G.cn(xe.className,Y));var xo=j(j({},xe),ot),Na={},Ws=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ws.forEach(function(Ye){Z[Ye]&&(Na[Ye]=function(){for(var st,Xt=arguments.length,gn=new Array(Xt),nn=0;nn<Xt;nn++)gn[nn]=arguments[nn];(st=xo[Ye])===null||st===void 0||st.call.apply(st,[xo].concat(gn)),Z[Ye].apply(Z,gn)})});var du=h.cloneElement(Ie,j(j({},xo),Na)),fu={x:bt,y:Jt},hu=L?j({},L!==!0?L:{}):null;return h.createElement(h.Fragment,null,h.createElement(bo,{disabled:!et,ref:Ze,onResize:tr},h.createElement(jx,{getTriggerDOMNode:te},du)),h.createElement(Pv.Provider,{value:Be},h.createElement(_x,{portal:t,ref:$e,prefixCls:i,popup:N,className:G.cn(I,Lr),style:T,target:De,onMouseEnter:ki,onMouseLeave:So,onPointerEnter:ki,zIndex:_,open:et,keepDom:Fe,fresh:K,onClick:W,onPointerDownCapture:Ma,mask:S,motion:Tt,maskMotion:Bt,onVisibleChanged:Jn,onPrepare:Dn,forceRender:R,autoDestroy:Q,getPopupContainer:$,align:Ut,arrow:hu,arrowPos:fu,ready:qe,offsetX:He,offsetY:ve,offsetR:nt,offsetB:St,onAlign:Xn,stretch:F,targetWidth:ct/Zt,targetHeight:Sn/tn})))});return process.env.NODE_ENV!=="production"&&(e.displayName="Trigger"),e}const eu=rj(Xc);var oj=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ij=function(e){var n=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},aj=function(e,n){var r=e.prefixCls;e.disabled;var o=e.visible,i=e.children,a=e.popupElement,s=e.animation,l=e.transitionName,c=e.dropdownStyle,u=e.dropdownClassName,d=e.direction,f=d===void 0?"ltr":d,p=e.placement,m=e.builtinPlacements,g=e.dropdownMatchSelectWidth,v=e.dropdownRender,b=e.dropdownAlign,y=e.getPopupContainer,C=e.empty,S=e.getTriggerDOMNode,x=e.onPopupVisibleChange,w=e.onPopupMouseEnter,$=lt(e,oj),R="".concat(r,"-dropdown"),M=a;v&&(M=v(a));var O=h.useMemo(function(){return m||ij(g)},[m,g]),N=s?"".concat(R,"-").concat(s):l,I=typeof g=="number",T=h.useMemo(function(){return I?null:g===!1?"minWidth":"width"},[g,I]),P=c;I&&(P=j(j({},P),{},{width:g}));var A=h.useRef(null);return h.useImperativeHandle(n,function(){return{getPopupElement:function(){var B;return(B=A.current)===null||B===void 0?void 0:B.popupElement}}}),h.createElement(eu,ge({},$,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:p||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:O,prefixCls:R,popupTransitionName:N,popup:h.createElement("div",{onMouseEnter:w},M),ref:A,stretch:T,popupAlign:b,popupVisible:o,getPopupContainer:y,popupClassName:G.cn(u,D({},"".concat(R,"-empty"),C)),popupStyle:P,getTriggerDOMNode:S,onPopupVisibleChange:x}),i)},Bx=h.forwardRef(aj);process.env.NODE_ENV!=="production"&&(Bx.displayName="SelectTrigger");function Bv(t,e){var n=t.key,r;return"value"in t&&(r=t.value),n??(r!==void 0?r:"rc-index-key-".concat(e))}function qf(t){return typeof t<"u"&&!Number.isNaN(t)}function zx(t,e){var n=t||{},r=n.label,o=n.value,i=n.options,a=n.groupLabel,s=r||(e?"children":"label");return{label:s,value:o||"value",options:i||"options",groupLabel:a||s}}function sj(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,o=[],i=zx(n,!1),a=i.label,s=i.value,l=i.options,c=i.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(p){if(f||!(l in p)){var m=p[s];o.push({key:Bv(p,o.length),groupOption:f,data:p,label:p[a],value:m})}else{var g=p[c];g===void 0&&r&&(g=p.label),o.push({key:Bv(p,o.length),group:!0,data:p,label:g}),u(p[l],!0)}})}return u(t,!1),o}function Kf(t){var e=j({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return at(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var lj=function(e,n,r){if(!n||!n.length)return null;var o=!1,i=function s(l,c){var u=_C(c),d=u[0],f=u.slice(1);if(!d)return[l];var p=l.split(d);return o=o||p.length>1,p.reduce(function(m,g){return[].concat(he(m),he(s(g,f)))},[]).filter(Boolean)},a=i(e,n);return o?typeof r<"u"?a.slice(0,r):a:null},mp=h.createContext(null);function cj(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(o){var i=o.label,a=o.value;return["number","string"].includes(Ue(i))?i:a}).join(", ")),n.length>r?", ...":null)}var uj=["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"],dj=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],cc=function(e){return e==="tags"||e==="multiple"},Lx=h.forwardRef(function(t,e){var n,r=t.id,o=t.prefixCls,i=t.className,a=t.showSearch,s=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,f=t.emptyOptions,p=t.notFoundContent,m=p===void 0?"Not Found":p,g=t.onClear,v=t.mode,b=t.disabled,y=t.loading,C=t.getInputElement,S=t.getRawInputElement,x=t.open,w=t.defaultOpen,$=t.onDropdownVisibleChange,R=t.activeValue,M=t.onActiveValueChange,O=t.activeDescendantId,N=t.searchValue,I=t.autoClearSearchValue,T=t.onSearch,P=t.onSearchSplit,A=t.tokenSeparators,k=t.allowClear,B=t.prefix,_=t.suffixIcon,F=t.clearIcon,H=t.OptionList,K=t.animation,V=t.transitionName,W=t.dropdownStyle,z=t.dropdownClassName,L=t.dropdownMatchSelectWidth,J=t.dropdownRender,ne=t.dropdownAlign,q=t.placement,re=t.builtinPlacements,ae=t.getPopupContainer,ee=t.showAction,Y=ee===void 0?[]:ee,te=t.onFocus,Z=t.onBlur,Q=t.onKeyUp,oe=t.onKeyDown,ce=t.onMouseDown,se=lt(t,uj),le=cc(v),be=(a!==void 0?a:le)||v==="combobox",ye=j({},se);dj.forEach(function(pt){delete ye[pt]}),c==null||c.forEach(function(pt){delete ye[pt]});var Be=h.useState(!1),de=X(Be,2),ue=de[0],pe=de[1];h.useEffect(function(){pe(fp())},[]);var Ae=h.useRef(null),_e=h.useRef(null),Re=h.useRef(null),$e=h.useRef(null),We=h.useRef(null),ke=h.useRef(!1),De=x_(),me=X(De,3),Ne=me[0],Ze=me[1],Ie=me[2];h.useImperativeHandle(e,function(){var pt,Ve;return{focus:(pt=$e.current)===null||pt===void 0?void 0:pt.focus,blur:(Ve=$e.current)===null||Ve===void 0?void 0:Ve.blur,scrollTo:function(dt){var xt;return(xt=We.current)===null||xt===void 0?void 0:xt.scrollTo(dt)},nativeElement:Ae.current||_e.current}});var xe=h.useMemo(function(){var pt;if(v!=="combobox")return N;var Ve=(pt=u[0])===null||pt===void 0?void 0:pt.value;return typeof Ve=="string"||typeof Ve=="number"?String(Ve):""},[N,v,u]),ot=v==="combobox"&&typeof C=="function"&&C()||null,ft=typeof S=="function"&&S(),Tt=Yo(_e,ft==null||(n=ft.props)===null||n===void 0?void 0:n.ref),Bt=h.useState(!1),Pe=X(Bt,2),Se=Pe[0],Xe=Pe[1];zt(function(){Xe(!0)},[]);var Ge=en(!1,{defaultValue:w,value:x}),et=X(Ge,2),je=et[0],we=et[1],Ee=Se?je:!1,ut=!m&&f;(b||ut&&Ee&&v==="combobox")&&(Ee=!1);var ht=ut?!1:Ee,ze=h.useCallback(function(pt){var Ve=pt!==void 0?pt:!Ee;b||(we(Ve),Ee!==Ve&&($==null||$(Ve)))},[b,Ee,we,$]),Ce=h.useMemo(function(){return(A||[]).some(function(pt){return[`
299
+ ${u}-confirm ${u}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${u}-info ${u}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${u}-success ${u}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},d_=rS(["Modal","confirm"],t=>{const e=px(t);return[u_(e)]},mx,{order:-1e3});var f_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function bx(t){const{prefixCls:e,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:s,footer:l,locale:c}=t,u=f_(t,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const $=Kt("Modal");process.env.NODE_ENV!=="production"&&$(!(typeof n=="string"&&n.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`)}let d=n;if(!n&&n!==null)switch(a){case"info":d=h.createElement(ES,null);break;case"success":d=h.createElement(xS,null);break;case"error":d=h.createElement(zc,null);break;default:d=h.createElement(wS,null)}const f=s??a==="confirm",p=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",[m]=Qr("Modal"),g=c||m,v=r||(f?g==null?void 0:g.okText:g==null?void 0:g.justOkText),b=o||(g==null?void 0:g.cancelText),y=Object.assign({autoFocusButton:p,cancelTextLocale:b,okTextLocale:v,mergedOkCancel:f},u),C=h.useMemo(()=>y,he(Object.values(y))),S=h.createElement(h.Fragment,null,h.createElement(tv,null),h.createElement(nv,null)),x=t.title!==void 0&&t.title!==null,w=`${i}-body`;return h.createElement("div",{className:`${i}-body-wrapper`},h.createElement("div",{className:G.cn(w,{[`${w}-has-title`]:x})},d,h.createElement("div",{className:`${i}-paragraph`},x&&h.createElement("span",{className:`${i}-title`},t.title),h.createElement("div",{className:`${i}-content`},t.content))),l===void 0||typeof l=="function"?h.createElement(QS,{value:C},h.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(S,{OkBtn:nv,CancelBtn:tv}):S)):l,h.createElement(d_,{prefixCls:e}))}const yx=t=>{const{close:e,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=t;if(process.env.NODE_ENV!=="production"){const S=Kt("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(([x,w])=>{S.deprecated(!(x in t),x,w)})}const f=`${i}-confirm`,p=t.width||416,m=t.style||{},g=t.mask===void 0?!0:t.mask,v=t.maskClosable===void 0?!1:t.maskClosable,b=G.cn(f,`${f}-${t.type}`,{[`${f}-rtl`]:o==="rtl"},t.className),[,y]=er(),C=h.useMemo(()=>n!==void 0?n:y.zIndexPopupBase+OS,[n,y]);return h.createElement(vx,Object.assign({},t,{className:b,wrapClassName:G.cn({[`${f}-centered`]:!!t.centered},a),onCancel:()=>{e==null||e({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:Ei(s||"","zoom",t.transitionName),maskTransitionName:Ei(s||"","fade",t.maskTransitionName),mask:g,maskClosable:v,style:m,styles:Object.assign({body:l,mask:r},d),width:p,zIndex:C,closable:c}),h.createElement(bx,Object.assign({},t,{confirmPrefixCls:f})))},up=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:r,theme:o}=t;return h.createElement(to,{prefixCls:e,iconPrefixCls:n,direction:r,theme:o},h.createElement(yx,Object.assign({},t)))};process.env.NODE_ENV!=="production"&&(yx.displayName="ConfirmDialog",up.displayName="ConfirmDialogWrapper");const li=[];let Cx="";function Sx(){return Cx}const h_=t=>{var e,n;const{prefixCls:r,getContainer:o,direction:i}=t,a=FC(),s=E.useContext(gt),l=Sx()||s.getPrefixCls(),c=r||`${l}-modal`;let u=o;return u===!1&&(u=void 0,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&Ri(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),E.createElement(up,Object.assign({},t,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:i??s.direction,locale:(n=(e=s.locale)===null||e===void 0?void 0:e.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function Ds(t){const e=wT();process.env.NODE_ENV!=="production"&&!e.holderRender&&bT("Modal");const n=document.createDocumentFragment();let r=Object.assign(Object.assign({},t),{close:l,open:!0}),o,i;function a(...u){var d;if(u.some(m=>m==null?void 0:m.triggerCancel)){var p;(d=t.onCancel)===null||d===void 0||(p=d).call.apply(p,[t,()=>{}].concat(he(u.slice(1))))}for(let m=0;m<li.length;m++)if(li[m]===l){li.splice(m,1);break}i()}function s(u){clearTimeout(o),o=setTimeout(()=>{const d=e.getPrefixCls(void 0,Sx()),f=e.getIconPrefixCls(),p=e.getTheme(),m=E.createElement(h_,Object.assign({},u));i=NS()(E.createElement(to,{prefixCls:d,iconPrefixCls:f,theme:p},e.holderRender?e.holderRender(m):m),n)})}function l(...u){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),a.apply(this,u)}}),r.visible&&delete r.visible,s(r)}function c(u){typeof u=="function"?r=u(r):r=Object.assign(Object.assign({},r),u),s(r)}return s(r),li.push(l),{destroy:l,update:c}}function xx(t){return Object.assign(Object.assign({},t),{type:"warning"})}function wx(t){return Object.assign(Object.assign({},t),{type:"info"})}function Ex(t){return Object.assign(Object.assign({},t),{type:"success"})}function $x(t){return Object.assign(Object.assign({},t),{type:"error"})}function Ox(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function p_({rootPrefixCls:t}){process.env.NODE_ENV!=="production"&&Ri(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),Cx=t}var m_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const g_=(t,e)=>{var n,{afterClose:r,config:o}=t,i=m_(t,["afterClose","config"]);const[a,s]=h.useState(!0),[l,c]=h.useState(o),{direction:u,getPrefixCls:d}=h.useContext(gt),f=d("modal"),p=d(),m=()=>{var y;r(),(y=l.afterClose)===null||y===void 0||y.call(l)},g=(...y)=>{var C;if(s(!1),y.some(w=>w==null?void 0:w.triggerCancel)){var x;(C=l.onCancel)===null||C===void 0||(x=C).call.apply(x,[l,()=>{}].concat(he(y.slice(1))))}};h.useImperativeHandle(e,()=>({destroy:g,update:y=>{c(C=>Object.assign(Object.assign({},C),y))}}));const v=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[b]=Qr("Modal",Ho.Modal);return h.createElement(up,Object.assign({prefixCls:f,rootPrefixCls:p},l,{close:g,open:a,afterClose:m,okText:l.okText||(v?b==null?void 0:b.okText:b==null?void 0:b.justOkText),direction:l.direction||u,cancelText:l.cancelText||(b==null?void 0:b.cancelText)},i))},v_=h.forwardRef(g_);let Nv=0;const b_=h.memo(h.forwardRef((t,e)=>{const[n,r]=rA();return h.useImperativeHandle(e,()=>({patchElement:r}),[]),h.createElement(h.Fragment,null,n)}));function y_(){const t=h.useRef(null),[e,n]=h.useState([]);h.useEffect(()=>{e.length&&(he(e).forEach(a=>{a()}),n([]))},[e]);const r=h.useCallback(i=>function(s){var l;Nv+=1;const c=h.createRef();let u;const d=new Promise(v=>{u=v});let f=!1,p;const m=h.createElement(v_,{key:`modal-${Nv}`,config:i(s),ref:c,afterClose:()=>{p==null||p()},isSilent:()=>f,onConfirm:v=>{u(v)}});return p=(l=t.current)===null||l===void 0?void 0:l.patchElement(m),p&&li.push(p),{destroy:()=>{function v(){var b;(b=c.current)===null||b===void 0||b.destroy()}c.current?v():n(b=>[].concat(he(b),[v]))},update:v=>{function b(){var y;(y=c.current)===null||y===void 0||y.update(v)}c.current?b():n(y=>[].concat(he(y),[b]))},then:v=>(f=!0,d.then(v))}},[]);return[h.useMemo(()=>({info:r(wx),success:r(Ex),error:r($x),warning:r(xx),confirm:r(Ox)}),[]),h.createElement(b_,{key:"modal-holder",ref:t})]}function Mx(t){return e=>h.createElement(to,{theme:{token:{motion:!1,zIndexPopupBase:0}}},h.createElement(t,Object.assign({},e)))}const dp=(t,e,n,r,o)=>Mx(a=>{const{prefixCls:s,style:l}=a,c=h.useRef(null),[u,d]=h.useState(0),[f,p]=h.useState(0),[m,g]=en(!1,{value:a.open}),{getPrefixCls:v}=h.useContext(gt),b=v(r||"select",s);h.useEffect(()=>{if(g(!0),typeof ResizeObserver<"u"){const S=new ResizeObserver(w=>{const $=w[0].target;d($.offsetHeight+8),p($.offsetWidth)}),x=setInterval(()=>{var w;const $=o?`.${o(b)}`:`.${b}-dropdown`,R=(w=c.current)===null||w===void 0?void 0:w.querySelector($);R&&(clearInterval(x),S.observe(R))},10);return()=>{clearInterval(x),S.disconnect()}}},[]);let y=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:m,visible:m,getPopupContainer:()=>c.current});n&&(y=n(y)),e&&Object.assign(y,{[e]:{overflow:{adjustX:!1,adjustY:!1}}});const C={paddingBottom:u,position:"relative",minWidth:f};return h.createElement("div",{ref:c,style:C},h.createElement(t,Object.assign({},y)))}),fp=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var Qc=function(e){var n=e.className,r=e.customizeIcon,o=e.customizeIconProps,i=e.children,a=e.onMouseDown,s=e.onClick,l=typeof r=="function"?r(o):r;return h.createElement("span",{className:n,onMouseDown:function(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:h.createElement("span",{className:G.cn(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},C_=function(e,n,r,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=E.useMemo(function(){if(Ue(o)==="object")return o.clearIcon;if(i)return i},[o,i]),u=E.useMemo(function(){return!!(!a&&o&&(r.length||s)&&!(l==="combobox"&&s===""))},[o,a,r.length,s,l]);return{allowClear:u,clearIcon:E.createElement(Qc,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},Nx=h.createContext(null);function S_(){return h.useContext(Nx)}function x_(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=h.useState(!1),n=X(e,2),r=n[0],o=n[1],i=h.useRef(null),a=function(){window.clearTimeout(i.current)};h.useEffect(function(){return a},[]);var s=function(c,u){a(),i.current=window.setTimeout(function(){o(c),u&&u()},t)};return[r,s,a]}function Rx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=h.useRef(null),n=h.useRef(null);h.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(o){(o||e.current===null)&&(e.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function w_(t,e,n,r){var o=h.useRef(null);o.current={open:e,triggerOpen:n,customizedTrigger:r},h.useEffect(function(){function i(a){var s;if(!((s=o.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),o.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",i),function(){return window.removeEventListener("mousedown",i)}},[])}function E_(t){return t&&![Te.ESC,Te.SHIFT,Te.BACKSPACE,Te.TAB,Te.WIN_KEY,Te.ALT,Te.META,Te.WIN_KEY_RIGHT,Te.CTRL,Te.SEMICOLON,Te.EQUALS,Te.CAPS_LOCK,Te.CONTEXT_MENU,Te.F1,Te.F2,Te.F3,Te.F4,Te.F5,Te.F6,Te.F7,Te.F8,Te.F9,Te.F10,Te.F11,Te.F12].includes(t)}var $_=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Li=void 0;function O_(t,e){var n=t.prefixCls,r=t.invalidate,o=t.item,i=t.renderItem,a=t.responsive,s=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,d=t.style,f=t.children,p=t.display,m=t.order,g=t.component,v=g===void 0?"div":g,b=lt(t,$_),y=a&&!p;function C(R){l(c,R)}h.useEffect(function(){return function(){C(null)}},[]);var S=i&&o!==Li?i(o,{index:m}):f,x;r||(x={opacity:y?0:1,height:y?0:Li,overflowY:y?"hidden":Li,order:a?m:Li,pointerEvents:y?"none":Li,position:y?"absolute":Li});var w={};y&&(w["aria-hidden"]=!0);var $=h.createElement(v,ge({className:G.cn(!r&&n,u),style:j(j({},x),d)},w,b,{ref:e}),S);return a&&($=h.createElement(bo,{onResize:function(M){var O=M.offsetWidth;C(O)},disabled:s},$)),$}var Ja=h.forwardRef(O_);Ja.displayName="Item";function M_(t){if(typeof MessageChannel>"u")wt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function N_(){var t=h.useRef(null),e=function(r){t.current||(t.current=[],M_(function(){Ar.unstable_batchedUpdates(function(){t.current.forEach(function(o){o()}),t.current=null})})),t.current.push(r)};return e}function Aa(t,e){var n=h.useState(e),r=X(n,2),o=r[0],i=r[1],a=At(function(s){t(function(){i(s)})});return[o,a]}var lc=E.createContext(null),R_=["component"],I_=["className"],P_=["className"],T_=function(e,n){var r=h.useContext(lc);if(!r){var o=e.component,i=o===void 0?"div":o,a=lt(e,R_);return h.createElement(i,ge({},a,{ref:n}))}var s=r.className,l=lt(r,I_),c=e.className,u=lt(e,P_);return h.createElement(lc.Provider,{value:null},h.createElement(Ja,ge({ref:n,className:G.cn(s,c)},l,u)))},Ix=h.forwardRef(T_);Ix.displayName="RawItem";var A_=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Px="responsive",Tx="invalidate";function k_(t){return"+ ".concat(t.length," ...")}function D_(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,o=t.data,i=o===void 0?[]:o,a=t.renderItem,s=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,d=t.ssr,f=t.style,p=t.className,m=t.maxCount,g=t.renderRest,v=t.renderRawRest,b=t.suffix,y=t.component,C=y===void 0?"div":y,S=t.itemComponent,x=t.onVisibleChange,w=lt(t,A_),$=d==="full",R=N_(),M=Aa(R,null),O=X(M,2),N=O[0],I=O[1],T=N||0,P=Aa(R,new Map),A=X(P,2),k=A[0],B=A[1],_=Aa(R,0),F=X(_,2),H=F[0],K=F[1],V=Aa(R,0),W=X(V,2),z=W[0],L=W[1],J=Aa(R,0),ne=X(J,2),q=ne[0],re=ne[1],ae=E.useState(null),ee=X(ae,2),Y=ee[0],te=ee[1],Z=E.useState(null),Q=X(Z,2),ie=Q[0],ce=Q[1],se=h.useMemo(function(){return ie===null&&$?Number.MAX_SAFE_INTEGER:ie||0},[ie,N]),le=E.useState(!1),be=X(le,2),ye=be[0],Be=be[1],de="".concat(r,"-item"),ue=Math.max(H,z),pe=m===Px,Ae=i.length&&pe,_e=m===Tx,Re=Ae||typeof m=="number"&&i.length>m,$e=E.useMemo(function(){var je=i;return Ae?N===null&&$?je=i:je=i.slice(0,Math.min(i.length,T/u)):typeof m=="number"&&(je=i.slice(0,m)),je},[i,u,N,m,Ae]),We=E.useMemo(function(){return Ae?i.slice(se+1):i.slice($e.length)},[i,$e,Ae,se]),ke=E.useCallback(function(je,we){var Ee;return typeof l=="function"?l(je):(Ee=l&&(je==null?void 0:je[l]))!==null&&Ee!==void 0?Ee:we},[l]),De=E.useCallback(a||function(je){return je},[a]);function me(je,we,Ee){ie===je&&(we===void 0||we===Y)||(ce(je),Ee||(Be(je<i.length-1),x==null||x(je)),we!==void 0&&te(we))}function Ne(je,we){I(we.clientWidth)}function Ze(je,we){B(function(Ee){var ut=new Map(Ee);return we===null?ut.delete(je):ut.set(je,we),ut})}function Ie(je,we){L(we),K(z)}function xe(je,we){re(we)}function ot(je){return k.get(ke($e[je],je))}zt(function(){if(T&&typeof ue=="number"&&$e){var je=q,we=$e.length,Ee=we-1;if(!we){me(0,null);return}for(var ut=0;ut<we;ut+=1){var ht=ot(ut);if($&&(ht=ht||0),ht===void 0){me(ut-1,void 0,!0);break}if(je+=ht,Ee===0&&je<=T||ut===Ee-1&&je+ot(Ee)<=T){me(Ee,null);break}else if(je+ue>T){me(ut-1,je-ht-q+z);break}}b&&ot(0)+q>T&&te(null)}},[T,k,z,q,ke,$e]);var ft=ye&&!!We.length,Tt={};Y!==null&&Ae&&(Tt={position:"absolute",left:Y,top:0});var Bt={prefixCls:de,responsive:Ae,component:S,invalidate:_e},Pe=s?function(je,we){var Ee=ke(je,we);return h.createElement(lc.Provider,{key:Ee,value:j(j({},Bt),{},{order:we,item:je,itemKey:Ee,registerSize:Ze,display:we<=se})},s(je,we))}:function(je,we){var Ee=ke(je,we);return h.createElement(Ja,ge({},Bt,{order:we,key:Ee,item:je,renderItem:De,itemKey:Ee,registerSize:Ze,display:we<=se}))},Se={order:ft?se:Number.MAX_SAFE_INTEGER,className:"".concat(de,"-rest"),registerSize:Ie,display:ft},Xe=g||k_,Ge=v?h.createElement(lc.Provider,{value:j(j({},Bt),Se)},v(We)):h.createElement(Ja,ge({},Bt,Se),typeof Xe=="function"?Xe(We):Xe),et=h.createElement(C,ge({className:G.cn(!_e&&r,p),style:f,ref:e},w),$e.map(Pe),Re?Ge:null,b&&h.createElement(Ja,ge({},Bt,{responsive:pe,responsiveDisabled:!Ae,order:se,className:"".concat(de,"-suffix"),registerSize:xe,display:!0,style:Tt}),b));return pe?h.createElement(bo,{onResize:Ne,disabled:!Ae},et):et}var Kr=h.forwardRef(D_);Kr.displayName="Overflow";Kr.Item=Ix;Kr.RESPONSIVE=Px;Kr.INVALIDATE=Tx;function __(t,e,n){var r=j(j({},t),e);return Object.keys(e).forEach(function(o){var i=e[o];typeof i=="function"&&(r[o]=function(){for(var a,s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i.apply(void 0,l),(a=t[o])===null||a===void 0?void 0:a.call.apply(a,[t].concat(l))})}),r}var j_=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],B_=function(e,n){var r=e.prefixCls,o=e.id,i=e.inputElement,a=e.autoFocus,s=e.autoComplete,l=e.editable,c=e.activeDescendantId,u=e.value,d=e.open,f=e.attrs,p=lt(e,j_),m=i||h.createElement("input",null),g=m,v=g.ref,b=g.props;return Xr(!("maxLength"in m.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),m=h.cloneElement(m,j(j(j({type:"search"},__(p,b)),{},{id:o,ref:Qn(n,v),autoComplete:s||"off",autoFocus:a,className:G.cn("".concat(r,"-selection-search-input"),b==null?void 0:b.className),role:"combobox","aria-expanded":d||!1,"aria-haspopup":"listbox","aria-owns":"".concat(o,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(o,"_list"),"aria-activedescendant":d?c:void 0},f),{},{value:l?u:"",readOnly:!l,unselectable:l?null:"on",style:j(j({},b.style),{},{opacity:l?null:0})})),m},hp=h.forwardRef(B_);process.env.NODE_ENV!=="production"&&(hp.displayName="Input");function pp(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}var z_=typeof window<"u"&&window.document&&window.document.documentElement,L_=process.env.NODE_ENV!=="test"&&z_;function F_(t){return t!=null}function H_(t){return!t&&t!==0}function Rv(t){return["string","number"].includes(Ue(t))}function Ax(t){var e=void 0;return t&&(Rv(t.title)?e=t.title.toString():Rv(t.label)&&(e=t.label.toString())),e}function V_(t,e){L_?h.useLayoutEffect(t,e):h.useEffect(t,e)}function W_(t){var e;return(e=t.key)!==null&&e!==void 0?e:t.value}var Iv=function(e){e.preventDefault(),e.stopPropagation()},q_=function(e){var n=e.id,r=e.prefixCls,o=e.values,i=e.open,a=e.searchValue,s=e.autoClearSearchValue,l=e.inputRef,c=e.placeholder,u=e.disabled,d=e.mode,f=e.showSearch,p=e.autoFocus,m=e.autoComplete,g=e.activeDescendantId,v=e.tabIndex,b=e.removeIcon,y=e.maxTagCount,C=e.maxTagTextLength,S=e.maxTagPlaceholder,x=S===void 0?function(Z){return"+ ".concat(Z.length," ...")}:S,w=e.tagRender,$=e.onToggleOpen,R=e.onRemove,M=e.onInputChange,O=e.onInputPaste,N=e.onInputKeyDown,I=e.onInputMouseDown,T=e.onInputCompositionStart,P=e.onInputCompositionEnd,A=e.onInputBlur,k=h.useRef(null),B=E.useState(0),_=X(B,2),F=_[0],H=_[1],K=E.useState(!1),V=X(K,2),W=V[0],z=V[1],L="".concat(r,"-selection"),J=i||d==="multiple"&&s===!1||d==="tags"?a:"",ne=d==="tags"||d==="multiple"&&s===!1||f&&(i||W);V_(function(){H(k.current.scrollWidth)},[J]);var q=function(Q,ie,ce,se,le){return h.createElement("span",{title:Ax(Q),className:G.cn("".concat(L,"-item"),D({},"".concat(L,"-item-disabled"),ce))},h.createElement("span",{className:"".concat(L,"-item-content")},ie),se&&h.createElement(Qc,{className:"".concat(L,"-item-remove"),onMouseDown:Iv,onClick:le,customizeIcon:b},"×"))},re=function(Q,ie,ce,se,le,be){var ye=function(de){Iv(de),$(!i)};return h.createElement("span",{onMouseDown:ye},w({label:ie,value:Q,disabled:ce,closable:se,onClose:le,isMaxTag:!!be}))},ae=function(Q){var ie=Q.disabled,ce=Q.label,se=Q.value,le=!u&&!ie,be=ce;if(typeof C=="number"&&(typeof ce=="string"||typeof ce=="number")){var ye=String(be);ye.length>C&&(be="".concat(ye.slice(0,C),"..."))}var Be=function(ue){ue&&ue.stopPropagation(),R(Q)};return typeof w=="function"?re(se,be,ie,le,Be):q(Q,be,ie,le,Be)},ee=function(Q){if(!o.length)return null;var ie=typeof x=="function"?x(Q):x;return typeof w=="function"?re(void 0,ie,!1,!1,void 0,!0):q({title:ie},ie,!1)},Y=h.createElement("div",{className:"".concat(L,"-search"),style:{width:F},onFocus:function(){z(!0)},onBlur:function(){z(!1)}},h.createElement(hp,{ref:l,open:i,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:p,autoComplete:m,editable:ne,activeDescendantId:g,value:J,onKeyDown:N,onMouseDown:I,onChange:M,onPaste:O,onCompositionStart:T,onCompositionEnd:P,onBlur:A,tabIndex:v,attrs:Yr(e,!0)}),h.createElement("span",{ref:k,className:"".concat(L,"-search-mirror"),"aria-hidden":!0},J," ")),te=h.createElement(Kr,{prefixCls:"".concat(L,"-overflow"),data:o,renderItem:ae,renderRest:ee,suffix:Y,itemKey:W_,maxCount:y});return h.createElement("span",{className:"".concat(L,"-wrap")},te,!o.length&&!J&&h.createElement("span",{className:"".concat(L,"-placeholder")},c))},K_=function(e){var n=e.inputElement,r=e.prefixCls,o=e.id,i=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,p=e.placeholder,m=e.tabIndex,g=e.showSearch,v=e.searchValue,b=e.activeValue,y=e.maxLength,C=e.onInputKeyDown,S=e.onInputMouseDown,x=e.onInputChange,w=e.onInputPaste,$=e.onInputCompositionStart,R=e.onInputCompositionEnd,M=e.onInputBlur,O=e.title,N=h.useState(!1),I=X(N,2),T=I[0],P=I[1],A=u==="combobox",k=A||g,B=f[0],_=v||"";A&&b&&!T&&(_=b),h.useEffect(function(){A&&P(!1)},[A,b]);var F=u!=="combobox"&&!d&&!g?!1:!!_,H=O===void 0?Ax(B):O,K=h.useMemo(function(){return B?null:h.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:F?{visibility:"hidden"}:void 0},p)},[B,F,p,r]);return h.createElement("span",{className:"".concat(r,"-selection-wrap")},h.createElement("span",{className:"".concat(r,"-selection-search")},h.createElement(hp,{ref:i,prefixCls:r,id:o,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:k,activeDescendantId:c,value:_,onKeyDown:C,onMouseDown:S,onChange:function(W){P(!0),x(W)},onPaste:w,onCompositionStart:$,onCompositionEnd:R,onBlur:M,tabIndex:m,attrs:Yr(e,!0),maxLength:A?y:void 0})),!A&&B?h.createElement("span",{className:"".concat(r,"-selection-item"),title:H,style:F?{visibility:"hidden"}:void 0},B.label):null,K)},G_=function(e,n){var r=E.useRef(null),o=E.useRef(!1),i=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,d=e.prefix,f=e.autoClearSearchValue,p=e.onSearch,m=e.onSearchSubmit,g=e.onToggleOpen,v=e.onInputKeyDown,b=e.onInputBlur,y=e.domRef;h.useImperativeHandle(n,function(){return{focus:function(H){r.current.focus(H)},blur:function(){r.current.blur()}}});var C=Rx(0),S=X(C,2),x=S[0],w=S[1],$=function(H){var K=H.which,V=r.current instanceof HTMLTextAreaElement;!V&&a&&(K===Te.UP||K===Te.DOWN)&&H.preventDefault(),v&&v(H),K===Te.ENTER&&s==="tags"&&!o.current&&!a&&(m==null||m(H.target.value)),!(V&&!a&&~[Te.UP,Te.DOWN,Te.LEFT,Te.RIGHT].indexOf(K))&&E_(K)&&g(!0)},R=function(){w(!0)},M=E.useRef(null),O=function(H){p(H,!0,o.current)!==!1&&g(!0)},N=function(){o.current=!0},I=function(H){o.current=!1,s!=="combobox"&&O(H.target.value)},T=function(H){var K=H.target.value;if(c&&M.current&&/[\r\n]/.test(M.current)){var V=M.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");K=K.replace(V,M.current)}M.current=null,O(K)},P=function(H){var K=H.clipboardData,V=K==null?void 0:K.getData("text");M.current=V||""},A=function(H){var K=H.target;if(K!==r.current){var V=document.body.style.msTouchAction!==void 0;V?setTimeout(function(){r.current.focus()}):r.current.focus()}},k=function(H){var K=x();H.target!==r.current&&!K&&!(s==="combobox"&&u)&&H.preventDefault(),(s!=="combobox"&&(!l||!K)||!a)&&(a&&f!==!1&&p("",!0,!1),g())},B={inputRef:r,onInputKeyDown:$,onInputMouseDown:R,onInputChange:T,onInputPaste:P,onInputCompositionStart:N,onInputCompositionEnd:I,onInputBlur:b},_=s==="multiple"||s==="tags"?h.createElement(q_,ge({},e,B)):h.createElement(K_,ge({},e,B));return h.createElement("div",{ref:y,className:"".concat(i,"-selector"),onClick:A,onMouseDown:k},d&&h.createElement("div",{className:"".concat(i,"-prefix")},d),_)},kx=h.forwardRef(G_);process.env.NODE_ENV!=="production"&&(kx.displayName="Selector");function U_(t){var e=t.prefixCls,n=t.align,r=t.arrow,o=t.arrowPos,i=r||{},a=i.className,s=i.content,l=o.x,c=l===void 0?0:l,u=o.y,d=u===void 0?0:u,f=h.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(n.autoArrow!==!1){var m=n.points[0],g=n.points[1],v=m[0],b=m[1],y=g[0],C=g[1];v===y||!["t","b"].includes(v)?p.top=d:v==="t"?p.top=0:p.bottom=0,b===C||!["l","r"].includes(b)?p.left=c:b==="l"?p.left=0:p.right=0}return h.createElement("div",{ref:f,className:G.cn("".concat(e,"-arrow"),a),style:p},s)}function X_(t){var e=t.prefixCls,n=t.open,r=t.zIndex,o=t.mask,i=t.motion;return o?h.createElement(eo,ge({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return h.createElement("div",{style:{zIndex:r},className:G.cn("".concat(e,"-mask"),s)})}):null}var Dx=h.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});process.env.NODE_ENV!=="production"&&(Dx.displayName="PopupContent");var _x=h.forwardRef(function(t,e){var n=t.popup,r=t.className,o=t.prefixCls,i=t.style,a=t.target,s=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,d=t.onClick,f=t.mask,p=t.arrow,m=t.arrowPos,g=t.align,v=t.motion,b=t.maskMotion,y=t.forceRender,C=t.getPopupContainer,S=t.autoDestroy,x=t.portal,w=t.zIndex,$=t.onMouseEnter,R=t.onMouseLeave,M=t.onPointerEnter,O=t.onPointerDownCapture,N=t.ready,I=t.offsetX,T=t.offsetY,P=t.offsetR,A=t.offsetB,k=t.onAlign,B=t.onPrepare,_=t.stretch,F=t.targetWidth,H=t.targetHeight,K=typeof n=="function"?n():n,V=l||c,W=(C==null?void 0:C.length)>0,z=h.useState(!C||!W),L=X(z,2),J=L[0],ne=L[1];if(zt(function(){!J&&W&&a&&ne(!0)},[J,W,a]),!J)return null;var q="auto",re={left:"-1000vw",top:"-1000vh",right:q,bottom:q};if(N||!l){var ae,ee=g.points,Y=g.dynamicInset||((ae=g._experimental)===null||ae===void 0?void 0:ae.dynamicInset),te=Y&&ee[0][1]==="r",Z=Y&&ee[0][0]==="b";te?(re.right=P,re.left=q):(re.left=I,re.right=q),Z?(re.bottom=A,re.top=q):(re.top=T,re.bottom=q)}var Q={};return _&&(_.includes("height")&&H?Q.height=H:_.includes("minHeight")&&H&&(Q.minHeight=H),_.includes("width")&&F?Q.width=F:_.includes("minWidth")&&F&&(Q.minWidth=F)),l||(Q.pointerEvents="none"),h.createElement(x,{open:y||V,getContainer:C&&function(){return C(a)},autoDestroy:S},h.createElement(X_,{prefixCls:o,open:l,zIndex:w,mask:f,motion:b}),h.createElement(bo,{onResize:k,disabled:!l},function(ie){return h.createElement(eo,ge({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:y,leavedClassName:"".concat(o,"-hidden")},v,{onAppearPrepare:B,onEnterPrepare:B,visible:l,onVisibleChanged:function(se){var le;v==null||(le=v.onVisibleChanged)===null||le===void 0||le.call(v,se),s(se)}}),function(ce,se){var le=ce.className,be=ce.style,ye=G.cn(o,le,r);return h.createElement("div",{ref:Qn(ie,e,se),className:ye,style:j(j(j(j({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},re),Q),be),{},{boxSizing:"border-box",zIndex:w},i),onMouseEnter:$,onMouseLeave:R,onPointerEnter:M,onClick:d,onPointerDownCapture:O},p&&h.createElement(U_,{prefixCls:o,arrow:p,arrowPos:m,align:g}),h.createElement(Dx,{cache:!l&&!u},K))})}))});process.env.NODE_ENV!=="production"&&(_x.displayName="Popup");var jx=h.forwardRef(function(t,e){var n=t.children,r=t.getTriggerDOMNode,o=Jo(n),i=h.useCallback(function(s){Bh(e,r?r(s):s)},[r]),a=Yo(i,Ni(n));return o?h.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(jx.displayName="TriggerWrapper");var Pv=h.createContext(null);function Tv(t){return t?Array.isArray(t)?t:[t]:[]}function Y_(t,e,n,r){return h.useMemo(function(){var o=Tv(n??e),i=Tv(r??e),a=new Set(o),s=new Set(i);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[t,e,n,r])}function J_(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function Z_(t,e,n,r){for(var o=n.points,i=Object.keys(t),a=0;a<i.length;a+=1){var s,l=i[a];if(J_((s=t[l])===null||s===void 0?void 0:s.points,o,r))return"".concat(e,"-placement-").concat(l)}return""}function Av(t,e,n,r){return e||(n?{motionName:"".concat(t,"-").concat(n)}:r?{motionName:r}:null)}function _s(t){return t.ownerDocument.defaultView}function Wf(t){for(var e=[],n=t==null?void 0:t.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=_s(n).getComputedStyle(n),i=o.overflowX,a=o.overflowY,s=o.overflow;[i,a,s].some(function(l){return r.includes(l)})&&e.push(n),n=n.parentElement}return e}function bs(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function ka(t){return bs(parseFloat(t),0)}function kv(t,e){var n=j({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var o=_s(r).getComputedStyle(r),i=o.overflow,a=o.overflowClipMargin,s=o.borderTopWidth,l=o.borderBottomWidth,c=o.borderLeftWidth,u=o.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,p=r.clientHeight,m=r.offsetWidth,g=r.clientWidth,v=ka(s),b=ka(l),y=ka(c),C=ka(u),S=bs(Math.round(d.width/m*1e3)/1e3),x=bs(Math.round(d.height/f*1e3)/1e3),w=(m-g-y-C)*S,$=(f-p-v-b)*x,R=v*x,M=b*x,O=y*S,N=C*S,I=0,T=0;if(i==="clip"){var P=ka(a);I=P*S,T=P*x}var A=d.x+O-I,k=d.y+R-T,B=A+d.width+2*I-O-N-w,_=k+d.height+2*T-R-M-$;n.left=Math.max(n.left,A),n.top=Math.max(n.top,k),n.right=Math.min(n.right,B),n.bottom=Math.min(n.bottom,_)}}),n}function Dv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function _v(t,e){var n=e||[],r=X(n,2),o=r[0],i=r[1];return[Dv(t.width,o),Dv(t.height,i)]}function jv(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function Fi(t,e){var n=e[0],r=e[1],o,i;return n==="t"?i=t.y:n==="b"?i=t.y+t.height:i=t.y+t.height/2,r==="l"?o=t.x:r==="r"?o=t.x+t.width:o=t.x+t.width/2,{x:o,y:i}}function wo(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,o){return o===e?n[r]||"c":r}).join("")}function Q_(t,e,n,r,o,i,a){var s=h.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),l=X(s,2),c=l[0],u=l[1],d=h.useRef(0),f=h.useMemo(function(){return e?Wf(e):[]},[e]),p=h.useRef({}),m=function(){p.current={}};t||m();var g=At(function(){if(e&&n&&t){let pr=function(ki,So){var xo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ue,Na=z.x+ki,Ws=z.y+So,du=Na+te,fu=Ws+Y,hu=Math.max(Na,xo.left),Ye=Math.max(Ws,xo.top),st=Math.min(du,xo.right),Xt=Math.min(fu,xo.bottom);return Math.max(0,(st-hu)*(Xt-Ye))},Vs=function(){Nt=z.y+Ee,Dt=Nt+Y,Vt=z.x+we,Nn=Vt+te};var y,C,S,x,w=e,$=w.ownerDocument,R=_s(w),M=R.getComputedStyle(w),O=M.width,N=M.height,I=M.position,T=w.style.left,P=w.style.top,A=w.style.right,k=w.style.bottom,B=w.style.overflow,_=j(j({},o[r]),i),F=$.createElement("div");(y=w.parentElement)===null||y===void 0||y.appendChild(F),F.style.left="".concat(w.offsetLeft,"px"),F.style.top="".concat(w.offsetTop,"px"),F.style.position=I,F.style.height="".concat(w.offsetHeight,"px"),F.style.width="".concat(w.offsetWidth,"px"),w.style.left="0",w.style.top="0",w.style.right="auto",w.style.bottom="auto",w.style.overflow="hidden";var H;if(Array.isArray(n))H={x:n[0],y:n[1],width:0,height:0};else{var K,V,W=n.getBoundingClientRect();W.x=(K=W.x)!==null&&K!==void 0?K:W.left,W.y=(V=W.y)!==null&&V!==void 0?V:W.top,H={x:W.x,y:W.y,width:W.width,height:W.height}}var z=w.getBoundingClientRect();z.x=(C=z.x)!==null&&C!==void 0?C:z.left,z.y=(S=z.y)!==null&&S!==void 0?S:z.top;var L=$.documentElement,J=L.clientWidth,ne=L.clientHeight,q=L.scrollWidth,re=L.scrollHeight,ae=L.scrollTop,ee=L.scrollLeft,Y=z.height,te=z.width,Z=H.height,Q=H.width,ie={left:0,top:0,right:J,bottom:ne},ce={left:-ee,top:-ae,right:q-ee,bottom:re-ae},se=_.htmlRegion,le="visible",be="visibleFirst";se!=="scroll"&&se!==be&&(se=le);var ye=se===be,Be=kv(ce,f),de=kv(ie,f),ue=se===le?de:Be,pe=ye?de:ue;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";var Ae=w.getBoundingClientRect();w.style.left=T,w.style.top=P,w.style.right=A,w.style.bottom=k,w.style.overflow=B,(x=w.parentElement)===null||x===void 0||x.removeChild(F);var _e=bs(Math.round(te/parseFloat(O)*1e3)/1e3),Re=bs(Math.round(Y/parseFloat(N)*1e3)/1e3);if(_e===0||Re===0||ss(n)&&!Qh(n))return;var $e=_.offset,We=_.targetOffset,ke=_v(z,$e),De=X(ke,2),me=De[0],Ne=De[1],Ze=_v(H,We),Ie=X(Ze,2),xe=Ie[0],ot=Ie[1];H.x-=xe,H.y-=ot;var ft=_.points||[],Tt=X(ft,2),Bt=Tt[0],Pe=Tt[1],Se=jv(Pe),Xe=jv(Bt),Ge=Fi(H,Se),et=Fi(z,Xe),je=j({},_),we=Ge.x-et.x+me,Ee=Ge.y-et.y+Ne,ut=pr(we,Ee),ht=pr(we,Ee,de),ze=Fi(H,["t","l"]),Ce=Fi(z,["t","l"]),Ke=Fi(H,["b","r"]),Le=Fi(z,["b","r"]),Fe=_.overflow||{},Qe=Fe.adjustX,Et=Fe.adjustY,vt=Fe.shiftX,Ht=Fe.shiftY,Ct=function(So){return typeof So=="boolean"?So:So>=0},Nt,Dt,Vt,Nn;Vs();var Wt=Ct(Et),It=Xe[0]===Se[0];if(Wt&&Xe[0]==="t"&&(Dt>pe.bottom||p.current.bt)){var Oe=Ee;It?Oe-=Y-Z:Oe=ze.y-Le.y-Ne;var qe=pr(we,Oe),He=pr(we,Oe,de);qe>ut||qe===ut&&(!ye||He>=ht)?(p.current.bt=!0,Ee=Oe,Ne=-Ne,je.points=[wo(Xe,0),wo(Se,0)]):p.current.bt=!1}if(Wt&&Xe[0]==="b"&&(Nt<pe.top||p.current.tb)){var ve=Ee;It?ve+=Y-Z:ve=Ke.y-Ce.y-Ne;var nt=pr(we,ve),St=pr(we,ve,de);nt>ut||nt===ut&&(!ye||St>=ht)?(p.current.tb=!0,Ee=ve,Ne=-Ne,je.points=[wo(Xe,0),wo(Se,0)]):p.current.tb=!1}var bt=Ct(Qe),Jt=Xe[1]===Se[1];if(bt&&Xe[1]==="l"&&(Nn>pe.right||p.current.rl)){var Zt=we;Jt?Zt-=te-Q:Zt=ze.x-Le.x-me;var tn=pr(Zt,Ee),Ut=pr(Zt,Ee,de);tn>ut||tn===ut&&(!ye||Ut>=ht)?(p.current.rl=!0,we=Zt,me=-me,je.points=[wo(Xe,1),wo(Se,1)]):p.current.rl=!1}if(bt&&Xe[1]==="r"&&(Vt<pe.left||p.current.lr)){var Qt=we;Jt?Qt+=te-Q:Qt=Ke.x-Ce.x-me;var pn=pr(Qt,Ee),Rn=pr(Qt,Ee,de);pn>ut||pn===ut&&(!ye||Rn>=ht)?(p.current.lr=!0,we=Qt,me=-me,je.points=[wo(Xe,1),wo(Se,1)]):p.current.lr=!1}Vs();var dn=vt===!0?0:vt;typeof dn=="number"&&(Vt<de.left&&(we-=Vt-de.left-me,H.x+Q<de.left+dn&&(we+=H.x-de.left+Q-dn)),Nn>de.right&&(we-=Nn-de.right-me,H.x>de.right-dn&&(we+=H.x-de.right+dn)));var Cn=Ht===!0?0:Ht;typeof Cn=="number"&&(Nt<de.top&&(Ee-=Nt-de.top-Ne,H.y+Z<de.top+Cn&&(Ee+=H.y-de.top+Z-Cn)),Dt>de.bottom&&(Ee-=Dt-de.bottom-Ne,H.y>de.bottom-Cn&&(Ee+=H.y-de.bottom+Cn)));var Or=z.x+we,zr=Or+te,Xn=z.y+Ee,Co=Xn+Y,Lr=H.x,pt=Lr+Q,Ve=H.y,ct=Ve+Z,dt=Math.max(Or,Lr),xt=Math.min(zr,pt),Ot=(dt+xt)/2,Sn=Ot-Or,xn=Math.max(Xn,Ve),Yn=Math.min(Co,ct),tr=(xn+Yn)/2,Jn=tr-Xn;a==null||a(e,je);var Dn=Ae.right-z.x-(we+z.width),mn=Ae.bottom-z.y-(Ee+z.height);_e===1&&(we=Math.round(we),Dn=Math.round(Dn)),Re===1&&(Ee=Math.round(Ee),mn=Math.round(mn));var Ma={ready:!0,offsetX:we/_e,offsetY:Ee/Re,offsetR:Dn/_e,offsetB:mn/Re,arrowX:Sn/_e,arrowY:Jn/Re,scaleX:_e,scaleY:Re,align:je};u(Ma)}}),v=function(){d.current+=1;var C=d.current;Promise.resolve().then(function(){d.current===C&&g()})},b=function(){u(function(C){return j(j({},C),{},{ready:!1})})};return zt(b,[r]),zt(function(){t||b()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,v]}function ej(t,e,n,r,o){zt(function(){if(t&&e&&n){let d=function(){r(),o()};var i=e,a=n,s=Wf(i),l=Wf(a),c=_s(a),u=new Set([c].concat(he(s),he(l)));return u.forEach(function(f){f.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),r(),function(){u.forEach(function(f){f.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[t,e,n])}function tj(t,e,n,r,o,i,a,s){var l=h.useRef(t);l.current=t;var c=h.useRef(!1);h.useEffect(function(){if(e&&r&&(!o||i)){var d=function(){c.current=!1},f=function(S){var x;l.current&&!a(((x=S.composedPath)===null||x===void 0||(x=x.call(S))===null||x===void 0?void 0:x[0])||S.target)&&!c.current&&s(!1)},p=_s(r);p.addEventListener("pointerdown",d,!0),p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0);var m=oc(n);if(m&&(m.addEventListener("mousedown",f,!0),m.addEventListener("contextmenu",f,!0)),process.env.NODE_ENV!=="production"){var g,v,b=n==null||(g=n.getRootNode)===null||g===void 0?void 0:g.call(n),y=(v=r.getRootNode)===null||v===void 0?void 0:v.call(r);Xr(b===y,"trigger element and popup element should in same shadow root.")}return function(){p.removeEventListener("pointerdown",d,!0),p.removeEventListener("mousedown",f,!0),p.removeEventListener("contextmenu",f,!0),m&&(m.removeEventListener("mousedown",f,!0),m.removeEventListener("contextmenu",f,!0))}}},[e,n,r,o,i]);function u(){c.current=!0}return u}var nj=["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 rj(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xc,e=h.forwardRef(function(n,r){var o=n.prefixCls,i=o===void 0?"rc-trigger-popup":o,a=n.children,s=n.action,l=s===void 0?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,p=n.onPopupVisibleChange,m=n.afterPopupVisibleChange,g=n.mouseEnterDelay,v=n.mouseLeaveDelay,b=v===void 0?.1:v,y=n.focusDelay,C=n.blurDelay,S=n.mask,x=n.maskClosable,w=x===void 0?!0:x,$=n.getPopupContainer,R=n.forceRender,M=n.autoDestroy,O=n.destroyPopupOnHide,N=n.popup,I=n.popupClassName,T=n.popupStyle,P=n.popupPlacement,A=n.builtinPlacements,k=A===void 0?{}:A,B=n.popupAlign,_=n.zIndex,F=n.stretch,H=n.getPopupClassNameFromAlign,K=n.fresh,V=n.alignPoint,W=n.onPopupClick,z=n.onPopupAlign,L=n.arrow,J=n.popupMotion,ne=n.maskMotion,q=n.popupTransitionName,re=n.popupAnimation,ae=n.maskTransitionName,ee=n.maskAnimation,Y=n.className,te=n.getTriggerDOMNode,Z=lt(n,nj),Q=M||O||!1,ie=h.useState(!1),ce=X(ie,2),se=ce[0],le=ce[1];zt(function(){le(fp())},[]);var be=h.useRef({}),ye=h.useContext(Pv),Be=h.useMemo(function(){return{registerSubPopup:function(st,Xt){be.current[st]=Xt,ye==null||ye.registerSubPopup(st,Xt)}}},[ye]),de=Yc(),ue=h.useState(null),pe=X(ue,2),Ae=pe[0],_e=pe[1],Re=h.useRef(null),$e=At(function(Ye){Re.current=Ye,ss(Ye)&&Ae!==Ye&&_e(Ye),ye==null||ye.registerSubPopup(de,Ye)}),We=h.useState(null),ke=X(We,2),De=ke[0],me=ke[1],Ne=h.useRef(null),Ze=At(function(Ye){ss(Ye)&&De!==Ye&&(me(Ye),Ne.current=Ye)}),Ie=h.Children.only(a),xe=(Ie==null?void 0:Ie.props)||{},ot={},ft=At(function(Ye){var st,Xt,gn=De;return(gn==null?void 0:gn.contains(Ye))||((st=oc(gn))===null||st===void 0?void 0:st.host)===Ye||Ye===gn||(Ae==null?void 0:Ae.contains(Ye))||((Xt=oc(Ae))===null||Xt===void 0?void 0:Xt.host)===Ye||Ye===Ae||Object.values(be.current).some(function(nn){return(nn==null?void 0:nn.contains(Ye))||Ye===nn})}),Tt=Av(i,J,re,q),Bt=Av(i,ne,ee,ae),Pe=h.useState(f||!1),Se=X(Pe,2),Xe=Se[0],Ge=Se[1],et=d??Xe,je=At(function(Ye){d===void 0&&Ge(Ye)});zt(function(){Ge(d||!1)},[d]);var we=h.useRef(et);we.current=et;var Ee=h.useRef([]);Ee.current=[];var ut=At(function(Ye){var st;je(Ye),((st=Ee.current[Ee.current.length-1])!==null&&st!==void 0?st:et)!==Ye&&(Ee.current.push(Ye),p==null||p(Ye))}),ht=h.useRef(),ze=function(){clearTimeout(ht.current)},Ce=function(st){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;ze(),Xt===0?ut(st):ht.current=setTimeout(function(){ut(st)},Xt*1e3)};h.useEffect(function(){return ze},[]);var Ke=h.useState(!1),Le=X(Ke,2),Fe=Le[0],Qe=Le[1];zt(function(Ye){(!Ye||et)&&Qe(!0)},[et]);var Et=h.useState(null),vt=X(Et,2),Ht=vt[0],Ct=vt[1],Nt=h.useState(null),Dt=X(Nt,2),Vt=Dt[0],Nn=Dt[1],Wt=function(st){Nn([st.clientX,st.clientY])},It=Q_(et,Ae,V&&Vt!==null?Vt:De,P,k,B,z),Oe=X(It,11),qe=Oe[0],He=Oe[1],ve=Oe[2],nt=Oe[3],St=Oe[4],bt=Oe[5],Jt=Oe[6],Zt=Oe[7],tn=Oe[8],Ut=Oe[9],Qt=Oe[10],pn=Y_(se,l,c,u),Rn=X(pn,2),dn=Rn[0],Cn=Rn[1],Or=dn.has("click"),zr=Cn.has("click")||Cn.has("contextMenu"),Xn=At(function(){Fe||Qt()}),Co=function(){we.current&&V&&zr&&Ce(!1)};ej(et,De,Ae,Xn,Co),zt(function(){Xn()},[Vt,P]),zt(function(){et&&!(k!=null&&k[P])&&Xn()},[JSON.stringify(B)]);var Lr=h.useMemo(function(){var Ye=Z_(k,i,Ut,V);return G.cn(Ye,H==null?void 0:H(Ut))},[Ut,H,k,i,V]);h.useImperativeHandle(r,function(){return{nativeElement:Ne.current,popupElement:Re.current,forceAlign:Xn}});var pt=h.useState(0),Ve=X(pt,2),ct=Ve[0],dt=Ve[1],xt=h.useState(0),Ot=X(xt,2),Sn=Ot[0],xn=Ot[1],Yn=function(){if(F&&De){var st=De.getBoundingClientRect();dt(st.width),xn(st.height)}},tr=function(){Yn(),Xn()},Jn=function(st){Qe(!1),Qt(),m==null||m(st)},Dn=function(){return new Promise(function(st){Yn(),Ct(function(){return st})})};zt(function(){Ht&&(Qt(),Ht(),Ct(null))},[Ht]);function mn(Ye,st,Xt,gn){ot[Ye]=function(nn){var qs;gn==null||gn(nn),Ce(st,Xt);for(var pu=arguments.length,Wp=new Array(pu>1?pu-1:0),Ks=1;Ks<pu;Ks++)Wp[Ks-1]=arguments[Ks];(qs=xe[Ye])===null||qs===void 0||qs.call.apply(qs,[xe,nn].concat(Wp))}}(Or||zr)&&(ot.onClick=function(Ye){var st;we.current&&zr?Ce(!1):!we.current&&Or&&(Wt(Ye),Ce(!0));for(var Xt=arguments.length,gn=new Array(Xt>1?Xt-1:0),nn=1;nn<Xt;nn++)gn[nn-1]=arguments[nn];(st=xe.onClick)===null||st===void 0||st.call.apply(st,[xe,Ye].concat(gn))});var Ma=tj(et,zr,De,Ae,S,w,ft,Ce),pr=dn.has("hover"),Vs=Cn.has("hover"),ki,So;pr&&(mn("onMouseEnter",!0,g,function(Ye){Wt(Ye)}),mn("onPointerEnter",!0,g,function(Ye){Wt(Ye)}),ki=function(st){(et||Fe)&&Ae!==null&&Ae!==void 0&&Ae.contains(st.target)&&Ce(!0,g)},V&&(ot.onMouseMove=function(Ye){var st;(st=xe.onMouseMove)===null||st===void 0||st.call(xe,Ye)})),Vs&&(mn("onMouseLeave",!1,b),mn("onPointerLeave",!1,b),So=function(){Ce(!1,b)}),dn.has("focus")&&mn("onFocus",!0,y),Cn.has("focus")&&mn("onBlur",!1,C),dn.has("contextMenu")&&(ot.onContextMenu=function(Ye){var st;we.current&&Cn.has("contextMenu")?Ce(!1):(Wt(Ye),Ce(!0)),Ye.preventDefault();for(var Xt=arguments.length,gn=new Array(Xt>1?Xt-1:0),nn=1;nn<Xt;nn++)gn[nn-1]=arguments[nn];(st=xe.onContextMenu)===null||st===void 0||st.call.apply(st,[xe,Ye].concat(gn))}),Y&&(ot.className=G.cn(xe.className,Y));var xo=j(j({},xe),ot),Na={},Ws=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ws.forEach(function(Ye){Z[Ye]&&(Na[Ye]=function(){for(var st,Xt=arguments.length,gn=new Array(Xt),nn=0;nn<Xt;nn++)gn[nn]=arguments[nn];(st=xo[Ye])===null||st===void 0||st.call.apply(st,[xo].concat(gn)),Z[Ye].apply(Z,gn)})});var du=h.cloneElement(Ie,j(j({},xo),Na)),fu={x:bt,y:Jt},hu=L?j({},L!==!0?L:{}):null;return h.createElement(h.Fragment,null,h.createElement(bo,{disabled:!et,ref:Ze,onResize:tr},h.createElement(jx,{getTriggerDOMNode:te},du)),h.createElement(Pv.Provider,{value:Be},h.createElement(_x,{portal:t,ref:$e,prefixCls:i,popup:N,className:G.cn(I,Lr),style:T,target:De,onMouseEnter:ki,onMouseLeave:So,onPointerEnter:ki,zIndex:_,open:et,keepDom:Fe,fresh:K,onClick:W,onPointerDownCapture:Ma,mask:S,motion:Tt,maskMotion:Bt,onVisibleChanged:Jn,onPrepare:Dn,forceRender:R,autoDestroy:Q,getPopupContainer:$,align:Ut,arrow:hu,arrowPos:fu,ready:qe,offsetX:He,offsetY:ve,offsetR:nt,offsetB:St,onAlign:Xn,stretch:F,targetWidth:ct/Zt,targetHeight:Sn/tn})))});return process.env.NODE_ENV!=="production"&&(e.displayName="Trigger"),e}const eu=rj(Xc);var oj=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ij=function(e){var n=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},aj=function(e,n){var r=e.prefixCls;e.disabled;var o=e.visible,i=e.children,a=e.popupElement,s=e.animation,l=e.transitionName,c=e.dropdownStyle,u=e.dropdownClassName,d=e.direction,f=d===void 0?"ltr":d,p=e.placement,m=e.builtinPlacements,g=e.dropdownMatchSelectWidth,v=e.dropdownRender,b=e.dropdownAlign,y=e.getPopupContainer,C=e.empty,S=e.getTriggerDOMNode,x=e.onPopupVisibleChange,w=e.onPopupMouseEnter,$=lt(e,oj),R="".concat(r,"-dropdown"),M=a;v&&(M=v(a));var O=h.useMemo(function(){return m||ij(g)},[m,g]),N=s?"".concat(R,"-").concat(s):l,I=typeof g=="number",T=h.useMemo(function(){return I?null:g===!1?"minWidth":"width"},[g,I]),P=c;I&&(P=j(j({},P),{},{width:g}));var A=h.useRef(null);return h.useImperativeHandle(n,function(){return{getPopupElement:function(){var B;return(B=A.current)===null||B===void 0?void 0:B.popupElement}}}),h.createElement(eu,ge({},$,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:p||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:O,prefixCls:R,popupTransitionName:N,popup:h.createElement("div",{onMouseEnter:w},M),ref:A,stretch:T,popupAlign:b,popupVisible:o,getPopupContainer:y,popupClassName:G.cn(u,D({},"".concat(R,"-empty"),C)),popupStyle:P,getTriggerDOMNode:S,onPopupVisibleChange:x}),i)},Bx=h.forwardRef(aj);process.env.NODE_ENV!=="production"&&(Bx.displayName="SelectTrigger");function Bv(t,e){var n=t.key,r;return"value"in t&&(r=t.value),n??(r!==void 0?r:"rc-index-key-".concat(e))}function qf(t){return typeof t<"u"&&!Number.isNaN(t)}function zx(t,e){var n=t||{},r=n.label,o=n.value,i=n.options,a=n.groupLabel,s=r||(e?"children":"label");return{label:s,value:o||"value",options:i||"options",groupLabel:a||s}}function sj(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,o=[],i=zx(n,!1),a=i.label,s=i.value,l=i.options,c=i.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(p){if(f||!(l in p)){var m=p[s];o.push({key:Bv(p,o.length),groupOption:f,data:p,label:p[a],value:m})}else{var g=p[c];g===void 0&&r&&(g=p.label),o.push({key:Bv(p,o.length),group:!0,data:p,label:g}),u(p[l],!0)}})}return u(t,!1),o}function Kf(t){var e=j({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return at(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var lj=function(e,n,r){if(!n||!n.length)return null;var o=!1,i=function s(l,c){var u=_C(c),d=u[0],f=u.slice(1);if(!d)return[l];var p=l.split(d);return o=o||p.length>1,p.reduce(function(m,g){return[].concat(he(m),he(s(g,f)))},[]).filter(Boolean)},a=i(e,n);return o?typeof r<"u"?a.slice(0,r):a:null},mp=h.createContext(null);function cj(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(o){var i=o.label,a=o.value;return["number","string"].includes(Ue(i))?i:a}).join(", ")),n.length>r?", ...":null)}var uj=["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"],dj=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],cc=function(e){return e==="tags"||e==="multiple"},Lx=h.forwardRef(function(t,e){var n,r=t.id,o=t.prefixCls,i=t.className,a=t.showSearch,s=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,f=t.emptyOptions,p=t.notFoundContent,m=p===void 0?"Not Found":p,g=t.onClear,v=t.mode,b=t.disabled,y=t.loading,C=t.getInputElement,S=t.getRawInputElement,x=t.open,w=t.defaultOpen,$=t.onDropdownVisibleChange,R=t.activeValue,M=t.onActiveValueChange,O=t.activeDescendantId,N=t.searchValue,I=t.autoClearSearchValue,T=t.onSearch,P=t.onSearchSplit,A=t.tokenSeparators,k=t.allowClear,B=t.prefix,_=t.suffixIcon,F=t.clearIcon,H=t.OptionList,K=t.animation,V=t.transitionName,W=t.dropdownStyle,z=t.dropdownClassName,L=t.dropdownMatchSelectWidth,J=t.dropdownRender,ne=t.dropdownAlign,q=t.placement,re=t.builtinPlacements,ae=t.getPopupContainer,ee=t.showAction,Y=ee===void 0?[]:ee,te=t.onFocus,Z=t.onBlur,Q=t.onKeyUp,ie=t.onKeyDown,ce=t.onMouseDown,se=lt(t,uj),le=cc(v),be=(a!==void 0?a:le)||v==="combobox",ye=j({},se);dj.forEach(function(pt){delete ye[pt]}),c==null||c.forEach(function(pt){delete ye[pt]});var Be=h.useState(!1),de=X(Be,2),ue=de[0],pe=de[1];h.useEffect(function(){pe(fp())},[]);var Ae=h.useRef(null),_e=h.useRef(null),Re=h.useRef(null),$e=h.useRef(null),We=h.useRef(null),ke=h.useRef(!1),De=x_(),me=X(De,3),Ne=me[0],Ze=me[1],Ie=me[2];h.useImperativeHandle(e,function(){var pt,Ve;return{focus:(pt=$e.current)===null||pt===void 0?void 0:pt.focus,blur:(Ve=$e.current)===null||Ve===void 0?void 0:Ve.blur,scrollTo:function(dt){var xt;return(xt=We.current)===null||xt===void 0?void 0:xt.scrollTo(dt)},nativeElement:Ae.current||_e.current}});var xe=h.useMemo(function(){var pt;if(v!=="combobox")return N;var Ve=(pt=u[0])===null||pt===void 0?void 0:pt.value;return typeof Ve=="string"||typeof Ve=="number"?String(Ve):""},[N,v,u]),ot=v==="combobox"&&typeof C=="function"&&C()||null,ft=typeof S=="function"&&S(),Tt=Yo(_e,ft==null||(n=ft.props)===null||n===void 0?void 0:n.ref),Bt=h.useState(!1),Pe=X(Bt,2),Se=Pe[0],Xe=Pe[1];zt(function(){Xe(!0)},[]);var Ge=en(!1,{defaultValue:w,value:x}),et=X(Ge,2),je=et[0],we=et[1],Ee=Se?je:!1,ut=!m&&f;(b||ut&&Ee&&v==="combobox")&&(Ee=!1);var ht=ut?!1:Ee,ze=h.useCallback(function(pt){var Ve=pt!==void 0?pt:!Ee;b||(we(Ve),Ee!==Ve&&($==null||$(Ve)))},[b,Ee,we,$]),Ce=h.useMemo(function(){return(A||[]).some(function(pt){return[`
300
300
  `,`\r
301
- `].includes(pt)})},[A]),Ke=h.useContext(mp)||{},Le=Ke.maxCount,Fe=Ke.rawValues,Qe=function(Ve,ct,dt){if(!(le&&qf(Le)&&(Fe==null?void 0:Fe.size)>=Le)){var xt=!0,Ot=Ve;M==null||M(null);var Sn=lj(Ve,A,qf(Le)?Le-Fe.size:void 0),xn=dt?null:Sn;return v!=="combobox"&&xn&&(Ot="",P==null||P(xn),ze(!1),xt=!1),T&&xe!==Ot&&T(Ot,{source:ct?"typing":"effect"}),xt}},Et=function(Ve){!Ve||!Ve.trim()||T(Ve,{source:"submit"})};h.useEffect(function(){!Ee&&!le&&v!=="combobox"&&Qe("",!1,!1)},[Ee]),h.useEffect(function(){je&&b&&we(!1),b&&!ke.current&&Ze(!1)},[b]);var vt=Rx(),Ht=X(vt,2),Ct=Ht[0],Nt=Ht[1],Dt=h.useRef(!1),Vt=function(Ve){var ct=Ct(),dt=Ve.key,xt=dt==="Enter";if(xt&&(v!=="combobox"&&Ve.preventDefault(),Ee||ze(!0)),Nt(!!xe),dt==="Backspace"&&!ct&&le&&!xe&&u.length){for(var Ot=he(u),Sn=null,xn=Ot.length-1;xn>=0;xn-=1){var Yn=Ot[xn];if(!Yn.disabled){Ot.splice(xn,1),Sn=Yn;break}}Sn&&d(Ot,{type:"remove",values:[Sn]})}for(var tr=arguments.length,Jn=new Array(tr>1?tr-1:0),Dn=1;Dn<tr;Dn++)Jn[Dn-1]=arguments[Dn];if(Ee&&(!xt||!Dt.current)){var mn;xt&&(Dt.current=!0),(mn=We.current)===null||mn===void 0||mn.onKeyDown.apply(mn,[Ve].concat(Jn))}oe==null||oe.apply(void 0,[Ve].concat(Jn))},Nn=function(Ve){for(var ct=arguments.length,dt=new Array(ct>1?ct-1:0),xt=1;xt<ct;xt++)dt[xt-1]=arguments[xt];if(Ee){var Ot;(Ot=We.current)===null||Ot===void 0||Ot.onKeyUp.apply(Ot,[Ve].concat(dt))}Ve.key==="Enter"&&(Dt.current=!1),Q==null||Q.apply(void 0,[Ve].concat(dt))},Wt=function(Ve){var ct=u.filter(function(dt){return dt!==Ve});d(ct,{type:"remove",values:[Ve]})},It=function(){Dt.current=!1},Oe=h.useRef(!1),qe=function(){Ze(!0),b||(te&&!Oe.current&&te.apply(void 0,arguments),Y.includes("focus")&&ze(!0)),Oe.current=!0},He=function(){ke.current=!0,Ze(!1,function(){Oe.current=!1,ke.current=!1,ze(!1)}),!b&&(xe&&(v==="tags"?T(xe,{source:"submit"}):v==="multiple"&&T("",{source:"blur"})),Z&&Z.apply(void 0,arguments))},ve=[];h.useEffect(function(){return function(){ve.forEach(function(pt){return clearTimeout(pt)}),ve.splice(0,ve.length)}},[]);var nt=function(Ve){var ct,dt=Ve.target,xt=(ct=Re.current)===null||ct===void 0?void 0:ct.getPopupElement();if(xt&&xt.contains(dt)){var Ot=setTimeout(function(){var tr=ve.indexOf(Ot);if(tr!==-1&&ve.splice(tr,1),Ie(),!ue&&!xt.contains(document.activeElement)){var Jn;(Jn=$e.current)===null||Jn===void 0||Jn.focus()}});ve.push(Ot)}for(var Sn=arguments.length,xn=new Array(Sn>1?Sn-1:0),Yn=1;Yn<Sn;Yn++)xn[Yn-1]=arguments[Yn];ce==null||ce.apply(void 0,[Ve].concat(xn))},St=h.useState({}),bt=X(St,2),Jt=bt[1];function Zt(){Jt({})}var tn;ft&&(tn=function(Ve){ze(Ve)}),w_(function(){var pt;return[Ae.current,(pt=Re.current)===null||pt===void 0?void 0:pt.getPopupElement()]},ht,ze,!!ft);var Ut=h.useMemo(function(){return j(j({},t),{},{notFoundContent:m,open:Ee,triggerOpen:ht,id:r,showSearch:be,multiple:le,toggleOpen:ze})},[t,m,ht,Ee,r,be,le,ze]),Qt=!!_||y,pn;Qt&&(pn=h.createElement(Qc,{className:G.cn("".concat(o,"-arrow"),D({},"".concat(o,"-arrow-loading"),y)),customizeIcon:_,customizeIconProps:{loading:y,searchValue:xe,open:Ee,focused:Ne,showSearch:be}}));var Rn=function(){var Ve;g==null||g(),(Ve=$e.current)===null||Ve===void 0||Ve.focus(),d([],{type:"clear",values:u}),Qe("",!1,!1)},dn=C_(o,Rn,u,k,F,b,xe,v),Cn=dn.allowClear,Or=dn.clearIcon,zr=h.createElement(H,{ref:We}),Xn=G.cn(o,i,D(D(D(D(D(D(D(D(D(D({},"".concat(o,"-focused"),Ne),"".concat(o,"-multiple"),le),"".concat(o,"-single"),!le),"".concat(o,"-allow-clear"),k),"".concat(o,"-show-arrow"),Qt),"".concat(o,"-disabled"),b),"".concat(o,"-loading"),y),"".concat(o,"-open"),Ee),"".concat(o,"-customize-input"),ot),"".concat(o,"-show-search"),be)),Co=h.createElement(Bx,{ref:Re,disabled:b,prefixCls:o,visible:ht,popupElement:zr,animation:K,transitionName:V,dropdownStyle:W,dropdownClassName:z,direction:l,dropdownMatchSelectWidth:L,dropdownRender:J,dropdownAlign:ne,placement:q,builtinPlacements:re,getPopupContainer:ae,empty:f,getTriggerDOMNode:function(Ve){return _e.current||Ve},onPopupVisibleChange:tn,onPopupMouseEnter:Zt},ft?h.cloneElement(ft,{ref:Tt}):h.createElement(kx,ge({},t,{domRef:_e,prefixCls:o,inputElement:ot,ref:$e,id:r,prefix:B,showSearch:be,autoClearSearchValue:I,mode:v,activeDescendantId:O,tagRender:s,values:u,open:Ee,onToggleOpen:ze,activeValue:R,searchValue:xe,onSearch:Qe,onSearchSubmit:Et,onRemove:Wt,tokenWithEnter:Ce,onInputBlur:It}))),Lr;return ft?Lr=Co:Lr=h.createElement("div",ge({className:Xn},ye,{ref:Ae,onMouseDown:nt,onKeyDown:Vt,onKeyUp:Nn,onFocus:qe,onBlur:He}),h.createElement(cj,{visible:Ne&&!Ee,values:u}),Co,pn,Cn&&Or),h.createElement(Nx.Provider,{value:Ut},Lr)});process.env.NODE_ENV!=="production"&&(Lx.displayName="BaseSelect");var gp=function(){return null};gp.isSelectOptGroup=!0;var vp=function(){return null};vp.isSelectOption=!0;var Fx=h.forwardRef(function(t,e){var n=t.height,r=t.offsetY,o=t.offsetX,i=t.children,a=t.prefixCls,s=t.onInnerResize,l=t.innerProps,c=t.rtl,u=t.extra,d={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},f=j(j({},f),{},D(D(D(D(D({transform:"translateY(".concat(r,"px)")},c?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:d},h.createElement(bo,{onResize:function(m){var g=m.offsetHeight;g&&s&&s()}},h.createElement("div",ge({style:f,className:G.cn(D({},"".concat(a,"-holder-inner"),a)),ref:e},l),i,u)))});Fx.displayName="Filler";function fj(t){var e=t.children,n=t.setRef,r=h.useCallback(function(o){n(o)},[]);return h.cloneElement(e,{ref:r})}function hj(t,e,n,r,o,i,a,s){var l=s.getKey;return t.slice(e,n+1).map(function(c,u){var d=e+u,f=a(c,d,{style:{width:r},offsetX:o}),p=l(c);return h.createElement(fj,{key:p,setRef:function(g){return i(c,g)}},f)})}function pj(t,e,n){var r=t.length,o=e.length,i,a;if(r===0&&o===0)return null;r<o?(i=t,a=e):(i=e,a=t);var s={__EMPTY_ITEM__:!0};function l(m){return m!==void 0?n(m):s}for(var c=null,u=Math.abs(r-o)!==1,d=0;d<a.length;d+=1){var f=l(i[d]),p=l(a[d]);if(f!==p){c=d,u=u||f!==l(a[d+1]);break}}return c===null?null:{index:c,multiple:u}}function mj(t,e,n){var r=h.useState(t),o=X(r,2),i=o[0],a=o[1],s=h.useState(null),l=X(s,2),c=l[0],u=l[1];return h.useEffect(function(){var d=pj(i||[],t||[],e);(d==null?void 0:d.index)!==void 0&&u(t[d.index]),a(t)},[t]),[c]}var zv=(typeof navigator>"u"?"undefined":Ue(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const Hx=function(t,e,n,r){var o=E.useRef(!1),i=E.useRef(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(function(){o.current=!1},50)}var s=E.useRef({top:t,bottom:e,left:n,right:r});return s.current.top=t,s.current.bottom=e,s.current.left=n,s.current.right=r,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(i.current),o.current=!1):(!d||o.current)&&a(),!o.current&&d}};function gj(t,e,n,r,o,i,a){var s=E.useRef(0),l=E.useRef(null),c=E.useRef(null),u=E.useRef(!1),d=Hx(e,n,r,o);function f(y,C){if(wt.cancel(l.current),!d(!1,C)){var S=y;if(!S._virtualHandled)S._virtualHandled=!0;else return;s.current+=C,c.current=C,zv||S.preventDefault(),l.current=wt(function(){var x=u.current?10:1;a(s.current*x,!1),s.current=0})}}function p(y,C){a(C,!0),zv||y.preventDefault()}var m=E.useRef(null),g=E.useRef(null);function v(y){if(t){wt.cancel(g.current),g.current=wt(function(){m.current=null},2);var C=y.deltaX,S=y.deltaY,x=y.shiftKey,w=C,$=S;(m.current==="sx"||!m.current&&x&&S&&!C)&&(w=S,$=0,m.current="sx");var R=Math.abs(w),M=Math.abs($);m.current===null&&(m.current=i&&R>M?"x":"y"),m.current==="y"?f(y,$):p(y,w)}}function b(y){t&&(u.current=y.detail===c.current)}return[v,b]}function vj(t,e,n,r){var o=h.useMemo(function(){return[new Map,[]]},[t,n.id,r]),i=X(o,2),a=i[0],s=i[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),p=a.get(d);if(f===void 0||p===void 0)for(var m=t.length,g=s.length;g<m;g+=1){var v,b=t[g],y=e(b);a.set(y,g);var C=(v=n.get(y))!==null&&v!==void 0?v:r;if(s[g]=(s[g-1]||0)+C,y===u&&(f=g),y===d&&(p=g),f!==void 0&&p!==void 0)break}return{top:s[f-1]||0,bottom:s[p]}};return l}var bj=function(){function t(){ln(this,t),D(this,"maps",void 0),D(this,"id",0),D(this,"diffRecords",new Map),this.maps=Object.create(null)}return cn(t,[{key:"set",value:function(n,r){this.diffRecords.set(n,this.maps[n]),this.maps[n]=r,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),t}();function Lv(t){var e=parseFloat(t);return isNaN(e)?0:e}function yj(t,e,n){var r=h.useState(0),o=X(r,2),i=o[0],a=o[1],s=E.useRef(new Map),l=E.useRef(new bj),c=E.useRef(0);function u(){c.current+=1}function d(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;u();var m=function(){var b=!1;s.current.forEach(function(y,C){if(y&&y.offsetParent){var S=y.offsetHeight,x=getComputedStyle(y),w=x.marginTop,$=x.marginBottom,R=Lv(w),M=Lv($),O=S+R+M;l.current.get(C)!==O&&(l.current.set(C,O),b=!0)}}),b&&a(function(y){return y+1})};if(p)m();else{c.current+=1;var g=c.current;Promise.resolve().then(function(){g===c.current&&m()})}}function f(p,m){var g=t(p);s.current.get(g),m?(s.current.set(g,m),d()):s.current.delete(g)}return E.useEffect(function(){return u},[]),[f,d,l.current,i]}var Fv=14/15;function Cj(t,e,n){var r=E.useRef(!1),o=E.useRef(0),i=E.useRef(0),a=E.useRef(null),s=E.useRef(null),l,c=function(p){if(r.current){var m=Math.ceil(p.touches[0].pageX),g=Math.ceil(p.touches[0].pageY),v=o.current-m,b=i.current-g,y=Math.abs(v)>Math.abs(b);y?o.current=m:i.current=g;var C=n(y,y?v:b,!1,p);C&&p.preventDefault(),clearInterval(s.current),C&&(s.current=setInterval(function(){y?v*=Fv:b*=Fv;var S=Math.floor(y?v:b);(!n(y,S,!0)||Math.abs(S)<=.1)&&clearInterval(s.current)},16))}},u=function(){r.current=!1,l()},d=function(p){l(),p.touches.length===1&&!r.current&&(r.current=!0,o.current=Math.ceil(p.touches[0].pageX),i.current=Math.ceil(p.touches[0].pageY),a.current=p.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},zt(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=e.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[t])}function Hv(t){return Math.floor(Math.pow(t,.5))}function Gf(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function Sj(t,e,n){h.useEffect(function(){var r=e.current;if(t&&r){var o=!1,i,a,s=function(){wt.cancel(i)},l=function f(){s(),i=wt(function(){n(a),f()})},c=function(p){if(!(p.target.draggable||p.button!==0)){var m=p;m._virtualHandled||(m._virtualHandled=!0,o=!0)}},u=function(){o=!1,s()},d=function(p){if(o){var m=Gf(p,!1),g=r.getBoundingClientRect(),v=g.top,b=g.bottom;if(m<=v){var y=v-m;a=-Hv(y),l()}else if(m>=b){var C=m-b;a=Hv(C),l()}else s()}};return r.addEventListener("mousedown",c),r.ownerDocument.addEventListener("mouseup",u),r.ownerDocument.addEventListener("mousemove",d),function(){r.removeEventListener("mousedown",c),r.ownerDocument.removeEventListener("mouseup",u),r.ownerDocument.removeEventListener("mousemove",d),s()}}},[t])}var Vv=10;function xj(t,e,n,r,o,i,a,s){var l=h.useRef(),c=h.useState(null),u=X(c,2),d=u[0],f=u[1];return zt(function(){if(d&&d.times<Vv){if(!t.current){f(function(F){return j({},F)});return}i();var p=d.targetAlign,m=d.originAlign,g=d.index,v=d.offset,b=t.current.clientHeight,y=!1,C=p,S=null;if(b){for(var x=p||m,w=0,$=0,R=0,M=Math.min(e.length-1,g),O=0;O<=M;O+=1){var N=o(e[O]);$=w;var I=n.get(N);R=$+(I===void 0?r:I),w=R}for(var T=x==="top"?v:b-v,P=M;P>=0;P-=1){var A=o(e[P]),k=n.get(A);if(k===void 0){y=!0;break}if(T-=k,T<=0)break}switch(x){case"top":S=$-v;break;case"bottom":S=R-b+v;break;default:{var B=t.current.scrollTop,_=B+b;$<B?C="top":R>_&&(C="bottom")}}S!==null&&a(S),S!==d.lastTop&&(y=!0)}y&&f(j(j({},d),{},{times:d.times+1,targetAlign:C,lastTop:S}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===Vv&&at(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,t.current]),function(p){if(p==null){s();return}if(wt.cancel(l.current),typeof p=="number")a(p);else if(p&&Ue(p)==="object"){var m,g=p.align;"index"in p?m=p.index:m=e.findIndex(function(y){return o(y)===p.key});var v=p.offset,b=v===void 0?0:v;f({times:0,index:m,offset:b,originAlign:g})}}}var Uf=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.rtl,o=t.scrollOffset,i=t.scrollRange,a=t.onStartMove,s=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,d=t.containerSize,f=t.style,p=t.thumbStyle,m=t.showScrollBar,g=h.useState(!1),v=X(g,2),b=v[0],y=v[1],C=h.useState(null),S=X(C,2),x=S[0],w=S[1],$=h.useState(null),R=X($,2),M=R[0],O=R[1],N=!r,I=h.useRef(),T=h.useRef(),P=h.useState(m),A=X(P,2),k=A[0],B=A[1],_=h.useRef(),F=function(){m===!0||m===!1||(clearTimeout(_.current),B(!0),_.current=setTimeout(function(){B(!1)},3e3))},H=i-d||0,K=d-u||0,V=h.useMemo(function(){if(o===0||H===0)return 0;var ee=o/H;return ee*K},[o,H,K]),W=function(Y){Y.stopPropagation(),Y.preventDefault()},z=h.useRef({top:V,dragging:b,pageY:x,startTop:M});z.current={top:V,dragging:b,pageY:x,startTop:M};var L=function(Y){y(!0),w(Gf(Y,c)),O(z.current.top),a(),Y.stopPropagation(),Y.preventDefault()};h.useEffect(function(){var ee=function(Q){Q.preventDefault()},Y=I.current,te=T.current;return Y.addEventListener("touchstart",ee,{passive:!1}),te.addEventListener("touchstart",L,{passive:!1}),function(){Y.removeEventListener("touchstart",ee),te.removeEventListener("touchstart",L)}},[]);var J=h.useRef();J.current=H;var ne=h.useRef();ne.current=K,h.useEffect(function(){if(b){var ee,Y=function(Q){var oe=z.current,ce=oe.dragging,se=oe.pageY,le=oe.startTop;wt.cancel(ee);var be=I.current.getBoundingClientRect(),ye=d/(c?be.width:be.height);if(ce){var Be=(Gf(Q,c)-se)*ye,de=le;!N&&c?de-=Be:de+=Be;var ue=J.current,pe=ne.current,Ae=pe?de/pe:0,_e=Math.ceil(Ae*ue);_e=Math.max(_e,0),_e=Math.min(_e,ue),ee=wt(function(){l(_e,c)})}},te=function(){y(!1),s()};return window.addEventListener("mousemove",Y,{passive:!0}),window.addEventListener("touchmove",Y,{passive:!0}),window.addEventListener("mouseup",te,{passive:!0}),window.addEventListener("touchend",te,{passive:!0}),function(){window.removeEventListener("mousemove",Y),window.removeEventListener("touchmove",Y),window.removeEventListener("mouseup",te),window.removeEventListener("touchend",te),wt.cancel(ee)}}},[b]),h.useEffect(function(){return F(),function(){clearTimeout(_.current)}},[o]),h.useImperativeHandle(e,function(){return{delayHidden:F}});var q="".concat(n,"-scrollbar"),re={position:"absolute",visibility:k?null:"hidden"},ae={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return c?(re.height=8,re.left=0,re.right=0,re.bottom=0,ae.height="100%",ae.width=u,N?ae.left=V:ae.right=V):(re.width=8,re.top=0,re.bottom=0,N?re.right=0:re.left=0,ae.width="100%",ae.height=u,ae.top=V),h.createElement("div",{ref:I,className:G.cn(q,D(D(D({},"".concat(q,"-horizontal"),c),"".concat(q,"-vertical"),!c),"".concat(q,"-visible"),k)),style:j(j({},re),f),onMouseDown:W,onMouseMove:F},h.createElement("div",{ref:T,className:G.cn("".concat(q,"-thumb"),D({},"".concat(q,"-thumb-moving"),b)),style:j(j({},ae),p),onMouseDown:L}))});process.env.NODE_ENV!=="production"&&(Uf.displayName="ScrollBar");var wj=20;function Wv(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,wj),Math.floor(n)}var Ej=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],$j=[],Oj={overflowY:"auto",overflowAnchor:"none"};function Mj(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,o=t.className,i=t.height,a=t.itemHeight,s=t.fullHeight,l=s===void 0?!0:s,c=t.style,u=t.data,d=t.children,f=t.itemKey,p=t.virtual,m=t.direction,g=t.scrollWidth,v=t.component,b=v===void 0?"div":v,y=t.onScroll,C=t.onVirtualScroll,S=t.onVisibleChange,x=t.innerProps,w=t.extraRender,$=t.styles,R=t.showScrollBar,M=R===void 0?"optional":R,O=lt(t,Ej),N=h.useCallback(function(Oe){return typeof f=="function"?f(Oe):Oe==null?void 0:Oe[f]},[f]),I=yj(N),T=X(I,4),P=T[0],A=T[1],k=T[2],B=T[3],_=!!(p!==!1&&i&&a),F=h.useMemo(function(){return Object.values(k.maps).reduce(function(Oe,qe){return Oe+qe},0)},[k.id,k.maps]),H=_&&u&&(Math.max(a*u.length,F)>i||!!g),K=m==="rtl",V=G.cn(r,D({},"".concat(r,"-rtl"),K),o),W=u||$j,z=E.useRef(),L=E.useRef(),J=E.useRef(),ne=E.useState(0),q=X(ne,2),re=q[0],ae=q[1],ee=E.useState(0),Y=X(ee,2),te=Y[0],Z=Y[1],Q=E.useState(!1),oe=X(Q,2),ce=oe[0],se=oe[1],le=function(){se(!0)},be=function(){se(!1)},ye={getKey:N};function Be(Oe){ae(function(qe){var He;typeof Oe=="function"?He=Oe(qe):He=Oe;var ve=Xe(He);return z.current.scrollTop=ve,ve})}var de=E.useRef({start:0,end:W.length}),ue=E.useRef(),pe=mj(W,N),Ae=X(pe,1),_e=Ae[0];ue.current=_e;var Re=h.useMemo(function(){if(!_)return{scrollHeight:void 0,start:0,end:W.length-1,offset:void 0};if(!H){var Oe;return{scrollHeight:((Oe=L.current)===null||Oe===void 0?void 0:Oe.offsetHeight)||0,start:0,end:W.length-1,offset:void 0}}for(var qe=0,He,ve,nt,St=W.length,bt=0;bt<St;bt+=1){var Jt=W[bt],Zt=N(Jt),tn=k.get(Zt),Ut=qe+(tn===void 0?a:tn);Ut>=re&&He===void 0&&(He=bt,ve=qe),Ut>re+i&&nt===void 0&&(nt=bt),qe=Ut}return He===void 0&&(He=0,ve=0,nt=Math.ceil(i/a)),nt===void 0&&(nt=W.length-1),nt=Math.min(nt+1,W.length-1),{scrollHeight:qe,start:He,end:nt,offset:ve}},[H,_,re,W,B,i]),$e=Re.scrollHeight,We=Re.start,ke=Re.end,De=Re.offset;de.current.start=We,de.current.end=ke,h.useLayoutEffect(function(){var Oe=k.getRecord();if(Oe.size===1){var qe=Array.from(Oe.keys())[0],He=Oe.get(qe),ve=W[We];if(ve&&He===void 0){var nt=N(ve);if(nt===qe){var St=k.get(qe),bt=St-a;Be(function(Jt){return Jt+bt})}}}k.resetRecord()},[$e]);var me=h.useState({width:0,height:i}),Ne=X(me,2),Ze=Ne[0],Ie=Ne[1],xe=function(qe){Ie({width:qe.offsetWidth,height:qe.offsetHeight})},ot=E.useRef(),ft=E.useRef(),Tt=h.useMemo(function(){return Wv(Ze.width,g)},[Ze.width,g]),Bt=h.useMemo(function(){return Wv(Ze.height,$e)},[Ze.height,$e]),Pe=$e-i,Se=E.useRef(Pe);Se.current=Pe;function Xe(Oe){var qe=Oe;return Number.isNaN(Se.current)||(qe=Math.min(qe,Se.current)),qe=Math.max(qe,0),qe}var Ge=re<=0,et=re>=Pe,je=te<=0,we=te>=g,Ee=Hx(Ge,et,je,we),ut=function(){return{x:K?-te:te,y:re}},ht=E.useRef(ut()),ze=At(function(Oe){if(C){var qe=j(j({},ut()),Oe);(ht.current.x!==qe.x||ht.current.y!==qe.y)&&(C(qe),ht.current=qe)}});function Ce(Oe,qe){var He=Oe;qe?(Ar.flushSync(function(){Z(He)}),ze()):Be(He)}function Ke(Oe){var qe=Oe.currentTarget.scrollTop;qe!==re&&Be(qe),y==null||y(Oe),ze()}var Le=function(qe){var He=qe,ve=g?g-Ze.width:0;return He=Math.max(He,0),He=Math.min(He,ve),He},Fe=At(function(Oe,qe){qe?(Ar.flushSync(function(){Z(function(He){var ve=He+(K?-Oe:Oe);return Le(ve)})}),ze()):Be(function(He){var ve=He+Oe;return ve})}),Qe=gj(_,Ge,et,je,we,!!g,Fe),Et=X(Qe,2),vt=Et[0],Ht=Et[1];Cj(_,z,function(Oe,qe,He,ve){var nt=ve;return Ee(Oe,qe,He)?!1:!nt||!nt._virtualHandled?(nt&&(nt._virtualHandled=!0),vt({preventDefault:function(){},deltaX:Oe?qe:0,deltaY:Oe?0:qe}),!0):!1}),Sj(H,z,function(Oe){Be(function(qe){return qe+Oe})}),zt(function(){function Oe(He){var ve=Ge&&He.detail<0,nt=et&&He.detail>0;_&&!ve&&!nt&&He.preventDefault()}var qe=z.current;return qe.addEventListener("wheel",vt,{passive:!1}),qe.addEventListener("DOMMouseScroll",Ht,{passive:!0}),qe.addEventListener("MozMousePixelScroll",Oe,{passive:!1}),function(){qe.removeEventListener("wheel",vt),qe.removeEventListener("DOMMouseScroll",Ht),qe.removeEventListener("MozMousePixelScroll",Oe)}},[_,Ge,et]),zt(function(){if(g){var Oe=Le(te);Z(Oe),ze({x:Oe})}},[Ze.width,g]);var Ct=function(){var qe,He;(qe=ot.current)===null||qe===void 0||qe.delayHidden(),(He=ft.current)===null||He===void 0||He.delayHidden()},Nt=xj(z,W,k,a,N,function(){return A(!0)},Be,Ct);h.useImperativeHandle(e,function(){return{nativeElement:J.current,getScrollInfo:ut,scrollTo:function(qe){function He(ve){return ve&&Ue(ve)==="object"&&("left"in ve||"top"in ve)}He(qe)?(qe.left!==void 0&&Z(Le(qe.left)),Nt(qe.top)):Nt(qe)}}}),zt(function(){if(S){var Oe=W.slice(We,ke+1);S(Oe,W)}},[We,ke,W]);var Dt=vj(W,N,k,a),Vt=w==null?void 0:w({start:We,end:ke,virtual:H,offsetX:te,offsetY:De,rtl:K,getSize:Dt}),Nn=hj(W,We,ke,g,te,P,d,ye),Wt=null;i&&(Wt=j(D({},l?"height":"maxHeight",i),Oj),_&&(Wt.overflowY="hidden",g&&(Wt.overflowX="hidden"),ce&&(Wt.pointerEvents="none")));var It={};return K&&(It.dir="rtl"),h.createElement("div",ge({ref:J,style:j(j({},c),{},{position:"relative"}),className:V},It,O),h.createElement(bo,{onResize:xe},h.createElement(b,{className:"".concat(r,"-holder"),style:Wt,ref:z,onScroll:Ke,onMouseEnter:Ct},h.createElement(Fx,{prefixCls:r,height:$e,offsetX:te,offsetY:De,scrollWidth:g,onInnerResize:A,ref:L,innerProps:x,rtl:K,extra:Vt},Nn))),H&&$e>i&&h.createElement(Uf,{ref:ot,prefixCls:r,scrollOffset:re,scrollRange:$e,rtl:K,onScroll:Ce,onStartMove:le,onStopMove:be,spinSize:Bt,containerSize:Ze.height,style:$==null?void 0:$.verticalScrollBar,thumbStyle:$==null?void 0:$.verticalScrollBarThumb,showScrollBar:M}),H&&g>Ze.width&&h.createElement(Uf,{ref:ft,prefixCls:r,scrollOffset:te,scrollRange:g,rtl:K,onScroll:Ce,onStartMove:le,onStopMove:be,spinSize:Tt,containerSize:Ze.width,horizontal:!0,style:$==null?void 0:$.horizontalScrollBar,thumbStyle:$==null?void 0:$.horizontalScrollBarThumb,showScrollBar:M}))}var Vx=h.forwardRef(Mj);Vx.displayName="List";function Nj(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Rj=["disabled","title","children","style","className"];function qv(t){return typeof t=="string"||typeof t=="number"}var Ij=function(e,n){var r=S_(),o=r.prefixCls,i=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,p=h.useContext(mp),m=p.maxCount,g=p.flattenOptions,v=p.onActiveValue,b=p.defaultActiveFirstOption,y=p.onSelect,C=p.menuItemSelectedIcon,S=p.rawValues,x=p.fieldNames,w=p.virtual,$=p.direction,R=p.listHeight,M=p.listItemHeight,O=p.optionRender,N="".concat(o,"-item"),I=Es(function(){return g},[a,g],function(ee,Y){return Y[0]&&ee[1]!==Y[1]}),T=h.useRef(null),P=h.useMemo(function(){return s&&qf(m)&&(S==null?void 0:S.size)>=m},[s,m,S==null?void 0:S.size]),A=function(Y){Y.preventDefault()},k=function(Y){var te;(te=T.current)===null||te===void 0||te.scrollTo(typeof Y=="number"?{index:Y}:Y)},B=h.useCallback(function(ee){return l==="combobox"?!1:S.has(ee)},[l,he(S).toString(),S.size]),_=function(Y){for(var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Z=I.length,Q=0;Q<Z;Q+=1){var oe=(Y+Q*te+Z)%Z,ce=I[oe]||{},se=ce.group,le=ce.data;if(!se&&!(le!=null&&le.disabled)&&(B(le.value)||!P))return oe}return-1},F=h.useState(function(){return _(0)}),H=X(F,2),K=H[0],V=H[1],W=function(Y){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;V(Y);var Z={source:te?"keyboard":"mouse"},Q=I[Y];if(!Q){v(null,-1,Z);return}v(Q.value,Y,Z)};E.useEffect(function(){W(b!==!1?_(0):-1)},[I.length,c]);var z=h.useCallback(function(ee){return l==="combobox"?String(ee).toLowerCase()===c.toLowerCase():S.has(ee)},[l,c,he(S).toString(),S.size]);E.useEffect(function(){var ee=setTimeout(function(){if(!s&&a&&S.size===1){var te=Array.from(S)[0],Z=I.findIndex(function(Q){var oe=Q.data;return c?String(oe.value).startsWith(c):oe.value===te});Z!==-1&&(W(Z),k(Z))}});if(a){var Y;(Y=T.current)===null||Y===void 0||Y.scrollTo(void 0)}return function(){return clearTimeout(ee)}},[a,c]);var L=function(Y){Y!==void 0&&y(Y,{selected:!S.has(Y)}),s||u(!1)};if(h.useImperativeHandle(n,function(){return{onKeyDown:function(Y){var te=Y.which,Z=Y.ctrlKey;switch(te){case Te.N:case Te.P:case Te.UP:case Te.DOWN:{var Q=0;if(te===Te.UP?Q=-1:te===Te.DOWN?Q=1:Nj()&&Z&&(te===Te.N?Q=1:te===Te.P&&(Q=-1)),Q!==0){var oe=_(K+Q,Q);k(oe),W(oe,!0)}break}case Te.TAB:case Te.ENTER:{var ce,se=I[K];se&&!(se!=null&&(ce=se.data)!==null&&ce!==void 0&&ce.disabled)&&!P?L(se.value):L(void 0),a&&Y.preventDefault();break}case Te.ESC:u(!1),a&&Y.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Y){k(Y)}}}),I.length===0)return h.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(N,"-empty"),onMouseDown:A},d);var J=Object.keys(x).map(function(ee){return x[ee]}),ne=function(Y){return Y.label};function q(ee,Y){var te=ee.group;return{role:te?"presentation":"option",id:"".concat(i,"_list_").concat(Y)}}var re=function(Y){var te=I[Y];if(!te)return null;var Z=te.data||{},Q=Z.value,oe=te.group,ce=Yr(Z,!0),se=ne(te);return te?h.createElement("div",ge({"aria-label":typeof se=="string"&&!oe?se:null},ce,{key:Y},q(te,Y),{"aria-selected":z(Q)}),Q):null},ae={role:"listbox",id:"".concat(i,"_list")};return h.createElement(h.Fragment,null,w&&h.createElement("div",ge({},ae,{style:{height:0,width:0,overflow:"hidden"}}),re(K-1),re(K),re(K+1)),h.createElement(Vx,{itemKey:"key",ref:T,data:I,height:R,itemHeight:M,fullHeight:!1,onMouseDown:A,onScroll:f,virtual:w,direction:$,innerProps:w?null:ae},function(ee,Y){var te=ee.group,Z=ee.groupOption,Q=ee.data,oe=ee.label,ce=ee.value,se=Q.key;if(te){var le,be=(le=Q.title)!==null&&le!==void 0?le:qv(oe)?oe.toString():void 0;return h.createElement("div",{className:G.cn(N,"".concat(N,"-group"),Q.className),title:be},oe!==void 0?oe:se)}var ye=Q.disabled,Be=Q.title;Q.children;var de=Q.style,ue=Q.className,pe=lt(Q,Rj),Ae=vn(pe,J),_e=B(ce),Re=ye||!_e&&P,$e="".concat(N,"-option"),We=G.cn(N,$e,ue,D(D(D(D({},"".concat($e,"-grouped"),Z),"".concat($e,"-active"),K===Y&&!Re),"".concat($e,"-disabled"),Re),"".concat($e,"-selected"),_e)),ke=ne(ee),De=!C||typeof C=="function"||_e,me=typeof ke=="number"?ke:ke||ce,Ne=qv(me)?me.toString():void 0;return Be!==void 0&&(Ne=Be),h.createElement("div",ge({},Yr(Ae),w?{}:q(ee,Y),{"aria-selected":z(ce),className:We,title:Ne,onMouseMove:function(){K===Y||Re||W(Y)},onClick:function(){Re||L(ce)},style:de}),h.createElement("div",{className:"".concat($e,"-content")},typeof O=="function"?O(ee,{index:Y}):me),h.isValidElement(C)||_e,De&&h.createElement(Qc,{className:"".concat(N,"-option-state"),customizeIcon:C,customizeIconProps:{value:ce,disabled:Re,isSelected:_e}},_e?"✓":null))}))},Wx=h.forwardRef(Ij);process.env.NODE_ENV!=="production"&&(Wx.displayName="OptionList");const Pj=function(t,e){var n=h.useRef({values:new Map,options:new Map}),r=h.useMemo(function(){var i=n.current,a=i.values,s=i.options,l=t.map(function(d){if(d.label===void 0){var f;return j(j({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,e.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[t,e]),o=h.useCallback(function(i){return e.get(i)||n.current.options.get(i)},[e]);return[r,o]};function dd(t,e){return pp(t).join("").toUpperCase().includes(e)}const Tj=function(t,e,n,r,o){return h.useMemo(function(){if(!n||r===!1)return t;var i=e.options,a=e.label,s=e.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(p,m){return o?dd(m[o],u):m[i]?dd(m[a!=="children"?a:"label"],u):dd(m[s],u)},f=c?function(p){return Kf(p)}:function(p){return p};return t.forEach(function(p){if(p[i]){var m=d(n,f(p));if(m)l.push(p);else{var g=p[i].filter(function(v){return d(n,f(v))});g.length&&l.push(j(j({},p),{},D({},i,g)))}return}d(n,f(p))&&l.push(p)}),l},[t,r,o,n,e])};var Kv=0,Aj=process.env.NODE_ENV!=="test"&&zn();function kj(){var t;return Aj?(t=Kv,Kv+=1):t="TEST_OR_SSR",t}function Dj(t){var e=h.useState(),n=X(e,2),r=n[0],o=n[1];return h.useEffect(function(){o("rc_select_".concat(kj()))},[]),t||r}var _j=["children","value"],jj=["children"];function Bj(t){var e=t,n=e.key,r=e.props,o=r.children,i=r.value,a=lt(r,_j);return j({key:n,value:i!==void 0?i:n,children:o},a)}function bp(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return dr(t).map(function(n,r){if(!h.isValidElement(n)||!n.type)return null;var o=n,i=o.type.isSelectOptGroup,a=o.key,s=o.props,l=s.children,c=lt(s,jj);return e||!i?Bj(n):j(j({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:bp(l)})}).filter(function(n){return n})}var zj=function(e,n,r,o,i){return h.useMemo(function(){var a=e,s=!e;s&&(a=bp(n));var l=new Map,c=new Map,u=function(p,m,g){g&&typeof g=="string"&&p.set(m[g],m)},d=function f(p){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=0;g<p.length;g+=1){var v=p[g];!v[r.options]||m?(l.set(v[r.value],v),u(c,v,r.label),u(c,v,o),u(c,v,i)):f(v[r.options],!0)}};return d(a),{options:a,valueOptions:l,labelOptions:c}},[e,n,r,o,i])};function Gv(t){var e=h.useRef();e.current=t;var n=h.useCallback(function(){return e.current.apply(e,arguments)},[]);return n}function Lj(t){var e=t.mode,n=t.options,r=t.children,o=t.backfill,i=t.allowClear,a=t.placeholder,s=t.getInputElement,l=t.showSearch,c=t.onSearch,u=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,m=t.inputValue,g=t.optionLabelProp,v=cc(e),b=l!==void 0?l:v||e==="combobox",y=n||bp(r);if(at(e!=="tags"||y.every(function(w){return!w.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),e==="tags"||e==="combobox"){var C=y.some(function(w){return w.options?w.options.some(function($){return typeof("value"in $?$.value:$.key)=="number"}):typeof("value"in w?w.value:w.key)=="number"});at(!C,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(at(e!=="combobox"||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),at(e==="combobox"||!o,"`backfill` only works with `combobox` mode."),at(e==="combobox"||!s,"`getInputElement` only work with `combobox` mode."),Ud(e!=="combobox"||!s||!i||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),c&&!b&&e!=="combobox"&&e!=="tags"&&at(!1,"`onSearch` should work with `showSearch` instead of use alone."),Ud(!u||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),p!=null){var S=pp(p);at(!f||S.every(function(w){return Ue(w)==="object"&&("key"in w||"value"in w)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),at(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var x=null;dr(r).some(function(w){if(!h.isValidElement(w)||!w.type)return!1;var $=w,R=$.type;if(R.isSelectOption)return!1;if(R.isSelectOptGroup){var M=dr(w.props.children).every(function(O){return!h.isValidElement(O)||!w.type||O.type.isSelectOption?!0:(x=O.type,!1)});return!M}return x=R,!0}),x&&at(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(x.displayName||x.name||x,"`.")),at(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Fj(t,e){if(t){var n=function r(o){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=0;a<o.length;a++){var s=o[a];if(s[e==null?void 0:e.value]===null)return at(!1,"`value` in Select options should not be `null`."),!0;if(!i&&Array.isArray(s[e==null?void 0:e.options])&&r(s[e==null?void 0:e.options],!0))break}};n(t)}}var Hj=["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"],Vj=["inputValue"];function Wj(t){return!t||Ue(t)!=="object"}var qx=h.forwardRef(function(t,e){var n=t.id,r=t.mode,o=t.prefixCls,i=o===void 0?"rc-select":o,a=t.backfill,s=t.fieldNames,l=t.inputValue,c=t.searchValue,u=t.onSearch,d=t.autoClearSearchValue,f=d===void 0?!0:d,p=t.onSelect,m=t.onDeselect,g=t.dropdownMatchSelectWidth,v=g===void 0?!0:g,b=t.filterOption,y=t.filterSort,C=t.optionFilterProp,S=t.optionLabelProp,x=t.options,w=t.optionRender,$=t.children,R=t.defaultActiveFirstOption,M=t.menuItemSelectedIcon,O=t.virtual,N=t.direction,I=t.listHeight,T=I===void 0?200:I,P=t.listItemHeight,A=P===void 0?20:P,k=t.labelRender,B=t.value,_=t.defaultValue,F=t.labelInValue,H=t.onChange,K=t.maxCount,V=lt(t,Hj),W=Dj(n),z=cc(r),L=!!(!x&&$),J=h.useMemo(function(){return b===void 0&&r==="combobox"?!1:b},[b,r]),ne=h.useMemo(function(){return zx(s,L)},[JSON.stringify(s),L]),q=en("",{value:c!==void 0?c:l,postState:function(Ce){return Ce||""}}),re=X(q,2),ae=re[0],ee=re[1],Y=zj(x,$,ne,C,S),te=Y.valueOptions,Z=Y.labelOptions,Q=Y.options,oe=h.useCallback(function(ze){var Ce=pp(ze);return Ce.map(function(Ke){var Le,Fe,Qe,Et,vt;if(Wj(Ke))Le=Ke;else{var Ht;Qe=Ke.key,Fe=Ke.label,Le=(Ht=Ke.value)!==null&&Ht!==void 0?Ht:Qe}var Ct=te.get(Le);if(Ct){var Nt;if(Fe===void 0&&(Fe=Ct==null?void 0:Ct[S||ne.label]),Qe===void 0&&(Qe=(Nt=Ct==null?void 0:Ct.key)!==null&&Nt!==void 0?Nt:Le),Et=Ct==null?void 0:Ct.disabled,vt=Ct==null?void 0:Ct.title,process.env.NODE_ENV!=="production"&&!S){var Dt=Ct==null?void 0:Ct[ne.label];Dt!==void 0&&!h.isValidElement(Dt)&&!h.isValidElement(Fe)&&Dt!==Fe&&at(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:Fe,value:Le,key:Qe,disabled:Et,title:vt}})},[ne,S,te]),ce=en(_,{value:B}),se=X(ce,2),le=se[0],be=se[1],ye=h.useMemo(function(){var ze,Ce=z&&le===null?[]:le,Ke=oe(Ce);return r==="combobox"&&H_((ze=Ke[0])===null||ze===void 0?void 0:ze.value)?[]:Ke},[le,oe,r,z]),Be=Pj(ye,te),de=X(Be,2),ue=de[0],pe=de[1],Ae=h.useMemo(function(){if(!r&&ue.length===1){var ze=ue[0];if(ze.value===null&&(ze.label===null||ze.label===void 0))return[]}return ue.map(function(Ce){var Ke;return j(j({},Ce),{},{label:(Ke=typeof k=="function"?k(Ce):Ce.label)!==null&&Ke!==void 0?Ke:Ce.value})})},[r,ue,k]),_e=h.useMemo(function(){return new Set(ue.map(function(ze){return ze.value}))},[ue]);h.useEffect(function(){if(r==="combobox"){var ze,Ce=(ze=ue[0])===null||ze===void 0?void 0:ze.value;ee(F_(Ce)?String(Ce):"")}},[ue]);var Re=Gv(function(ze,Ce){var Ke=Ce??ze;return D(D({},ne.value,ze),ne.label,Ke)}),$e=h.useMemo(function(){if(r!=="tags")return Q;var ze=he(Q),Ce=function(Le){return te.has(Le)};return he(ue).sort(function(Ke,Le){return Ke.value<Le.value?-1:1}).forEach(function(Ke){var Le=Ke.value;Ce(Le)||ze.push(Re(Le,Ke.label))}),ze},[Re,Q,te,ue,r]),We=Tj($e,ne,ae,J,C),ke=h.useMemo(function(){return r!=="tags"||!ae||We.some(function(ze){return ze[C||"value"]===ae})||We.some(function(ze){return ze[ne.value]===ae})?We:[Re(ae)].concat(he(We))},[Re,C,r,We,ae,ne]),De=function ze(Ce){var Ke=he(Ce).sort(function(Le,Fe){return y(Le,Fe,{searchValue:ae})});return Ke.map(function(Le){return Array.isArray(Le.options)?j(j({},Le),{},{options:Le.options.length>0?ze(Le.options):Le.options}):Le})},me=h.useMemo(function(){return y?De(ke):ke},[ke,y,ae]),Ne=h.useMemo(function(){return sj(me,{fieldNames:ne,childrenAsData:L})},[me,ne,L]),Ze=function(Ce){var Ke=oe(Ce);if(be(Ke),H&&(Ke.length!==ue.length||Ke.some(function(Qe,Et){var vt;return((vt=ue[Et])===null||vt===void 0?void 0:vt.value)!==(Qe==null?void 0:Qe.value)}))){var Le=F?Ke:Ke.map(function(Qe){return Qe.value}),Fe=Ke.map(function(Qe){return Kf(pe(Qe.value))});H(z?Le:Le[0],z?Fe:Fe[0])}},Ie=h.useState(null),xe=X(Ie,2),ot=xe[0],ft=xe[1],Tt=h.useState(0),Bt=X(Tt,2),Pe=Bt[0],Se=Bt[1],Xe=R!==void 0?R:r!=="combobox",Ge=h.useCallback(function(ze,Ce){var Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Le=Ke.source,Fe=Le===void 0?"keyboard":Le;Se(Ce),a&&r==="combobox"&&ze!==null&&Fe==="keyboard"&&ft(String(ze))},[a,r]),et=function(Ce,Ke,Le){var Fe=function(){var Wt,It=pe(Ce);return[F?{label:It==null?void 0:It[ne.label],value:Ce,key:(Wt=It==null?void 0:It.key)!==null&&Wt!==void 0?Wt:Ce}:Ce,Kf(It)]};if(Ke&&p){var Qe=Fe(),Et=X(Qe,2),vt=Et[0],Ht=Et[1];p(vt,Ht)}else if(!Ke&&m&&Le!=="clear"){var Ct=Fe(),Nt=X(Ct,2),Dt=Nt[0],Vt=Nt[1];m(Dt,Vt)}},je=Gv(function(ze,Ce){var Ke,Le=z?Ce.selected:!0;Le?Ke=z?[].concat(he(ue),[ze]):[ze]:Ke=ue.filter(function(Fe){return Fe.value!==ze}),Ze(Ke),et(ze,Le),r==="combobox"?ft(""):(!cc||f)&&(ee(""),ft(""))}),we=function(Ce,Ke){Ze(Ce);var Le=Ke.type,Fe=Ke.values;(Le==="remove"||Le==="clear")&&Fe.forEach(function(Qe){et(Qe.value,!1,Le)})},Ee=function(Ce,Ke){if(ee(Ce),ft(null),Ke.source==="submit"){var Le=(Ce||"").trim();if(Le){var Fe=Array.from(new Set([].concat(he(_e),[Le])));Ze(Fe),et(Le,!0),ee("")}return}Ke.source!=="blur"&&(r==="combobox"&&Ze(Ce),u==null||u(Ce))},ut=function(Ce){var Ke=Ce;r!=="tags"&&(Ke=Ce.map(function(Fe){var Qe=Z.get(Fe);return Qe==null?void 0:Qe.value}).filter(function(Fe){return Fe!==void 0}));var Le=Array.from(new Set([].concat(he(_e),he(Ke))));Ze(Le),Le.forEach(function(Fe){et(Fe,!0)})},ht=h.useMemo(function(){var ze=O!==!1&&v!==!1;return j(j({},Y),{},{flattenOptions:Ne,onActiveValue:Ge,defaultActiveFirstOption:Xe,onSelect:je,menuItemSelectedIcon:M,rawValues:_e,fieldNames:ne,virtual:ze,direction:N,listHeight:T,listItemHeight:A,childrenAsData:L,maxCount:K,optionRender:w})},[K,Y,Ne,Ge,Xe,je,M,_e,ne,O,v,N,T,A,L,w]);return process.env.NODE_ENV!=="production"&&(Lj(t),Fj(Q,ne)),h.createElement(mp.Provider,{value:ht},h.createElement(Lx,ge({},V,{id:W,prefixCls:i,ref:e,omitDomProps:Vj,mode:r,displayValues:Ae,onDisplayValuesChange:we,direction:N,searchValue:ae,onSearch:Ee,autoClearSearchValue:f,onSearchSplit:ut,dropdownMatchSelectWidth:v,OptionList:Wx,emptyOptions:!Ne.length,activeValue:ot,activeDescendantId:"".concat(W,"_list_").concat(Pe)})))});process.env.NODE_ENV!=="production"&&(qx.displayName="Select");var yp=qx;yp.Option=vp;yp.OptGroup=gp;function $i(t,e,n){return G.cn({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const js=(t,e)=>e||t,Kx=()=>{const[,t]=er(),[e]=Qr("Empty"),r=new Pt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return h.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(e==null?void 0:e.description)||"Empty"),h.createElement("g",{fill:"none",fillRule:"evenodd"},h.createElement("g",{transform:"translate(24 31.67)"},h.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),h.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"}),h.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)"}),h.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"}),h.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"})),h.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"}),h.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},h.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),h.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(Kx.displayName="EmptyImage");const Gx=()=>{const[,t]=er(),[e]=Qr("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=t,{borderColor:a,shadowColor:s,contentColor:l}=E.useMemo(()=>({borderColor:new Pt(n).onBackground(i).toHexString(),shadowColor:new Pt(r).onBackground(i).toHexString(),contentColor:new Pt(o).onBackground(i).toHexString()}),[n,r,o,i]);return h.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(e==null?void 0:e.description)||"Empty"),h.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},h.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),h.createElement("g",{fillRule:"nonzero",stroke:a},h.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"}),h.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:l}))))};process.env.NODE_ENV!=="production"&&(Gx.displayName="SimpleImage");const qj=t=>{const{componentCls:e,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=t;return{[e]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:r,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:r,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},Kj=Yt("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:r}=t,o=Mt(t,{emptyImgCls:`${e}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[qj(o)]});var Gj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Ux=h.createElement(Kx,null),Xx=h.createElement(Gx,null),Ro=t=>{const{className:e,rootClassName:n,prefixCls:r,image:o=Ux,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=t,d=Gj(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:p,className:m,style:g,classNames:v,styles:b}=hr("empty"),y=f("empty",r),[C,S,x]=Kj(y),[w]=Qr("Empty"),$=typeof i<"u"?i:w==null?void 0:w.description,R=typeof $=="string"?$:"empty";let M=null;if(typeof o=="string"?M=h.createElement("img",{alt:R,src:o}):M=o,process.env.NODE_ENV!=="production"){const O=Kt("Empty");[["imageStyle","styles: { image: {} }"]].forEach(([N,I])=>{O.deprecated(!(N in t),N,I)})}return C(h.createElement("div",Object.assign({className:G.cn(S,x,y,m,{[`${y}-normal`]:o===Xx,[`${y}-rtl`]:p==="rtl"},e,n,v.root,c==null?void 0:c.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},b.root),g),u==null?void 0:u.root),l)},d),h.createElement("div",{className:G.cn(`${y}-image`,v.image,c==null?void 0:c.image),style:Object.assign(Object.assign(Object.assign({},s),b.image),u==null?void 0:u.image)},M),$&&h.createElement("div",{className:G.cn(`${y}-description`,v.description,c==null?void 0:c.description),style:Object.assign(Object.assign({},b.description),u==null?void 0:u.description)},$),a&&h.createElement("div",{className:G.cn(`${y}-footer`,v.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},b.footer),u==null?void 0:u.footer)},a)))};Ro.PRESENTED_IMAGE_DEFAULT=Ux;Ro.PRESENTED_IMAGE_SIMPLE=Xx;process.env.NODE_ENV!=="production"&&(Ro.displayName="Empty");const Uj=t=>{const{componentName:e}=t,{getPrefixCls:n}=E.useContext(gt),r=n("empty");switch(e){case"Table":case"List":return E.createElement(Ro,{image:Ro.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return E.createElement(Ro,{image:Ro.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return E.createElement(Ro,null)}},tu=(t,e,n=void 0)=>{var r,o;const{variant:i,[t]:a}=h.useContext(gt),s=h.useContext(O2),l=a==null?void 0:a.variant;let c;typeof e<"u"?c=e:n===!1?c="borderless":c=(o=(r=s??l)!==null&&r!==void 0?r:i)!==null&&o!==void 0?o:"outlined";const u=gP.includes(c);return[c,u]},Xj=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function Yj(t,e){return t||Xj(e)}const Uv=t=>{const{optionHeight:e,optionFontSize:n,optionLineHeight:r,optionPadding:o}=t;return{position:"relative",display:"block",minHeight:e,padding:o,color:t.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},Jj=t=>{const{antCls:e,componentCls:n}=t,r=`${n}-item`,o=`&${e}-slide-up-enter${e}-slide-up-enter-active`,i=`&${e}-slide-up-appear${e}-slide-up-appear-active`,a=`&${e}-slide-up-leave${e}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},An(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[`
301
+ `].includes(pt)})},[A]),Ke=h.useContext(mp)||{},Le=Ke.maxCount,Fe=Ke.rawValues,Qe=function(Ve,ct,dt){if(!(le&&qf(Le)&&(Fe==null?void 0:Fe.size)>=Le)){var xt=!0,Ot=Ve;M==null||M(null);var Sn=lj(Ve,A,qf(Le)?Le-Fe.size:void 0),xn=dt?null:Sn;return v!=="combobox"&&xn&&(Ot="",P==null||P(xn),ze(!1),xt=!1),T&&xe!==Ot&&T(Ot,{source:ct?"typing":"effect"}),xt}},Et=function(Ve){!Ve||!Ve.trim()||T(Ve,{source:"submit"})};h.useEffect(function(){!Ee&&!le&&v!=="combobox"&&Qe("",!1,!1)},[Ee]),h.useEffect(function(){je&&b&&we(!1),b&&!ke.current&&Ze(!1)},[b]);var vt=Rx(),Ht=X(vt,2),Ct=Ht[0],Nt=Ht[1],Dt=h.useRef(!1),Vt=function(Ve){var ct=Ct(),dt=Ve.key,xt=dt==="Enter";if(xt&&(v!=="combobox"&&Ve.preventDefault(),Ee||ze(!0)),Nt(!!xe),dt==="Backspace"&&!ct&&le&&!xe&&u.length){for(var Ot=he(u),Sn=null,xn=Ot.length-1;xn>=0;xn-=1){var Yn=Ot[xn];if(!Yn.disabled){Ot.splice(xn,1),Sn=Yn;break}}Sn&&d(Ot,{type:"remove",values:[Sn]})}for(var tr=arguments.length,Jn=new Array(tr>1?tr-1:0),Dn=1;Dn<tr;Dn++)Jn[Dn-1]=arguments[Dn];if(Ee&&(!xt||!Dt.current)){var mn;xt&&(Dt.current=!0),(mn=We.current)===null||mn===void 0||mn.onKeyDown.apply(mn,[Ve].concat(Jn))}ie==null||ie.apply(void 0,[Ve].concat(Jn))},Nn=function(Ve){for(var ct=arguments.length,dt=new Array(ct>1?ct-1:0),xt=1;xt<ct;xt++)dt[xt-1]=arguments[xt];if(Ee){var Ot;(Ot=We.current)===null||Ot===void 0||Ot.onKeyUp.apply(Ot,[Ve].concat(dt))}Ve.key==="Enter"&&(Dt.current=!1),Q==null||Q.apply(void 0,[Ve].concat(dt))},Wt=function(Ve){var ct=u.filter(function(dt){return dt!==Ve});d(ct,{type:"remove",values:[Ve]})},It=function(){Dt.current=!1},Oe=h.useRef(!1),qe=function(){Ze(!0),b||(te&&!Oe.current&&te.apply(void 0,arguments),Y.includes("focus")&&ze(!0)),Oe.current=!0},He=function(){ke.current=!0,Ze(!1,function(){Oe.current=!1,ke.current=!1,ze(!1)}),!b&&(xe&&(v==="tags"?T(xe,{source:"submit"}):v==="multiple"&&T("",{source:"blur"})),Z&&Z.apply(void 0,arguments))},ve=[];h.useEffect(function(){return function(){ve.forEach(function(pt){return clearTimeout(pt)}),ve.splice(0,ve.length)}},[]);var nt=function(Ve){var ct,dt=Ve.target,xt=(ct=Re.current)===null||ct===void 0?void 0:ct.getPopupElement();if(xt&&xt.contains(dt)){var Ot=setTimeout(function(){var tr=ve.indexOf(Ot);if(tr!==-1&&ve.splice(tr,1),Ie(),!ue&&!xt.contains(document.activeElement)){var Jn;(Jn=$e.current)===null||Jn===void 0||Jn.focus()}});ve.push(Ot)}for(var Sn=arguments.length,xn=new Array(Sn>1?Sn-1:0),Yn=1;Yn<Sn;Yn++)xn[Yn-1]=arguments[Yn];ce==null||ce.apply(void 0,[Ve].concat(xn))},St=h.useState({}),bt=X(St,2),Jt=bt[1];function Zt(){Jt({})}var tn;ft&&(tn=function(Ve){ze(Ve)}),w_(function(){var pt;return[Ae.current,(pt=Re.current)===null||pt===void 0?void 0:pt.getPopupElement()]},ht,ze,!!ft);var Ut=h.useMemo(function(){return j(j({},t),{},{notFoundContent:m,open:Ee,triggerOpen:ht,id:r,showSearch:be,multiple:le,toggleOpen:ze})},[t,m,ht,Ee,r,be,le,ze]),Qt=!!_||y,pn;Qt&&(pn=h.createElement(Qc,{className:G.cn("".concat(o,"-arrow"),D({},"".concat(o,"-arrow-loading"),y)),customizeIcon:_,customizeIconProps:{loading:y,searchValue:xe,open:Ee,focused:Ne,showSearch:be}}));var Rn=function(){var Ve;g==null||g(),(Ve=$e.current)===null||Ve===void 0||Ve.focus(),d([],{type:"clear",values:u}),Qe("",!1,!1)},dn=C_(o,Rn,u,k,F,b,xe,v),Cn=dn.allowClear,Or=dn.clearIcon,zr=h.createElement(H,{ref:We}),Xn=G.cn(o,i,D(D(D(D(D(D(D(D(D(D({},"".concat(o,"-focused"),Ne),"".concat(o,"-multiple"),le),"".concat(o,"-single"),!le),"".concat(o,"-allow-clear"),k),"".concat(o,"-show-arrow"),Qt),"".concat(o,"-disabled"),b),"".concat(o,"-loading"),y),"".concat(o,"-open"),Ee),"".concat(o,"-customize-input"),ot),"".concat(o,"-show-search"),be)),Co=h.createElement(Bx,{ref:Re,disabled:b,prefixCls:o,visible:ht,popupElement:zr,animation:K,transitionName:V,dropdownStyle:W,dropdownClassName:z,direction:l,dropdownMatchSelectWidth:L,dropdownRender:J,dropdownAlign:ne,placement:q,builtinPlacements:re,getPopupContainer:ae,empty:f,getTriggerDOMNode:function(Ve){return _e.current||Ve},onPopupVisibleChange:tn,onPopupMouseEnter:Zt},ft?h.cloneElement(ft,{ref:Tt}):h.createElement(kx,ge({},t,{domRef:_e,prefixCls:o,inputElement:ot,ref:$e,id:r,prefix:B,showSearch:be,autoClearSearchValue:I,mode:v,activeDescendantId:O,tagRender:s,values:u,open:Ee,onToggleOpen:ze,activeValue:R,searchValue:xe,onSearch:Qe,onSearchSubmit:Et,onRemove:Wt,tokenWithEnter:Ce,onInputBlur:It}))),Lr;return ft?Lr=Co:Lr=h.createElement("div",ge({className:Xn},ye,{ref:Ae,onMouseDown:nt,onKeyDown:Vt,onKeyUp:Nn,onFocus:qe,onBlur:He}),h.createElement(cj,{visible:Ne&&!Ee,values:u}),Co,pn,Cn&&Or),h.createElement(Nx.Provider,{value:Ut},Lr)});process.env.NODE_ENV!=="production"&&(Lx.displayName="BaseSelect");var gp=function(){return null};gp.isSelectOptGroup=!0;var vp=function(){return null};vp.isSelectOption=!0;var Fx=h.forwardRef(function(t,e){var n=t.height,r=t.offsetY,o=t.offsetX,i=t.children,a=t.prefixCls,s=t.onInnerResize,l=t.innerProps,c=t.rtl,u=t.extra,d={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},f=j(j({},f),{},D(D(D(D(D({transform:"translateY(".concat(r,"px)")},c?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:d},h.createElement(bo,{onResize:function(m){var g=m.offsetHeight;g&&s&&s()}},h.createElement("div",ge({style:f,className:G.cn(D({},"".concat(a,"-holder-inner"),a)),ref:e},l),i,u)))});Fx.displayName="Filler";function fj(t){var e=t.children,n=t.setRef,r=h.useCallback(function(o){n(o)},[]);return h.cloneElement(e,{ref:r})}function hj(t,e,n,r,o,i,a,s){var l=s.getKey;return t.slice(e,n+1).map(function(c,u){var d=e+u,f=a(c,d,{style:{width:r},offsetX:o}),p=l(c);return h.createElement(fj,{key:p,setRef:function(g){return i(c,g)}},f)})}function pj(t,e,n){var r=t.length,o=e.length,i,a;if(r===0&&o===0)return null;r<o?(i=t,a=e):(i=e,a=t);var s={__EMPTY_ITEM__:!0};function l(m){return m!==void 0?n(m):s}for(var c=null,u=Math.abs(r-o)!==1,d=0;d<a.length;d+=1){var f=l(i[d]),p=l(a[d]);if(f!==p){c=d,u=u||f!==l(a[d+1]);break}}return c===null?null:{index:c,multiple:u}}function mj(t,e,n){var r=h.useState(t),o=X(r,2),i=o[0],a=o[1],s=h.useState(null),l=X(s,2),c=l[0],u=l[1];return h.useEffect(function(){var d=pj(i||[],t||[],e);(d==null?void 0:d.index)!==void 0&&u(t[d.index]),a(t)},[t]),[c]}var zv=(typeof navigator>"u"?"undefined":Ue(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const Hx=function(t,e,n,r){var o=E.useRef(!1),i=E.useRef(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(function(){o.current=!1},50)}var s=E.useRef({top:t,bottom:e,left:n,right:r});return s.current.top=t,s.current.bottom=e,s.current.left=n,s.current.right=r,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(i.current),o.current=!1):(!d||o.current)&&a(),!o.current&&d}};function gj(t,e,n,r,o,i,a){var s=E.useRef(0),l=E.useRef(null),c=E.useRef(null),u=E.useRef(!1),d=Hx(e,n,r,o);function f(y,C){if(wt.cancel(l.current),!d(!1,C)){var S=y;if(!S._virtualHandled)S._virtualHandled=!0;else return;s.current+=C,c.current=C,zv||S.preventDefault(),l.current=wt(function(){var x=u.current?10:1;a(s.current*x,!1),s.current=0})}}function p(y,C){a(C,!0),zv||y.preventDefault()}var m=E.useRef(null),g=E.useRef(null);function v(y){if(t){wt.cancel(g.current),g.current=wt(function(){m.current=null},2);var C=y.deltaX,S=y.deltaY,x=y.shiftKey,w=C,$=S;(m.current==="sx"||!m.current&&x&&S&&!C)&&(w=S,$=0,m.current="sx");var R=Math.abs(w),M=Math.abs($);m.current===null&&(m.current=i&&R>M?"x":"y"),m.current==="y"?f(y,$):p(y,w)}}function b(y){t&&(u.current=y.detail===c.current)}return[v,b]}function vj(t,e,n,r){var o=h.useMemo(function(){return[new Map,[]]},[t,n.id,r]),i=X(o,2),a=i[0],s=i[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),p=a.get(d);if(f===void 0||p===void 0)for(var m=t.length,g=s.length;g<m;g+=1){var v,b=t[g],y=e(b);a.set(y,g);var C=(v=n.get(y))!==null&&v!==void 0?v:r;if(s[g]=(s[g-1]||0)+C,y===u&&(f=g),y===d&&(p=g),f!==void 0&&p!==void 0)break}return{top:s[f-1]||0,bottom:s[p]}};return l}var bj=function(){function t(){ln(this,t),D(this,"maps",void 0),D(this,"id",0),D(this,"diffRecords",new Map),this.maps=Object.create(null)}return cn(t,[{key:"set",value:function(n,r){this.diffRecords.set(n,this.maps[n]),this.maps[n]=r,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),t}();function Lv(t){var e=parseFloat(t);return isNaN(e)?0:e}function yj(t,e,n){var r=h.useState(0),o=X(r,2),i=o[0],a=o[1],s=E.useRef(new Map),l=E.useRef(new bj),c=E.useRef(0);function u(){c.current+=1}function d(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;u();var m=function(){var b=!1;s.current.forEach(function(y,C){if(y&&y.offsetParent){var S=y.offsetHeight,x=getComputedStyle(y),w=x.marginTop,$=x.marginBottom,R=Lv(w),M=Lv($),O=S+R+M;l.current.get(C)!==O&&(l.current.set(C,O),b=!0)}}),b&&a(function(y){return y+1})};if(p)m();else{c.current+=1;var g=c.current;Promise.resolve().then(function(){g===c.current&&m()})}}function f(p,m){var g=t(p);s.current.get(g),m?(s.current.set(g,m),d()):s.current.delete(g)}return E.useEffect(function(){return u},[]),[f,d,l.current,i]}var Fv=14/15;function Cj(t,e,n){var r=E.useRef(!1),o=E.useRef(0),i=E.useRef(0),a=E.useRef(null),s=E.useRef(null),l,c=function(p){if(r.current){var m=Math.ceil(p.touches[0].pageX),g=Math.ceil(p.touches[0].pageY),v=o.current-m,b=i.current-g,y=Math.abs(v)>Math.abs(b);y?o.current=m:i.current=g;var C=n(y,y?v:b,!1,p);C&&p.preventDefault(),clearInterval(s.current),C&&(s.current=setInterval(function(){y?v*=Fv:b*=Fv;var S=Math.floor(y?v:b);(!n(y,S,!0)||Math.abs(S)<=.1)&&clearInterval(s.current)},16))}},u=function(){r.current=!1,l()},d=function(p){l(),p.touches.length===1&&!r.current&&(r.current=!0,o.current=Math.ceil(p.touches[0].pageX),i.current=Math.ceil(p.touches[0].pageY),a.current=p.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},zt(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=e.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[t])}function Hv(t){return Math.floor(Math.pow(t,.5))}function Gf(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function Sj(t,e,n){h.useEffect(function(){var r=e.current;if(t&&r){var o=!1,i,a,s=function(){wt.cancel(i)},l=function f(){s(),i=wt(function(){n(a),f()})},c=function(p){if(!(p.target.draggable||p.button!==0)){var m=p;m._virtualHandled||(m._virtualHandled=!0,o=!0)}},u=function(){o=!1,s()},d=function(p){if(o){var m=Gf(p,!1),g=r.getBoundingClientRect(),v=g.top,b=g.bottom;if(m<=v){var y=v-m;a=-Hv(y),l()}else if(m>=b){var C=m-b;a=Hv(C),l()}else s()}};return r.addEventListener("mousedown",c),r.ownerDocument.addEventListener("mouseup",u),r.ownerDocument.addEventListener("mousemove",d),function(){r.removeEventListener("mousedown",c),r.ownerDocument.removeEventListener("mouseup",u),r.ownerDocument.removeEventListener("mousemove",d),s()}}},[t])}var Vv=10;function xj(t,e,n,r,o,i,a,s){var l=h.useRef(),c=h.useState(null),u=X(c,2),d=u[0],f=u[1];return zt(function(){if(d&&d.times<Vv){if(!t.current){f(function(F){return j({},F)});return}i();var p=d.targetAlign,m=d.originAlign,g=d.index,v=d.offset,b=t.current.clientHeight,y=!1,C=p,S=null;if(b){for(var x=p||m,w=0,$=0,R=0,M=Math.min(e.length-1,g),O=0;O<=M;O+=1){var N=o(e[O]);$=w;var I=n.get(N);R=$+(I===void 0?r:I),w=R}for(var T=x==="top"?v:b-v,P=M;P>=0;P-=1){var A=o(e[P]),k=n.get(A);if(k===void 0){y=!0;break}if(T-=k,T<=0)break}switch(x){case"top":S=$-v;break;case"bottom":S=R-b+v;break;default:{var B=t.current.scrollTop,_=B+b;$<B?C="top":R>_&&(C="bottom")}}S!==null&&a(S),S!==d.lastTop&&(y=!0)}y&&f(j(j({},d),{},{times:d.times+1,targetAlign:C,lastTop:S}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===Vv&&at(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,t.current]),function(p){if(p==null){s();return}if(wt.cancel(l.current),typeof p=="number")a(p);else if(p&&Ue(p)==="object"){var m,g=p.align;"index"in p?m=p.index:m=e.findIndex(function(y){return o(y)===p.key});var v=p.offset,b=v===void 0?0:v;f({times:0,index:m,offset:b,originAlign:g})}}}var Uf=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.rtl,o=t.scrollOffset,i=t.scrollRange,a=t.onStartMove,s=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,d=t.containerSize,f=t.style,p=t.thumbStyle,m=t.showScrollBar,g=h.useState(!1),v=X(g,2),b=v[0],y=v[1],C=h.useState(null),S=X(C,2),x=S[0],w=S[1],$=h.useState(null),R=X($,2),M=R[0],O=R[1],N=!r,I=h.useRef(),T=h.useRef(),P=h.useState(m),A=X(P,2),k=A[0],B=A[1],_=h.useRef(),F=function(){m===!0||m===!1||(clearTimeout(_.current),B(!0),_.current=setTimeout(function(){B(!1)},3e3))},H=i-d||0,K=d-u||0,V=h.useMemo(function(){if(o===0||H===0)return 0;var ee=o/H;return ee*K},[o,H,K]),W=function(Y){Y.stopPropagation(),Y.preventDefault()},z=h.useRef({top:V,dragging:b,pageY:x,startTop:M});z.current={top:V,dragging:b,pageY:x,startTop:M};var L=function(Y){y(!0),w(Gf(Y,c)),O(z.current.top),a(),Y.stopPropagation(),Y.preventDefault()};h.useEffect(function(){var ee=function(Q){Q.preventDefault()},Y=I.current,te=T.current;return Y.addEventListener("touchstart",ee,{passive:!1}),te.addEventListener("touchstart",L,{passive:!1}),function(){Y.removeEventListener("touchstart",ee),te.removeEventListener("touchstart",L)}},[]);var J=h.useRef();J.current=H;var ne=h.useRef();ne.current=K,h.useEffect(function(){if(b){var ee,Y=function(Q){var ie=z.current,ce=ie.dragging,se=ie.pageY,le=ie.startTop;wt.cancel(ee);var be=I.current.getBoundingClientRect(),ye=d/(c?be.width:be.height);if(ce){var Be=(Gf(Q,c)-se)*ye,de=le;!N&&c?de-=Be:de+=Be;var ue=J.current,pe=ne.current,Ae=pe?de/pe:0,_e=Math.ceil(Ae*ue);_e=Math.max(_e,0),_e=Math.min(_e,ue),ee=wt(function(){l(_e,c)})}},te=function(){y(!1),s()};return window.addEventListener("mousemove",Y,{passive:!0}),window.addEventListener("touchmove",Y,{passive:!0}),window.addEventListener("mouseup",te,{passive:!0}),window.addEventListener("touchend",te,{passive:!0}),function(){window.removeEventListener("mousemove",Y),window.removeEventListener("touchmove",Y),window.removeEventListener("mouseup",te),window.removeEventListener("touchend",te),wt.cancel(ee)}}},[b]),h.useEffect(function(){return F(),function(){clearTimeout(_.current)}},[o]),h.useImperativeHandle(e,function(){return{delayHidden:F}});var q="".concat(n,"-scrollbar"),re={position:"absolute",visibility:k?null:"hidden"},ae={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return c?(re.height=8,re.left=0,re.right=0,re.bottom=0,ae.height="100%",ae.width=u,N?ae.left=V:ae.right=V):(re.width=8,re.top=0,re.bottom=0,N?re.right=0:re.left=0,ae.width="100%",ae.height=u,ae.top=V),h.createElement("div",{ref:I,className:G.cn(q,D(D(D({},"".concat(q,"-horizontal"),c),"".concat(q,"-vertical"),!c),"".concat(q,"-visible"),k)),style:j(j({},re),f),onMouseDown:W,onMouseMove:F},h.createElement("div",{ref:T,className:G.cn("".concat(q,"-thumb"),D({},"".concat(q,"-thumb-moving"),b)),style:j(j({},ae),p),onMouseDown:L}))});process.env.NODE_ENV!=="production"&&(Uf.displayName="ScrollBar");var wj=20;function Wv(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,wj),Math.floor(n)}var Ej=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],$j=[],Oj={overflowY:"auto",overflowAnchor:"none"};function Mj(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,o=t.className,i=t.height,a=t.itemHeight,s=t.fullHeight,l=s===void 0?!0:s,c=t.style,u=t.data,d=t.children,f=t.itemKey,p=t.virtual,m=t.direction,g=t.scrollWidth,v=t.component,b=v===void 0?"div":v,y=t.onScroll,C=t.onVirtualScroll,S=t.onVisibleChange,x=t.innerProps,w=t.extraRender,$=t.styles,R=t.showScrollBar,M=R===void 0?"optional":R,O=lt(t,Ej),N=h.useCallback(function(Oe){return typeof f=="function"?f(Oe):Oe==null?void 0:Oe[f]},[f]),I=yj(N),T=X(I,4),P=T[0],A=T[1],k=T[2],B=T[3],_=!!(p!==!1&&i&&a),F=h.useMemo(function(){return Object.values(k.maps).reduce(function(Oe,qe){return Oe+qe},0)},[k.id,k.maps]),H=_&&u&&(Math.max(a*u.length,F)>i||!!g),K=m==="rtl",V=G.cn(r,D({},"".concat(r,"-rtl"),K),o),W=u||$j,z=E.useRef(),L=E.useRef(),J=E.useRef(),ne=E.useState(0),q=X(ne,2),re=q[0],ae=q[1],ee=E.useState(0),Y=X(ee,2),te=Y[0],Z=Y[1],Q=E.useState(!1),ie=X(Q,2),ce=ie[0],se=ie[1],le=function(){se(!0)},be=function(){se(!1)},ye={getKey:N};function Be(Oe){ae(function(qe){var He;typeof Oe=="function"?He=Oe(qe):He=Oe;var ve=Xe(He);return z.current.scrollTop=ve,ve})}var de=E.useRef({start:0,end:W.length}),ue=E.useRef(),pe=mj(W,N),Ae=X(pe,1),_e=Ae[0];ue.current=_e;var Re=h.useMemo(function(){if(!_)return{scrollHeight:void 0,start:0,end:W.length-1,offset:void 0};if(!H){var Oe;return{scrollHeight:((Oe=L.current)===null||Oe===void 0?void 0:Oe.offsetHeight)||0,start:0,end:W.length-1,offset:void 0}}for(var qe=0,He,ve,nt,St=W.length,bt=0;bt<St;bt+=1){var Jt=W[bt],Zt=N(Jt),tn=k.get(Zt),Ut=qe+(tn===void 0?a:tn);Ut>=re&&He===void 0&&(He=bt,ve=qe),Ut>re+i&&nt===void 0&&(nt=bt),qe=Ut}return He===void 0&&(He=0,ve=0,nt=Math.ceil(i/a)),nt===void 0&&(nt=W.length-1),nt=Math.min(nt+1,W.length-1),{scrollHeight:qe,start:He,end:nt,offset:ve}},[H,_,re,W,B,i]),$e=Re.scrollHeight,We=Re.start,ke=Re.end,De=Re.offset;de.current.start=We,de.current.end=ke,h.useLayoutEffect(function(){var Oe=k.getRecord();if(Oe.size===1){var qe=Array.from(Oe.keys())[0],He=Oe.get(qe),ve=W[We];if(ve&&He===void 0){var nt=N(ve);if(nt===qe){var St=k.get(qe),bt=St-a;Be(function(Jt){return Jt+bt})}}}k.resetRecord()},[$e]);var me=h.useState({width:0,height:i}),Ne=X(me,2),Ze=Ne[0],Ie=Ne[1],xe=function(qe){Ie({width:qe.offsetWidth,height:qe.offsetHeight})},ot=E.useRef(),ft=E.useRef(),Tt=h.useMemo(function(){return Wv(Ze.width,g)},[Ze.width,g]),Bt=h.useMemo(function(){return Wv(Ze.height,$e)},[Ze.height,$e]),Pe=$e-i,Se=E.useRef(Pe);Se.current=Pe;function Xe(Oe){var qe=Oe;return Number.isNaN(Se.current)||(qe=Math.min(qe,Se.current)),qe=Math.max(qe,0),qe}var Ge=re<=0,et=re>=Pe,je=te<=0,we=te>=g,Ee=Hx(Ge,et,je,we),ut=function(){return{x:K?-te:te,y:re}},ht=E.useRef(ut()),ze=At(function(Oe){if(C){var qe=j(j({},ut()),Oe);(ht.current.x!==qe.x||ht.current.y!==qe.y)&&(C(qe),ht.current=qe)}});function Ce(Oe,qe){var He=Oe;qe?(Ar.flushSync(function(){Z(He)}),ze()):Be(He)}function Ke(Oe){var qe=Oe.currentTarget.scrollTop;qe!==re&&Be(qe),y==null||y(Oe),ze()}var Le=function(qe){var He=qe,ve=g?g-Ze.width:0;return He=Math.max(He,0),He=Math.min(He,ve),He},Fe=At(function(Oe,qe){qe?(Ar.flushSync(function(){Z(function(He){var ve=He+(K?-Oe:Oe);return Le(ve)})}),ze()):Be(function(He){var ve=He+Oe;return ve})}),Qe=gj(_,Ge,et,je,we,!!g,Fe),Et=X(Qe,2),vt=Et[0],Ht=Et[1];Cj(_,z,function(Oe,qe,He,ve){var nt=ve;return Ee(Oe,qe,He)?!1:!nt||!nt._virtualHandled?(nt&&(nt._virtualHandled=!0),vt({preventDefault:function(){},deltaX:Oe?qe:0,deltaY:Oe?0:qe}),!0):!1}),Sj(H,z,function(Oe){Be(function(qe){return qe+Oe})}),zt(function(){function Oe(He){var ve=Ge&&He.detail<0,nt=et&&He.detail>0;_&&!ve&&!nt&&He.preventDefault()}var qe=z.current;return qe.addEventListener("wheel",vt,{passive:!1}),qe.addEventListener("DOMMouseScroll",Ht,{passive:!0}),qe.addEventListener("MozMousePixelScroll",Oe,{passive:!1}),function(){qe.removeEventListener("wheel",vt),qe.removeEventListener("DOMMouseScroll",Ht),qe.removeEventListener("MozMousePixelScroll",Oe)}},[_,Ge,et]),zt(function(){if(g){var Oe=Le(te);Z(Oe),ze({x:Oe})}},[Ze.width,g]);var Ct=function(){var qe,He;(qe=ot.current)===null||qe===void 0||qe.delayHidden(),(He=ft.current)===null||He===void 0||He.delayHidden()},Nt=xj(z,W,k,a,N,function(){return A(!0)},Be,Ct);h.useImperativeHandle(e,function(){return{nativeElement:J.current,getScrollInfo:ut,scrollTo:function(qe){function He(ve){return ve&&Ue(ve)==="object"&&("left"in ve||"top"in ve)}He(qe)?(qe.left!==void 0&&Z(Le(qe.left)),Nt(qe.top)):Nt(qe)}}}),zt(function(){if(S){var Oe=W.slice(We,ke+1);S(Oe,W)}},[We,ke,W]);var Dt=vj(W,N,k,a),Vt=w==null?void 0:w({start:We,end:ke,virtual:H,offsetX:te,offsetY:De,rtl:K,getSize:Dt}),Nn=hj(W,We,ke,g,te,P,d,ye),Wt=null;i&&(Wt=j(D({},l?"height":"maxHeight",i),Oj),_&&(Wt.overflowY="hidden",g&&(Wt.overflowX="hidden"),ce&&(Wt.pointerEvents="none")));var It={};return K&&(It.dir="rtl"),h.createElement("div",ge({ref:J,style:j(j({},c),{},{position:"relative"}),className:V},It,O),h.createElement(bo,{onResize:xe},h.createElement(b,{className:"".concat(r,"-holder"),style:Wt,ref:z,onScroll:Ke,onMouseEnter:Ct},h.createElement(Fx,{prefixCls:r,height:$e,offsetX:te,offsetY:De,scrollWidth:g,onInnerResize:A,ref:L,innerProps:x,rtl:K,extra:Vt},Nn))),H&&$e>i&&h.createElement(Uf,{ref:ot,prefixCls:r,scrollOffset:re,scrollRange:$e,rtl:K,onScroll:Ce,onStartMove:le,onStopMove:be,spinSize:Bt,containerSize:Ze.height,style:$==null?void 0:$.verticalScrollBar,thumbStyle:$==null?void 0:$.verticalScrollBarThumb,showScrollBar:M}),H&&g>Ze.width&&h.createElement(Uf,{ref:ft,prefixCls:r,scrollOffset:te,scrollRange:g,rtl:K,onScroll:Ce,onStartMove:le,onStopMove:be,spinSize:Tt,containerSize:Ze.width,horizontal:!0,style:$==null?void 0:$.horizontalScrollBar,thumbStyle:$==null?void 0:$.horizontalScrollBarThumb,showScrollBar:M}))}var Vx=h.forwardRef(Mj);Vx.displayName="List";function Nj(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Rj=["disabled","title","children","style","className"];function qv(t){return typeof t=="string"||typeof t=="number"}var Ij=function(e,n){var r=S_(),o=r.prefixCls,i=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,p=h.useContext(mp),m=p.maxCount,g=p.flattenOptions,v=p.onActiveValue,b=p.defaultActiveFirstOption,y=p.onSelect,C=p.menuItemSelectedIcon,S=p.rawValues,x=p.fieldNames,w=p.virtual,$=p.direction,R=p.listHeight,M=p.listItemHeight,O=p.optionRender,N="".concat(o,"-item"),I=Es(function(){return g},[a,g],function(ee,Y){return Y[0]&&ee[1]!==Y[1]}),T=h.useRef(null),P=h.useMemo(function(){return s&&qf(m)&&(S==null?void 0:S.size)>=m},[s,m,S==null?void 0:S.size]),A=function(Y){Y.preventDefault()},k=function(Y){var te;(te=T.current)===null||te===void 0||te.scrollTo(typeof Y=="number"?{index:Y}:Y)},B=h.useCallback(function(ee){return l==="combobox"?!1:S.has(ee)},[l,he(S).toString(),S.size]),_=function(Y){for(var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Z=I.length,Q=0;Q<Z;Q+=1){var ie=(Y+Q*te+Z)%Z,ce=I[ie]||{},se=ce.group,le=ce.data;if(!se&&!(le!=null&&le.disabled)&&(B(le.value)||!P))return ie}return-1},F=h.useState(function(){return _(0)}),H=X(F,2),K=H[0],V=H[1],W=function(Y){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;V(Y);var Z={source:te?"keyboard":"mouse"},Q=I[Y];if(!Q){v(null,-1,Z);return}v(Q.value,Y,Z)};E.useEffect(function(){W(b!==!1?_(0):-1)},[I.length,c]);var z=h.useCallback(function(ee){return l==="combobox"?String(ee).toLowerCase()===c.toLowerCase():S.has(ee)},[l,c,he(S).toString(),S.size]);E.useEffect(function(){var ee=setTimeout(function(){if(!s&&a&&S.size===1){var te=Array.from(S)[0],Z=I.findIndex(function(Q){var ie=Q.data;return c?String(ie.value).startsWith(c):ie.value===te});Z!==-1&&(W(Z),k(Z))}});if(a){var Y;(Y=T.current)===null||Y===void 0||Y.scrollTo(void 0)}return function(){return clearTimeout(ee)}},[a,c]);var L=function(Y){Y!==void 0&&y(Y,{selected:!S.has(Y)}),s||u(!1)};if(h.useImperativeHandle(n,function(){return{onKeyDown:function(Y){var te=Y.which,Z=Y.ctrlKey;switch(te){case Te.N:case Te.P:case Te.UP:case Te.DOWN:{var Q=0;if(te===Te.UP?Q=-1:te===Te.DOWN?Q=1:Nj()&&Z&&(te===Te.N?Q=1:te===Te.P&&(Q=-1)),Q!==0){var ie=_(K+Q,Q);k(ie),W(ie,!0)}break}case Te.TAB:case Te.ENTER:{var ce,se=I[K];se&&!(se!=null&&(ce=se.data)!==null&&ce!==void 0&&ce.disabled)&&!P?L(se.value):L(void 0),a&&Y.preventDefault();break}case Te.ESC:u(!1),a&&Y.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Y){k(Y)}}}),I.length===0)return h.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(N,"-empty"),onMouseDown:A},d);var J=Object.keys(x).map(function(ee){return x[ee]}),ne=function(Y){return Y.label};function q(ee,Y){var te=ee.group;return{role:te?"presentation":"option",id:"".concat(i,"_list_").concat(Y)}}var re=function(Y){var te=I[Y];if(!te)return null;var Z=te.data||{},Q=Z.value,ie=te.group,ce=Yr(Z,!0),se=ne(te);return te?h.createElement("div",ge({"aria-label":typeof se=="string"&&!ie?se:null},ce,{key:Y},q(te,Y),{"aria-selected":z(Q)}),Q):null},ae={role:"listbox",id:"".concat(i,"_list")};return h.createElement(h.Fragment,null,w&&h.createElement("div",ge({},ae,{style:{height:0,width:0,overflow:"hidden"}}),re(K-1),re(K),re(K+1)),h.createElement(Vx,{itemKey:"key",ref:T,data:I,height:R,itemHeight:M,fullHeight:!1,onMouseDown:A,onScroll:f,virtual:w,direction:$,innerProps:w?null:ae},function(ee,Y){var te=ee.group,Z=ee.groupOption,Q=ee.data,ie=ee.label,ce=ee.value,se=Q.key;if(te){var le,be=(le=Q.title)!==null&&le!==void 0?le:qv(ie)?ie.toString():void 0;return h.createElement("div",{className:G.cn(N,"".concat(N,"-group"),Q.className),title:be},ie!==void 0?ie:se)}var ye=Q.disabled,Be=Q.title;Q.children;var de=Q.style,ue=Q.className,pe=lt(Q,Rj),Ae=vn(pe,J),_e=B(ce),Re=ye||!_e&&P,$e="".concat(N,"-option"),We=G.cn(N,$e,ue,D(D(D(D({},"".concat($e,"-grouped"),Z),"".concat($e,"-active"),K===Y&&!Re),"".concat($e,"-disabled"),Re),"".concat($e,"-selected"),_e)),ke=ne(ee),De=!C||typeof C=="function"||_e,me=typeof ke=="number"?ke:ke||ce,Ne=qv(me)?me.toString():void 0;return Be!==void 0&&(Ne=Be),h.createElement("div",ge({},Yr(Ae),w?{}:q(ee,Y),{"aria-selected":z(ce),className:We,title:Ne,onMouseMove:function(){K===Y||Re||W(Y)},onClick:function(){Re||L(ce)},style:de}),h.createElement("div",{className:"".concat($e,"-content")},typeof O=="function"?O(ee,{index:Y}):me),h.isValidElement(C)||_e,De&&h.createElement(Qc,{className:"".concat(N,"-option-state"),customizeIcon:C,customizeIconProps:{value:ce,disabled:Re,isSelected:_e}},_e?"✓":null))}))},Wx=h.forwardRef(Ij);process.env.NODE_ENV!=="production"&&(Wx.displayName="OptionList");const Pj=function(t,e){var n=h.useRef({values:new Map,options:new Map}),r=h.useMemo(function(){var i=n.current,a=i.values,s=i.options,l=t.map(function(d){if(d.label===void 0){var f;return j(j({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,e.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[t,e]),o=h.useCallback(function(i){return e.get(i)||n.current.options.get(i)},[e]);return[r,o]};function dd(t,e){return pp(t).join("").toUpperCase().includes(e)}const Tj=function(t,e,n,r,o){return h.useMemo(function(){if(!n||r===!1)return t;var i=e.options,a=e.label,s=e.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(p,m){return o?dd(m[o],u):m[i]?dd(m[a!=="children"?a:"label"],u):dd(m[s],u)},f=c?function(p){return Kf(p)}:function(p){return p};return t.forEach(function(p){if(p[i]){var m=d(n,f(p));if(m)l.push(p);else{var g=p[i].filter(function(v){return d(n,f(v))});g.length&&l.push(j(j({},p),{},D({},i,g)))}return}d(n,f(p))&&l.push(p)}),l},[t,r,o,n,e])};var Kv=0,Aj=process.env.NODE_ENV!=="test"&&zn();function kj(){var t;return Aj?(t=Kv,Kv+=1):t="TEST_OR_SSR",t}function Dj(t){var e=h.useState(),n=X(e,2),r=n[0],o=n[1];return h.useEffect(function(){o("rc_select_".concat(kj()))},[]),t||r}var _j=["children","value"],jj=["children"];function Bj(t){var e=t,n=e.key,r=e.props,o=r.children,i=r.value,a=lt(r,_j);return j({key:n,value:i!==void 0?i:n,children:o},a)}function bp(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return dr(t).map(function(n,r){if(!h.isValidElement(n)||!n.type)return null;var o=n,i=o.type.isSelectOptGroup,a=o.key,s=o.props,l=s.children,c=lt(s,jj);return e||!i?Bj(n):j(j({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:bp(l)})}).filter(function(n){return n})}var zj=function(e,n,r,o,i){return h.useMemo(function(){var a=e,s=!e;s&&(a=bp(n));var l=new Map,c=new Map,u=function(p,m,g){g&&typeof g=="string"&&p.set(m[g],m)},d=function f(p){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=0;g<p.length;g+=1){var v=p[g];!v[r.options]||m?(l.set(v[r.value],v),u(c,v,r.label),u(c,v,o),u(c,v,i)):f(v[r.options],!0)}};return d(a),{options:a,valueOptions:l,labelOptions:c}},[e,n,r,o,i])};function Gv(t){var e=h.useRef();e.current=t;var n=h.useCallback(function(){return e.current.apply(e,arguments)},[]);return n}function Lj(t){var e=t.mode,n=t.options,r=t.children,o=t.backfill,i=t.allowClear,a=t.placeholder,s=t.getInputElement,l=t.showSearch,c=t.onSearch,u=t.defaultOpen,d=t.autoFocus,f=t.labelInValue,p=t.value,m=t.inputValue,g=t.optionLabelProp,v=cc(e),b=l!==void 0?l:v||e==="combobox",y=n||bp(r);if(at(e!=="tags"||y.every(function(w){return!w.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),e==="tags"||e==="combobox"){var C=y.some(function(w){return w.options?w.options.some(function($){return typeof("value"in $?$.value:$.key)=="number"}):typeof("value"in w?w.value:w.key)=="number"});at(!C,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(at(e!=="combobox"||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),at(e==="combobox"||!o,"`backfill` only works with `combobox` mode."),at(e==="combobox"||!s,"`getInputElement` only work with `combobox` mode."),Ud(e!=="combobox"||!s||!i||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),c&&!b&&e!=="combobox"&&e!=="tags"&&at(!1,"`onSearch` should work with `showSearch` instead of use alone."),Ud(!u||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),p!=null){var S=pp(p);at(!f||S.every(function(w){return Ue(w)==="object"&&("key"in w||"value"in w)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),at(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var x=null;dr(r).some(function(w){if(!h.isValidElement(w)||!w.type)return!1;var $=w,R=$.type;if(R.isSelectOption)return!1;if(R.isSelectOptGroup){var M=dr(w.props.children).every(function(O){return!h.isValidElement(O)||!w.type||O.type.isSelectOption?!0:(x=O.type,!1)});return!M}return x=R,!0}),x&&at(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(x.displayName||x.name||x,"`.")),at(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Fj(t,e){if(t){var n=function r(o){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=0;a<o.length;a++){var s=o[a];if(s[e==null?void 0:e.value]===null)return at(!1,"`value` in Select options should not be `null`."),!0;if(!i&&Array.isArray(s[e==null?void 0:e.options])&&r(s[e==null?void 0:e.options],!0))break}};n(t)}}var Hj=["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"],Vj=["inputValue"];function Wj(t){return!t||Ue(t)!=="object"}var qx=h.forwardRef(function(t,e){var n=t.id,r=t.mode,o=t.prefixCls,i=o===void 0?"rc-select":o,a=t.backfill,s=t.fieldNames,l=t.inputValue,c=t.searchValue,u=t.onSearch,d=t.autoClearSearchValue,f=d===void 0?!0:d,p=t.onSelect,m=t.onDeselect,g=t.dropdownMatchSelectWidth,v=g===void 0?!0:g,b=t.filterOption,y=t.filterSort,C=t.optionFilterProp,S=t.optionLabelProp,x=t.options,w=t.optionRender,$=t.children,R=t.defaultActiveFirstOption,M=t.menuItemSelectedIcon,O=t.virtual,N=t.direction,I=t.listHeight,T=I===void 0?200:I,P=t.listItemHeight,A=P===void 0?20:P,k=t.labelRender,B=t.value,_=t.defaultValue,F=t.labelInValue,H=t.onChange,K=t.maxCount,V=lt(t,Hj),W=Dj(n),z=cc(r),L=!!(!x&&$),J=h.useMemo(function(){return b===void 0&&r==="combobox"?!1:b},[b,r]),ne=h.useMemo(function(){return zx(s,L)},[JSON.stringify(s),L]),q=en("",{value:c!==void 0?c:l,postState:function(Ce){return Ce||""}}),re=X(q,2),ae=re[0],ee=re[1],Y=zj(x,$,ne,C,S),te=Y.valueOptions,Z=Y.labelOptions,Q=Y.options,ie=h.useCallback(function(ze){var Ce=pp(ze);return Ce.map(function(Ke){var Le,Fe,Qe,Et,vt;if(Wj(Ke))Le=Ke;else{var Ht;Qe=Ke.key,Fe=Ke.label,Le=(Ht=Ke.value)!==null&&Ht!==void 0?Ht:Qe}var Ct=te.get(Le);if(Ct){var Nt;if(Fe===void 0&&(Fe=Ct==null?void 0:Ct[S||ne.label]),Qe===void 0&&(Qe=(Nt=Ct==null?void 0:Ct.key)!==null&&Nt!==void 0?Nt:Le),Et=Ct==null?void 0:Ct.disabled,vt=Ct==null?void 0:Ct.title,process.env.NODE_ENV!=="production"&&!S){var Dt=Ct==null?void 0:Ct[ne.label];Dt!==void 0&&!h.isValidElement(Dt)&&!h.isValidElement(Fe)&&Dt!==Fe&&at(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:Fe,value:Le,key:Qe,disabled:Et,title:vt}})},[ne,S,te]),ce=en(_,{value:B}),se=X(ce,2),le=se[0],be=se[1],ye=h.useMemo(function(){var ze,Ce=z&&le===null?[]:le,Ke=ie(Ce);return r==="combobox"&&H_((ze=Ke[0])===null||ze===void 0?void 0:ze.value)?[]:Ke},[le,ie,r,z]),Be=Pj(ye,te),de=X(Be,2),ue=de[0],pe=de[1],Ae=h.useMemo(function(){if(!r&&ue.length===1){var ze=ue[0];if(ze.value===null&&(ze.label===null||ze.label===void 0))return[]}return ue.map(function(Ce){var Ke;return j(j({},Ce),{},{label:(Ke=typeof k=="function"?k(Ce):Ce.label)!==null&&Ke!==void 0?Ke:Ce.value})})},[r,ue,k]),_e=h.useMemo(function(){return new Set(ue.map(function(ze){return ze.value}))},[ue]);h.useEffect(function(){if(r==="combobox"){var ze,Ce=(ze=ue[0])===null||ze===void 0?void 0:ze.value;ee(F_(Ce)?String(Ce):"")}},[ue]);var Re=Gv(function(ze,Ce){var Ke=Ce??ze;return D(D({},ne.value,ze),ne.label,Ke)}),$e=h.useMemo(function(){if(r!=="tags")return Q;var ze=he(Q),Ce=function(Le){return te.has(Le)};return he(ue).sort(function(Ke,Le){return Ke.value<Le.value?-1:1}).forEach(function(Ke){var Le=Ke.value;Ce(Le)||ze.push(Re(Le,Ke.label))}),ze},[Re,Q,te,ue,r]),We=Tj($e,ne,ae,J,C),ke=h.useMemo(function(){return r!=="tags"||!ae||We.some(function(ze){return ze[C||"value"]===ae})||We.some(function(ze){return ze[ne.value]===ae})?We:[Re(ae)].concat(he(We))},[Re,C,r,We,ae,ne]),De=function ze(Ce){var Ke=he(Ce).sort(function(Le,Fe){return y(Le,Fe,{searchValue:ae})});return Ke.map(function(Le){return Array.isArray(Le.options)?j(j({},Le),{},{options:Le.options.length>0?ze(Le.options):Le.options}):Le})},me=h.useMemo(function(){return y?De(ke):ke},[ke,y,ae]),Ne=h.useMemo(function(){return sj(me,{fieldNames:ne,childrenAsData:L})},[me,ne,L]),Ze=function(Ce){var Ke=ie(Ce);if(be(Ke),H&&(Ke.length!==ue.length||Ke.some(function(Qe,Et){var vt;return((vt=ue[Et])===null||vt===void 0?void 0:vt.value)!==(Qe==null?void 0:Qe.value)}))){var Le=F?Ke:Ke.map(function(Qe){return Qe.value}),Fe=Ke.map(function(Qe){return Kf(pe(Qe.value))});H(z?Le:Le[0],z?Fe:Fe[0])}},Ie=h.useState(null),xe=X(Ie,2),ot=xe[0],ft=xe[1],Tt=h.useState(0),Bt=X(Tt,2),Pe=Bt[0],Se=Bt[1],Xe=R!==void 0?R:r!=="combobox",Ge=h.useCallback(function(ze,Ce){var Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Le=Ke.source,Fe=Le===void 0?"keyboard":Le;Se(Ce),a&&r==="combobox"&&ze!==null&&Fe==="keyboard"&&ft(String(ze))},[a,r]),et=function(Ce,Ke,Le){var Fe=function(){var Wt,It=pe(Ce);return[F?{label:It==null?void 0:It[ne.label],value:Ce,key:(Wt=It==null?void 0:It.key)!==null&&Wt!==void 0?Wt:Ce}:Ce,Kf(It)]};if(Ke&&p){var Qe=Fe(),Et=X(Qe,2),vt=Et[0],Ht=Et[1];p(vt,Ht)}else if(!Ke&&m&&Le!=="clear"){var Ct=Fe(),Nt=X(Ct,2),Dt=Nt[0],Vt=Nt[1];m(Dt,Vt)}},je=Gv(function(ze,Ce){var Ke,Le=z?Ce.selected:!0;Le?Ke=z?[].concat(he(ue),[ze]):[ze]:Ke=ue.filter(function(Fe){return Fe.value!==ze}),Ze(Ke),et(ze,Le),r==="combobox"?ft(""):(!cc||f)&&(ee(""),ft(""))}),we=function(Ce,Ke){Ze(Ce);var Le=Ke.type,Fe=Ke.values;(Le==="remove"||Le==="clear")&&Fe.forEach(function(Qe){et(Qe.value,!1,Le)})},Ee=function(Ce,Ke){if(ee(Ce),ft(null),Ke.source==="submit"){var Le=(Ce||"").trim();if(Le){var Fe=Array.from(new Set([].concat(he(_e),[Le])));Ze(Fe),et(Le,!0),ee("")}return}Ke.source!=="blur"&&(r==="combobox"&&Ze(Ce),u==null||u(Ce))},ut=function(Ce){var Ke=Ce;r!=="tags"&&(Ke=Ce.map(function(Fe){var Qe=Z.get(Fe);return Qe==null?void 0:Qe.value}).filter(function(Fe){return Fe!==void 0}));var Le=Array.from(new Set([].concat(he(_e),he(Ke))));Ze(Le),Le.forEach(function(Fe){et(Fe,!0)})},ht=h.useMemo(function(){var ze=O!==!1&&v!==!1;return j(j({},Y),{},{flattenOptions:Ne,onActiveValue:Ge,defaultActiveFirstOption:Xe,onSelect:je,menuItemSelectedIcon:M,rawValues:_e,fieldNames:ne,virtual:ze,direction:N,listHeight:T,listItemHeight:A,childrenAsData:L,maxCount:K,optionRender:w})},[K,Y,Ne,Ge,Xe,je,M,_e,ne,O,v,N,T,A,L,w]);return process.env.NODE_ENV!=="production"&&(Lj(t),Fj(Q,ne)),h.createElement(mp.Provider,{value:ht},h.createElement(Lx,ge({},V,{id:W,prefixCls:i,ref:e,omitDomProps:Vj,mode:r,displayValues:Ae,onDisplayValuesChange:we,direction:N,searchValue:ae,onSearch:Ee,autoClearSearchValue:f,onSearchSplit:ut,dropdownMatchSelectWidth:v,OptionList:Wx,emptyOptions:!Ne.length,activeValue:ot,activeDescendantId:"".concat(W,"_list_").concat(Pe)})))});process.env.NODE_ENV!=="production"&&(qx.displayName="Select");var yp=qx;yp.Option=vp;yp.OptGroup=gp;function $i(t,e,n){return G.cn({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const js=(t,e)=>e||t,Kx=()=>{const[,t]=er(),[e]=Qr("Empty"),r=new Pt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return h.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(e==null?void 0:e.description)||"Empty"),h.createElement("g",{fill:"none",fillRule:"evenodd"},h.createElement("g",{transform:"translate(24 31.67)"},h.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),h.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"}),h.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)"}),h.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"}),h.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"})),h.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"}),h.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},h.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),h.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(Kx.displayName="EmptyImage");const Gx=()=>{const[,t]=er(),[e]=Qr("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=t,{borderColor:a,shadowColor:s,contentColor:l}=E.useMemo(()=>({borderColor:new Pt(n).onBackground(i).toHexString(),shadowColor:new Pt(r).onBackground(i).toHexString(),contentColor:new Pt(o).onBackground(i).toHexString()}),[n,r,o,i]);return h.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(e==null?void 0:e.description)||"Empty"),h.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},h.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),h.createElement("g",{fillRule:"nonzero",stroke:a},h.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"}),h.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:l}))))};process.env.NODE_ENV!=="production"&&(Gx.displayName="SimpleImage");const qj=t=>{const{componentCls:e,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=t;return{[e]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:r,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:r,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},Kj=Yt("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:r}=t,o=Mt(t,{emptyImgCls:`${e}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[qj(o)]});var Gj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Ux=h.createElement(Kx,null),Xx=h.createElement(Gx,null),Ro=t=>{const{className:e,rootClassName:n,prefixCls:r,image:o=Ux,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=t,d=Gj(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:p,className:m,style:g,classNames:v,styles:b}=hr("empty"),y=f("empty",r),[C,S,x]=Kj(y),[w]=Qr("Empty"),$=typeof i<"u"?i:w==null?void 0:w.description,R=typeof $=="string"?$:"empty";let M=null;if(typeof o=="string"?M=h.createElement("img",{alt:R,src:o}):M=o,process.env.NODE_ENV!=="production"){const O=Kt("Empty");[["imageStyle","styles: { image: {} }"]].forEach(([N,I])=>{O.deprecated(!(N in t),N,I)})}return C(h.createElement("div",Object.assign({className:G.cn(S,x,y,m,{[`${y}-normal`]:o===Xx,[`${y}-rtl`]:p==="rtl"},e,n,v.root,c==null?void 0:c.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},b.root),g),u==null?void 0:u.root),l)},d),h.createElement("div",{className:G.cn(`${y}-image`,v.image,c==null?void 0:c.image),style:Object.assign(Object.assign(Object.assign({},s),b.image),u==null?void 0:u.image)},M),$&&h.createElement("div",{className:G.cn(`${y}-description`,v.description,c==null?void 0:c.description),style:Object.assign(Object.assign({},b.description),u==null?void 0:u.description)},$),a&&h.createElement("div",{className:G.cn(`${y}-footer`,v.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},b.footer),u==null?void 0:u.footer)},a)))};Ro.PRESENTED_IMAGE_DEFAULT=Ux;Ro.PRESENTED_IMAGE_SIMPLE=Xx;process.env.NODE_ENV!=="production"&&(Ro.displayName="Empty");const Uj=t=>{const{componentName:e}=t,{getPrefixCls:n}=E.useContext(gt),r=n("empty");switch(e){case"Table":case"List":return E.createElement(Ro,{image:Ro.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return E.createElement(Ro,{image:Ro.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return E.createElement(Ro,null)}},tu=(t,e,n=void 0)=>{var r,o;const{variant:i,[t]:a}=h.useContext(gt),s=h.useContext(O2),l=a==null?void 0:a.variant;let c;typeof e<"u"?c=e:n===!1?c="borderless":c=(o=(r=s??l)!==null&&r!==void 0?r:i)!==null&&o!==void 0?o:"outlined";const u=gP.includes(c);return[c,u]},Xj=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function Yj(t,e){return t||Xj(e)}const Uv=t=>{const{optionHeight:e,optionFontSize:n,optionLineHeight:r,optionPadding:o}=t;return{position:"relative",display:"block",minHeight:e,padding:o,color:t.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},Jj=t=>{const{antCls:e,componentCls:n}=t,r=`${n}-item`,o=`&${e}-slide-up-enter${e}-slide-up-enter-active`,i=`&${e}-slide-up-appear${e}-slide-up-appear-active`,a=`&${e}-slide-up-leave${e}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},An(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[`
302
302
  ${o}${s}bottomLeft,
303
303
  ${i}${s}bottomLeft
304
304
  `]:{animationName:np},[`
@@ -324,7 +324,7 @@ html body {
324
324
  `]:{paddingInlineEnd:t.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${U(r)}`,[`${n}-selection-search-input`]:{height:i,fontSize:t.fontSize},"&:after":{lineHeight:U(i)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${U(r)}`,"&:after":{display:"none"}}}}}}}function rB(t){const{componentCls:e}=t,n=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[hd(t),hd(Mt(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{padding:`0 ${U(n)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(n).add(t.calc(t.fontSize).mul(1.5)).equal()},[`
325
325
  &${e}-show-arrow ${e}-selection-item,
326
326
  &${e}-show-arrow ${e}-selection-placeholder
327
- `]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},hd(Mt(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const oB=t=>{const{fontSize:e,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:g,colorBgContainerDisabled:v,colorTextDisabled:b,colorPrimaryHover:y,colorPrimary:C,controlOutline:S}=t,x=s*2,w=r*2,$=Math.min(o-x,o-w),R=Math.min(i-x,i-w),M=Math.min(a-x,a-w);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(o-e*n)/2}px ${l}px`,optionFontSize:e,optionLineHeight:n,optionHeight:o,selectorBg:m,clearBg:m,singleItemHeightLG:a,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:$,multipleItemHeightSM:R,multipleItemHeightLG:M,multipleSelectorBgDisabled:v,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:y,activeBorderColor:C,activeOutlineColor:S,selectAffixPadding:s}},Yx=(t,e)=>{const{componentCls:n,antCls:r,controlOutlineWidth:o}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${U(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${U(o)} ${e.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:e.color}}}},Xv=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},Yx(t,e))}),iB=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Yx(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Xv(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Xv(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${U(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),Jx=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${U(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:e.hoverBg},[`${n}-focused& ${n}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},Yv=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},Jx(t,e))}),aB=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},Jx(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),Yv(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),Yv(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${U(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),sB=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${U(t.lineWidth)} ${t.lineType} transparent`},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${U(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),Zx=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${U(t.lineWidth)} 0`,borderStyle:`none none ${t.lineType} none`,borderColor:e.borderColor,background:t.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,outline:0},[`${n}-prefix`]:{color:e.color}}}},Jv=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},Zx(t,e))}),lB=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},Zx(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Jv(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Jv(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${U(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),cB=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},iB(t)),aB(t)),sB(t)),lB(t))}),uB=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},dB=t=>{const{componentCls:e}=t;return{[`${e}-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"}}}},fB=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=t,i={[`${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},An(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},uB(t)),dB(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},gs),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},gs),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},Ii()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[o]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:t.colorIcon}},"@media(hover:none)":i,"&:hover":i}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(r).add(t.fontSize).add(t.paddingXS).equal()}}}}}},hB=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},fB(t),rB(t),nB(t),Jj(t),{[`${e}-rtl`]:{direction:"rtl"}},Ps(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},pB=Yt("Select",(t,{rootPrefixCls:e})=>{const n=Mt(t,{rootPrefixCls:e,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[hB(n),cB(n)]},oB,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var mB={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"},gB=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:mB}))},Qx=h.forwardRef(gB);process.env.NODE_ENV!=="production"&&(Qx.displayName="CheckOutlined");var vB={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"},bB=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:vB}))},Cp=h.forwardRef(bB);process.env.NODE_ENV!=="production"&&(Cp.displayName="DownOutlined");var yB={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"},CB=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:yB}))},Sp=h.forwardRef(CB);process.env.NODE_ENV!=="production"&&(Sp.displayName="SearchOutlined");function SB({suffixIcon:t,clearIcon:e,menuItemSelectedIcon:n,removeIcon:r,loading:o,multiple:i,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:d}){process.env.NODE_ENV!=="production"&&Kt(d).deprecated(!e,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const f=e??h.createElement(zc,null),p=b=>t===null&&!a&&!u?null:h.createElement(h.Fragment,null,l!==!1&&b,a&&c);let m=null;if(t!==void 0)m=p(t);else if(o)m=p(h.createElement(Zh,{spin:!0}));else{const b=`${s}-suffix`;m=({open:y,showSearch:C})=>p(y&&C?h.createElement(Sp,{className:b}):h.createElement(Cp,{className:b}))}let g=null;n!==void 0?g=n:i?g=h.createElement(Qx,null):g=null;let v=null;return r!==void 0?v=r:v=h.createElement(Os,null),{clearIcon:f,suffixIcon:m,itemIcon:g,removeIcon:v}}function xB(t,e){return e!==void 0?e:t!==null}var wB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const e1="SECRET_COMBOBOX_MODE_DO_NOT_USE",t1=(t,e)=>{var n,r,o,i,a;const{prefixCls:s,bordered:l,className:c,rootClassName:u,getPopupContainer:d,popupClassName:f,dropdownClassName:p,listHeight:m=256,placement:g,listItemHeight:v,size:b,disabled:y,notFoundContent:C,status:S,builtinPlacements:x,dropdownMatchSelectWidth:w,popupMatchSelectWidth:$,direction:R,style:M,allowClear:O,variant:N,dropdownStyle:I,transitionName:T,tagRender:P,maxCount:A,prefix:k,dropdownRender:B,popupRender:_,onDropdownVisibleChange:F,onOpenChange:H,styles:K,classNames:V}=t,W=wB(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:z,getPrefixCls:L,renderEmpty:J,direction:ne,virtual:q,popupMatchSelectWidth:re,popupOverflow:ae}=h.useContext(gt),{showSearch:ee,style:Y,styles:te,className:Z,classNames:Q}=hr("select"),[,oe]=er(),ce=v??(oe==null?void 0:oe.controlHeight),se=L("select",s),le=L(),be=R??ne,{compactSize:ye,compactItemClassnames:Be}=Zo(se,be),[de,ue]=tu("select",N,l),pe=yo(se),[Ae,_e,Re]=pB(se,pe),$e=h.useMemo(()=>{const{mode:Le}=t;if(Le!=="combobox")return Le===e1?"combobox":Le},[t.mode]),We=$e==="multiple"||$e==="tags",ke=xB(t.suffixIcon,t.showArrow),De=(n=$??w)!==null&&n!==void 0?n:re,me=((r=K==null?void 0:K.popup)===null||r===void 0?void 0:r.root)||((o=te.popup)===null||o===void 0?void 0:o.root)||I,Ne=_||B,Ze=H||F,{status:Ie,hasFeedback:xe,isFormItemInput:ot,feedbackIcon:ft}=h.useContext(wr),Tt=js(Ie,S);let Bt;C!==void 0?Bt=C:$e==="combobox"?Bt=null:Bt=(J==null?void 0:J("Select"))||h.createElement(Uj,{componentName:"Select"});const{suffixIcon:Pe,itemIcon:Se,removeIcon:Xe,clearIcon:Ge}=SB(Object.assign(Object.assign({},W),{multiple:We,hasFeedback:xe,feedbackIcon:ft,showSuffixIcon:ke,prefixCls:se,componentName:"Select"})),et=O===!0?{clearIcon:Ge}:O,je=vn(W,["suffixIcon","itemIcon"]),we=G.cn(((i=V==null?void 0:V.popup)===null||i===void 0?void 0:i.root)||((a=Q==null?void 0:Q.popup)===null||a===void 0?void 0:a.root)||f||p,{[`${se}-dropdown-${be}`]:be==="rtl"},u,Q.root,V==null?void 0:V.root,Re,pe,_e),Ee=Er(Le=>{var Fe;return(Fe=b??ye)!==null&&Fe!==void 0?Fe:Le}),ut=h.useContext(Dr),ht=y??ut,ze=G.cn({[`${se}-lg`]:Ee==="large",[`${se}-sm`]:Ee==="small",[`${se}-rtl`]:be==="rtl",[`${se}-${de}`]:ue,[`${se}-in-form-item`]:ot},$i(se,Tt,xe),Be,Z,c,Q.root,V==null?void 0:V.root,u,Re,pe,_e),Ce=h.useMemo(()=>g!==void 0?g:be==="rtl"?"bottomRight":"bottomLeft",[g,be]);if(process.env.NODE_ENV!=="production"){const Le=Kt("Select");Object.entries({dropdownMatchSelectWidth:"popupMatchSelectWidth",dropdownStyle:"styles.popup.root",dropdownClassName:"classNames.popup.root",popupClassName:"classNames.popup.root",dropdownRender:"popupRender",onDropdownVisibleChange:"onOpenChange",bordered:"variant"}).forEach(([Qe,Et])=>{Le.deprecated(!(Qe in t),Qe,Et)}),process.env.NODE_ENV!=="production"&&Le(!("showArrow"in t),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),process.env.NODE_ENV!=="production"&&Le(!(typeof A<"u"&&!We),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[Ke]=Ns("SelectLike",me==null?void 0:me.zIndex);return Ae(h.createElement(yp,Object.assign({ref:e,virtual:q,showSearch:ee},je,{style:Object.assign(Object.assign(Object.assign(Object.assign({},te.root),K==null?void 0:K.root),Y),M),dropdownMatchSelectWidth:De,transitionName:Ei(le,"slide-up",T),builtinPlacements:Yj(x,ae),listHeight:m,listItemHeight:ce,mode:$e,prefixCls:se,placement:Ce,direction:be,prefix:k,suffixIcon:Pe,menuItemSelectedIcon:Se,removeIcon:Xe,allowClear:et,notFoundContent:Bt,className:ze,getPopupContainer:d||z,dropdownClassName:we,disabled:ht,dropdownStyle:Object.assign(Object.assign({},me),{zIndex:Ke}),maxCount:We?A:void 0,tagRender:We?P:void 0,dropdownRender:Ne,onDropdownVisibleChange:Ze})))};process.env.NODE_ENV!=="production"&&(t1.displayName="Select");const ir=h.forwardRef(t1),EB=dp(ir,"dropdownAlign");ir.SECRET_COMBOBOX_MODE_DO_NOT_USE=e1;ir.Option=vp;ir.OptGroup=gp;ir._InternalPanelDoNotUseOrYouWillBeFired=EB;process.env.NODE_ENV!=="production"&&(ir.displayName="Select");const $B=(t,e)=>{typeof(t==null?void 0:t.addEventListener)<"u"?t.addEventListener("change",e):typeof(t==null?void 0:t.addListener)<"u"&&t.addListener(e)},OB=(t,e)=>{typeof(t==null?void 0:t.removeEventListener)<"u"?t.removeEventListener("change",e):typeof(t==null?void 0:t.removeListener)<"u"&&t.removeListener(e)},uc=t=>t?typeof t=="function"?t():t:null;function xp(t){var e=t.children,n=t.prefixCls,r=t.id,o=t.overlayInnerStyle,i=t.bodyClassName,a=t.className,s=t.style;return h.createElement("div",{className:G.cn("".concat(n,"-content"),a),style:s},h.createElement("div",{className:G.cn("".concat(n,"-inner"),i),id:r,role:"tooltip",style:o},typeof e=="function"?e():e))}var Hi={shiftX:64,adjustY:1},Vi={adjustX:1,shiftY:!0},vr=[0,0],MB={left:{points:["cr","cl"],overflow:Vi,offset:[-4,0],targetOffset:vr},right:{points:["cl","cr"],overflow:Vi,offset:[4,0],targetOffset:vr},top:{points:["bc","tc"],overflow:Hi,offset:[0,-4],targetOffset:vr},bottom:{points:["tc","bc"],overflow:Hi,offset:[0,4],targetOffset:vr},topLeft:{points:["bl","tl"],overflow:Hi,offset:[0,-4],targetOffset:vr},leftTop:{points:["tr","tl"],overflow:Vi,offset:[-4,0],targetOffset:vr},topRight:{points:["br","tr"],overflow:Hi,offset:[0,-4],targetOffset:vr},rightTop:{points:["tl","tr"],overflow:Vi,offset:[4,0],targetOffset:vr},bottomRight:{points:["tr","br"],overflow:Hi,offset:[0,4],targetOffset:vr},rightBottom:{points:["bl","br"],overflow:Vi,offset:[4,0],targetOffset:vr},bottomLeft:{points:["tl","bl"],overflow:Hi,offset:[0,4],targetOffset:vr},leftBottom:{points:["br","bl"],overflow:Vi,offset:[-4,0],targetOffset:vr}},NB=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],RB=function(e,n){var r=e.overlayClassName,o=e.trigger,i=o===void 0?["hover"]:o,a=e.mouseEnterDelay,s=a===void 0?0:a,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,d=e.prefixCls,f=d===void 0?"rc-tooltip":d,p=e.children,m=e.onVisibleChange,g=e.afterVisibleChange,v=e.transitionName,b=e.animation,y=e.motion,C=e.placement,S=C===void 0?"right":C,x=e.align,w=x===void 0?{}:x,$=e.destroyTooltipOnHide,R=$===void 0?!1:$,M=e.defaultVisible,O=e.getTooltipContainer,N=e.overlayInnerStyle;e.arrowContent;var I=e.overlay,T=e.id,P=e.showArrow,A=P===void 0?!0:P,k=e.classNames,B=e.styles,_=lt(e,NB),F=Yc(T),H=E.useRef(null);E.useImperativeHandle(n,function(){return H.current});var K=j({},_);"visible"in e&&(K.popupVisible=e.visible);var V=function(){return h.createElement(xp,{key:"content",prefixCls:f,id:F,bodyClassName:k==null?void 0:k.body,overlayInnerStyle:j(j({},N),B==null?void 0:B.body)},I)},W=function(){var L=h.Children.only(p),J=(L==null?void 0:L.props)||{},ne=j(j({},J),{},{"aria-describedby":I?F:null});return h.cloneElement(p,ne)};return h.createElement(eu,ge({popupClassName:G.cn(r,k==null?void 0:k.root),prefixCls:f,popup:V,action:i,builtinPlacements:MB,popupPlacement:S,ref:H,popupAlign:w,getPopupContainer:O,onPopupVisibleChange:m,afterPopupVisibleChange:g,popupTransitionName:v,popupAnimation:b,popupMotion:y,defaultPopupVisible:M,autoDestroy:R,mouseLeaveDelay:c,popupStyle:j(j({},u),B==null?void 0:B.root),mouseEnterDelay:s,arrow:A},K),W())};const IB=E.forwardRef(RB);function wp(t){const{sizePopupArrow:e,borderRadiusXS:n,borderRadiusOuter:r}=t,o=e/2,i=0,a=o,s=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,f=u,p=2*o-s,m=l,g=2*o-i,v=a,b=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),y=r*(Math.sqrt(2)-1),C=`polygon(${y}px 100%, 50% ${y}px, ${2*o-y}px 100%, ${y}px 100%)`,S=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${p} ${m} A ${r} ${r} 0 0 0 ${g} ${v} Z')`;return{arrowShadowWidth:b,arrowPath:S,arrowPolygon:C}}const PB=(t,e,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=t;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${U(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},n1=8;function nu(t){const{contentRadius:e,limitVerticalRadius:n}=t,r=e>12?e+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?n1:r}}function cl(t,e){return t?e:{}}function Ep(t,e,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=t,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},PB(t,e,o)),{"&:before":{background:e}})]},cl(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${U(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),cl(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${U(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),cl(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}})),cl(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}))}}function TB(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=r&&typeof r=="object"?r:{},i={};switch(t){case"top":case"bottom":i.shiftX=e.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=e.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a=Object.assign(Object.assign({},i),o);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Zv={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"]}},AB={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"]}},kB=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function r1(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=t,s=e/2,l={};return Object.keys(Zv).forEach(c=>{const u=r&&AB[c]||Zv[c],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=d,kB.has(c)&&(d.autoArrow=!1),c){case"top":case"topLeft":case"topRight":d.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=s+o;break}const f=nu({contentRadius:i,limitVerticalRadius:!0});if(r)switch(c){case"topLeft":case"bottomLeft":d.offset[0]=-f.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":d.offset[0]=f.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":d.offset[1]=-f.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":d.offset[1]=f.arrowOffsetHorizontal*2-s;break}d.overflow=TB(c,f,e,n),a&&(d.htmlRegion="visibleFirst")}),l}const DB=t=>{const{calc:e,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p}=t,m=e(a).add(p).add(f).equal(),g=e(a).mul(2).add(p).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,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":i,[`${n}-inner`]:{minWidth:g,minHeight:l,padding:`${U(t.calc(u).div(2).equal())} ${U(d)}`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:m},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:t.min(a,n1)}},[`${n}-content`]:{position:"relative"}}),HP(t,(v,{darkColor:b})=>({[`&${n}-${v}`]:{[`${n}-inner`]:{backgroundColor:b},[`${n}-arrow`]:{"--antd-arrow-background-color":b}}}))),{"&-rtl":{direction:"rtl"}})},Ep(t,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},_B=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},nu({contentRadius:t.borderRadius,limitVerticalRadius:!0})),wp(Mt(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),o1=(t,e=!0)=>Yt("Tooltip",r=>{const{borderRadius:o,colorTextLightSolid:i,colorBgSpotlight:a}=r,s=Mt(r,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:o,tooltipBg:a});return[DB(s),Is(r,"zoom-big-fast")]},_B,{resetStyle:!1,injectStyle:e})(t),jB=Vo.map(t=>`${t}-inverse`);function BB(t,e=!0){return e?[].concat(he(jB),he(Vo)).includes(t):Vo.includes(t)}function i1(t,e){const n=BB(e),r=G.cn({[`${t}-${e}`]:e&&n}),o={},i={};return e&&!n&&(o.background=e,i["--antd-arrow-background-color"]=e),{className:r,overlayStyle:o,arrowStyle:i}}const zB=t=>{const{prefixCls:e,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a}=t,{getPrefixCls:s}=h.useContext(gt),l=s("tooltip",e),[c,u,d]=o1(l),f=i1(l,i),p=f.arrowStyle,m=Object.assign(Object.assign({},a),f.overlayStyle),g=G.cn(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(h.createElement("div",{className:g,style:p},h.createElement("div",{className:`${l}-arrow`}),h.createElement(xp,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:m}),o)))};var LB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const FB=h.forwardRef((t,e)=>{var n,r;const{prefixCls:o,openClassName:i,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,destroyOnHidden:p,arrow:m=!0,title:g,overlay:v,builtinPlacements:b,arrowPointAtCenter:y=!1,autoAdjustOverflow:C=!0,motion:S,getPopupContainer:x,placement:w="top",mouseEnterDelay:$=.1,mouseLeaveDelay:R=.1,overlayStyle:M,rootClassName:O,overlayClassName:N,styles:I,classNames:T}=t,P=LB(t,["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"]),A=!!m,[,k]=er(),{getPopupContainer:B,getPrefixCls:_,direction:F,className:H,style:K,classNames:V,styles:W}=hr("tooltip"),z=Kt("Tooltip"),L=h.useRef(null),J=()=>{var ke;(ke=L.current)===null||ke===void 0||ke.forceAlign()};h.useImperativeHandle(e,()=>{var ke,De;return{forceAlign:J,forcePopupAlign:()=>{z.deprecated(!1,"forcePopupAlign","forceAlign"),J()},nativeElement:(ke=L.current)===null||ke===void 0?void 0:ke.nativeElement,popupElement:(De=L.current)===null||De===void 0?void 0:De.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["destroyTooltipOnHide","destroyOnHidden"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName",'classNames={{ root: "" }}']].forEach(([ke,De])=>{z.deprecated(!(ke in t),ke,De)}),process.env.NODE_ENV!=="production"&&z(!f||typeof f=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&z(!m||typeof m=="boolean"||!("arrowPointAtCenter"in m),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[ne,q]=en(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),re=!g&&!v&&g!==0,ae=ke=>{var De,me;q(re?!1:ke),re||((De=t.onOpenChange)===null||De===void 0||De.call(t,ke),(me=t.onVisibleChange)===null||me===void 0||me.call(t,ke))},ee=h.useMemo(()=>{var ke,De;let me=y;return typeof m=="object"&&(me=(De=(ke=m.pointAtCenter)!==null&&ke!==void 0?ke:m.arrowPointAtCenter)!==null&&De!==void 0?De:y),b||r1({arrowPointAtCenter:me,autoAdjustOverflow:C,arrowWidth:A?k.sizePopupArrow:0,borderRadius:k.borderRadius,offset:k.marginXXS,visibleFirst:!0})},[y,m,b,k]),Y=h.useMemo(()=>g===0?g:v||g||"",[v,g]),te=h.createElement(Wo,{space:!0},typeof Y=="function"?Y():Y),Z=_("tooltip",o),Q=_(),oe=t["data-popover-inject"];let ce=ne;!("open"in t)&&!("visible"in t)&&re&&(ce=!1);const se=h.isValidElement(c)&&!$S(c)?c:h.createElement("span",null,c),le=se.props,be=!le.className||typeof le.className=="string"?G.cn(le.className,i||`${Z}-open`):le.className,[ye,Be,de]=o1(Z,!oe),ue=i1(Z,s),pe=ue.arrowStyle,Ae=G.cn(N,{[`${Z}-rtl`]:F==="rtl"},ue.className,O,Be,de,H,V.root,T==null?void 0:T.root),_e=G.cn(V.body,T==null?void 0:T.body),[Re,$e]=Ns("Tooltip",P.zIndex),We=h.createElement(IB,Object.assign({},P,{zIndex:Re,showArrow:A,placement:w,mouseEnterDelay:$,mouseLeaveDelay:R,prefixCls:Z,classNames:{root:Ae,body:_e},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pe),W.root),K),M),I==null?void 0:I.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},W.body),l),I==null?void 0:I.body),ue.overlayStyle)},getTooltipContainer:x||a||B,ref:L,builtinPlacements:ee,overlay:te,visible:ce,onVisibleChange:ae,afterVisibleChange:u??d,arrowContent:h.createElement("span",{className:`${Z}-arrow-content`}),motion:{motionName:Ei(Q,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:p??!!f}),ce?xr(se,{className:be}):se);return ye(h.createElement(Ms.Provider,{value:$e},We))}),qo=FB;process.env.NODE_ENV!=="production"&&(qo.displayName="Tooltip");qo._InternalPanelDoNotUseOrYouWillBeFired=zB;const HB=t=>{const{componentCls:e,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:g}=t;return[{[e]:Object.assign(Object.assign({},An(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:i},[`${e}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:o,borderBottom:p,padding:g},[`${e}-inner-content`]:{color:n,padding:m}})},Ep(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},VB=t=>{const{componentCls:e}=t;return{[e]:Vo.map(n=>{const r=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":r,[`${e}-inner`]:{backgroundColor:r},[`${e}-arrow`]:{background:"transparent"}}}})}},WB=t=>{const{lineWidth:e,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=t,f=n-r,p=f/2,m=f/2-e,g=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},wp(t)),nu({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:l,titlePadding:i?`${p}px ${g}px ${m}px`:0,titleBorderBottom:i?`${e}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${g}px`:0})},a1=Yt("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,r=Mt(t,{popoverBg:e,popoverColor:n});return[HB(r),VB(r),Is(r,"zoom-big")]},WB,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var qB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const s1=({title:t,content:e,prefixCls:n})=>!t&&!e?null:h.createElement(h.Fragment,null,t&&h.createElement("div",{className:`${n}-title`},t),e&&h.createElement("div",{className:`${n}-inner-content`},e)),KB=t=>{const{hashId:e,prefixCls:n,className:r,style:o,placement:i="top",title:a,content:s,children:l}=t,c=uc(a),u=uc(s),d=G.cn(e,n,`${n}-pure`,`${n}-placement-${i}`,r);return h.createElement("div",{className:d,style:o},h.createElement("div",{className:`${n}-arrow`}),h.createElement(xp,Object.assign({},t,{className:e,prefixCls:n}),l||h.createElement(s1,{prefixCls:n,title:c,content:u})))},GB=t=>{const{prefixCls:e,className:n}=t,r=qB(t,["prefixCls","className"]),{getPrefixCls:o}=h.useContext(gt),i=o("popover",e),[a,s,l]=a1(i);return a(h.createElement(KB,Object.assign({},r,{prefixCls:i,hashId:s,className:G.cn(n,l)})))};var UB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const XB=h.forwardRef((t,e)=>{var n,r;const{prefixCls:o,title:i,content:a,overlayClassName:s,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:f=.1,onOpenChange:p,overlayStyle:m={},styles:g,classNames:v}=t,b=UB(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:y,className:C,style:S,classNames:x,styles:w}=hr("popover"),$=y("popover",o),[R,M,O]=a1($),N=y(),I=G.cn(s,M,O,C,x.root,v==null?void 0:v.root),T=G.cn(x.body,v==null?void 0:v.body),[P,A]=en(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),k=(K,V)=>{A(K,!0),p==null||p(K,V)},B=K=>{K.keyCode===Te.ESC&&k(!1,K)},_=K=>{k(K)},F=uc(i),H=uc(a);return R(h.createElement(qo,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},b,{prefixCls:$,classNames:{root:I,body:T},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},w.root),S),m),g==null?void 0:g.root),body:Object.assign(Object.assign({},w.body),g==null?void 0:g.body)},ref:e,open:P,onOpenChange:_,overlay:F||H?h.createElement(s1,{prefixCls:$,title:F,content:H}):null,transitionName:Ei(N,"zoom-big",b.transitionName),"data-popover-inject":!0}),xr(u,{onKeyDown:K=>{var V,W;h.isValidElement(u)&&((W=u==null?void 0:(V=u.props).onKeyDown)===null||W===void 0||W.call(V,K)),B(K)}})))}),$p=XB;$p._InternalPanelDoNotUseOrYouWillBeFired=GB;process.env.NODE_ENV!=="production"&&($p.displayName="Popover");var YB={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"},JB=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:YB}))},dc=h.forwardRef(JB);process.env.NODE_ENV!=="production"&&(dc.displayName="LeftOutlined");var ZB=Te.ESC,QB=Te.TAB;function ez(t){var e=t.visible,n=t.triggerRef,r=t.onVisibleChange,o=t.autoFocus,i=t.overlayRef,a=h.useRef(!1),s=function(){if(e){var d,f;(d=n.current)===null||d===void 0||(f=d.focus)===null||f===void 0||f.call(d),r==null||r(!1)}},l=function(){var d;return(d=i.current)!==null&&d!==void 0&&d.focus?(i.current.focus(),a.current=!0,!0):!1},c=function(d){switch(d.keyCode){case ZB:s();break;case QB:{var f=!1;a.current||(f=l()),f?d.preventDefault():s();break}}};h.useEffect(function(){return e?(window.addEventListener("keydown",c),o&&wt(l,3),function(){window.removeEventListener("keydown",c),a.current=!1}):function(){a.current=!1}},[e])}var tz=E.forwardRef(function(t,e){var n=t.overlay,r=t.arrow,o=t.prefixCls,i=E.useMemo(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),a=Qn(e,Ni(i));return E.createElement(E.Fragment,null,r&&E.createElement("div",{className:"".concat(o,"-arrow")}),E.cloneElement(i,{ref:Jo(i)?a:void 0}))}),Wi={adjustX:1,adjustY:1},qi=[0,0],nz={topLeft:{points:["bl","tl"],overflow:Wi,offset:[0,-4],targetOffset:qi},top:{points:["bc","tc"],overflow:Wi,offset:[0,-4],targetOffset:qi},topRight:{points:["br","tr"],overflow:Wi,offset:[0,-4],targetOffset:qi},bottomLeft:{points:["tl","bl"],overflow:Wi,offset:[0,4],targetOffset:qi},bottom:{points:["tc","bc"],overflow:Wi,offset:[0,4],targetOffset:qi},bottomRight:{points:["tr","br"],overflow:Wi,offset:[0,4],targetOffset:qi}},rz=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function oz(t,e){var n,r=t.arrow,o=r===void 0?!1:r,i=t.prefixCls,a=i===void 0?"rc-dropdown":i,s=t.transitionName,l=t.animation,c=t.align,u=t.placement,d=u===void 0?"bottomLeft":u,f=t.placements,p=f===void 0?nz:f,m=t.getPopupContainer,g=t.showAction,v=t.hideAction,b=t.overlayClassName,y=t.overlayStyle,C=t.visible,S=t.trigger,x=S===void 0?["hover"]:S,w=t.autoFocus,$=t.overlay,R=t.children,M=t.onVisibleChange,O=lt(t,rz),N=E.useState(),I=X(N,2),T=I[0],P=I[1],A="visible"in t?C:T,k=E.useRef(null),B=E.useRef(null),_=E.useRef(null);E.useImperativeHandle(e,function(){return k.current});var F=function(q){P(q),M==null||M(q)};ez({visible:A,triggerRef:_,onVisibleChange:F,autoFocus:w,overlayRef:B});var H=function(q){var re=t.onOverlayClick;P(!1),re&&re(q)},K=function(){return E.createElement(tz,{ref:B,overlay:$,prefixCls:a,arrow:o})},V=function(){return typeof $=="function"?K:K()},W=function(){var q=t.minOverlayWidthMatchTrigger,re=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?q:!re},z=function(){var q=t.openClassName;return q!==void 0?q:"".concat(a,"-open")},L=E.cloneElement(R,{className:G.cn((n=R.props)===null||n===void 0?void 0:n.className,A&&z()),ref:Jo(R)?Qn(_,Ni(R)):void 0}),J=v;return!J&&x.indexOf("contextMenu")!==-1&&(J=["click"]),E.createElement(eu,ge({builtinPlacements:p},O,{prefixCls:a,ref:k,popupClassName:G.cn(b,D({},"".concat(a,"-show-arrow"),o)),popupStyle:y,action:x,showAction:g,hideAction:J,popupPlacement:d,popupAlign:c,popupTransitionName:s,popupAnimation:l,popupVisible:A,stretch:W()?"minWidth":"",popup:V(),onPopupVisibleChange:F,onPopupClick:H,getPopupContainer:m}),L)}const iz=E.forwardRef(oz),az=t=>typeof t!="object"&&typeof t!="function"||t===null;var l1=h.createContext(null);function c1(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function u1(t){var e=h.useContext(l1);return c1(e,t)}var sz=["children","locked"],jr=h.createContext(null);function lz(t,e){var n=j({},t);return Object.keys(e).forEach(function(r){var o=e[r];o!==void 0&&(n[r]=o)}),n}function ys(t){var e=t.children,n=t.locked,r=lt(t,sz),o=h.useContext(jr),i=Es(function(){return lz(o,r)},[o,r],function(a,s){return!n&&(a[0]!==s[0]||!da(a[1],s[1],!0))});return h.createElement(jr.Provider,{value:i},e)}var cz=[],d1=h.createContext(null);function ru(){return h.useContext(d1)}var f1=h.createContext(cz);function Ea(t){var e=h.useContext(f1);return h.useMemo(function(){return t!==void 0?[].concat(he(e),[t]):e},[e,t])}var h1=h.createContext(null),Op=h.createContext({});function Qv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Qh(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),o=t.getAttribute("tabindex"),i=Number(o),a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&t.disabled&&(a=null),a!==null&&(a>=0||e&&a<0)}return!1}function uz(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=he(t.querySelectorAll("*")).filter(function(r){return Qv(r,e)});return Qv(t,e)&&n.unshift(t),n}var Xf=Te.LEFT,Yf=Te.RIGHT,Jf=Te.UP,Tl=Te.DOWN,Al=Te.ENTER,p1=Te.ESC,Da=Te.HOME,_a=Te.END,e0=[Jf,Tl,Xf,Yf];function dz(t,e,n,r){var o,i="prev",a="next",s="children",l="parent";if(t==="inline"&&r===Al)return{inlineTrigger:!0};var c=D(D({},Jf,i),Tl,a),u=D(D(D(D({},Xf,n?a:i),Yf,n?i:a),Tl,s),Al,s),d=D(D(D(D(D(D({},Jf,i),Tl,a),Al,s),p1,l),Xf,n?s:l),Yf,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},p=(o=f["".concat(t).concat(e?"":"Sub")])===null||o===void 0?void 0:o[r];switch(p){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function fz(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function hz(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function Mp(t,e){var n=uz(t,!0);return n.filter(function(r){return e.has(r)})}function t0(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var o=Mp(t,e),i=o.length,a=o.findIndex(function(s){return n===s});return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}var Zf=function(e,n){var r=new Set,o=new Map,i=new Map;return e.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(c1(n,a),"']"));s&&(r.add(s),i.set(s,a),o.set(a,s))}),{elements:r,key2element:o,element2key:i}};function pz(t,e,n,r,o,i,a,s,l,c){var u=h.useRef(),d=h.useRef();d.current=e;var f=function(){wt.cancel(u.current)};return h.useEffect(function(){return function(){f()}},[]),function(p){var m=p.which;if([].concat(e0,[Al,p1,Da,_a]).includes(m)){var g=i(),v=Zf(g,r),b=v,y=b.elements,C=b.key2element,S=b.element2key,x=C.get(e),w=hz(x,y),$=S.get(w),R=dz(t,a($,!0).length===1,n,m);if(!R&&m!==Da&&m!==_a)return;(e0.includes(m)||[Da,_a].includes(m))&&p.preventDefault();var M=function(B){if(B){var _=B,F=B.querySelector("a");F!=null&&F.getAttribute("href")&&(_=F);var H=S.get(B);s(H),f(),u.current=wt(function(){d.current===H&&_.focus()})}};if([Da,_a].includes(m)||R.sibling||!w){var O;!w||t==="inline"?O=o.current:O=fz(w);var N,I=Mp(O,y);m===Da?N=I[0]:m===_a?N=I[I.length-1]:N=t0(O,y,w,R.offset),M(N)}else if(R.inlineTrigger)l($);else if(R.offset>0)l($,!0),f(),u.current=wt(function(){v=Zf(g,r);var k=w.getAttribute("aria-controls"),B=document.getElementById(k),_=t0(B,v.elements);M(_)},5);else if(R.offset<0){var T=a($,!0),P=T[T.length-2],A=C.get(P);l(P,!1),M(A)}}c==null||c(p)}}function mz(t){Promise.resolve().then(t)}var Np="__RC_UTIL_PATH_SPLIT__",n0=function(e){return e.join(Np)},gz=function(e){return e.split(Np)},Qf="rc-menu-more";function vz(){var t=h.useState({}),e=X(t,2),n=e[1],r=E.useRef(new Map),o=E.useRef(new Map),i=h.useState([]),a=X(i,2),s=a[0],l=a[1],c=E.useRef(0),u=E.useRef(!1),d=function(){u.current||n({})},f=E.useCallback(function(C,S){process.env.NODE_ENV!=="production"&&at(!r.current.has(C),"Duplicated key '".concat(C,"' used in Menu by path [").concat(S.join(" > "),"]"));var x=n0(S);o.current.set(x,C),r.current.set(C,x),c.current+=1;var w=c.current;mz(function(){w===c.current&&d()})},[]),p=E.useCallback(function(C,S){var x=n0(S);o.current.delete(x),r.current.delete(C)},[]),m=E.useCallback(function(C){l(C)},[]),g=E.useCallback(function(C,S){var x=r.current.get(C)||"",w=gz(x);return S&&s.includes(w[0])&&w.unshift(Qf),w},[s]),v=E.useCallback(function(C,S){return C.filter(function(x){return x!==void 0}).some(function(x){var w=g(x,!0);return w.includes(S)})},[g]),b=function(){var S=he(r.current.keys());return s.length&&S.push(Qf),S},y=E.useCallback(function(C){var S="".concat(r.current.get(C)).concat(Np),x=new Set;return he(o.current.keys()).forEach(function(w){w.startsWith(S)&&x.add(o.current.get(w))}),x},[]);return h.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:p,refreshOverflowKeys:m,isSubPathKey:v,getKeyPath:g,getKeys:b,getSubPathKeys:y}}function Va(t){var e=h.useRef(t);e.current=t;var n=h.useCallback(function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=e.current)===null||r===void 0?void 0:r.call.apply(r,[e].concat(i))},[]);return t?n:void 0}var bz=Math.random().toFixed(5).toString().slice(2),r0=0;function yz(t){var e=en(t,{value:t}),n=X(e,2),r=n[0],o=n[1];return h.useEffect(function(){r0+=1;var i=process.env.NODE_ENV==="test"?"test":"".concat(bz,"-").concat(r0);o("rc-menu-uuid-".concat(i))},[]),r}function m1(t,e,n,r){var o=h.useContext(jr),i=o.activeKey,a=o.onActive,s=o.onInactive,l={active:i===t};return e||(l.onMouseEnter=function(c){n==null||n({key:t,domEvent:c}),a(t)},l.onMouseLeave=function(c){r==null||r({key:t,domEvent:c}),s(t)}),l}function g1(t){var e=h.useContext(jr),n=e.mode,r=e.rtl,o=e.inlineIndent;if(n!=="inline")return null;var i=t;return r?{paddingRight:i*o}:{paddingLeft:i*o}}function v1(t){var e=t.icon,n=t.props,r=t.children,o;return e===null||e===!1?null:(typeof e=="function"?o=h.createElement(e,j({},n)):typeof e!="boolean"&&(o=e),o||r||null)}var Cz=["item"];function fc(t){var e=t.item,n=lt(t,Cz);return Object.defineProperty(n,"item",{get:function(){return at(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e}}),n}var Sz=["title","attribute","elementRef"],xz=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],wz=["active"],Ez=function(t){go(n,t);var e=vo(n);function n(){return ln(this,n),e.apply(this,arguments)}return cn(n,[{key:"render",value:function(){var o=this.props,i=o.title,a=o.attribute,s=o.elementRef,l=lt(o,Sz),c=vn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return at(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),h.createElement(Kr.Item,ge({},a,{title:typeof i=="string"?i:void 0},c,{ref:s}))}}]),n}(h.Component),$z=h.forwardRef(function(t,e){var n=t.style,r=t.className,o=t.eventKey,i=t.warnKey,a=t.disabled,s=t.itemIcon,l=t.children,c=t.role,u=t.onMouseEnter,d=t.onMouseLeave,f=t.onClick,p=t.onKeyDown,m=t.onFocus,g=lt(t,xz),v=u1(o),b=h.useContext(jr),y=b.prefixCls,C=b.onItemClick,S=b.disabled,x=b.overflowDisabled,w=b.itemIcon,$=b.selectedKeys,R=b.onActive,M=h.useContext(Op),O=M._internalRenderMenuItem,N="".concat(y,"-item"),I=h.useRef(),T=h.useRef(),P=S||a,A=Yo(e,T),k=Ea(o);process.env.NODE_ENV!=="production"&&i&&at(!1,"MenuItem should not leave undefined `key`.");var B=function(ae){return{key:o,keyPath:he(k).reverse(),item:I.current,domEvent:ae}},_=s||w,F=m1(o,P,u,d),H=F.active,K=lt(F,wz),V=$.includes(o),W=g1(k.length),z=function(ae){if(!P){var ee=B(ae);f==null||f(fc(ee)),C(ee)}},L=function(ae){if(p==null||p(ae),ae.which===Te.ENTER){var ee=B(ae);f==null||f(fc(ee)),C(ee)}},J=function(ae){R(o),m==null||m(ae)},ne={};t.role==="option"&&(ne["aria-selected"]=V);var q=h.createElement(Ez,ge({ref:I,elementRef:A,role:c===null?"none":c||"menuitem",tabIndex:a?null:-1,"data-menu-id":x&&v?null:v},vn(g,["extra"]),K,ne,{component:"li","aria-disabled":a,style:j(j({},W),n),className:G.cn(N,D(D(D({},"".concat(N,"-active"),H),"".concat(N,"-selected"),V),"".concat(N,"-disabled"),P),r),onClick:z,onKeyDown:L,onFocus:J}),l,h.createElement(v1,{props:j(j({},t),{},{isSelected:V}),icon:_}));return O&&(q=O(q,t,{selected:V})),q});function Oz(t,e){var n=t.eventKey,r=ru(),o=Ea(n);return h.useEffect(function(){if(r)return r.registerPath(n,o),function(){r.unregisterPath(n,o)}},[o]),r?null:h.createElement($z,ge({},t,{ref:e}))}const ou=h.forwardRef(Oz);var Mz=["className","children"],Nz=function(e,n){var r=e.className,o=e.children,i=lt(e,Mz),a=h.useContext(jr),s=a.prefixCls,l=a.mode,c=a.rtl;return h.createElement("ul",ge({className:G.cn(s,c&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},i,{"data-menu-list":!0,ref:n}),o)},Rp=h.forwardRef(Nz);Rp.displayName="SubMenuList";function Ip(t,e){return dr(t).map(function(n,r){if(h.isValidElement(n)){var o,i,a=n.key,s=(o=(i=n.props)===null||i===void 0?void 0:i.eventKey)!==null&&o!==void 0?o:a,l=s==null;l&&(s="tmp_key-".concat([].concat(he(e),[r]).join("-")));var c={key:s,eventKey:s};return process.env.NODE_ENV!=="production"&&l&&(c.warnKey=!0),h.cloneElement(n,c)}return n})}var jn={adjustX:1,adjustY:1},Rz={topLeft:{points:["bl","tl"],overflow:jn},topRight:{points:["br","tr"],overflow:jn},bottomLeft:{points:["tl","bl"],overflow:jn},bottomRight:{points:["tr","br"],overflow:jn},leftTop:{points:["tr","tl"],overflow:jn},leftBottom:{points:["br","bl"],overflow:jn},rightTop:{points:["tl","tr"],overflow:jn},rightBottom:{points:["bl","br"],overflow:jn}},Iz={topLeft:{points:["bl","tl"],overflow:jn},topRight:{points:["br","tr"],overflow:jn},bottomLeft:{points:["tl","bl"],overflow:jn},bottomRight:{points:["tr","br"],overflow:jn},rightTop:{points:["tr","tl"],overflow:jn},rightBottom:{points:["br","bl"],overflow:jn},leftTop:{points:["tl","tr"],overflow:jn},leftBottom:{points:["bl","br"],overflow:jn}};function b1(t,e,n){if(e)return e;if(n)return n[t]||n.other}var Pz={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Tz(t){var e=t.prefixCls,n=t.visible,r=t.children,o=t.popup,i=t.popupStyle,a=t.popupClassName,s=t.popupOffset,l=t.disabled,c=t.mode,u=t.onVisibleChange,d=h.useContext(jr),f=d.getPopupContainer,p=d.rtl,m=d.subMenuOpenDelay,g=d.subMenuCloseDelay,v=d.builtinPlacements,b=d.triggerSubMenuAction,y=d.forceSubMenuRender,C=d.rootClassName,S=d.motion,x=d.defaultMotions,w=h.useState(!1),$=X(w,2),R=$[0],M=$[1],O=j(p?j({},Iz):j({},Rz),v),N=Pz[c],I=b1(c,S,x),T=h.useRef(I);c!=="inline"&&(T.current=I);var P=j(j({},T.current),{},{leavedClassName:"".concat(e,"-hidden"),removeOnLeave:!1,motionAppear:!0}),A=h.useRef();return h.useEffect(function(){return A.current=wt(function(){M(n)}),function(){wt.cancel(A.current)}},[n]),h.createElement(eu,{prefixCls:e,popupClassName:G.cn("".concat(e,"-popup"),D({},"".concat(e,"-rtl"),p),a,C),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:O,popupPlacement:N,popupVisible:R,popup:o,popupStyle:i,popupAlign:s&&{offset:s},action:l?[]:[b],mouseEnterDelay:m,mouseLeaveDelay:g,onPopupVisibleChange:u,forceRender:y,popupMotion:P,fresh:!0},r)}function Az(t){var e=t.id,n=t.open,r=t.keyPath,o=t.children,i="inline",a=h.useContext(jr),s=a.prefixCls,l=a.forceSubMenuRender,c=a.motion,u=a.defaultMotions,d=a.mode,f=h.useRef(!1);f.current=d===i;var p=h.useState(!f.current),m=X(p,2),g=m[0],v=m[1],b=f.current?n:!1;h.useEffect(function(){f.current&&v(!1)},[d]);var y=j({},b1(i,c,u));r.length>1&&(y.motionAppear=!1);var C=y.onVisibleChanged;return y.onVisibleChanged=function(S){return!f.current&&!S&&v(!0),C==null?void 0:C(S)},g?null:h.createElement(ys,{mode:i,locked:!f.current},h.createElement(eo,ge({visible:b},y,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(S){var x=S.className,w=S.style;return h.createElement(Rp,{id:e,className:x,style:w},o)}))}var kz=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Dz=["active"],_z=h.forwardRef(function(t,e){var n=t.style,r=t.className,o=t.title,i=t.eventKey,a=t.warnKey,s=t.disabled,l=t.internalPopupClose,c=t.children,u=t.itemIcon,d=t.expandIcon,f=t.popupClassName,p=t.popupOffset,m=t.popupStyle,g=t.onClick,v=t.onMouseEnter,b=t.onMouseLeave,y=t.onTitleClick,C=t.onTitleMouseEnter,S=t.onTitleMouseLeave,x=lt(t,kz),w=u1(i),$=h.useContext(jr),R=$.prefixCls,M=$.mode,O=$.openKeys,N=$.disabled,I=$.overflowDisabled,T=$.activeKey,P=$.selectedKeys,A=$.itemIcon,k=$.expandIcon,B=$.onItemClick,_=$.onOpenChange,F=$.onActive,H=h.useContext(Op),K=H._internalRenderSubMenuItem,V=h.useContext(h1),W=V.isSubPathKey,z=Ea(),L="".concat(R,"-submenu"),J=N||s,ne=h.useRef(),q=h.useRef();process.env.NODE_ENV!=="production"&&a&&at(!1,"SubMenu should not leave undefined `key`.");var re=u??A,ae=d??k,ee=O.includes(i),Y=!I&&ee,te=W(P,i),Z=m1(i,J,C,S),Q=Z.active,oe=lt(Z,Dz),ce=h.useState(!1),se=X(ce,2),le=se[0],be=se[1],ye=function(xe){J||be(xe)},Be=function(xe){ye(!0),v==null||v({key:i,domEvent:xe})},de=function(xe){ye(!1),b==null||b({key:i,domEvent:xe})},ue=h.useMemo(function(){return Q||(M!=="inline"?le||W([T],i):!1)},[M,Q,T,le,i,W]),pe=g1(z.length),Ae=function(xe){J||(y==null||y({key:i,domEvent:xe}),M==="inline"&&_(i,!ee))},_e=Va(function(Ie){g==null||g(fc(Ie)),B(Ie)}),Re=function(xe){M!=="inline"&&_(i,xe)},$e=function(){F(i)},We=w&&"".concat(w,"-popup"),ke=h.useMemo(function(){return h.createElement(v1,{icon:M!=="horizontal"?ae:void 0,props:j(j({},t),{},{isOpen:Y,isSubMenu:!0})},h.createElement("i",{className:"".concat(L,"-arrow")}))},[M,ae,t,Y,L]),De=h.createElement("div",ge({role:"menuitem",style:pe,className:"".concat(L,"-title"),tabIndex:J?null:-1,ref:ne,title:typeof o=="string"?o:null,"data-menu-id":I&&w?null:w,"aria-expanded":Y,"aria-haspopup":!0,"aria-controls":We,"aria-disabled":J,onClick:Ae,onFocus:$e},oe),o,ke),me=h.useRef(M);if(M!=="inline"&&z.length>1?me.current="vertical":me.current=M,!I){var Ne=me.current;De=h.createElement(Tz,{mode:Ne,prefixCls:L,visible:!l&&Y&&M!=="inline",popupClassName:f,popupOffset:p,popupStyle:m,popup:h.createElement(ys,{mode:Ne==="horizontal"?"vertical":Ne},h.createElement(Rp,{id:We,ref:q},c)),disabled:J,onVisibleChange:Re},De)}var Ze=h.createElement(Kr.Item,ge({ref:e,role:"none"},x,{component:"li",style:n,className:G.cn(L,"".concat(L,"-").concat(M),r,D(D(D(D({},"".concat(L,"-open"),Y),"".concat(L,"-active"),ue),"".concat(L,"-selected"),te),"".concat(L,"-disabled"),J)),onMouseEnter:Be,onMouseLeave:de}),De,!I&&h.createElement(Az,{id:We,open:Y,keyPath:z},c));return K&&(Ze=K(Ze,t,{selected:te,active:ue,open:Y,disabled:J})),h.createElement(ys,{onItemClick:_e,mode:M==="horizontal"?"vertical":M,itemIcon:re,expandIcon:ae},Ze)}),Bs=h.forwardRef(function(t,e){var n=t.eventKey,r=t.children,o=Ea(n),i=Ip(r,o),a=ru();h.useEffect(function(){if(a)return a.registerPath(n,o),function(){a.unregisterPath(n,o)}},[o]);var s;return a?s=i:s=h.createElement(_z,ge({ref:e},t),i),h.createElement(f1.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Bs.displayName="SubMenu");function Pp(t){var e=t.className,n=t.style,r=h.useContext(jr),o=r.prefixCls,i=ru();return i?null:h.createElement("li",{role:"separator",className:G.cn("".concat(o,"-item-divider"),e),style:n})}var jz=["className","title","eventKey","children"],Bz=h.forwardRef(function(t,e){var n=t.className,r=t.title;t.eventKey;var o=t.children,i=lt(t,jz),a=h.useContext(jr),s=a.prefixCls,l="".concat(s,"-item-group");return h.createElement("li",ge({ref:e,role:"presentation"},i,{onClick:function(u){return u.stopPropagation()},className:G.cn(l,n)}),h.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),h.createElement("ul",{role:"group",className:"".concat(l,"-list")},o))}),iu=h.forwardRef(function(t,e){var n=t.eventKey,r=t.children,o=Ea(n),i=Ip(r,o),a=ru();return a?i:h.createElement(Bz,ge({ref:e},vn(t,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(iu.displayName="MenuItemGroup");var zz=["label","children","key","type","extra"];function eh(t,e,n){var r=e.item,o=e.group,i=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&Ue(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,p=c.type,m=c.extra,g=lt(c,zz),v=f??"tmp-".concat(l);return d||p==="group"?p==="group"?h.createElement(o,ge({key:v},g,{title:u}),eh(d,e,n)):h.createElement(i,ge({key:v},g,{title:u}),eh(d,e,n)):p==="divider"?h.createElement(a,ge({key:v},g)):h.createElement(r,ge({key:v},g,{extra:m}),u,(!!m||m===0)&&h.createElement("span",{className:"".concat(n,"-item-extra")},m))}return null}).filter(function(s){return s})}function o0(t,e,n,r,o){var i=t,a=j({divider:Pp,item:ou,group:iu,submenu:Bs},r);return e&&(i=eh(e,a,o)),Ip(i,n)}var Lz=["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"],Qo=[],Fz=h.forwardRef(function(t,e){var n,r=t,o=r.prefixCls,i=o===void 0?"rc-menu":o,a=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,f=r.children,p=r.direction,m=r.id,g=r.mode,v=g===void 0?"vertical":g,b=r.inlineCollapsed,y=r.disabled,C=r.disabledOverflow,S=r.subMenuOpenDelay,x=S===void 0?.1:S,w=r.subMenuCloseDelay,$=w===void 0?.1:w,R=r.forceSubMenuRender,M=r.defaultOpenKeys,O=r.openKeys,N=r.activeKey,I=r.defaultActiveFirst,T=r.selectable,P=T===void 0?!0:T,A=r.multiple,k=A===void 0?!1:A,B=r.defaultSelectedKeys,_=r.selectedKeys,F=r.onSelect,H=r.onDeselect,K=r.inlineIndent,V=K===void 0?24:K,W=r.motion,z=r.defaultMotions,L=r.triggerSubMenuAction,J=L===void 0?"hover":L,ne=r.builtinPlacements,q=r.itemIcon,re=r.expandIcon,ae=r.overflowedIndicator,ee=ae===void 0?"...":ae,Y=r.overflowedIndicatorPopupClassName,te=r.getPopupContainer,Z=r.onClick,Q=r.onOpenChange,oe=r.onKeyDown,ce=r.openAnimation,se=r.openTransitionName,le=r._internalRenderMenuItem,be=r._internalRenderSubMenuItem,ye=r._internalComponents,Be=lt(r,Lz),de=h.useMemo(function(){return[o0(f,d,Qo,ye,i),o0(f,d,Qo,{},i)]},[f,d,ye]),ue=X(de,2),pe=ue[0],Ae=ue[1],_e=h.useState(!1),Re=X(_e,2),$e=Re[0],We=Re[1],ke=h.useRef(),De=yz(m),me=p==="rtl";process.env.NODE_ENV!=="production"&&at(!ce&&!se,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var Ne=en(M,{value:O,postState:function(ct){return ct||Qo}}),Ze=X(Ne,2),Ie=Ze[0],xe=Ze[1],ot=function(ct){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function xt(){xe(ct),Q==null||Q(ct)}dt?Ar.flushSync(xt):xt()},ft=h.useState(Ie),Tt=X(ft,2),Bt=Tt[0],Pe=Tt[1],Se=h.useRef(!1),Xe=h.useMemo(function(){return(v==="inline"||v==="vertical")&&b?["vertical",b]:[v,!1]},[v,b]),Ge=X(Xe,2),et=Ge[0],je=Ge[1],we=et==="inline",Ee=h.useState(et),ut=X(Ee,2),ht=ut[0],ze=ut[1],Ce=h.useState(je),Ke=X(Ce,2),Le=Ke[0],Fe=Ke[1];h.useEffect(function(){ze(et),Fe(je),Se.current&&(we?xe(Bt):ot(Qo))},[et,je]);var Qe=h.useState(0),Et=X(Qe,2),vt=Et[0],Ht=Et[1],Ct=vt>=pe.length-1||ht!=="horizontal"||C;h.useEffect(function(){we&&Pe(Ie)},[Ie]),h.useEffect(function(){return Se.current=!0,function(){Se.current=!1}},[]);var Nt=vz(),Dt=Nt.registerPath,Vt=Nt.unregisterPath,Nn=Nt.refreshOverflowKeys,Wt=Nt.isSubPathKey,It=Nt.getKeyPath,Oe=Nt.getKeys,qe=Nt.getSubPathKeys,He=h.useMemo(function(){return{registerPath:Dt,unregisterPath:Vt}},[Dt,Vt]),ve=h.useMemo(function(){return{isSubPathKey:Wt}},[Wt]);h.useEffect(function(){Nn(Ct?Qo:pe.slice(vt+1).map(function(Ve){return Ve.key}))},[vt,Ct]);var nt=en(N||I&&((n=pe[0])===null||n===void 0?void 0:n.key),{value:N}),St=X(nt,2),bt=St[0],Jt=St[1],Zt=Va(function(Ve){Jt(Ve)}),tn=Va(function(){Jt(void 0)});E.useImperativeHandle(e,function(){return{list:ke.current,focus:function(ct){var dt,xt=Oe(),Ot=Zf(xt,De),Sn=Ot.elements,xn=Ot.key2element,Yn=Ot.element2key,tr=Mp(ke.current,Sn),Jn=bt??(tr[0]?Yn.get(tr[0]):(dt=pe.find(function(Ma){return!Ma.props.disabled}))===null||dt===void 0?void 0:dt.key),Dn=xn.get(Jn);if(Jn&&Dn){var mn;Dn==null||(mn=Dn.focus)===null||mn===void 0||mn.call(Dn,ct)}}}});var Ut=en(B||[],{value:_,postState:function(ct){return Array.isArray(ct)?ct:ct==null?Qo:[ct]}}),Qt=X(Ut,2),pn=Qt[0],Rn=Qt[1],dn=function(ct){if(P){var dt=ct.key,xt=pn.includes(dt),Ot;k?xt?Ot=pn.filter(function(xn){return xn!==dt}):Ot=[].concat(he(pn),[dt]):Ot=[dt],Rn(Ot);var Sn=j(j({},ct),{},{selectedKeys:Ot});xt?H==null||H(Sn):F==null||F(Sn)}!k&&Ie.length&&ht!=="inline"&&ot(Qo)},Cn=Va(function(Ve){Z==null||Z(fc(Ve)),dn(Ve)}),Or=Va(function(Ve,ct){var dt=Ie.filter(function(Ot){return Ot!==Ve});if(ct)dt.push(Ve);else if(ht!=="inline"){var xt=qe(Ve);dt=dt.filter(function(Ot){return!xt.has(Ot)})}da(Ie,dt,!0)||ot(dt,!0)}),zr=function(ct,dt){var xt=dt??!Ie.includes(ct);Or(ct,xt)},Xn=pz(ht,bt,me,De,ke,Oe,It,Jt,zr,oe);h.useEffect(function(){We(!0)},[]);var Co=h.useMemo(function(){return{_internalRenderMenuItem:le,_internalRenderSubMenuItem:be}},[le,be]),Lr=ht!=="horizontal"||C?pe:pe.map(function(Ve,ct){return h.createElement(ys,{key:Ve.key,overflowDisabled:ct>vt},Ve)}),pt=h.createElement(Kr,ge({id:m,ref:ke,prefixCls:"".concat(i,"-overflow"),component:"ul",itemComponent:ou,className:G.cn(i,"".concat(i,"-root"),"".concat(i,"-").concat(ht),l,D(D({},"".concat(i,"-inline-collapsed"),Le),"".concat(i,"-rtl"),me),a),dir:p,style:s,role:"menu",tabIndex:u,data:Lr,renderRawItem:function(ct){return ct},renderRawRest:function(ct){var dt=ct.length,xt=dt?pe.slice(-dt):null;return h.createElement(Bs,{eventKey:Qf,title:ee,disabled:Ct,internalPopupClose:dt===0,popupClassName:Y},xt)},maxCount:ht!=="horizontal"||C?Kr.INVALIDATE:Kr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ct){Ht(ct)},onKeyDown:Xn},Be));return h.createElement(Op.Provider,{value:Co},h.createElement(l1.Provider,{value:De},h.createElement(ys,{prefixCls:i,rootClassName:a,mode:ht,openKeys:Ie,rtl:me,disabled:y,motion:$e?W:null,defaultMotions:$e?z:null,activeKey:bt,onActive:Zt,onInactive:tn,selectedKeys:pn,inlineIndent:V,subMenuOpenDelay:x,subMenuCloseDelay:$,forceSubMenuRender:R,builtinPlacements:ne,triggerSubMenuAction:J,getPopupContainer:te,itemIcon:q,expandIcon:re,onItemClick:Cn,onOpenChange:Or},h.createElement(h1.Provider,{value:ve},pt),h.createElement("div",{style:{display:"none"},"aria-hidden":!0},h.createElement(d1.Provider,{value:He},Ae)))))}),zs=Fz;zs.Item=ou;zs.SubMenu=Bs;zs.ItemGroup=iu;zs.Divider=Pp;var Hz={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},Vz=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:Hz}))},y1=h.forwardRef(Vz);process.env.NODE_ENV!=="production"&&(y1.displayName="BarsOutlined");const Wz=h.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),qz=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:i,padding:a,color:s,lineHeight:U(i),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},C1=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=t,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},S1=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];Yt("Layout",t=>[qz(t)],C1,{deprecatedTokens:S1});const Kz=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:g,bodyBg:v}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${e}-children`]:{overflow:"hidden"},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:U(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${U(f)} ${U(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:t.calc(u).mul(-1).equal(),borderRadius:`${U(f)} 0 0 ${U(f)}`}},"&-light":{background:p,[`${e}-trigger`]:{color:m,background:g},[`${e}-zero-width-trigger`]:{color:m,background:g,border:`1px solid ${v}`,borderInlineStart:0}}}}},Gz=Yt(["Layout","Sider"],t=>[Kz(t)],C1,{deprecatedTokens:S1});var Uz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const i0={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Xz=t=>!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Tp=h.createContext({}),Yz=(()=>{let t=0;return(e="")=>(t+=1,`${e}${t}`)})(),Jz=h.forwardRef((t,e)=>{const{prefixCls:n,className:r,trigger:o,children:i,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:g,onBreakpoint:v}=t,b=Uz(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:y}=E.useContext(Wz),[C,S]=E.useState("collapsed"in t?t.collapsed:a),[x,w]=E.useState(!1);E.useEffect(()=>{"collapsed"in t&&S(t.collapsed)},[t.collapsed]);const $=(q,re)=>{"collapsed"in t||S(q),g==null||g(q,re)},{getPrefixCls:R,direction:M}=E.useContext(gt),O=R("layout-sider",n),[N,I,T]=Gz(O),P=E.useRef(null);P.current=q=>{w(q.matches),v==null||v(q.matches),C!==q.matches&&$(q.matches,"responsive")},E.useEffect(()=>{function q(ae){var ee;return(ee=P.current)===null||ee===void 0?void 0:ee.call(P,ae)}let re;return typeof(window==null?void 0:window.matchMedia)<"u"&&m&&m in i0&&(re=window.matchMedia(`screen and (max-width: ${i0[m]})`),$B(re,q),q(re)),()=>{OB(re,q)}},[m]),E.useEffect(()=>{const q=Yz("ant-sider-");return y.addSider(q),()=>y.removeSider(q)},[]);const A=()=>{$(!C,"clickTrigger")},k=vn(b,["collapsed"]),B=C?f:d,_=Xz(B)?`${B}px`:String(B),F=parseFloat(String(f||0))===0?h.createElement("span",{onClick:A,className:G.cn(`${O}-zero-width-trigger`,`${O}-zero-width-trigger-${u?"right":"left"}`),style:p},o||h.createElement(y1,null)):null,H=M==="rtl"==!u,W={expanded:H?h.createElement(vs,null):h.createElement(dc,null),collapsed:H?h.createElement(dc,null):h.createElement(vs,null)}[C?"collapsed":"expanded"],z=o!==null?F||h.createElement("div",{className:`${O}-trigger`,onClick:A,style:{width:_}},o||W):null,L=Object.assign(Object.assign({},l),{flex:`0 0 ${_}`,maxWidth:_,minWidth:_,width:_}),J=G.cn(O,`${O}-${s}`,{[`${O}-collapsed`]:!!C,[`${O}-has-trigger`]:c&&o!==null&&!F,[`${O}-below`]:!!x,[`${O}-zero-width`]:parseFloat(_)===0},r,I,T),ne=h.useMemo(()=>({siderCollapsed:C}),[C]);return N(h.createElement(Tp.Provider,{value:ne},h.createElement("aside",Object.assign({className:J},k,{style:L,ref:e}),h.createElement("div",{className:`${O}-children`},i),c||x&&F?z:null)))});process.env.NODE_ENV!=="production"&&(Jz.displayName="Sider");var Zz={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"},Qz=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:Zz}))},Ap=h.forwardRef(Qz);process.env.NODE_ENV!=="production"&&(Ap.displayName="EllipsisOutlined");const hc=E.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var eL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const x1=t=>{const{prefixCls:e,className:n,dashed:r}=t,o=eL(t,["prefixCls","className","dashed"]),{getPrefixCls:i}=h.useContext(gt),a=i("menu",e),s=G.cn({[`${a}-item-divider-dashed`]:!!r},n);return h.createElement(Pp,Object.assign({className:s},o))},w1=t=>{var e;const{className:n,children:r,icon:o,title:i,danger:a,extra:s}=t,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=h.useContext(hc),p=C=>{const S=r==null?void 0:r[0],x=h.createElement("span",{className:G.cn(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!o||h.isValidElement(r)&&r.type==="span")&&r&&C&&c&&typeof S=="string"?h.createElement("div",{className:`${l}-inline-collapsed-noicon`},S.charAt(0)):x},{siderCollapsed:m}=h.useContext(Tp);let g=i;typeof i>"u"?g=c?r:"":i===!1&&(g="");const v={title:g};!m&&!f&&(v.title=null,v.open=!1);const b=dr(r).length;let y=h.createElement(ou,Object.assign({},vn(t,["title","icon","danger"]),{className:G.cn({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(o?b+1:b)===1},n),title:typeof i=="string"?i:void 0}),xr(o,{className:G.cn(h.isValidElement(o)?(e=o.props)===null||e===void 0?void 0:e.className:"",`${l}-item-icon`)}),p(f));return d||(y=h.createElement(qo,Object.assign({},v,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),y)),y};var tL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const pc=h.createContext(null),nL=h.forwardRef((t,e)=>{const{children:n}=t,r=tL(t,["children"]),o=h.useContext(pc),i=h.useMemo(()=>Object.assign(Object.assign({},o),r),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=uR(n),s=Yo(e,a?Ni(n):null);return h.createElement(pc.Provider,{value:i},h.createElement(Wo,{space:!0},a?h.cloneElement(n,{ref:s}):n))}),rL=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${U(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover,
327
+ `]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},hd(Mt(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const oB=t=>{const{fontSize:e,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:g,colorBgContainerDisabled:v,colorTextDisabled:b,colorPrimaryHover:y,colorPrimary:C,controlOutline:S}=t,x=s*2,w=r*2,$=Math.min(o-x,o-w),R=Math.min(i-x,i-w),M=Math.min(a-x,a-w);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(o-e*n)/2}px ${l}px`,optionFontSize:e,optionLineHeight:n,optionHeight:o,selectorBg:m,clearBg:m,singleItemHeightLG:a,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:$,multipleItemHeightSM:R,multipleItemHeightLG:M,multipleSelectorBgDisabled:v,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:y,activeBorderColor:C,activeOutlineColor:S,selectAffixPadding:s}},Yx=(t,e)=>{const{componentCls:n,antCls:r,controlOutlineWidth:o}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${U(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${U(o)} ${e.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:e.color}}}},Xv=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},Yx(t,e))}),iB=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Yx(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Xv(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Xv(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${U(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),Jx=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${U(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:e.hoverBg},[`${n}-focused& ${n}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},Yv=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},Jx(t,e))}),aB=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},Jx(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),Yv(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),Yv(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${U(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),sB=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${U(t.lineWidth)} ${t.lineType} transparent`},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${U(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),Zx=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${U(t.lineWidth)} 0`,borderStyle:`none none ${t.lineType} none`,borderColor:e.borderColor,background:t.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,outline:0},[`${n}-prefix`]:{color:e.color}}}},Jv=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},Zx(t,e))}),lB=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},Zx(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Jv(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Jv(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${U(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),cB=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},iB(t)),aB(t)),sB(t)),lB(t))}),uB=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},dB=t=>{const{componentCls:e}=t;return{[`${e}-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"}}}},fB=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=t,i={[`${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},An(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},uB(t)),dB(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},gs),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},gs),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},Ii()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[o]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:t.colorIcon}},"@media(hover:none)":i,"&:hover":i}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(r).add(t.fontSize).add(t.paddingXS).equal()}}}}}},hB=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},fB(t),rB(t),nB(t),Jj(t),{[`${e}-rtl`]:{direction:"rtl"}},Ps(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},pB=Yt("Select",(t,{rootPrefixCls:e})=>{const n=Mt(t,{rootPrefixCls:e,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[hB(n),cB(n)]},oB,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var mB={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"},gB=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:mB}))},Qx=h.forwardRef(gB);process.env.NODE_ENV!=="production"&&(Qx.displayName="CheckOutlined");var vB={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"},bB=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:vB}))},Cp=h.forwardRef(bB);process.env.NODE_ENV!=="production"&&(Cp.displayName="DownOutlined");var yB={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"},CB=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:yB}))},Sp=h.forwardRef(CB);process.env.NODE_ENV!=="production"&&(Sp.displayName="SearchOutlined");function SB({suffixIcon:t,clearIcon:e,menuItemSelectedIcon:n,removeIcon:r,loading:o,multiple:i,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:d}){process.env.NODE_ENV!=="production"&&Kt(d).deprecated(!e,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const f=e??h.createElement(zc,null),p=b=>t===null&&!a&&!u?null:h.createElement(h.Fragment,null,l!==!1&&b,a&&c);let m=null;if(t!==void 0)m=p(t);else if(o)m=p(h.createElement(Zh,{spin:!0}));else{const b=`${s}-suffix`;m=({open:y,showSearch:C})=>p(y&&C?h.createElement(Sp,{className:b}):h.createElement(Cp,{className:b}))}let g=null;n!==void 0?g=n:i?g=h.createElement(Qx,null):g=null;let v=null;return r!==void 0?v=r:v=h.createElement(Os,null),{clearIcon:f,suffixIcon:m,itemIcon:g,removeIcon:v}}function xB(t,e){return e!==void 0?e:t!==null}var wB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const e1="SECRET_COMBOBOX_MODE_DO_NOT_USE",t1=(t,e)=>{var n,r,o,i,a;const{prefixCls:s,bordered:l,className:c,rootClassName:u,getPopupContainer:d,popupClassName:f,dropdownClassName:p,listHeight:m=256,placement:g,listItemHeight:v,size:b,disabled:y,notFoundContent:C,status:S,builtinPlacements:x,dropdownMatchSelectWidth:w,popupMatchSelectWidth:$,direction:R,style:M,allowClear:O,variant:N,dropdownStyle:I,transitionName:T,tagRender:P,maxCount:A,prefix:k,dropdownRender:B,popupRender:_,onDropdownVisibleChange:F,onOpenChange:H,styles:K,classNames:V}=t,W=wB(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:z,getPrefixCls:L,renderEmpty:J,direction:ne,virtual:q,popupMatchSelectWidth:re,popupOverflow:ae}=h.useContext(gt),{showSearch:ee,style:Y,styles:te,className:Z,classNames:Q}=hr("select"),[,ie]=er(),ce=v??(ie==null?void 0:ie.controlHeight),se=L("select",s),le=L(),be=R??ne,{compactSize:ye,compactItemClassnames:Be}=Zo(se,be),[de,ue]=tu("select",N,l),pe=yo(se),[Ae,_e,Re]=pB(se,pe),$e=h.useMemo(()=>{const{mode:Le}=t;if(Le!=="combobox")return Le===e1?"combobox":Le},[t.mode]),We=$e==="multiple"||$e==="tags",ke=xB(t.suffixIcon,t.showArrow),De=(n=$??w)!==null&&n!==void 0?n:re,me=((r=K==null?void 0:K.popup)===null||r===void 0?void 0:r.root)||((o=te.popup)===null||o===void 0?void 0:o.root)||I,Ne=_||B,Ze=H||F,{status:Ie,hasFeedback:xe,isFormItemInput:ot,feedbackIcon:ft}=h.useContext(wr),Tt=js(Ie,S);let Bt;C!==void 0?Bt=C:$e==="combobox"?Bt=null:Bt=(J==null?void 0:J("Select"))||h.createElement(Uj,{componentName:"Select"});const{suffixIcon:Pe,itemIcon:Se,removeIcon:Xe,clearIcon:Ge}=SB(Object.assign(Object.assign({},W),{multiple:We,hasFeedback:xe,feedbackIcon:ft,showSuffixIcon:ke,prefixCls:se,componentName:"Select"})),et=O===!0?{clearIcon:Ge}:O,je=vn(W,["suffixIcon","itemIcon"]),we=G.cn(((i=V==null?void 0:V.popup)===null||i===void 0?void 0:i.root)||((a=Q==null?void 0:Q.popup)===null||a===void 0?void 0:a.root)||f||p,{[`${se}-dropdown-${be}`]:be==="rtl"},u,Q.root,V==null?void 0:V.root,Re,pe,_e),Ee=Er(Le=>{var Fe;return(Fe=b??ye)!==null&&Fe!==void 0?Fe:Le}),ut=h.useContext(Dr),ht=y??ut,ze=G.cn({[`${se}-lg`]:Ee==="large",[`${se}-sm`]:Ee==="small",[`${se}-rtl`]:be==="rtl",[`${se}-${de}`]:ue,[`${se}-in-form-item`]:ot},$i(se,Tt,xe),Be,Z,c,Q.root,V==null?void 0:V.root,u,Re,pe,_e),Ce=h.useMemo(()=>g!==void 0?g:be==="rtl"?"bottomRight":"bottomLeft",[g,be]);if(process.env.NODE_ENV!=="production"){const Le=Kt("Select");Object.entries({dropdownMatchSelectWidth:"popupMatchSelectWidth",dropdownStyle:"styles.popup.root",dropdownClassName:"classNames.popup.root",popupClassName:"classNames.popup.root",dropdownRender:"popupRender",onDropdownVisibleChange:"onOpenChange",bordered:"variant"}).forEach(([Qe,Et])=>{Le.deprecated(!(Qe in t),Qe,Et)}),process.env.NODE_ENV!=="production"&&Le(!("showArrow"in t),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),process.env.NODE_ENV!=="production"&&Le(!(typeof A<"u"&&!We),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[Ke]=Ns("SelectLike",me==null?void 0:me.zIndex);return Ae(h.createElement(yp,Object.assign({ref:e,virtual:q,showSearch:ee},je,{style:Object.assign(Object.assign(Object.assign(Object.assign({},te.root),K==null?void 0:K.root),Y),M),dropdownMatchSelectWidth:De,transitionName:Ei(le,"slide-up",T),builtinPlacements:Yj(x,ae),listHeight:m,listItemHeight:ce,mode:$e,prefixCls:se,placement:Ce,direction:be,prefix:k,suffixIcon:Pe,menuItemSelectedIcon:Se,removeIcon:Xe,allowClear:et,notFoundContent:Bt,className:ze,getPopupContainer:d||z,dropdownClassName:we,disabled:ht,dropdownStyle:Object.assign(Object.assign({},me),{zIndex:Ke}),maxCount:We?A:void 0,tagRender:We?P:void 0,dropdownRender:Ne,onDropdownVisibleChange:Ze})))};process.env.NODE_ENV!=="production"&&(t1.displayName="Select");const ir=h.forwardRef(t1),EB=dp(ir,"dropdownAlign");ir.SECRET_COMBOBOX_MODE_DO_NOT_USE=e1;ir.Option=vp;ir.OptGroup=gp;ir._InternalPanelDoNotUseOrYouWillBeFired=EB;process.env.NODE_ENV!=="production"&&(ir.displayName="Select");const $B=(t,e)=>{typeof(t==null?void 0:t.addEventListener)<"u"?t.addEventListener("change",e):typeof(t==null?void 0:t.addListener)<"u"&&t.addListener(e)},OB=(t,e)=>{typeof(t==null?void 0:t.removeEventListener)<"u"?t.removeEventListener("change",e):typeof(t==null?void 0:t.removeListener)<"u"&&t.removeListener(e)},uc=t=>t?typeof t=="function"?t():t:null;function xp(t){var e=t.children,n=t.prefixCls,r=t.id,o=t.overlayInnerStyle,i=t.bodyClassName,a=t.className,s=t.style;return h.createElement("div",{className:G.cn("".concat(n,"-content"),a),style:s},h.createElement("div",{className:G.cn("".concat(n,"-inner"),i),id:r,role:"tooltip",style:o},typeof e=="function"?e():e))}var Hi={shiftX:64,adjustY:1},Vi={adjustX:1,shiftY:!0},vr=[0,0],MB={left:{points:["cr","cl"],overflow:Vi,offset:[-4,0],targetOffset:vr},right:{points:["cl","cr"],overflow:Vi,offset:[4,0],targetOffset:vr},top:{points:["bc","tc"],overflow:Hi,offset:[0,-4],targetOffset:vr},bottom:{points:["tc","bc"],overflow:Hi,offset:[0,4],targetOffset:vr},topLeft:{points:["bl","tl"],overflow:Hi,offset:[0,-4],targetOffset:vr},leftTop:{points:["tr","tl"],overflow:Vi,offset:[-4,0],targetOffset:vr},topRight:{points:["br","tr"],overflow:Hi,offset:[0,-4],targetOffset:vr},rightTop:{points:["tl","tr"],overflow:Vi,offset:[4,0],targetOffset:vr},bottomRight:{points:["tr","br"],overflow:Hi,offset:[0,4],targetOffset:vr},rightBottom:{points:["bl","br"],overflow:Vi,offset:[4,0],targetOffset:vr},bottomLeft:{points:["tl","bl"],overflow:Hi,offset:[0,4],targetOffset:vr},leftBottom:{points:["br","bl"],overflow:Vi,offset:[-4,0],targetOffset:vr}},NB=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],RB=function(e,n){var r=e.overlayClassName,o=e.trigger,i=o===void 0?["hover"]:o,a=e.mouseEnterDelay,s=a===void 0?0:a,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,d=e.prefixCls,f=d===void 0?"rc-tooltip":d,p=e.children,m=e.onVisibleChange,g=e.afterVisibleChange,v=e.transitionName,b=e.animation,y=e.motion,C=e.placement,S=C===void 0?"right":C,x=e.align,w=x===void 0?{}:x,$=e.destroyTooltipOnHide,R=$===void 0?!1:$,M=e.defaultVisible,O=e.getTooltipContainer,N=e.overlayInnerStyle;e.arrowContent;var I=e.overlay,T=e.id,P=e.showArrow,A=P===void 0?!0:P,k=e.classNames,B=e.styles,_=lt(e,NB),F=Yc(T),H=E.useRef(null);E.useImperativeHandle(n,function(){return H.current});var K=j({},_);"visible"in e&&(K.popupVisible=e.visible);var V=function(){return h.createElement(xp,{key:"content",prefixCls:f,id:F,bodyClassName:k==null?void 0:k.body,overlayInnerStyle:j(j({},N),B==null?void 0:B.body)},I)},W=function(){var L=h.Children.only(p),J=(L==null?void 0:L.props)||{},ne=j(j({},J),{},{"aria-describedby":I?F:null});return h.cloneElement(p,ne)};return h.createElement(eu,ge({popupClassName:G.cn(r,k==null?void 0:k.root),prefixCls:f,popup:V,action:i,builtinPlacements:MB,popupPlacement:S,ref:H,popupAlign:w,getPopupContainer:O,onPopupVisibleChange:m,afterPopupVisibleChange:g,popupTransitionName:v,popupAnimation:b,popupMotion:y,defaultPopupVisible:M,autoDestroy:R,mouseLeaveDelay:c,popupStyle:j(j({},u),B==null?void 0:B.root),mouseEnterDelay:s,arrow:A},K),W())};const IB=E.forwardRef(RB);function wp(t){const{sizePopupArrow:e,borderRadiusXS:n,borderRadiusOuter:r}=t,o=e/2,i=0,a=o,s=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,f=u,p=2*o-s,m=l,g=2*o-i,v=a,b=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),y=r*(Math.sqrt(2)-1),C=`polygon(${y}px 100%, 50% ${y}px, ${2*o-y}px 100%, ${y}px 100%)`,S=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${p} ${m} A ${r} ${r} 0 0 0 ${g} ${v} Z')`;return{arrowShadowWidth:b,arrowPath:S,arrowPolygon:C}}const PB=(t,e,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=t;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${U(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},n1=8;function nu(t){const{contentRadius:e,limitVerticalRadius:n}=t,r=e>12?e+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?n1:r}}function cl(t,e){return t?e:{}}function Ep(t,e,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=t,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},PB(t,e,o)),{"&:before":{background:e}})]},cl(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${U(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),cl(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${U(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),cl(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}})),cl(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}))}}function TB(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=r&&typeof r=="object"?r:{},i={};switch(t){case"top":case"bottom":i.shiftX=e.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=e.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a=Object.assign(Object.assign({},i),o);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Zv={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"]}},AB={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"]}},kB=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function r1(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=t,s=e/2,l={};return Object.keys(Zv).forEach(c=>{const u=r&&AB[c]||Zv[c],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=d,kB.has(c)&&(d.autoArrow=!1),c){case"top":case"topLeft":case"topRight":d.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=s+o;break}const f=nu({contentRadius:i,limitVerticalRadius:!0});if(r)switch(c){case"topLeft":case"bottomLeft":d.offset[0]=-f.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":d.offset[0]=f.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":d.offset[1]=-f.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":d.offset[1]=f.arrowOffsetHorizontal*2-s;break}d.overflow=TB(c,f,e,n),a&&(d.htmlRegion="visibleFirst")}),l}const DB=t=>{const{calc:e,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p}=t,m=e(a).add(p).add(f).equal(),g=e(a).mul(2).add(p).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,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":i,[`${n}-inner`]:{minWidth:g,minHeight:l,padding:`${U(t.calc(u).div(2).equal())} ${U(d)}`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:m},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:t.min(a,n1)}},[`${n}-content`]:{position:"relative"}}),HP(t,(v,{darkColor:b})=>({[`&${n}-${v}`]:{[`${n}-inner`]:{backgroundColor:b},[`${n}-arrow`]:{"--antd-arrow-background-color":b}}}))),{"&-rtl":{direction:"rtl"}})},Ep(t,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},_B=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},nu({contentRadius:t.borderRadius,limitVerticalRadius:!0})),wp(Mt(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),o1=(t,e=!0)=>Yt("Tooltip",r=>{const{borderRadius:o,colorTextLightSolid:i,colorBgSpotlight:a}=r,s=Mt(r,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:o,tooltipBg:a});return[DB(s),Is(r,"zoom-big-fast")]},_B,{resetStyle:!1,injectStyle:e})(t),jB=Vo.map(t=>`${t}-inverse`);function BB(t,e=!0){return e?[].concat(he(jB),he(Vo)).includes(t):Vo.includes(t)}function i1(t,e){const n=BB(e),r=G.cn({[`${t}-${e}`]:e&&n}),o={},i={};return e&&!n&&(o.background=e,i["--antd-arrow-background-color"]=e),{className:r,overlayStyle:o,arrowStyle:i}}const zB=t=>{const{prefixCls:e,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a}=t,{getPrefixCls:s}=h.useContext(gt),l=s("tooltip",e),[c,u,d]=o1(l),f=i1(l,i),p=f.arrowStyle,m=Object.assign(Object.assign({},a),f.overlayStyle),g=G.cn(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(h.createElement("div",{className:g,style:p},h.createElement("div",{className:`${l}-arrow`}),h.createElement(xp,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:m}),o)))};var LB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const FB=h.forwardRef((t,e)=>{var n,r;const{prefixCls:o,openClassName:i,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,destroyOnHidden:p,arrow:m=!0,title:g,overlay:v,builtinPlacements:b,arrowPointAtCenter:y=!1,autoAdjustOverflow:C=!0,motion:S,getPopupContainer:x,placement:w="top",mouseEnterDelay:$=.1,mouseLeaveDelay:R=.1,overlayStyle:M,rootClassName:O,overlayClassName:N,styles:I,classNames:T}=t,P=LB(t,["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"]),A=!!m,[,k]=er(),{getPopupContainer:B,getPrefixCls:_,direction:F,className:H,style:K,classNames:V,styles:W}=hr("tooltip"),z=Kt("Tooltip"),L=h.useRef(null),J=()=>{var ke;(ke=L.current)===null||ke===void 0||ke.forceAlign()};h.useImperativeHandle(e,()=>{var ke,De;return{forceAlign:J,forcePopupAlign:()=>{z.deprecated(!1,"forcePopupAlign","forceAlign"),J()},nativeElement:(ke=L.current)===null||ke===void 0?void 0:ke.nativeElement,popupElement:(De=L.current)===null||De===void 0?void 0:De.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["destroyTooltipOnHide","destroyOnHidden"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName",'classNames={{ root: "" }}']].forEach(([ke,De])=>{z.deprecated(!(ke in t),ke,De)}),process.env.NODE_ENV!=="production"&&z(!f||typeof f=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&z(!m||typeof m=="boolean"||!("arrowPointAtCenter"in m),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[ne,q]=en(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),re=!g&&!v&&g!==0,ae=ke=>{var De,me;q(re?!1:ke),re||((De=t.onOpenChange)===null||De===void 0||De.call(t,ke),(me=t.onVisibleChange)===null||me===void 0||me.call(t,ke))},ee=h.useMemo(()=>{var ke,De;let me=y;return typeof m=="object"&&(me=(De=(ke=m.pointAtCenter)!==null&&ke!==void 0?ke:m.arrowPointAtCenter)!==null&&De!==void 0?De:y),b||r1({arrowPointAtCenter:me,autoAdjustOverflow:C,arrowWidth:A?k.sizePopupArrow:0,borderRadius:k.borderRadius,offset:k.marginXXS,visibleFirst:!0})},[y,m,b,k]),Y=h.useMemo(()=>g===0?g:v||g||"",[v,g]),te=h.createElement(Wo,{space:!0},typeof Y=="function"?Y():Y),Z=_("tooltip",o),Q=_(),ie=t["data-popover-inject"];let ce=ne;!("open"in t)&&!("visible"in t)&&re&&(ce=!1);const se=h.isValidElement(c)&&!$S(c)?c:h.createElement("span",null,c),le=se.props,be=!le.className||typeof le.className=="string"?G.cn(le.className,i||`${Z}-open`):le.className,[ye,Be,de]=o1(Z,!ie),ue=i1(Z,s),pe=ue.arrowStyle,Ae=G.cn(N,{[`${Z}-rtl`]:F==="rtl"},ue.className,O,Be,de,H,V.root,T==null?void 0:T.root),_e=G.cn(V.body,T==null?void 0:T.body),[Re,$e]=Ns("Tooltip",P.zIndex),We=h.createElement(IB,Object.assign({},P,{zIndex:Re,showArrow:A,placement:w,mouseEnterDelay:$,mouseLeaveDelay:R,prefixCls:Z,classNames:{root:Ae,body:_e},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pe),W.root),K),M),I==null?void 0:I.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},W.body),l),I==null?void 0:I.body),ue.overlayStyle)},getTooltipContainer:x||a||B,ref:L,builtinPlacements:ee,overlay:te,visible:ce,onVisibleChange:ae,afterVisibleChange:u??d,arrowContent:h.createElement("span",{className:`${Z}-arrow-content`}),motion:{motionName:Ei(Q,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:p??!!f}),ce?xr(se,{className:be}):se);return ye(h.createElement(Ms.Provider,{value:$e},We))}),qo=FB;process.env.NODE_ENV!=="production"&&(qo.displayName="Tooltip");qo._InternalPanelDoNotUseOrYouWillBeFired=zB;const HB=t=>{const{componentCls:e,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:g}=t;return[{[e]:Object.assign(Object.assign({},An(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:i},[`${e}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:o,borderBottom:p,padding:g},[`${e}-inner-content`]:{color:n,padding:m}})},Ep(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},VB=t=>{const{componentCls:e}=t;return{[e]:Vo.map(n=>{const r=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":r,[`${e}-inner`]:{backgroundColor:r},[`${e}-arrow`]:{background:"transparent"}}}})}},WB=t=>{const{lineWidth:e,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=t,f=n-r,p=f/2,m=f/2-e,g=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},wp(t)),nu({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:l,titlePadding:i?`${p}px ${g}px ${m}px`:0,titleBorderBottom:i?`${e}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${g}px`:0})},a1=Yt("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,r=Mt(t,{popoverBg:e,popoverColor:n});return[HB(r),VB(r),Is(r,"zoom-big")]},WB,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var qB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const s1=({title:t,content:e,prefixCls:n})=>!t&&!e?null:h.createElement(h.Fragment,null,t&&h.createElement("div",{className:`${n}-title`},t),e&&h.createElement("div",{className:`${n}-inner-content`},e)),KB=t=>{const{hashId:e,prefixCls:n,className:r,style:o,placement:i="top",title:a,content:s,children:l}=t,c=uc(a),u=uc(s),d=G.cn(e,n,`${n}-pure`,`${n}-placement-${i}`,r);return h.createElement("div",{className:d,style:o},h.createElement("div",{className:`${n}-arrow`}),h.createElement(xp,Object.assign({},t,{className:e,prefixCls:n}),l||h.createElement(s1,{prefixCls:n,title:c,content:u})))},GB=t=>{const{prefixCls:e,className:n}=t,r=qB(t,["prefixCls","className"]),{getPrefixCls:o}=h.useContext(gt),i=o("popover",e),[a,s,l]=a1(i);return a(h.createElement(KB,Object.assign({},r,{prefixCls:i,hashId:s,className:G.cn(n,l)})))};var UB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const XB=h.forwardRef((t,e)=>{var n,r;const{prefixCls:o,title:i,content:a,overlayClassName:s,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:f=.1,onOpenChange:p,overlayStyle:m={},styles:g,classNames:v}=t,b=UB(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:y,className:C,style:S,classNames:x,styles:w}=hr("popover"),$=y("popover",o),[R,M,O]=a1($),N=y(),I=G.cn(s,M,O,C,x.root,v==null?void 0:v.root),T=G.cn(x.body,v==null?void 0:v.body),[P,A]=en(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),k=(K,V)=>{A(K,!0),p==null||p(K,V)},B=K=>{K.keyCode===Te.ESC&&k(!1,K)},_=K=>{k(K)},F=uc(i),H=uc(a);return R(h.createElement(qo,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},b,{prefixCls:$,classNames:{root:I,body:T},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},w.root),S),m),g==null?void 0:g.root),body:Object.assign(Object.assign({},w.body),g==null?void 0:g.body)},ref:e,open:P,onOpenChange:_,overlay:F||H?h.createElement(s1,{prefixCls:$,title:F,content:H}):null,transitionName:Ei(N,"zoom-big",b.transitionName),"data-popover-inject":!0}),xr(u,{onKeyDown:K=>{var V,W;h.isValidElement(u)&&((W=u==null?void 0:(V=u.props).onKeyDown)===null||W===void 0||W.call(V,K)),B(K)}})))}),$p=XB;$p._InternalPanelDoNotUseOrYouWillBeFired=GB;process.env.NODE_ENV!=="production"&&($p.displayName="Popover");var YB={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"},JB=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:YB}))},dc=h.forwardRef(JB);process.env.NODE_ENV!=="production"&&(dc.displayName="LeftOutlined");var ZB=Te.ESC,QB=Te.TAB;function ez(t){var e=t.visible,n=t.triggerRef,r=t.onVisibleChange,o=t.autoFocus,i=t.overlayRef,a=h.useRef(!1),s=function(){if(e){var d,f;(d=n.current)===null||d===void 0||(f=d.focus)===null||f===void 0||f.call(d),r==null||r(!1)}},l=function(){var d;return(d=i.current)!==null&&d!==void 0&&d.focus?(i.current.focus(),a.current=!0,!0):!1},c=function(d){switch(d.keyCode){case ZB:s();break;case QB:{var f=!1;a.current||(f=l()),f?d.preventDefault():s();break}}};h.useEffect(function(){return e?(window.addEventListener("keydown",c),o&&wt(l,3),function(){window.removeEventListener("keydown",c),a.current=!1}):function(){a.current=!1}},[e])}var tz=E.forwardRef(function(t,e){var n=t.overlay,r=t.arrow,o=t.prefixCls,i=E.useMemo(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),a=Qn(e,Ni(i));return E.createElement(E.Fragment,null,r&&E.createElement("div",{className:"".concat(o,"-arrow")}),E.cloneElement(i,{ref:Jo(i)?a:void 0}))}),Wi={adjustX:1,adjustY:1},qi=[0,0],nz={topLeft:{points:["bl","tl"],overflow:Wi,offset:[0,-4],targetOffset:qi},top:{points:["bc","tc"],overflow:Wi,offset:[0,-4],targetOffset:qi},topRight:{points:["br","tr"],overflow:Wi,offset:[0,-4],targetOffset:qi},bottomLeft:{points:["tl","bl"],overflow:Wi,offset:[0,4],targetOffset:qi},bottom:{points:["tc","bc"],overflow:Wi,offset:[0,4],targetOffset:qi},bottomRight:{points:["tr","br"],overflow:Wi,offset:[0,4],targetOffset:qi}},rz=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function oz(t,e){var n,r=t.arrow,o=r===void 0?!1:r,i=t.prefixCls,a=i===void 0?"rc-dropdown":i,s=t.transitionName,l=t.animation,c=t.align,u=t.placement,d=u===void 0?"bottomLeft":u,f=t.placements,p=f===void 0?nz:f,m=t.getPopupContainer,g=t.showAction,v=t.hideAction,b=t.overlayClassName,y=t.overlayStyle,C=t.visible,S=t.trigger,x=S===void 0?["hover"]:S,w=t.autoFocus,$=t.overlay,R=t.children,M=t.onVisibleChange,O=lt(t,rz),N=E.useState(),I=X(N,2),T=I[0],P=I[1],A="visible"in t?C:T,k=E.useRef(null),B=E.useRef(null),_=E.useRef(null);E.useImperativeHandle(e,function(){return k.current});var F=function(q){P(q),M==null||M(q)};ez({visible:A,triggerRef:_,onVisibleChange:F,autoFocus:w,overlayRef:B});var H=function(q){var re=t.onOverlayClick;P(!1),re&&re(q)},K=function(){return E.createElement(tz,{ref:B,overlay:$,prefixCls:a,arrow:o})},V=function(){return typeof $=="function"?K:K()},W=function(){var q=t.minOverlayWidthMatchTrigger,re=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?q:!re},z=function(){var q=t.openClassName;return q!==void 0?q:"".concat(a,"-open")},L=E.cloneElement(R,{className:G.cn((n=R.props)===null||n===void 0?void 0:n.className,A&&z()),ref:Jo(R)?Qn(_,Ni(R)):void 0}),J=v;return!J&&x.indexOf("contextMenu")!==-1&&(J=["click"]),E.createElement(eu,ge({builtinPlacements:p},O,{prefixCls:a,ref:k,popupClassName:G.cn(b,D({},"".concat(a,"-show-arrow"),o)),popupStyle:y,action:x,showAction:g,hideAction:J,popupPlacement:d,popupAlign:c,popupTransitionName:s,popupAnimation:l,popupVisible:A,stretch:W()?"minWidth":"",popup:V(),onPopupVisibleChange:F,onPopupClick:H,getPopupContainer:m}),L)}const iz=E.forwardRef(oz),az=t=>typeof t!="object"&&typeof t!="function"||t===null;var l1=h.createContext(null);function c1(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function u1(t){var e=h.useContext(l1);return c1(e,t)}var sz=["children","locked"],jr=h.createContext(null);function lz(t,e){var n=j({},t);return Object.keys(e).forEach(function(r){var o=e[r];o!==void 0&&(n[r]=o)}),n}function ys(t){var e=t.children,n=t.locked,r=lt(t,sz),o=h.useContext(jr),i=Es(function(){return lz(o,r)},[o,r],function(a,s){return!n&&(a[0]!==s[0]||!da(a[1],s[1],!0))});return h.createElement(jr.Provider,{value:i},e)}var cz=[],d1=h.createContext(null);function ru(){return h.useContext(d1)}var f1=h.createContext(cz);function Ea(t){var e=h.useContext(f1);return h.useMemo(function(){return t!==void 0?[].concat(he(e),[t]):e},[e,t])}var h1=h.createContext(null),Op=h.createContext({});function Qv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Qh(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),o=t.getAttribute("tabindex"),i=Number(o),a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&t.disabled&&(a=null),a!==null&&(a>=0||e&&a<0)}return!1}function uz(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=he(t.querySelectorAll("*")).filter(function(r){return Qv(r,e)});return Qv(t,e)&&n.unshift(t),n}var Xf=Te.LEFT,Yf=Te.RIGHT,Jf=Te.UP,Tl=Te.DOWN,Al=Te.ENTER,p1=Te.ESC,Da=Te.HOME,_a=Te.END,e0=[Jf,Tl,Xf,Yf];function dz(t,e,n,r){var o,i="prev",a="next",s="children",l="parent";if(t==="inline"&&r===Al)return{inlineTrigger:!0};var c=D(D({},Jf,i),Tl,a),u=D(D(D(D({},Xf,n?a:i),Yf,n?i:a),Tl,s),Al,s),d=D(D(D(D(D(D({},Jf,i),Tl,a),Al,s),p1,l),Xf,n?s:l),Yf,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},p=(o=f["".concat(t).concat(e?"":"Sub")])===null||o===void 0?void 0:o[r];switch(p){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function fz(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function hz(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function Mp(t,e){var n=uz(t,!0);return n.filter(function(r){return e.has(r)})}function t0(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var o=Mp(t,e),i=o.length,a=o.findIndex(function(s){return n===s});return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}var Zf=function(e,n){var r=new Set,o=new Map,i=new Map;return e.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(c1(n,a),"']"));s&&(r.add(s),i.set(s,a),o.set(a,s))}),{elements:r,key2element:o,element2key:i}};function pz(t,e,n,r,o,i,a,s,l,c){var u=h.useRef(),d=h.useRef();d.current=e;var f=function(){wt.cancel(u.current)};return h.useEffect(function(){return function(){f()}},[]),function(p){var m=p.which;if([].concat(e0,[Al,p1,Da,_a]).includes(m)){var g=i(),v=Zf(g,r),b=v,y=b.elements,C=b.key2element,S=b.element2key,x=C.get(e),w=hz(x,y),$=S.get(w),R=dz(t,a($,!0).length===1,n,m);if(!R&&m!==Da&&m!==_a)return;(e0.includes(m)||[Da,_a].includes(m))&&p.preventDefault();var M=function(B){if(B){var _=B,F=B.querySelector("a");F!=null&&F.getAttribute("href")&&(_=F);var H=S.get(B);s(H),f(),u.current=wt(function(){d.current===H&&_.focus()})}};if([Da,_a].includes(m)||R.sibling||!w){var O;!w||t==="inline"?O=o.current:O=fz(w);var N,I=Mp(O,y);m===Da?N=I[0]:m===_a?N=I[I.length-1]:N=t0(O,y,w,R.offset),M(N)}else if(R.inlineTrigger)l($);else if(R.offset>0)l($,!0),f(),u.current=wt(function(){v=Zf(g,r);var k=w.getAttribute("aria-controls"),B=document.getElementById(k),_=t0(B,v.elements);M(_)},5);else if(R.offset<0){var T=a($,!0),P=T[T.length-2],A=C.get(P);l(P,!1),M(A)}}c==null||c(p)}}function mz(t){Promise.resolve().then(t)}var Np="__RC_UTIL_PATH_SPLIT__",n0=function(e){return e.join(Np)},gz=function(e){return e.split(Np)},Qf="rc-menu-more";function vz(){var t=h.useState({}),e=X(t,2),n=e[1],r=E.useRef(new Map),o=E.useRef(new Map),i=h.useState([]),a=X(i,2),s=a[0],l=a[1],c=E.useRef(0),u=E.useRef(!1),d=function(){u.current||n({})},f=E.useCallback(function(C,S){process.env.NODE_ENV!=="production"&&at(!r.current.has(C),"Duplicated key '".concat(C,"' used in Menu by path [").concat(S.join(" > "),"]"));var x=n0(S);o.current.set(x,C),r.current.set(C,x),c.current+=1;var w=c.current;mz(function(){w===c.current&&d()})},[]),p=E.useCallback(function(C,S){var x=n0(S);o.current.delete(x),r.current.delete(C)},[]),m=E.useCallback(function(C){l(C)},[]),g=E.useCallback(function(C,S){var x=r.current.get(C)||"",w=gz(x);return S&&s.includes(w[0])&&w.unshift(Qf),w},[s]),v=E.useCallback(function(C,S){return C.filter(function(x){return x!==void 0}).some(function(x){var w=g(x,!0);return w.includes(S)})},[g]),b=function(){var S=he(r.current.keys());return s.length&&S.push(Qf),S},y=E.useCallback(function(C){var S="".concat(r.current.get(C)).concat(Np),x=new Set;return he(o.current.keys()).forEach(function(w){w.startsWith(S)&&x.add(o.current.get(w))}),x},[]);return h.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:p,refreshOverflowKeys:m,isSubPathKey:v,getKeyPath:g,getKeys:b,getSubPathKeys:y}}function Va(t){var e=h.useRef(t);e.current=t;var n=h.useCallback(function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=e.current)===null||r===void 0?void 0:r.call.apply(r,[e].concat(i))},[]);return t?n:void 0}var bz=Math.random().toFixed(5).toString().slice(2),r0=0;function yz(t){var e=en(t,{value:t}),n=X(e,2),r=n[0],o=n[1];return h.useEffect(function(){r0+=1;var i=process.env.NODE_ENV==="test"?"test":"".concat(bz,"-").concat(r0);o("rc-menu-uuid-".concat(i))},[]),r}function m1(t,e,n,r){var o=h.useContext(jr),i=o.activeKey,a=o.onActive,s=o.onInactive,l={active:i===t};return e||(l.onMouseEnter=function(c){n==null||n({key:t,domEvent:c}),a(t)},l.onMouseLeave=function(c){r==null||r({key:t,domEvent:c}),s(t)}),l}function g1(t){var e=h.useContext(jr),n=e.mode,r=e.rtl,o=e.inlineIndent;if(n!=="inline")return null;var i=t;return r?{paddingRight:i*o}:{paddingLeft:i*o}}function v1(t){var e=t.icon,n=t.props,r=t.children,o;return e===null||e===!1?null:(typeof e=="function"?o=h.createElement(e,j({},n)):typeof e!="boolean"&&(o=e),o||r||null)}var Cz=["item"];function fc(t){var e=t.item,n=lt(t,Cz);return Object.defineProperty(n,"item",{get:function(){return at(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e}}),n}var Sz=["title","attribute","elementRef"],xz=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],wz=["active"],Ez=function(t){go(n,t);var e=vo(n);function n(){return ln(this,n),e.apply(this,arguments)}return cn(n,[{key:"render",value:function(){var o=this.props,i=o.title,a=o.attribute,s=o.elementRef,l=lt(o,Sz),c=vn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return at(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),h.createElement(Kr.Item,ge({},a,{title:typeof i=="string"?i:void 0},c,{ref:s}))}}]),n}(h.Component),$z=h.forwardRef(function(t,e){var n=t.style,r=t.className,o=t.eventKey,i=t.warnKey,a=t.disabled,s=t.itemIcon,l=t.children,c=t.role,u=t.onMouseEnter,d=t.onMouseLeave,f=t.onClick,p=t.onKeyDown,m=t.onFocus,g=lt(t,xz),v=u1(o),b=h.useContext(jr),y=b.prefixCls,C=b.onItemClick,S=b.disabled,x=b.overflowDisabled,w=b.itemIcon,$=b.selectedKeys,R=b.onActive,M=h.useContext(Op),O=M._internalRenderMenuItem,N="".concat(y,"-item"),I=h.useRef(),T=h.useRef(),P=S||a,A=Yo(e,T),k=Ea(o);process.env.NODE_ENV!=="production"&&i&&at(!1,"MenuItem should not leave undefined `key`.");var B=function(ae){return{key:o,keyPath:he(k).reverse(),item:I.current,domEvent:ae}},_=s||w,F=m1(o,P,u,d),H=F.active,K=lt(F,wz),V=$.includes(o),W=g1(k.length),z=function(ae){if(!P){var ee=B(ae);f==null||f(fc(ee)),C(ee)}},L=function(ae){if(p==null||p(ae),ae.which===Te.ENTER){var ee=B(ae);f==null||f(fc(ee)),C(ee)}},J=function(ae){R(o),m==null||m(ae)},ne={};t.role==="option"&&(ne["aria-selected"]=V);var q=h.createElement(Ez,ge({ref:I,elementRef:A,role:c===null?"none":c||"menuitem",tabIndex:a?null:-1,"data-menu-id":x&&v?null:v},vn(g,["extra"]),K,ne,{component:"li","aria-disabled":a,style:j(j({},W),n),className:G.cn(N,D(D(D({},"".concat(N,"-active"),H),"".concat(N,"-selected"),V),"".concat(N,"-disabled"),P),r),onClick:z,onKeyDown:L,onFocus:J}),l,h.createElement(v1,{props:j(j({},t),{},{isSelected:V}),icon:_}));return O&&(q=O(q,t,{selected:V})),q});function Oz(t,e){var n=t.eventKey,r=ru(),o=Ea(n);return h.useEffect(function(){if(r)return r.registerPath(n,o),function(){r.unregisterPath(n,o)}},[o]),r?null:h.createElement($z,ge({},t,{ref:e}))}const ou=h.forwardRef(Oz);var Mz=["className","children"],Nz=function(e,n){var r=e.className,o=e.children,i=lt(e,Mz),a=h.useContext(jr),s=a.prefixCls,l=a.mode,c=a.rtl;return h.createElement("ul",ge({className:G.cn(s,c&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},i,{"data-menu-list":!0,ref:n}),o)},Rp=h.forwardRef(Nz);Rp.displayName="SubMenuList";function Ip(t,e){return dr(t).map(function(n,r){if(h.isValidElement(n)){var o,i,a=n.key,s=(o=(i=n.props)===null||i===void 0?void 0:i.eventKey)!==null&&o!==void 0?o:a,l=s==null;l&&(s="tmp_key-".concat([].concat(he(e),[r]).join("-")));var c={key:s,eventKey:s};return process.env.NODE_ENV!=="production"&&l&&(c.warnKey=!0),h.cloneElement(n,c)}return n})}var jn={adjustX:1,adjustY:1},Rz={topLeft:{points:["bl","tl"],overflow:jn},topRight:{points:["br","tr"],overflow:jn},bottomLeft:{points:["tl","bl"],overflow:jn},bottomRight:{points:["tr","br"],overflow:jn},leftTop:{points:["tr","tl"],overflow:jn},leftBottom:{points:["br","bl"],overflow:jn},rightTop:{points:["tl","tr"],overflow:jn},rightBottom:{points:["bl","br"],overflow:jn}},Iz={topLeft:{points:["bl","tl"],overflow:jn},topRight:{points:["br","tr"],overflow:jn},bottomLeft:{points:["tl","bl"],overflow:jn},bottomRight:{points:["tr","br"],overflow:jn},rightTop:{points:["tr","tl"],overflow:jn},rightBottom:{points:["br","bl"],overflow:jn},leftTop:{points:["tl","tr"],overflow:jn},leftBottom:{points:["bl","br"],overflow:jn}};function b1(t,e,n){if(e)return e;if(n)return n[t]||n.other}var Pz={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Tz(t){var e=t.prefixCls,n=t.visible,r=t.children,o=t.popup,i=t.popupStyle,a=t.popupClassName,s=t.popupOffset,l=t.disabled,c=t.mode,u=t.onVisibleChange,d=h.useContext(jr),f=d.getPopupContainer,p=d.rtl,m=d.subMenuOpenDelay,g=d.subMenuCloseDelay,v=d.builtinPlacements,b=d.triggerSubMenuAction,y=d.forceSubMenuRender,C=d.rootClassName,S=d.motion,x=d.defaultMotions,w=h.useState(!1),$=X(w,2),R=$[0],M=$[1],O=j(p?j({},Iz):j({},Rz),v),N=Pz[c],I=b1(c,S,x),T=h.useRef(I);c!=="inline"&&(T.current=I);var P=j(j({},T.current),{},{leavedClassName:"".concat(e,"-hidden"),removeOnLeave:!1,motionAppear:!0}),A=h.useRef();return h.useEffect(function(){return A.current=wt(function(){M(n)}),function(){wt.cancel(A.current)}},[n]),h.createElement(eu,{prefixCls:e,popupClassName:G.cn("".concat(e,"-popup"),D({},"".concat(e,"-rtl"),p),a,C),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:O,popupPlacement:N,popupVisible:R,popup:o,popupStyle:i,popupAlign:s&&{offset:s},action:l?[]:[b],mouseEnterDelay:m,mouseLeaveDelay:g,onPopupVisibleChange:u,forceRender:y,popupMotion:P,fresh:!0},r)}function Az(t){var e=t.id,n=t.open,r=t.keyPath,o=t.children,i="inline",a=h.useContext(jr),s=a.prefixCls,l=a.forceSubMenuRender,c=a.motion,u=a.defaultMotions,d=a.mode,f=h.useRef(!1);f.current=d===i;var p=h.useState(!f.current),m=X(p,2),g=m[0],v=m[1],b=f.current?n:!1;h.useEffect(function(){f.current&&v(!1)},[d]);var y=j({},b1(i,c,u));r.length>1&&(y.motionAppear=!1);var C=y.onVisibleChanged;return y.onVisibleChanged=function(S){return!f.current&&!S&&v(!0),C==null?void 0:C(S)},g?null:h.createElement(ys,{mode:i,locked:!f.current},h.createElement(eo,ge({visible:b},y,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(S){var x=S.className,w=S.style;return h.createElement(Rp,{id:e,className:x,style:w},o)}))}var kz=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Dz=["active"],_z=h.forwardRef(function(t,e){var n=t.style,r=t.className,o=t.title,i=t.eventKey,a=t.warnKey,s=t.disabled,l=t.internalPopupClose,c=t.children,u=t.itemIcon,d=t.expandIcon,f=t.popupClassName,p=t.popupOffset,m=t.popupStyle,g=t.onClick,v=t.onMouseEnter,b=t.onMouseLeave,y=t.onTitleClick,C=t.onTitleMouseEnter,S=t.onTitleMouseLeave,x=lt(t,kz),w=u1(i),$=h.useContext(jr),R=$.prefixCls,M=$.mode,O=$.openKeys,N=$.disabled,I=$.overflowDisabled,T=$.activeKey,P=$.selectedKeys,A=$.itemIcon,k=$.expandIcon,B=$.onItemClick,_=$.onOpenChange,F=$.onActive,H=h.useContext(Op),K=H._internalRenderSubMenuItem,V=h.useContext(h1),W=V.isSubPathKey,z=Ea(),L="".concat(R,"-submenu"),J=N||s,ne=h.useRef(),q=h.useRef();process.env.NODE_ENV!=="production"&&a&&at(!1,"SubMenu should not leave undefined `key`.");var re=u??A,ae=d??k,ee=O.includes(i),Y=!I&&ee,te=W(P,i),Z=m1(i,J,C,S),Q=Z.active,ie=lt(Z,Dz),ce=h.useState(!1),se=X(ce,2),le=se[0],be=se[1],ye=function(xe){J||be(xe)},Be=function(xe){ye(!0),v==null||v({key:i,domEvent:xe})},de=function(xe){ye(!1),b==null||b({key:i,domEvent:xe})},ue=h.useMemo(function(){return Q||(M!=="inline"?le||W([T],i):!1)},[M,Q,T,le,i,W]),pe=g1(z.length),Ae=function(xe){J||(y==null||y({key:i,domEvent:xe}),M==="inline"&&_(i,!ee))},_e=Va(function(Ie){g==null||g(fc(Ie)),B(Ie)}),Re=function(xe){M!=="inline"&&_(i,xe)},$e=function(){F(i)},We=w&&"".concat(w,"-popup"),ke=h.useMemo(function(){return h.createElement(v1,{icon:M!=="horizontal"?ae:void 0,props:j(j({},t),{},{isOpen:Y,isSubMenu:!0})},h.createElement("i",{className:"".concat(L,"-arrow")}))},[M,ae,t,Y,L]),De=h.createElement("div",ge({role:"menuitem",style:pe,className:"".concat(L,"-title"),tabIndex:J?null:-1,ref:ne,title:typeof o=="string"?o:null,"data-menu-id":I&&w?null:w,"aria-expanded":Y,"aria-haspopup":!0,"aria-controls":We,"aria-disabled":J,onClick:Ae,onFocus:$e},ie),o,ke),me=h.useRef(M);if(M!=="inline"&&z.length>1?me.current="vertical":me.current=M,!I){var Ne=me.current;De=h.createElement(Tz,{mode:Ne,prefixCls:L,visible:!l&&Y&&M!=="inline",popupClassName:f,popupOffset:p,popupStyle:m,popup:h.createElement(ys,{mode:Ne==="horizontal"?"vertical":Ne},h.createElement(Rp,{id:We,ref:q},c)),disabled:J,onVisibleChange:Re},De)}var Ze=h.createElement(Kr.Item,ge({ref:e,role:"none"},x,{component:"li",style:n,className:G.cn(L,"".concat(L,"-").concat(M),r,D(D(D(D({},"".concat(L,"-open"),Y),"".concat(L,"-active"),ue),"".concat(L,"-selected"),te),"".concat(L,"-disabled"),J)),onMouseEnter:Be,onMouseLeave:de}),De,!I&&h.createElement(Az,{id:We,open:Y,keyPath:z},c));return K&&(Ze=K(Ze,t,{selected:te,active:ue,open:Y,disabled:J})),h.createElement(ys,{onItemClick:_e,mode:M==="horizontal"?"vertical":M,itemIcon:re,expandIcon:ae},Ze)}),Bs=h.forwardRef(function(t,e){var n=t.eventKey,r=t.children,o=Ea(n),i=Ip(r,o),a=ru();h.useEffect(function(){if(a)return a.registerPath(n,o),function(){a.unregisterPath(n,o)}},[o]);var s;return a?s=i:s=h.createElement(_z,ge({ref:e},t),i),h.createElement(f1.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Bs.displayName="SubMenu");function Pp(t){var e=t.className,n=t.style,r=h.useContext(jr),o=r.prefixCls,i=ru();return i?null:h.createElement("li",{role:"separator",className:G.cn("".concat(o,"-item-divider"),e),style:n})}var jz=["className","title","eventKey","children"],Bz=h.forwardRef(function(t,e){var n=t.className,r=t.title;t.eventKey;var o=t.children,i=lt(t,jz),a=h.useContext(jr),s=a.prefixCls,l="".concat(s,"-item-group");return h.createElement("li",ge({ref:e,role:"presentation"},i,{onClick:function(u){return u.stopPropagation()},className:G.cn(l,n)}),h.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),h.createElement("ul",{role:"group",className:"".concat(l,"-list")},o))}),iu=h.forwardRef(function(t,e){var n=t.eventKey,r=t.children,o=Ea(n),i=Ip(r,o),a=ru();return a?i:h.createElement(Bz,ge({ref:e},vn(t,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(iu.displayName="MenuItemGroup");var zz=["label","children","key","type","extra"];function eh(t,e,n){var r=e.item,o=e.group,i=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&Ue(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,p=c.type,m=c.extra,g=lt(c,zz),v=f??"tmp-".concat(l);return d||p==="group"?p==="group"?h.createElement(o,ge({key:v},g,{title:u}),eh(d,e,n)):h.createElement(i,ge({key:v},g,{title:u}),eh(d,e,n)):p==="divider"?h.createElement(a,ge({key:v},g)):h.createElement(r,ge({key:v},g,{extra:m}),u,(!!m||m===0)&&h.createElement("span",{className:"".concat(n,"-item-extra")},m))}return null}).filter(function(s){return s})}function o0(t,e,n,r,o){var i=t,a=j({divider:Pp,item:ou,group:iu,submenu:Bs},r);return e&&(i=eh(e,a,o)),Ip(i,n)}var Lz=["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"],Qo=[],Fz=h.forwardRef(function(t,e){var n,r=t,o=r.prefixCls,i=o===void 0?"rc-menu":o,a=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,f=r.children,p=r.direction,m=r.id,g=r.mode,v=g===void 0?"vertical":g,b=r.inlineCollapsed,y=r.disabled,C=r.disabledOverflow,S=r.subMenuOpenDelay,x=S===void 0?.1:S,w=r.subMenuCloseDelay,$=w===void 0?.1:w,R=r.forceSubMenuRender,M=r.defaultOpenKeys,O=r.openKeys,N=r.activeKey,I=r.defaultActiveFirst,T=r.selectable,P=T===void 0?!0:T,A=r.multiple,k=A===void 0?!1:A,B=r.defaultSelectedKeys,_=r.selectedKeys,F=r.onSelect,H=r.onDeselect,K=r.inlineIndent,V=K===void 0?24:K,W=r.motion,z=r.defaultMotions,L=r.triggerSubMenuAction,J=L===void 0?"hover":L,ne=r.builtinPlacements,q=r.itemIcon,re=r.expandIcon,ae=r.overflowedIndicator,ee=ae===void 0?"...":ae,Y=r.overflowedIndicatorPopupClassName,te=r.getPopupContainer,Z=r.onClick,Q=r.onOpenChange,ie=r.onKeyDown,ce=r.openAnimation,se=r.openTransitionName,le=r._internalRenderMenuItem,be=r._internalRenderSubMenuItem,ye=r._internalComponents,Be=lt(r,Lz),de=h.useMemo(function(){return[o0(f,d,Qo,ye,i),o0(f,d,Qo,{},i)]},[f,d,ye]),ue=X(de,2),pe=ue[0],Ae=ue[1],_e=h.useState(!1),Re=X(_e,2),$e=Re[0],We=Re[1],ke=h.useRef(),De=yz(m),me=p==="rtl";process.env.NODE_ENV!=="production"&&at(!ce&&!se,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var Ne=en(M,{value:O,postState:function(ct){return ct||Qo}}),Ze=X(Ne,2),Ie=Ze[0],xe=Ze[1],ot=function(ct){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function xt(){xe(ct),Q==null||Q(ct)}dt?Ar.flushSync(xt):xt()},ft=h.useState(Ie),Tt=X(ft,2),Bt=Tt[0],Pe=Tt[1],Se=h.useRef(!1),Xe=h.useMemo(function(){return(v==="inline"||v==="vertical")&&b?["vertical",b]:[v,!1]},[v,b]),Ge=X(Xe,2),et=Ge[0],je=Ge[1],we=et==="inline",Ee=h.useState(et),ut=X(Ee,2),ht=ut[0],ze=ut[1],Ce=h.useState(je),Ke=X(Ce,2),Le=Ke[0],Fe=Ke[1];h.useEffect(function(){ze(et),Fe(je),Se.current&&(we?xe(Bt):ot(Qo))},[et,je]);var Qe=h.useState(0),Et=X(Qe,2),vt=Et[0],Ht=Et[1],Ct=vt>=pe.length-1||ht!=="horizontal"||C;h.useEffect(function(){we&&Pe(Ie)},[Ie]),h.useEffect(function(){return Se.current=!0,function(){Se.current=!1}},[]);var Nt=vz(),Dt=Nt.registerPath,Vt=Nt.unregisterPath,Nn=Nt.refreshOverflowKeys,Wt=Nt.isSubPathKey,It=Nt.getKeyPath,Oe=Nt.getKeys,qe=Nt.getSubPathKeys,He=h.useMemo(function(){return{registerPath:Dt,unregisterPath:Vt}},[Dt,Vt]),ve=h.useMemo(function(){return{isSubPathKey:Wt}},[Wt]);h.useEffect(function(){Nn(Ct?Qo:pe.slice(vt+1).map(function(Ve){return Ve.key}))},[vt,Ct]);var nt=en(N||I&&((n=pe[0])===null||n===void 0?void 0:n.key),{value:N}),St=X(nt,2),bt=St[0],Jt=St[1],Zt=Va(function(Ve){Jt(Ve)}),tn=Va(function(){Jt(void 0)});E.useImperativeHandle(e,function(){return{list:ke.current,focus:function(ct){var dt,xt=Oe(),Ot=Zf(xt,De),Sn=Ot.elements,xn=Ot.key2element,Yn=Ot.element2key,tr=Mp(ke.current,Sn),Jn=bt??(tr[0]?Yn.get(tr[0]):(dt=pe.find(function(Ma){return!Ma.props.disabled}))===null||dt===void 0?void 0:dt.key),Dn=xn.get(Jn);if(Jn&&Dn){var mn;Dn==null||(mn=Dn.focus)===null||mn===void 0||mn.call(Dn,ct)}}}});var Ut=en(B||[],{value:_,postState:function(ct){return Array.isArray(ct)?ct:ct==null?Qo:[ct]}}),Qt=X(Ut,2),pn=Qt[0],Rn=Qt[1],dn=function(ct){if(P){var dt=ct.key,xt=pn.includes(dt),Ot;k?xt?Ot=pn.filter(function(xn){return xn!==dt}):Ot=[].concat(he(pn),[dt]):Ot=[dt],Rn(Ot);var Sn=j(j({},ct),{},{selectedKeys:Ot});xt?H==null||H(Sn):F==null||F(Sn)}!k&&Ie.length&&ht!=="inline"&&ot(Qo)},Cn=Va(function(Ve){Z==null||Z(fc(Ve)),dn(Ve)}),Or=Va(function(Ve,ct){var dt=Ie.filter(function(Ot){return Ot!==Ve});if(ct)dt.push(Ve);else if(ht!=="inline"){var xt=qe(Ve);dt=dt.filter(function(Ot){return!xt.has(Ot)})}da(Ie,dt,!0)||ot(dt,!0)}),zr=function(ct,dt){var xt=dt??!Ie.includes(ct);Or(ct,xt)},Xn=pz(ht,bt,me,De,ke,Oe,It,Jt,zr,ie);h.useEffect(function(){We(!0)},[]);var Co=h.useMemo(function(){return{_internalRenderMenuItem:le,_internalRenderSubMenuItem:be}},[le,be]),Lr=ht!=="horizontal"||C?pe:pe.map(function(Ve,ct){return h.createElement(ys,{key:Ve.key,overflowDisabled:ct>vt},Ve)}),pt=h.createElement(Kr,ge({id:m,ref:ke,prefixCls:"".concat(i,"-overflow"),component:"ul",itemComponent:ou,className:G.cn(i,"".concat(i,"-root"),"".concat(i,"-").concat(ht),l,D(D({},"".concat(i,"-inline-collapsed"),Le),"".concat(i,"-rtl"),me),a),dir:p,style:s,role:"menu",tabIndex:u,data:Lr,renderRawItem:function(ct){return ct},renderRawRest:function(ct){var dt=ct.length,xt=dt?pe.slice(-dt):null;return h.createElement(Bs,{eventKey:Qf,title:ee,disabled:Ct,internalPopupClose:dt===0,popupClassName:Y},xt)},maxCount:ht!=="horizontal"||C?Kr.INVALIDATE:Kr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ct){Ht(ct)},onKeyDown:Xn},Be));return h.createElement(Op.Provider,{value:Co},h.createElement(l1.Provider,{value:De},h.createElement(ys,{prefixCls:i,rootClassName:a,mode:ht,openKeys:Ie,rtl:me,disabled:y,motion:$e?W:null,defaultMotions:$e?z:null,activeKey:bt,onActive:Zt,onInactive:tn,selectedKeys:pn,inlineIndent:V,subMenuOpenDelay:x,subMenuCloseDelay:$,forceSubMenuRender:R,builtinPlacements:ne,triggerSubMenuAction:J,getPopupContainer:te,itemIcon:q,expandIcon:re,onItemClick:Cn,onOpenChange:Or},h.createElement(h1.Provider,{value:ve},pt),h.createElement("div",{style:{display:"none"},"aria-hidden":!0},h.createElement(d1.Provider,{value:He},Ae)))))}),zs=Fz;zs.Item=ou;zs.SubMenu=Bs;zs.ItemGroup=iu;zs.Divider=Pp;var Hz={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},Vz=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:Hz}))},y1=h.forwardRef(Vz);process.env.NODE_ENV!=="production"&&(y1.displayName="BarsOutlined");const Wz=h.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),qz=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:i,padding:a,color:s,lineHeight:U(i),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},C1=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=t,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},S1=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];Yt("Layout",t=>[qz(t)],C1,{deprecatedTokens:S1});const Kz=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:m,lightTriggerBg:g,bodyBg:v}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${e}-children`]:{overflow:"hidden"},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:U(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${U(f)} ${U(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:t.calc(u).mul(-1).equal(),borderRadius:`${U(f)} 0 0 ${U(f)}`}},"&-light":{background:p,[`${e}-trigger`]:{color:m,background:g},[`${e}-zero-width-trigger`]:{color:m,background:g,border:`1px solid ${v}`,borderInlineStart:0}}}}},Gz=Yt(["Layout","Sider"],t=>[Kz(t)],C1,{deprecatedTokens:S1});var Uz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const i0={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Xz=t=>!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Tp=h.createContext({}),Yz=(()=>{let t=0;return(e="")=>(t+=1,`${e}${t}`)})(),Jz=h.forwardRef((t,e)=>{const{prefixCls:n,className:r,trigger:o,children:i,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:m,onCollapse:g,onBreakpoint:v}=t,b=Uz(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:y}=E.useContext(Wz),[C,S]=E.useState("collapsed"in t?t.collapsed:a),[x,w]=E.useState(!1);E.useEffect(()=>{"collapsed"in t&&S(t.collapsed)},[t.collapsed]);const $=(q,re)=>{"collapsed"in t||S(q),g==null||g(q,re)},{getPrefixCls:R,direction:M}=E.useContext(gt),O=R("layout-sider",n),[N,I,T]=Gz(O),P=E.useRef(null);P.current=q=>{w(q.matches),v==null||v(q.matches),C!==q.matches&&$(q.matches,"responsive")},E.useEffect(()=>{function q(ae){var ee;return(ee=P.current)===null||ee===void 0?void 0:ee.call(P,ae)}let re;return typeof(window==null?void 0:window.matchMedia)<"u"&&m&&m in i0&&(re=window.matchMedia(`screen and (max-width: ${i0[m]})`),$B(re,q),q(re)),()=>{OB(re,q)}},[m]),E.useEffect(()=>{const q=Yz("ant-sider-");return y.addSider(q),()=>y.removeSider(q)},[]);const A=()=>{$(!C,"clickTrigger")},k=vn(b,["collapsed"]),B=C?f:d,_=Xz(B)?`${B}px`:String(B),F=parseFloat(String(f||0))===0?h.createElement("span",{onClick:A,className:G.cn(`${O}-zero-width-trigger`,`${O}-zero-width-trigger-${u?"right":"left"}`),style:p},o||h.createElement(y1,null)):null,H=M==="rtl"==!u,W={expanded:H?h.createElement(vs,null):h.createElement(dc,null),collapsed:H?h.createElement(dc,null):h.createElement(vs,null)}[C?"collapsed":"expanded"],z=o!==null?F||h.createElement("div",{className:`${O}-trigger`,onClick:A,style:{width:_}},o||W):null,L=Object.assign(Object.assign({},l),{flex:`0 0 ${_}`,maxWidth:_,minWidth:_,width:_}),J=G.cn(O,`${O}-${s}`,{[`${O}-collapsed`]:!!C,[`${O}-has-trigger`]:c&&o!==null&&!F,[`${O}-below`]:!!x,[`${O}-zero-width`]:parseFloat(_)===0},r,I,T),ne=h.useMemo(()=>({siderCollapsed:C}),[C]);return N(h.createElement(Tp.Provider,{value:ne},h.createElement("aside",Object.assign({className:J},k,{style:L,ref:e}),h.createElement("div",{className:`${O}-children`},i),c||x&&F?z:null)))});process.env.NODE_ENV!=="production"&&(Jz.displayName="Sider");var Zz={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"},Qz=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:Zz}))},Ap=h.forwardRef(Qz);process.env.NODE_ENV!=="production"&&(Ap.displayName="EllipsisOutlined");const hc=E.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var eL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const x1=t=>{const{prefixCls:e,className:n,dashed:r}=t,o=eL(t,["prefixCls","className","dashed"]),{getPrefixCls:i}=h.useContext(gt),a=i("menu",e),s=G.cn({[`${a}-item-divider-dashed`]:!!r},n);return h.createElement(Pp,Object.assign({className:s},o))},w1=t=>{var e;const{className:n,children:r,icon:o,title:i,danger:a,extra:s}=t,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=h.useContext(hc),p=C=>{const S=r==null?void 0:r[0],x=h.createElement("span",{className:G.cn(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!o||h.isValidElement(r)&&r.type==="span")&&r&&C&&c&&typeof S=="string"?h.createElement("div",{className:`${l}-inline-collapsed-noicon`},S.charAt(0)):x},{siderCollapsed:m}=h.useContext(Tp);let g=i;typeof i>"u"?g=c?r:"":i===!1&&(g="");const v={title:g};!m&&!f&&(v.title=null,v.open=!1);const b=dr(r).length;let y=h.createElement(ou,Object.assign({},vn(t,["title","icon","danger"]),{className:G.cn({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(o?b+1:b)===1},n),title:typeof i=="string"?i:void 0}),xr(o,{className:G.cn(h.isValidElement(o)?(e=o.props)===null||e===void 0?void 0:e.className:"",`${l}-item-icon`)}),p(f));return d||(y=h.createElement(qo,Object.assign({},v,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),y)),y};var tL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const pc=h.createContext(null),nL=h.forwardRef((t,e)=>{const{children:n}=t,r=tL(t,["children"]),o=h.useContext(pc),i=h.useMemo(()=>Object.assign(Object.assign({},o),r),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=uR(n),s=Yo(e,a?Ni(n):null);return h.createElement(pc.Provider,{value:i},h.createElement(Wo,{space:!0},a?h.cloneElement(n,{ref:s}):n))}),rL=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${U(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover,
328
328
  > ${e}-item-active,
329
329
  > ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},oL=({componentCls:t,menuArrowOffset:e,calc:n})=>({[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical,
330
330
  ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${U(n(e).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${U(e)})`}}}}),a0=t=>Object.assign({},Yh(t)),s0=(t,e)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:g,itemPaddingInline:v,motionDurationMid:b,itemHoverColor:y,lineType:C,colorSplit:S,itemDisabledColor:x,dangerItemColor:w,dangerItemHoverColor:$,dangerItemSelectedColor:R,dangerItemActiveBg:M,dangerItemSelectedBg:O,popupBg:N,itemHoverBg:I,itemActiveBg:T,menuSubMenuBg:P,horizontalItemSelectedColor:A,horizontalItemSelectedBg:k,horizontalItemBorderRadius:B,horizontalItemHoverBg:_}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},a0(t)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},a0(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:y}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:I},"&:active":{backgroundColor:T}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:I},"&:active":{backgroundColor:T}}},[`${n}-item-danger`]:{color:w,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:$}},[`&${n}-item:active`]:{background:M}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:R},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:O}},[`&${n}-submenu > ${n}`]:{backgroundColor:P},[`&${n}-popup > ${n}`]:{backgroundColor:N},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:N},[`&${n}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:t.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:B,"&::after":{position:"absolute",insetInline:v,bottom:0,borderBottom:`${U(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:'""'},"&:hover, &-active, &-open":{background:_,"&::after":{borderBottomWidth:u,borderBottomColor:A}},"&-selected":{color:A,backgroundColor:k,"&:hover":{backgroundColor:k},"&::after":{borderBottomWidth:u,borderBottomColor:A}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${U(f)} ${C} ${S}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${U(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${b} ${g}`,`opacity ${b} ${g}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:R}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${b} ${m}`,`opacity ${b} ${m}`].join(",")}}}}}},l0=t=>{const{componentCls:e,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=t,u=t.calc(i).add(o).add(a).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:U(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${e}-item,
@@ -350,7 +350,7 @@ html body {
350
350
  &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottom,
351
351
  &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:rp},[`&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topLeft,
352
352
  &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-top,
353
- &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:ip}}},Ep(t,g,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},An(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},va(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${U(c)} ${U(m)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${U(c)} ${U(m)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},va(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${U(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorIcon,fontSize:p,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${U(t.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:t.calc(m).add(t.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:g,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[ba(t,"slide-up"),ba(t,"slide-down"),ac(t,"move-up"),ac(t,"move-down"),Is(t,"zoom-big")]]},pL=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},nu({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),wp(t)),mL=Yt("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:r,componentCls:o}=t,i=Mt(t,{menuCls:`${o}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:r});return[hL(i),fL(i)]},pL,{resetStyle:!1}),Ls=t=>{var e;const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:p,open:m,onOpenChange:g,visible:v,onVisibleChange:b,mouseEnterDelay:y=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:S=!0,placement:x="",overlay:w,transitionName:$,destroyOnHidden:R,destroyPopupOnHide:M}=t,{getPopupContainer:O,getPrefixCls:N,direction:I,dropdown:T}=h.useContext(gt),P=c||l,A=Kt("Dropdown");process.env.NODE_ENV!=="production"&&(Object.entries({visible:"open",onVisibleChange:"onOpenChange",overlay:"menu",dropdownRender:"popupRender",destroyPopupOnHide:"destroyOnHidden"}).forEach(([le,be])=>{A.deprecated(!(le in t),le,be)}),x.includes("Center")&&A.deprecated(!x.includes("Center"),`placement: ${x}`,`placement: ${x.slice(0,x.indexOf("Center"))}`));const k=h.useMemo(()=>{const se=N();return $!==void 0?$:x.includes("top")?`${se}-slide-down`:`${se}-slide-up`},[N,x,$]),B=h.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:I==="rtl"?"bottomRight":"bottomLeft",[x,I]),_=N("dropdown",o),F=yo(_),[H,K,V]=mL(_,F),[,W]=er(),z=h.Children.only(az(i)?h.createElement("span",null,i):i),L=xr(z,{className:G.cn(`${_}-trigger`,{[`${_}-rtl`]:I==="rtl"},z.props.className),disabled:(e=z.props.disabled)!==null&&e!==void 0?e:s}),J=s?[]:a,ne=!!(J!=null&&J.includes("contextMenu")),[q,re]=en(!1,{value:m??v}),ae=At(se=>{g==null||g(se,{source:"trigger"}),b==null||b(se),re(se)}),ee=G.cn(d,f,K,V,F,T==null?void 0:T.className,{[`${_}-rtl`]:I==="rtl"}),Y=r1({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:S,offset:W.marginXXS,arrowWidth:r?W.sizePopupArrow:0,borderRadius:W.borderRadius}),te=h.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(g==null||g(!1,{source:"menu"}),re(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),Z=()=>{let se;return n!=null&&n.items?se=h.createElement(Ko,Object.assign({},n)):typeof w=="function"?se=w():se=w,P&&(se=P(se)),se=h.Children.only(typeof se=="string"?h.createElement("span",null,se):se),h.createElement(nL,{prefixCls:`${_}-menu`,rootClassName:G.cn(V,F),expandIcon:h.createElement("span",{className:`${_}-menu-submenu-arrow`},I==="rtl"?h.createElement(dc,{className:`${_}-menu-submenu-arrow-icon`}):h.createElement(vs,{className:`${_}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:te,validator:({mode:le})=>{process.env.NODE_ENV!=="production"&&A(!le||le==="vertical","usage",`mode="${le}" is not supported for Dropdown's Menu.`)}},se)},[Q,oe]=Ns("Dropdown",p==null?void 0:p.zIndex);let ce=h.createElement(iz,Object.assign({alignPoint:ne},vn(t,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:C,visible:q,builtinPlacements:Y,arrow:!!r,overlayClassName:ee,prefixCls:_,getPopupContainer:u||O,transitionName:k,trigger:J,overlay:Z,placement:B,onVisibleChange:ae,overlayStyle:Object.assign(Object.assign(Object.assign({},T==null?void 0:T.style),p),{zIndex:Q}),autoDestroy:R??M}),L);return Q&&(ce=h.createElement(Ms.Provider,{value:oe},ce)),H(ce)},gL=dp(Ls,"align",void 0,"dropdown",t=>t),vL=t=>h.createElement(gL,Object.assign({},t),h.createElement("span",null));Ls._InternalPanelDoNotUseOrYouWillBeFired=vL;process.env.NODE_ENV!=="production"&&(Ls.displayName="Dropdown");function Fs(t){return Mt(t,{inputAffixPadding:t.paddingXXS})}const Hs=t=>{const{controlHeight:e,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:g,controlOutline:v,colorErrorOutline:b,colorWarningOutline:y,colorBgContainer:C,inputFontSize:S,inputFontSizeLG:x,inputFontSizeSM:w}=t,$=S||n,R=w||$,M=x||s,O=Math.round((e-$*r)/2*10)/10-o,N=Math.round((i-R*r)/2*10)/10-o,I=Math.ceil((a-M*l)/2*10)/10-o;return{paddingBlock:Math.max(O,0),paddingBlockSM:Math.max(N,0),paddingBlockLG:Math.max(I,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${g}px ${v}`,errorActiveShadow:`0 0 0 ${g}px ${b}`,warningActiveShadow:`0 0 0 ${g}px ${y}`,hoverBg:C,activeBg:C,inputFontSize:$,inputFontSizeLG:M,inputFontSizeSM:R}},bL=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),kp=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},bL(Mt(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),$1=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),d0=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},$1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),O1=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$1(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},kp(t))}),d0(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),d0(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),f0=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),M1=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},f0(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),f0(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},kp(t))}})}),N1=(t,e)=>{const{componentCls:n}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},R1=(t,e)=>{var n;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=e==null?void 0:e.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},h0=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},R1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),I1=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},R1(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},kp(t))}),h0(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),h0(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),p0=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),P1=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group-addon`]:{background:t.colorFillTertiary,"&:last-child":{position:"static"}}},p0(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),p0(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),T1=(t,e)=>({background:t.colorBgContainer,borderWidth:`${U(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.borderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.borderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),m0=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},T1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),A1=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},T1(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),m0(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),m0(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),k1=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),D1=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=t;return{padding:`${U(e)} ${U(o)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:r}},_1=t=>({padding:`${U(t.paddingBlockSM)} ${U(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),au=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${U(t.paddingBlock)} ${U(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},k1(t.colorTextPlaceholder)),{"&-lg":Object.assign({},D1(t)),"&-sm":Object.assign({},_1(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),j1=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},D1(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},_1(t)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-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 ${U(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${U(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${U(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${U(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${U(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},nc()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
353
+ &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:ip}}},Ep(t,g,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},An(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},va(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${U(c)} ${U(m)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${U(c)} ${U(m)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},va(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${U(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorIcon,fontSize:p,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${U(t.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:t.calc(m).add(t.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:g,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[ba(t,"slide-up"),ba(t,"slide-down"),ac(t,"move-up"),ac(t,"move-down"),Is(t,"zoom-big")]]},pL=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},nu({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),wp(t)),mL=Yt("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:r,componentCls:o}=t,i=Mt(t,{menuCls:`${o}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:r});return[hL(i),fL(i)]},pL,{resetStyle:!1}),Ls=t=>{var e;const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:p,open:m,onOpenChange:g,visible:v,onVisibleChange:b,mouseEnterDelay:y=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:S=!0,placement:x="",overlay:w,transitionName:$,destroyOnHidden:R,destroyPopupOnHide:M}=t,{getPopupContainer:O,getPrefixCls:N,direction:I,dropdown:T}=h.useContext(gt),P=c||l,A=Kt("Dropdown");process.env.NODE_ENV!=="production"&&(Object.entries({visible:"open",onVisibleChange:"onOpenChange",overlay:"menu",dropdownRender:"popupRender",destroyPopupOnHide:"destroyOnHidden"}).forEach(([le,be])=>{A.deprecated(!(le in t),le,be)}),x.includes("Center")&&A.deprecated(!x.includes("Center"),`placement: ${x}`,`placement: ${x.slice(0,x.indexOf("Center"))}`));const k=h.useMemo(()=>{const se=N();return $!==void 0?$:x.includes("top")?`${se}-slide-down`:`${se}-slide-up`},[N,x,$]),B=h.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:I==="rtl"?"bottomRight":"bottomLeft",[x,I]),_=N("dropdown",o),F=yo(_),[H,K,V]=mL(_,F),[,W]=er(),z=h.Children.only(az(i)?h.createElement("span",null,i):i),L=xr(z,{className:G.cn(`${_}-trigger`,{[`${_}-rtl`]:I==="rtl"},z.props.className),disabled:(e=z.props.disabled)!==null&&e!==void 0?e:s}),J=s?[]:a,ne=!!(J!=null&&J.includes("contextMenu")),[q,re]=en(!1,{value:m??v}),ae=At(se=>{g==null||g(se,{source:"trigger"}),b==null||b(se),re(se)}),ee=G.cn(d,f,K,V,F,T==null?void 0:T.className,{[`${_}-rtl`]:I==="rtl"}),Y=r1({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:S,offset:W.marginXXS,arrowWidth:r?W.sizePopupArrow:0,borderRadius:W.borderRadius}),te=h.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(g==null||g(!1,{source:"menu"}),re(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),Z=()=>{let se;return n!=null&&n.items?se=h.createElement(Ko,Object.assign({},n)):typeof w=="function"?se=w():se=w,P&&(se=P(se)),se=h.Children.only(typeof se=="string"?h.createElement("span",null,se):se),h.createElement(nL,{prefixCls:`${_}-menu`,rootClassName:G.cn(V,F),expandIcon:h.createElement("span",{className:`${_}-menu-submenu-arrow`},I==="rtl"?h.createElement(dc,{className:`${_}-menu-submenu-arrow-icon`}):h.createElement(vs,{className:`${_}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:te,validator:({mode:le})=>{process.env.NODE_ENV!=="production"&&A(!le||le==="vertical","usage",`mode="${le}" is not supported for Dropdown's Menu.`)}},se)},[Q,ie]=Ns("Dropdown",p==null?void 0:p.zIndex);let ce=h.createElement(iz,Object.assign({alignPoint:ne},vn(t,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:C,visible:q,builtinPlacements:Y,arrow:!!r,overlayClassName:ee,prefixCls:_,getPopupContainer:u||O,transitionName:k,trigger:J,overlay:Z,placement:B,onVisibleChange:ae,overlayStyle:Object.assign(Object.assign(Object.assign({},T==null?void 0:T.style),p),{zIndex:Q}),autoDestroy:R??M}),L);return Q&&(ce=h.createElement(Ms.Provider,{value:ie},ce)),H(ce)},gL=dp(Ls,"align",void 0,"dropdown",t=>t),vL=t=>h.createElement(gL,Object.assign({},t),h.createElement("span",null));Ls._InternalPanelDoNotUseOrYouWillBeFired=vL;process.env.NODE_ENV!=="production"&&(Ls.displayName="Dropdown");function Fs(t){return Mt(t,{inputAffixPadding:t.paddingXXS})}const Hs=t=>{const{controlHeight:e,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:g,controlOutline:v,colorErrorOutline:b,colorWarningOutline:y,colorBgContainer:C,inputFontSize:S,inputFontSizeLG:x,inputFontSizeSM:w}=t,$=S||n,R=w||$,M=x||s,O=Math.round((e-$*r)/2*10)/10-o,N=Math.round((i-R*r)/2*10)/10-o,I=Math.ceil((a-M*l)/2*10)/10-o;return{paddingBlock:Math.max(O,0),paddingBlockSM:Math.max(N,0),paddingBlockLG:Math.max(I,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${g}px ${v}`,errorActiveShadow:`0 0 0 ${g}px ${b}`,warningActiveShadow:`0 0 0 ${g}px ${y}`,hoverBg:C,activeBg:C,inputFontSize:$,inputFontSizeLG:M,inputFontSizeSM:R}},bL=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),kp=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},bL(Mt(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),$1=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),d0=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},$1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),O1=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$1(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},kp(t))}),d0(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),d0(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),f0=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),M1=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},f0(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),f0(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},kp(t))}})}),N1=(t,e)=>{const{componentCls:n}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},R1=(t,e)=>{var n;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=e==null?void 0:e.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},h0=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},R1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),I1=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},R1(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},kp(t))}),h0(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),h0(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),p0=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),P1=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group-addon`]:{background:t.colorFillTertiary,"&:last-child":{position:"static"}}},p0(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),p0(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${U(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),T1=(t,e)=>({background:t.colorBgContainer,borderWidth:`${U(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.borderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.borderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),m0=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},T1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),A1=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},T1(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),m0(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),m0(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),k1=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),D1=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=t;return{padding:`${U(e)} ${U(o)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:r}},_1=t=>({padding:`${U(t.paddingBlockSM)} ${U(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),au=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${U(t.paddingBlock)} ${U(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},k1(t.colorTextPlaceholder)),{"&-lg":Object.assign({},D1(t)),"&-sm":Object.assign({},_1(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),j1=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},D1(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},_1(t)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-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 ${U(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${U(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${U(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${U(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${U(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},nc()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
354
354
  & > ${e}-affix-wrapper,
355
355
  & > ${e}-number-affix-wrapper,
356
356
  & > ${n}-picker-range
@@ -365,7 +365,7 @@ html body {
365
365
  & > ${n}-cascader-picker:last-child ${e},
366
366
  & > ${n}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${n}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}})}},yL=t=>{const{componentCls:e,controlHeightSM:n,lineWidth:r,calc:o}=t,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),au(t)),O1(t)),I1(t)),N1(t)),A1(t)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},CL=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:t.colorIcon},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${U(t.inputAffixPadding)}`}}}},SL=t=>{const{componentCls:e,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:s}=t,l=`${e}-affix-wrapper`,c=`${e}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},au(t)),{display:"inline-flex",[`&:not(${e}-disabled):hover`]:{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${e}`]:{padding:0},[`> input${e}, > textarea${e}`]:{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"'},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),CL(t)),{[`${s}${e}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}}),[`${e}-underlined`]:{borderRadius:0},[c]:{[`${s}${e}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},xL=t=>{const{componentCls:e,borderRadiusLG:n,borderRadiusSM:r}=t;return{[`${e}-group`]:Object.assign(Object.assign(Object.assign({},An(t)),j1(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:n,fontSize:t.inputFontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:r}}},M1(t)),P1(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},wL=t=>{const{componentCls:e,antCls:n}=t,r=`${e}-search`;return{[r]:{[e]:{"&:hover, &:focus":{[`+ ${e}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{height:t.controlHeight,borderRadius:0},[`${e}-lg`]:{lineHeight:t.calc(t.lineHeightLG).sub(2e-4).equal()},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:t.colorTextDescription,"&:hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightLG}},"&-small":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button,
367
367
  > ${e},
368
- ${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},EL=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},B1=Yt(["Input","Shared"],t=>{const e=Mt(t,Fs(t));return[yL(e),SL(e)]},Hs,{resetFont:!1}),z1=Yt(["Input","Component"],t=>{const e=Mt(t,Fs(t));return[xL(e),wL(e),EL(e),Ps(e)]},Hs,{resetFont:!1}),$L=t=>{const{componentCls:e}=t;return{[e]:{"&-horizontal":{[`&${e}`]:{"&-sm":{marginBlock:t.marginXS},"&-md":{marginBlock:t.margin}}}}}},OL=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:s}=t;return{[e]:Object.assign(Object.assign({},An(t)),{borderBlockStart:`${U(o)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${U(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${U(t.marginLG)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${U(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${U(o)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${e}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${U(o)} 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${U(o)} 0 0`},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-start${e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-end${e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},ML=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),NL=Yt("Divider",t=>{const e=Mt(t,{dividerHorizontalWithTextGutterMargin:t.margin,sizePaddingEdgeHorizontal:0});return[OL(e),$L(e)]},ML,{unitless:{orientationMargin:!0}});var RL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const IL={small:"sm",middle:"md"},L1=t=>{const{getPrefixCls:e,direction:n,className:r,style:o}=hr("divider"),{prefixCls:i,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:p="solid",plain:m,style:g,size:v}=t,b=RL(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),y=e("divider",i),[C,S,x]=NL(y),w=Er(v),$=IL[w],R=!!d,M=h.useMemo(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),O=M==="start"&&l!=null,N=M==="end"&&l!=null,I=G.cn(y,r,S,x,`${y}-${a}`,{[`${y}-with-text`]:R,[`${y}-with-text-${M}`]:R,[`${y}-dashed`]:!!f,[`${y}-${p}`]:p!=="solid",[`${y}-plain`]:!!m,[`${y}-rtl`]:n==="rtl",[`${y}-no-default-orientation-margin-start`]:O,[`${y}-no-default-orientation-margin-end`]:N,[`${y}-${$}`]:!!$},c,u),T=h.useMemo(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),P={marginInlineStart:O?T:void 0,marginInlineEnd:N?T:void 0};if(process.env.NODE_ENV!=="production"){const A=Kt("Divider");process.env.NODE_ENV!=="production"&&A(!d||a!=="vertical","usage","`children` not working in `vertical` mode.")}return C(h.createElement("div",Object.assign({className:I,style:Object.assign(Object.assign({},o),g)},b,{role:"separator"}),d&&a!=="vertical"&&h.createElement("span",{className:`${y}-inner-text`,style:P},d)))};process.env.NODE_ENV!=="production"&&(L1.displayName="Divider");var g0=function(e,n){if(!e)return null;var r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return n?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},Fr=function(e){return e!==void 0?"".concat(e,"px"):void 0};function PL(t){var e=t.prefixCls,n=t.containerRef,r=t.value,o=t.getValueIndex,i=t.motionName,a=t.onMotionStart,s=t.onMotionEnd,l=t.direction,c=t.vertical,u=c===void 0?!1:c,d=h.useRef(null),f=h.useState(r),p=X(f,2),m=p[0],g=p[1],v=function(A){var k,B=o(A),_=(k=n.current)===null||k===void 0?void 0:k.querySelectorAll(".".concat(e,"-item"))[B];return(_==null?void 0:_.offsetParent)&&_},b=h.useState(null),y=X(b,2),C=y[0],S=y[1],x=h.useState(null),w=X(x,2),$=w[0],R=w[1];zt(function(){if(m!==r){var P=v(m),A=v(r),k=g0(P,u),B=g0(A,u);g(r),S(k),R(B),P&&A?a():s()}},[r]);var M=h.useMemo(function(){if(u){var P;return Fr((P=C==null?void 0:C.top)!==null&&P!==void 0?P:0)}return Fr(l==="rtl"?-(C==null?void 0:C.right):C==null?void 0:C.left)},[u,l,C]),O=h.useMemo(function(){if(u){var P;return Fr((P=$==null?void 0:$.top)!==null&&P!==void 0?P:0)}return Fr(l==="rtl"?-($==null?void 0:$.right):$==null?void 0:$.left)},[u,l,$]),N=function(){return u?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},I=function(){return u?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},T=function(){S(null),R(null),s()};return!C||!$?null:h.createElement(eo,{visible:!0,motionName:i,motionAppear:!0,onAppearStart:N,onAppearActive:I,onVisibleChanged:T},function(P,A){var k=P.className,B=P.style,_=j(j({},B),{},{"--thumb-start-left":M,"--thumb-start-width":Fr(C==null?void 0:C.width),"--thumb-active-left":O,"--thumb-active-width":Fr($==null?void 0:$.width),"--thumb-start-top":M,"--thumb-start-height":Fr(C==null?void 0:C.height),"--thumb-active-top":O,"--thumb-active-height":Fr($==null?void 0:$.height)}),F={ref:Qn(d,A),style:_,className:G.cn("".concat(e,"-thumb"),k)};return process.env.NODE_ENV==="test"&&(F["data-test-style"]=JSON.stringify(_)),h.createElement("div",F)})}var TL=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function AL(t){if(typeof t.title<"u")return t.title;if(Ue(t.label)!=="object"){var e;return(e=t.label)===null||e===void 0?void 0:e.toString()}}function kL(t){return t.map(function(e){if(Ue(e)==="object"&&e!==null){var n=AL(e);return j(j({},e),{},{title:n})}return{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e}})}var DL=function(e){var n=e.prefixCls,r=e.className,o=e.disabled,i=e.checked,a=e.label,s=e.title,l=e.value,c=e.name,u=e.onChange,d=e.onFocus,f=e.onBlur,p=e.onKeyDown,m=e.onKeyUp,g=e.onMouseDown,v=function(y){o||u(y,l)};return h.createElement("label",{className:G.cn(r,D({},"".concat(n,"-item-disabled"),o)),onMouseDown:g},h.createElement("input",{name:c,className:"".concat(n,"-item-input"),type:"radio",disabled:o,checked:i,onChange:v,onFocus:d,onBlur:f,onKeyDown:p,onKeyUp:m}),h.createElement("div",{className:"".concat(n,"-item-label"),title:s,"aria-selected":i},a))},F1=h.forwardRef(function(t,e){var n,r,o=t.prefixCls,i=o===void 0?"rc-segmented":o,a=t.direction,s=t.vertical,l=t.options,c=l===void 0?[]:l,u=t.disabled,d=t.defaultValue,f=t.value,p=t.name,m=t.onChange,g=t.className,v=g===void 0?"":g,b=t.motionName,y=b===void 0?"thumb-motion":b,C=lt(t,TL),S=h.useRef(null),x=h.useMemo(function(){return Qn(S,e)},[S,e]),w=h.useMemo(function(){return kL(c)},[c]),$=en((n=w[0])===null||n===void 0?void 0:n.value,{value:f,defaultValue:d}),R=X($,2),M=R[0],O=R[1],N=h.useState(!1),I=X(N,2),T=I[0],P=I[1],A=function(Y,te){O(te),m==null||m(te)},k=vn(C,["children"]),B=h.useState(!1),_=X(B,2),F=_[0],H=_[1],K=h.useState(!1),V=X(K,2),W=V[0],z=V[1],L=function(){z(!0)},J=function(){z(!1)},ne=function(){H(!1)},q=function(Y){Y.key==="Tab"&&H(!0)},re=function(Y){var te=w.findIndex(function(ce){return ce.value===M}),Z=w.length,Q=(te+Y+Z)%Z,oe=w[Q];oe&&(O(oe.value),m==null||m(oe.value))},ae=function(Y){switch(Y.key){case"ArrowLeft":case"ArrowUp":re(-1);break;case"ArrowRight":case"ArrowDown":re(1);break}};return h.createElement("div",ge({role:"radiogroup","aria-label":"segmented control",tabIndex:u?void 0:0},k,{className:G.cn(i,(r={},D(r,"".concat(i,"-rtl"),a==="rtl"),D(r,"".concat(i,"-disabled"),u),D(r,"".concat(i,"-vertical"),s),r),v),ref:x}),h.createElement("div",{className:"".concat(i,"-group")},h.createElement(PL,{vertical:s,prefixCls:i,value:M,containerRef:S,motionName:"".concat(i,"-").concat(y),direction:a,getValueIndex:function(Y){return w.findIndex(function(te){return te.value===Y})},onMotionStart:function(){P(!0)},onMotionEnd:function(){P(!1)}}),w.map(function(ee){var Y;return h.createElement(DL,ge({},ee,{name:p,key:ee.value,prefixCls:i,className:G.cn(ee.className,"".concat(i,"-item"),(Y={},D(Y,"".concat(i,"-item-selected"),ee.value===M&&!T),D(Y,"".concat(i,"-item-focused"),W&&F&&ee.value===M),Y)),checked:ee.value===M,onChange:A,onFocus:L,onBlur:J,onKeyDown:ae,onKeyUp:q,onMouseDown:ne,disabled:!!u||!!ee.disabled}))})))});process.env.NODE_ENV!=="production"&&(F1.displayName="Segmented");var _L=F1;function v0(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function b0(t){return{backgroundColor:t.itemSelectedBg,boxShadow:t.boxShadowTertiary}}const jL=Object.assign({overflow:"hidden"},gs),BL=t=>{const{componentCls:e}=t,n=t.calc(t.controlHeight).sub(t.calc(t.trackPadding).mul(2)).equal(),r=t.calc(t.controlHeightLG).sub(t.calc(t.trackPadding).mul(2)).equal(),o=t.calc(t.controlHeightSM).sub(t.calc(t.trackPadding).mul(2)).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),{display:"inline-block",padding:t.trackPadding,color:t.itemColor,background:t.trackBg,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`}),va(t)),{[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-vertical`]:{[`${e}-group`]:{flexDirection:"column"},[`${e}-thumb`]:{width:"100%",height:0,padding:`0 ${U(t.paddingXXS)}`}},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},b0(t)),{color:t.itemSelectedColor}),"&-focused":Object.assign({},Yh(t)),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{opacity:1,backgroundColor:t.itemHoverBg}},[`&:active:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{opacity:1,backgroundColor:t.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:U(n),padding:`0 ${U(t.segmentedPaddingHorizontal)}`},jL),"&-icon + *":{marginInlineStart:t.calc(t.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:Object.assign(Object.assign({},b0(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${U(t.paddingXXS)} 0`,borderRadius:t.borderRadiusSM,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, height ${t.motionDurationSlow} ${t.motionEaseInOut}`,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:r,lineHeight:U(r),padding:`0 ${U(t.segmentedPaddingHorizontal)}`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:o,lineHeight:U(o),padding:`0 ${U(t.segmentedPaddingHorizontalSM)}`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),v0(`&-disabled ${e}-item`,t)),v0(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"},[`&${e}-shape-round`]:{borderRadius:9999,[`${e}-item, ${e}-thumb`]:{borderRadius:9999}}})}},zL=t=>{const{colorTextLabel:e,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:a,colorBgLayout:s}=t;return{trackPadding:a,trackBg:s,itemColor:e,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}},LL=Yt("Segmented",t=>{const{lineWidth:e,calc:n}=t,r=Mt(t,{segmentedPaddingHorizontal:n(t.controlPaddingHorizontal).sub(e).equal(),segmentedPaddingHorizontalSM:n(t.controlPaddingHorizontalSM).sub(e).equal()});return[BL(r)]},zL);var y0=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function FL(t){return typeof t=="object"&&!!(t!=null&&t.icon)}const HL=h.forwardRef((t,e)=>{const n=Yc(),{prefixCls:r,className:o,rootClassName:i,block:a,options:s=[],size:l="middle",style:c,vertical:u,shape:d="default",name:f=n}=t,p=y0(t,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:m,direction:g,className:v,style:b}=hr("segmented"),y=m("segmented",r),[C,S,x]=LL(y),w=Er(l),$=h.useMemo(()=>s.map(O=>{if(FL(O)){const{icon:N,label:I}=O,T=y0(O,["icon","label"]);return Object.assign(Object.assign({},T),{label:h.createElement(h.Fragment,null,h.createElement("span",{className:`${y}-item-icon`},N),I&&h.createElement("span",null,I))})}return O}),[s,y]),R=G.cn(o,i,v,{[`${y}-block`]:a,[`${y}-sm`]:w==="small",[`${y}-lg`]:w==="large",[`${y}-vertical`]:u,[`${y}-shape-${d}`]:d==="round"},S,x),M=Object.assign(Object.assign({},b),c);return C(h.createElement(_L,Object.assign({},p,{name:f,className:R,style:M,options:$,ref:e,prefixCls:y,direction:g,vertical:u})))}),H1=HL;process.env.NODE_ENV!=="production"&&(H1.displayName="Segmented");const V1=E.createContext({}),W1=E.createContext({}),q1=({prefixCls:t,value:e,onChange:n})=>{const r=()=>{if(n&&e&&!e.cleared){const o=e.toHsb();o.a=0;const i=Ln(o);i.cleared=!0,n(i)}};return E.createElement("div",{className:`${t}-clear`,onClick:r})},K1="hex",G1="rgb",U1="hsb";var VL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},WL=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:VL}))},X1=h.forwardRef(WL);process.env.NODE_ENV!=="production"&&(X1.displayName="UpOutlined");function th(){return typeof BigInt=="function"}function Y1(t){return!t&&t!==0&&!Number.isNaN(t)||!String(t).trim()}function mi(t){var e=t.trim(),n=e.startsWith("-");n&&(e=e.slice(1)),e=e.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),e.startsWith(".")&&(e="0".concat(e));var r=e||"0",o=r.split("."),i=o[0]||"0",a=o[1]||"0";i==="0"&&a==="0"&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:i,decimalStr:a,fullStr:"".concat(s).concat(r)}}function Dp(t){var e=String(t);return!Number.isNaN(Number(e))&&e.includes("e")}function ci(t){var e=String(t);if(Dp(t)){var n=Number(e.slice(e.indexOf("e-")+2)),r=e.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return e.includes(".")&&_p(e)?e.length-e.indexOf(".")-1:0}function su(t){var e=String(t);if(Dp(t)){if(t>Number.MAX_SAFE_INTEGER)return String(th()?BigInt(t).toString():Number.MAX_SAFE_INTEGER);if(t<Number.MIN_SAFE_INTEGER)return String(th()?BigInt(t).toString():Number.MIN_SAFE_INTEGER);e=t.toFixed(ci(e))}return mi(e).fullStr}function _p(t){return typeof t=="number"?!Number.isNaN(t):t?/^\s*-?\d+(\.\d+)?\s*$/.test(t)||/^\s*-?\d+\.\s*$/.test(t)||/^\s*-?\.\d+\s*$/.test(t):!1}var qL=function(){function t(e){if(ln(this,t),D(this,"origin",""),D(this,"negative",void 0),D(this,"integer",void 0),D(this,"decimal",void 0),D(this,"decimalLen",void 0),D(this,"empty",void 0),D(this,"nan",void 0),Y1(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}var n=e;if(Dp(n)&&(n=Number(n)),n=typeof n=="string"?n:su(n),_p(n)){var r=mi(n);this.negative=r.negative;var o=r.trimStr.split(".");this.integer=BigInt(o[0]);var i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}return cn(t,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(r)}},{key:"negate",value:function(){var n=new t(this.toString());return n.negative=!n.negative,n}},{key:"cal",value:function(n,r,o){var i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),a=this.alignDecimal(i),s=n.alignDecimal(i),l=r(a,s).toString(),c=o(i),u=mi(l),d=u.negativeStr,f=u.trimStr,p="".concat(d).concat(f.padStart(c+1,"0"));return new t("".concat(p.slice(0,-c),".").concat(p.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new t(n);var r=new t(n);return r.isInvalidate()?this:this.cal(r,function(o,i){return o+i},function(o){return o})}},{key:"multi",value:function(n){var r=new t(n);return this.isInvalidate()||r.isInvalidate()?new t(NaN):this.cal(r,function(o,i){return o*i},function(o){return o*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===(n==null?void 0:n.toString())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":mi("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),t}(),KL=function(){function t(e){if(ln(this,t),D(this,"origin",""),D(this,"number",void 0),D(this,"empty",void 0),Y1(e)){this.empty=!0;return}this.origin=String(e),this.number=Number(e)}return cn(t,[{key:"negate",value:function(){return new t(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new t(n);var r=Number(n);if(Number.isNaN(r))return this;var o=this.number+r;if(o>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var i=Math.max(ci(this.number),ci(r));return new t(o.toFixed(i))}},{key:"multi",value:function(n){var r=Number(n);if(this.isInvalidate()||Number.isNaN(r))return new t(NaN);var o=this.number*r;if(o>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var i=Math.max(ci(this.number),ci(r));return new t(o.toFixed(i))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===(n==null?void 0:n.toNumber())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":su(this.number):this.origin}}]),t}();function Mr(t){return th()?new qL(t):new KL(t)}function kl(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="")return"";var o=mi(t),i=o.negativeStr,a=o.integerStr,s=o.decimalStr,l="".concat(e).concat(s),c="".concat(i).concat(a);if(n>=0){var u=Number(s[n]);if(u>=5&&!r){var d=Mr(t).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-u));return kl(d.toString(),e,n,r)}return n===0?c:"".concat(c).concat(e).concat(s.padEnd(n,"0").slice(0,n))}return l===".0"?c:"".concat(c).concat(l)}function GL(t){return!!(t.addonBefore||t.addonAfter)}function UL(t){return!!(t.prefix||t.suffix||t.allowClear)}function C0(t,e,n){var r=e.cloneNode(!0),o=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},o}function mc(t,e,n,r){if(n){var o=e;if(e.type==="click"){o=C0(e,t,""),n(o);return}if(t.type!=="file"&&r!==void 0){o=C0(e,t,r),n(o);return}n(o)}}function jp(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var o=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(o,o);break;default:t.setSelectionRange(0,o)}}}}var Bp=E.forwardRef(function(t,e){var n,r,o,i=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,d=t.addonAfter,f=t.className,p=t.style,m=t.disabled,g=t.readOnly,v=t.focused,b=t.triggerFocus,y=t.allowClear,C=t.value,S=t.handleReset,x=t.hidden,w=t.classes,$=t.classNames,R=t.dataAttrs,M=t.styles,O=t.components,N=t.onClear,I=a??i,T=(O==null?void 0:O.affixWrapper)||"span",P=(O==null?void 0:O.groupWrapper)||"span",A=(O==null?void 0:O.wrapper)||"span",k=(O==null?void 0:O.groupAddon)||"span",B=E.useRef(null),_=function(Q){var oe;(oe=B.current)!==null&&oe!==void 0&&oe.contains(Q.target)&&(b==null||b())},F=UL(t),H=E.cloneElement(I,{value:C,className:G.cn((n=I.props)===null||n===void 0?void 0:n.className,!F&&($==null?void 0:$.variant))||null}),K=E.useRef(null);if(E.useImperativeHandle(e,function(){return{nativeElement:K.current||B.current}}),F){var V=null;if(y){var W=!m&&!g&&C,z="".concat(s,"-clear-icon"),L=Ue(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"✖";V=E.createElement("button",{type:"button",tabIndex:-1,onClick:function(Q){S==null||S(Q),N==null||N()},onMouseDown:function(Q){return Q.preventDefault()},className:G.cn(z,D(D({},"".concat(z,"-hidden"),!W),"".concat(z,"-has-suffix"),!!c))},L)}var J="".concat(s,"-affix-wrapper"),ne=G.cn(J,D(D(D(D(D({},"".concat(s,"-disabled"),m),"".concat(J,"-disabled"),m),"".concat(J,"-focused"),v),"".concat(J,"-readonly"),g),"".concat(J,"-input-with-clear-btn"),c&&y&&C),w==null?void 0:w.affixWrapper,$==null?void 0:$.affixWrapper,$==null?void 0:$.variant),q=(c||y)&&E.createElement("span",{className:G.cn("".concat(s,"-suffix"),$==null?void 0:$.suffix),style:M==null?void 0:M.suffix},V,c);H=E.createElement(T,ge({className:ne,style:M==null?void 0:M.affixWrapper,onClick:_},R==null?void 0:R.affixWrapper,{ref:B}),l&&E.createElement("span",{className:G.cn("".concat(s,"-prefix"),$==null?void 0:$.prefix),style:M==null?void 0:M.prefix},l),H,q)}if(GL(t)){var re="".concat(s,"-group"),ae="".concat(re,"-addon"),ee="".concat(re,"-wrapper"),Y=G.cn("".concat(s,"-wrapper"),re,w==null?void 0:w.wrapper,$==null?void 0:$.wrapper),te=G.cn(ee,D({},"".concat(ee,"-disabled"),m),w==null?void 0:w.group,$==null?void 0:$.groupWrapper);H=E.createElement(P,{className:te,ref:K},E.createElement(A,{className:Y},u&&E.createElement(k,{className:ae},u),H,d&&E.createElement(k,{className:ae},d)))}return E.cloneElement(H,{className:G.cn((r=H.props)===null||r===void 0?void 0:r.className,f)||null,style:j(j({},(o=H.props)===null||o===void 0?void 0:o.style),p),hidden:x})}),XL=["show"];function J1(t,e){return h.useMemo(function(){var n={};e&&(n.show=Ue(e)==="object"&&e.formatter?e.formatter:!!e),n=j(j({},n),t);var r=n,o=r.show,i=lt(r,XL);return j(j({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[t,e])}var YL=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],JL=E.forwardRef(function(t,e){var n=t.autoComplete,r=t.onChange,o=t.onFocus,i=t.onBlur,a=t.onPressEnter,s=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,d=t.disabled,f=t.htmlSize,p=t.className,m=t.maxLength,g=t.suffix,v=t.showCount,b=t.count,y=t.type,C=y===void 0?"text":y,S=t.classes,x=t.classNames,w=t.styles,$=t.onCompositionStart,R=t.onCompositionEnd,M=lt(t,YL),O=E.useState(!1),N=X(O,2),I=N[0],T=N[1],P=E.useRef(!1),A=E.useRef(!1),k=E.useRef(null),B=E.useRef(null),_=function(ue){k.current&&jp(k.current,ue)},F=en(t.defaultValue,{value:t.value}),H=X(F,2),K=H[0],V=H[1],W=K==null?"":String(K),z=E.useState(null),L=X(z,2),J=L[0],ne=L[1],q=J1(b,v),re=q.max||m,ae=q.strategy(W),ee=!!re&&ae>re;E.useImperativeHandle(e,function(){var de;return{focus:_,blur:function(){var pe;(pe=k.current)===null||pe===void 0||pe.blur()},setSelectionRange:function(pe,Ae,_e){var Re;(Re=k.current)===null||Re===void 0||Re.setSelectionRange(pe,Ae,_e)},select:function(){var pe;(pe=k.current)===null||pe===void 0||pe.select()},input:k.current,nativeElement:((de=B.current)===null||de===void 0?void 0:de.nativeElement)||k.current}}),E.useEffect(function(){A.current&&(A.current=!1),T(function(de){return de&&d?!1:de})},[d]);var Y=function(ue,pe,Ae){var _e=pe;if(!P.current&&q.exceedFormatter&&q.max&&q.strategy(pe)>q.max){if(_e=q.exceedFormatter(pe,{max:q.max}),pe!==_e){var Re,$e;ne([((Re=k.current)===null||Re===void 0?void 0:Re.selectionStart)||0,(($e=k.current)===null||$e===void 0?void 0:$e.selectionEnd)||0])}}else if(Ae.source==="compositionEnd")return;V(_e),k.current&&mc(k.current,ue,r,_e)};E.useEffect(function(){if(J){var de;(de=k.current)===null||de===void 0||de.setSelectionRange.apply(de,he(J))}},[J]);var te=function(ue){Y(ue,ue.target.value,{source:"change"})},Z=function(ue){P.current=!1,Y(ue,ue.currentTarget.value,{source:"compositionEnd"}),R==null||R(ue)},Q=function(ue){a&&ue.key==="Enter"&&!A.current&&(A.current=!0,a(ue)),s==null||s(ue)},oe=function(ue){ue.key==="Enter"&&(A.current=!1),l==null||l(ue)},ce=function(ue){T(!0),o==null||o(ue)},se=function(ue){A.current&&(A.current=!1),T(!1),i==null||i(ue)},le=function(ue){V(""),_(),k.current&&mc(k.current,ue,r)},be=ee&&"".concat(u,"-out-of-range"),ye=function(){var ue=vn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return E.createElement("input",ge({autoComplete:n},ue,{onChange:te,onFocus:ce,onBlur:se,onKeyDown:Q,onKeyUp:oe,className:G.cn(u,D({},"".concat(u,"-disabled"),d),x==null?void 0:x.input),style:w==null?void 0:w.input,ref:k,size:f,type:C,onCompositionStart:function(Ae){P.current=!0,$==null||$(Ae)},onCompositionEnd:Z}))},Be=function(){var ue=Number(re)>0;if(g||q.show){var pe=q.showFormatter?q.showFormatter({value:W,count:ae,maxLength:re}):"".concat(ae).concat(ue?" / ".concat(re):"");return E.createElement(E.Fragment,null,q.show&&E.createElement("span",{className:G.cn("".concat(u,"-show-count-suffix"),D({},"".concat(u,"-show-count-has-suffix"),!!g),x==null?void 0:x.count),style:j({},w==null?void 0:w.count)},pe),g)}return null};return E.createElement(Bp,ge({},M,{prefixCls:u,className:G.cn(p,be),handleReset:le,value:W,focused:I,triggerFocus:_,suffix:Be(),disabled:d,classes:S,classNames:x,styles:w,ref:B}),ye())});function ZL(t,e){return typeof Proxy<"u"&&t?new Proxy(t,{get:function(r,o){if(e[o])return e[o];var i=r[o];return typeof i=="function"?i.bind(r):i}}):t}function QL(t,e){var n=E.useRef(null);function r(){try{var i=t.selectionStart,a=t.selectionEnd,s=t.value,l=s.substring(0,i),c=s.substring(a);n.current={start:i,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function o(){if(t&&n.current&&e)try{var i=t.value,a=n.current,s=a.beforeTxt,l=a.afterTxt,c=a.start,u=i.length;if(i.startsWith(s))u=s.length;else if(i.endsWith(l))u=i.length-n.current.afterTxt.length;else{var d=s[c-1],f=i.indexOf(d,c-1);f!==-1&&(u=f+1)}t.setSelectionRange(u,u)}catch(p){at(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(p.message))}}return[r,o]}var eF=function(){var e=E.useState(!1),n=X(e,2),r=n[0],o=n[1];return zt(function(){o(fp())},[]),r},tF=200,nF=600;function rF(t){var e=t.prefixCls,n=t.upNode,r=t.downNode,o=t.upDisabled,i=t.downDisabled,a=t.onStep,s=h.useRef(),l=h.useRef([]),c=h.useRef();c.current=a;var u=function(){clearTimeout(s.current)},d=function(C,S){C.preventDefault(),u(),c.current(S);function x(){c.current(S),s.current=setTimeout(x,tF)}s.current=setTimeout(x,nF)};h.useEffect(function(){return function(){u(),l.current.forEach(function(y){return wt.cancel(y)})}},[]);var f=eF();if(f)return null;var p="".concat(e,"-handler"),m=G.cn(p,"".concat(p,"-up"),D({},"".concat(p,"-up-disabled"),o)),g=G.cn(p,"".concat(p,"-down"),D({},"".concat(p,"-down-disabled"),i)),v=function(){return l.current.push(wt(u))},b={unselectable:"on",role:"button",onMouseUp:v,onMouseLeave:v};return h.createElement("div",{className:"".concat(p,"-wrap")},h.createElement("span",ge({},b,{onMouseDown:function(C){d(C,!0)},"aria-label":"Increase Value","aria-disabled":o,className:m}),n||h.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-up-inner")})),h.createElement("span",ge({},b,{onMouseDown:function(C){d(C,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:g}),r||h.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-down-inner")})))}function S0(t){var e=typeof t=="number"?su(t):mi(t).fullStr,n=e.includes(".");return n?mi(e.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:t+"0"}const oF=function(){var t=E.useRef(0),e=function(){wt.cancel(t.current)};return E.useEffect(function(){return e},[]),function(n){e(),t.current=wt(function(){n()})}};var iF=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],aF=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],x0=function(e,n){return e||n.isEmpty()?n.toString():n.toNumber()},w0=function(e){var n=Mr(e);return n.isInvalidate()?null:n},sF=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,o=t.style,i=t.min,a=t.max,s=t.step,l=s===void 0?1:s,c=t.defaultValue,u=t.value,d=t.disabled,f=t.readOnly,p=t.upHandler,m=t.downHandler,g=t.keyboard,v=t.changeOnWheel,b=v===void 0?!1:v,y=t.controls,C=y===void 0?!0:y;t.classNames;var S=t.stringMode,x=t.parser,w=t.formatter,$=t.precision,R=t.decimalSeparator,M=t.onChange,O=t.onInput,N=t.onPressEnter,I=t.onStep,T=t.changeOnBlur,P=T===void 0?!0:T,A=t.domRef,k=lt(t,iF),B="".concat(n,"-input"),_=h.useRef(null),F=h.useState(!1),H=X(F,2),K=H[0],V=H[1],W=h.useRef(!1),z=h.useRef(!1),L=h.useRef(!1),J=h.useState(function(){return Mr(u??c)}),ne=X(J,2),q=ne[0],re=ne[1];function ae(Pe){u===void 0&&re(Pe)}var ee=h.useCallback(function(Pe,Se){if(!Se)return $>=0?$:Math.max(ci(Pe),ci(l))},[$,l]),Y=h.useCallback(function(Pe){var Se=String(Pe);if(x)return x(Se);var Xe=Se;return R&&(Xe=Xe.replace(R,".")),Xe.replace(/[^\w.-]+/g,"")},[x,R]),te=h.useRef(""),Z=h.useCallback(function(Pe,Se){if(w)return w(Pe,{userTyping:Se,input:String(te.current)});var Xe=typeof Pe=="number"?su(Pe):Pe;if(!Se){var Ge=ee(Xe,Se);if(_p(Xe)&&(R||Ge>=0)){var et=R||".";Xe=kl(Xe,et,Ge)}}return Xe},[w,ee,R]),Q=h.useState(function(){var Pe=c??u;return q.isInvalidate()&&["string","number"].includes(Ue(Pe))?Number.isNaN(Pe)?"":Pe:Z(q.toString(),!1)}),oe=X(Q,2),ce=oe[0],se=oe[1];te.current=ce;function le(Pe,Se){se(Z(Pe.isInvalidate()?Pe.toString(!1):Pe.toString(!Se),Se))}var be=h.useMemo(function(){return w0(a)},[a,$]),ye=h.useMemo(function(){return w0(i)},[i,$]),Be=h.useMemo(function(){return!be||!q||q.isInvalidate()?!1:be.lessEquals(q)},[be,q]),de=h.useMemo(function(){return!ye||!q||q.isInvalidate()?!1:q.lessEquals(ye)},[ye,q]),ue=QL(_.current,K),pe=X(ue,2),Ae=pe[0],_e=pe[1],Re=function(Se){return be&&!Se.lessEquals(be)?be:ye&&!ye.lessEquals(Se)?ye:null},$e=function(Se){return!Re(Se)},We=function(Se,Xe){var Ge=Se,et=$e(Ge)||Ge.isEmpty();if(!Ge.isEmpty()&&!Xe&&(Ge=Re(Ge)||Ge,et=!0),!f&&!d&&et){var je=Ge.toString(),we=ee(je,Xe);return we>=0&&(Ge=Mr(kl(je,".",we)),$e(Ge)||(Ge=Mr(kl(je,".",we,!0)))),Ge.equals(q)||(ae(Ge),M==null||M(Ge.isEmpty()?null:x0(S,Ge)),u===void 0&&le(Ge,Xe)),Ge}return q},ke=oF(),De=function Pe(Se){if(Ae(),te.current=Se,se(Se),!z.current){var Xe=Y(Se),Ge=Mr(Xe);Ge.isNaN()||We(Ge,!0)}O==null||O(Se),ke(function(){var et=Se;x||(et=Se.replace(/。/g,".")),et!==Se&&Pe(et)})},me=function(){z.current=!0},Ne=function(){z.current=!1,De(_.current.value)},Ze=function(Se){De(Se.target.value)},Ie=function(Se){var Xe;if(!(Se&&Be||!Se&&de)){W.current=!1;var Ge=Mr(L.current?S0(l):l);Se||(Ge=Ge.negate());var et=(q||Mr(0)).add(Ge.toString()),je=We(et,!1);I==null||I(x0(S,je),{offset:L.current?S0(l):l,type:Se?"up":"down"}),(Xe=_.current)===null||Xe===void 0||Xe.focus()}},xe=function(Se){var Xe=Mr(Y(ce)),Ge;Xe.isNaN()?Ge=We(q,Se):Ge=We(Xe,Se),u!==void 0?le(q,!1):Ge.isNaN()||le(Ge,!1)},ot=function(){W.current=!0},ft=function(Se){var Xe=Se.key,Ge=Se.shiftKey;W.current=!0,L.current=Ge,Xe==="Enter"&&(z.current||(W.current=!1),xe(!1),N==null||N(Se)),g!==!1&&!z.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Xe)&&(Ie(Xe==="Up"||Xe==="ArrowUp"),Se.preventDefault())},Tt=function(){W.current=!1,L.current=!1};h.useEffect(function(){if(b&&K){var Pe=function(Ge){Ie(Ge.deltaY<0),Ge.preventDefault()},Se=_.current;if(Se)return Se.addEventListener("wheel",Pe,{passive:!1}),function(){return Se.removeEventListener("wheel",Pe)}}});var Bt=function(){P&&xe(!1),V(!1),W.current=!1};return Ua(function(){q.isInvalidate()||le(q,!1)},[$,w]),Ua(function(){var Pe=Mr(u);re(Pe);var Se=Mr(Y(ce));(!Pe.equals(Se)||!W.current||w)&&le(Pe,W.current)},[u]),Ua(function(){w&&_e()},[ce]),h.createElement("div",{ref:A,className:G.cn(n,r,D(D(D(D(D({},"".concat(n,"-focused"),K),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),f),"".concat(n,"-not-a-number"),q.isNaN()),"".concat(n,"-out-of-range"),!q.isInvalidate()&&!$e(q))),style:o,onFocus:function(){V(!0)},onBlur:Bt,onKeyDown:ft,onKeyUp:Tt,onCompositionStart:me,onCompositionEnd:Ne,onBeforeInput:ot},C&&h.createElement(rF,{prefixCls:n,upNode:p,downNode:m,upDisabled:Be,downDisabled:de,onStep:Ie}),h.createElement("div",{className:"".concat(B,"-wrap")},h.createElement("input",ge({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":q.isInvalidate()?null:q.toString(),step:l},k,{ref:Qn(_,e),className:B,value:ce,onChange:Ze,disabled:d,readOnly:f}))))}),Z1=h.forwardRef(function(t,e){var n=t.disabled,r=t.style,o=t.prefixCls,i=o===void 0?"rc-input-number":o,a=t.value,s=t.prefix,l=t.suffix,c=t.addonBefore,u=t.addonAfter,d=t.className,f=t.classNames,p=lt(t,aF),m=h.useRef(null),g=h.useRef(null),v=h.useRef(null),b=function(C){v.current&&jp(v.current,C)};return h.useImperativeHandle(e,function(){return ZL(v.current,{focus:b,nativeElement:m.current.nativeElement||g.current})}),h.createElement(Bp,{className:d,triggerFocus:b,prefixCls:i,value:a,disabled:n,style:r,prefix:s,suffix:l,addonAfter:u,addonBefore:c,classNames:f,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:m},h.createElement(sF,ge({prefixCls:i,disabled:n,ref:v,domRef:g,className:f==null?void 0:f.input},p)))});process.env.NODE_ENV!=="production"&&(Z1.displayName="InputNumber");const lF=t=>{var e;const n=(e=t.handleVisible)!==null&&e!==void 0?e:"auto",r=t.controlHeightSM-t.lineWidth*2;return Object.assign(Object.assign({},Hs(t)),{controlWidth:90,handleWidth:r,handleFontSize:t.fontSize/2,handleVisible:n,handleActiveBg:t.colorFillAlter,handleBg:t.colorBgContainer,filledHandleBg:new Pt(t.colorFillSecondary).onBackground(t.colorBgContainer).toHexString(),handleHoverColor:t.colorPrimary,handleBorderColor:t.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},E0=({componentCls:t,borderRadiusSM:e,borderRadiusLG:n},r)=>{const o=r==="lg"?n:e;return{[`&-${r}`]:{[`${t}-handler-wrap`]:{borderStartEndRadius:o,borderEndEndRadius:o},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderEndEndRadius:o}}}},cF=t=>{const{componentCls:e,lineWidth:n,lineType:r,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:f,paddingInlineLG:p,colorIcon:m,motionDurationMid:g,handleHoverColor:v,handleOpacity:b,paddingInline:y,paddingBlock:C,handleBg:S,handleActiveBg:x,colorTextDisabled:w,borderRadiusSM:$,borderRadiusLG:R,controlWidth:M,handleBorderColor:O,filledHandleBg:N,lineHeightLG:I,calc:T}=t;return[{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),au(t)),{display:"inline-block",width:M,margin:0,padding:0,borderRadius:o}),O1(t,{[`${e}-handler-wrap`]:{background:S,[`${e}-handler-down`]:{borderBlockStart:`${U(n)} ${r} ${O}`}}})),I1(t,{[`${e}-handler-wrap`]:{background:N,[`${e}-handler-down`]:{borderBlockStart:`${U(n)} ${r} ${O}`}},"&:focus-within":{[`${e}-handler-wrap`]:{background:S}}})),A1(t,{[`${e}-handler-wrap`]:{background:S,[`${e}-handler-down`]:{borderBlockStart:`${U(n)} ${r} ${O}`}}})),N1(t)),{"&-rtl":{direction:"rtl",[`${e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:I,borderRadius:R,[`input${e}-input`]:{height:T(s).sub(T(n).mul(2)).equal(),padding:`${U(f)} ${U(p)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:$,[`input${e}-input`]:{height:T(l).sub(T(n).mul(2)).equal(),padding:`${U(d)} ${U(u)}`}},"&-out-of-range":{[`${e}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},An(t)),j1(t)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${e}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${e}-group-addon`]:{borderRadius:R,fontSize:t.fontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:$}}},M1(t)),P1(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${e}-input`]:{cursor:"not-allowed"},[e]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),{width:"100%",padding:`${U(C)} ${U(y)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${g} linear`,appearance:"textfield",fontSize:"inherit"}),k1(t.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1}})},{[e]:Object.assign(Object.assign(Object.assign({[`${e}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:t.handleVisibleWidth,opacity:b,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${g}`,overflow:"hidden",[`${e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
368
+ ${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},EL=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},B1=Yt(["Input","Shared"],t=>{const e=Mt(t,Fs(t));return[yL(e),SL(e)]},Hs,{resetFont:!1}),z1=Yt(["Input","Component"],t=>{const e=Mt(t,Fs(t));return[xL(e),wL(e),EL(e),Ps(e)]},Hs,{resetFont:!1}),$L=t=>{const{componentCls:e}=t;return{[e]:{"&-horizontal":{[`&${e}`]:{"&-sm":{marginBlock:t.marginXS},"&-md":{marginBlock:t.margin}}}}}},OL=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:s}=t;return{[e]:Object.assign(Object.assign({},An(t)),{borderBlockStart:`${U(o)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${U(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${U(t.marginLG)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${U(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${U(o)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${e}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${U(o)} 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${U(o)} 0 0`},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-start${e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-end${e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},ML=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),NL=Yt("Divider",t=>{const e=Mt(t,{dividerHorizontalWithTextGutterMargin:t.margin,sizePaddingEdgeHorizontal:0});return[OL(e),$L(e)]},ML,{unitless:{orientationMargin:!0}});var RL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const IL={small:"sm",middle:"md"},L1=t=>{const{getPrefixCls:e,direction:n,className:r,style:o}=hr("divider"),{prefixCls:i,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:p="solid",plain:m,style:g,size:v}=t,b=RL(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),y=e("divider",i),[C,S,x]=NL(y),w=Er(v),$=IL[w],R=!!d,M=h.useMemo(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),O=M==="start"&&l!=null,N=M==="end"&&l!=null,I=G.cn(y,r,S,x,`${y}-${a}`,{[`${y}-with-text`]:R,[`${y}-with-text-${M}`]:R,[`${y}-dashed`]:!!f,[`${y}-${p}`]:p!=="solid",[`${y}-plain`]:!!m,[`${y}-rtl`]:n==="rtl",[`${y}-no-default-orientation-margin-start`]:O,[`${y}-no-default-orientation-margin-end`]:N,[`${y}-${$}`]:!!$},c,u),T=h.useMemo(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),P={marginInlineStart:O?T:void 0,marginInlineEnd:N?T:void 0};if(process.env.NODE_ENV!=="production"){const A=Kt("Divider");process.env.NODE_ENV!=="production"&&A(!d||a!=="vertical","usage","`children` not working in `vertical` mode.")}return C(h.createElement("div",Object.assign({className:I,style:Object.assign(Object.assign({},o),g)},b,{role:"separator"}),d&&a!=="vertical"&&h.createElement("span",{className:`${y}-inner-text`,style:P},d)))};process.env.NODE_ENV!=="production"&&(L1.displayName="Divider");var g0=function(e,n){if(!e)return null;var r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return n?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},Fr=function(e){return e!==void 0?"".concat(e,"px"):void 0};function PL(t){var e=t.prefixCls,n=t.containerRef,r=t.value,o=t.getValueIndex,i=t.motionName,a=t.onMotionStart,s=t.onMotionEnd,l=t.direction,c=t.vertical,u=c===void 0?!1:c,d=h.useRef(null),f=h.useState(r),p=X(f,2),m=p[0],g=p[1],v=function(A){var k,B=o(A),_=(k=n.current)===null||k===void 0?void 0:k.querySelectorAll(".".concat(e,"-item"))[B];return(_==null?void 0:_.offsetParent)&&_},b=h.useState(null),y=X(b,2),C=y[0],S=y[1],x=h.useState(null),w=X(x,2),$=w[0],R=w[1];zt(function(){if(m!==r){var P=v(m),A=v(r),k=g0(P,u),B=g0(A,u);g(r),S(k),R(B),P&&A?a():s()}},[r]);var M=h.useMemo(function(){if(u){var P;return Fr((P=C==null?void 0:C.top)!==null&&P!==void 0?P:0)}return Fr(l==="rtl"?-(C==null?void 0:C.right):C==null?void 0:C.left)},[u,l,C]),O=h.useMemo(function(){if(u){var P;return Fr((P=$==null?void 0:$.top)!==null&&P!==void 0?P:0)}return Fr(l==="rtl"?-($==null?void 0:$.right):$==null?void 0:$.left)},[u,l,$]),N=function(){return u?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},I=function(){return u?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},T=function(){S(null),R(null),s()};return!C||!$?null:h.createElement(eo,{visible:!0,motionName:i,motionAppear:!0,onAppearStart:N,onAppearActive:I,onVisibleChanged:T},function(P,A){var k=P.className,B=P.style,_=j(j({},B),{},{"--thumb-start-left":M,"--thumb-start-width":Fr(C==null?void 0:C.width),"--thumb-active-left":O,"--thumb-active-width":Fr($==null?void 0:$.width),"--thumb-start-top":M,"--thumb-start-height":Fr(C==null?void 0:C.height),"--thumb-active-top":O,"--thumb-active-height":Fr($==null?void 0:$.height)}),F={ref:Qn(d,A),style:_,className:G.cn("".concat(e,"-thumb"),k)};return process.env.NODE_ENV==="test"&&(F["data-test-style"]=JSON.stringify(_)),h.createElement("div",F)})}var TL=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function AL(t){if(typeof t.title<"u")return t.title;if(Ue(t.label)!=="object"){var e;return(e=t.label)===null||e===void 0?void 0:e.toString()}}function kL(t){return t.map(function(e){if(Ue(e)==="object"&&e!==null){var n=AL(e);return j(j({},e),{},{title:n})}return{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e}})}var DL=function(e){var n=e.prefixCls,r=e.className,o=e.disabled,i=e.checked,a=e.label,s=e.title,l=e.value,c=e.name,u=e.onChange,d=e.onFocus,f=e.onBlur,p=e.onKeyDown,m=e.onKeyUp,g=e.onMouseDown,v=function(y){o||u(y,l)};return h.createElement("label",{className:G.cn(r,D({},"".concat(n,"-item-disabled"),o)),onMouseDown:g},h.createElement("input",{name:c,className:"".concat(n,"-item-input"),type:"radio",disabled:o,checked:i,onChange:v,onFocus:d,onBlur:f,onKeyDown:p,onKeyUp:m}),h.createElement("div",{className:"".concat(n,"-item-label"),title:s,"aria-selected":i},a))},F1=h.forwardRef(function(t,e){var n,r,o=t.prefixCls,i=o===void 0?"rc-segmented":o,a=t.direction,s=t.vertical,l=t.options,c=l===void 0?[]:l,u=t.disabled,d=t.defaultValue,f=t.value,p=t.name,m=t.onChange,g=t.className,v=g===void 0?"":g,b=t.motionName,y=b===void 0?"thumb-motion":b,C=lt(t,TL),S=h.useRef(null),x=h.useMemo(function(){return Qn(S,e)},[S,e]),w=h.useMemo(function(){return kL(c)},[c]),$=en((n=w[0])===null||n===void 0?void 0:n.value,{value:f,defaultValue:d}),R=X($,2),M=R[0],O=R[1],N=h.useState(!1),I=X(N,2),T=I[0],P=I[1],A=function(Y,te){O(te),m==null||m(te)},k=vn(C,["children"]),B=h.useState(!1),_=X(B,2),F=_[0],H=_[1],K=h.useState(!1),V=X(K,2),W=V[0],z=V[1],L=function(){z(!0)},J=function(){z(!1)},ne=function(){H(!1)},q=function(Y){Y.key==="Tab"&&H(!0)},re=function(Y){var te=w.findIndex(function(ce){return ce.value===M}),Z=w.length,Q=(te+Y+Z)%Z,ie=w[Q];ie&&(O(ie.value),m==null||m(ie.value))},ae=function(Y){switch(Y.key){case"ArrowLeft":case"ArrowUp":re(-1);break;case"ArrowRight":case"ArrowDown":re(1);break}};return h.createElement("div",ge({role:"radiogroup","aria-label":"segmented control",tabIndex:u?void 0:0},k,{className:G.cn(i,(r={},D(r,"".concat(i,"-rtl"),a==="rtl"),D(r,"".concat(i,"-disabled"),u),D(r,"".concat(i,"-vertical"),s),r),v),ref:x}),h.createElement("div",{className:"".concat(i,"-group")},h.createElement(PL,{vertical:s,prefixCls:i,value:M,containerRef:S,motionName:"".concat(i,"-").concat(y),direction:a,getValueIndex:function(Y){return w.findIndex(function(te){return te.value===Y})},onMotionStart:function(){P(!0)},onMotionEnd:function(){P(!1)}}),w.map(function(ee){var Y;return h.createElement(DL,ge({},ee,{name:p,key:ee.value,prefixCls:i,className:G.cn(ee.className,"".concat(i,"-item"),(Y={},D(Y,"".concat(i,"-item-selected"),ee.value===M&&!T),D(Y,"".concat(i,"-item-focused"),W&&F&&ee.value===M),Y)),checked:ee.value===M,onChange:A,onFocus:L,onBlur:J,onKeyDown:ae,onKeyUp:q,onMouseDown:ne,disabled:!!u||!!ee.disabled}))})))});process.env.NODE_ENV!=="production"&&(F1.displayName="Segmented");var _L=F1;function v0(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function b0(t){return{backgroundColor:t.itemSelectedBg,boxShadow:t.boxShadowTertiary}}const jL=Object.assign({overflow:"hidden"},gs),BL=t=>{const{componentCls:e}=t,n=t.calc(t.controlHeight).sub(t.calc(t.trackPadding).mul(2)).equal(),r=t.calc(t.controlHeightLG).sub(t.calc(t.trackPadding).mul(2)).equal(),o=t.calc(t.controlHeightSM).sub(t.calc(t.trackPadding).mul(2)).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),{display:"inline-block",padding:t.trackPadding,color:t.itemColor,background:t.trackBg,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`}),va(t)),{[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-vertical`]:{[`${e}-group`]:{flexDirection:"column"},[`${e}-thumb`]:{width:"100%",height:0,padding:`0 ${U(t.paddingXXS)}`}},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},b0(t)),{color:t.itemSelectedColor}),"&-focused":Object.assign({},Yh(t)),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{opacity:1,backgroundColor:t.itemHoverBg}},[`&:active:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{opacity:1,backgroundColor:t.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:U(n),padding:`0 ${U(t.segmentedPaddingHorizontal)}`},jL),"&-icon + *":{marginInlineStart:t.calc(t.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:Object.assign(Object.assign({},b0(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${U(t.paddingXXS)} 0`,borderRadius:t.borderRadiusSM,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, height ${t.motionDurationSlow} ${t.motionEaseInOut}`,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:r,lineHeight:U(r),padding:`0 ${U(t.segmentedPaddingHorizontal)}`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:o,lineHeight:U(o),padding:`0 ${U(t.segmentedPaddingHorizontalSM)}`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),v0(`&-disabled ${e}-item`,t)),v0(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"},[`&${e}-shape-round`]:{borderRadius:9999,[`${e}-item, ${e}-thumb`]:{borderRadius:9999}}})}},zL=t=>{const{colorTextLabel:e,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:a,colorBgLayout:s}=t;return{trackPadding:a,trackBg:s,itemColor:e,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}},LL=Yt("Segmented",t=>{const{lineWidth:e,calc:n}=t,r=Mt(t,{segmentedPaddingHorizontal:n(t.controlPaddingHorizontal).sub(e).equal(),segmentedPaddingHorizontalSM:n(t.controlPaddingHorizontalSM).sub(e).equal()});return[BL(r)]},zL);var y0=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function FL(t){return typeof t=="object"&&!!(t!=null&&t.icon)}const HL=h.forwardRef((t,e)=>{const n=Yc(),{prefixCls:r,className:o,rootClassName:i,block:a,options:s=[],size:l="middle",style:c,vertical:u,shape:d="default",name:f=n}=t,p=y0(t,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:m,direction:g,className:v,style:b}=hr("segmented"),y=m("segmented",r),[C,S,x]=LL(y),w=Er(l),$=h.useMemo(()=>s.map(O=>{if(FL(O)){const{icon:N,label:I}=O,T=y0(O,["icon","label"]);return Object.assign(Object.assign({},T),{label:h.createElement(h.Fragment,null,h.createElement("span",{className:`${y}-item-icon`},N),I&&h.createElement("span",null,I))})}return O}),[s,y]),R=G.cn(o,i,v,{[`${y}-block`]:a,[`${y}-sm`]:w==="small",[`${y}-lg`]:w==="large",[`${y}-vertical`]:u,[`${y}-shape-${d}`]:d==="round"},S,x),M=Object.assign(Object.assign({},b),c);return C(h.createElement(_L,Object.assign({},p,{name:f,className:R,style:M,options:$,ref:e,prefixCls:y,direction:g,vertical:u})))}),H1=HL;process.env.NODE_ENV!=="production"&&(H1.displayName="Segmented");const V1=E.createContext({}),W1=E.createContext({}),q1=({prefixCls:t,value:e,onChange:n})=>{const r=()=>{if(n&&e&&!e.cleared){const o=e.toHsb();o.a=0;const i=Ln(o);i.cleared=!0,n(i)}};return E.createElement("div",{className:`${t}-clear`,onClick:r})},K1="hex",G1="rgb",U1="hsb";var VL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},WL=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:VL}))},X1=h.forwardRef(WL);process.env.NODE_ENV!=="production"&&(X1.displayName="UpOutlined");function th(){return typeof BigInt=="function"}function Y1(t){return!t&&t!==0&&!Number.isNaN(t)||!String(t).trim()}function mi(t){var e=t.trim(),n=e.startsWith("-");n&&(e=e.slice(1)),e=e.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),e.startsWith(".")&&(e="0".concat(e));var r=e||"0",o=r.split("."),i=o[0]||"0",a=o[1]||"0";i==="0"&&a==="0"&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:i,decimalStr:a,fullStr:"".concat(s).concat(r)}}function Dp(t){var e=String(t);return!Number.isNaN(Number(e))&&e.includes("e")}function ci(t){var e=String(t);if(Dp(t)){var n=Number(e.slice(e.indexOf("e-")+2)),r=e.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return e.includes(".")&&_p(e)?e.length-e.indexOf(".")-1:0}function su(t){var e=String(t);if(Dp(t)){if(t>Number.MAX_SAFE_INTEGER)return String(th()?BigInt(t).toString():Number.MAX_SAFE_INTEGER);if(t<Number.MIN_SAFE_INTEGER)return String(th()?BigInt(t).toString():Number.MIN_SAFE_INTEGER);e=t.toFixed(ci(e))}return mi(e).fullStr}function _p(t){return typeof t=="number"?!Number.isNaN(t):t?/^\s*-?\d+(\.\d+)?\s*$/.test(t)||/^\s*-?\d+\.\s*$/.test(t)||/^\s*-?\.\d+\s*$/.test(t):!1}var qL=function(){function t(e){if(ln(this,t),D(this,"origin",""),D(this,"negative",void 0),D(this,"integer",void 0),D(this,"decimal",void 0),D(this,"decimalLen",void 0),D(this,"empty",void 0),D(this,"nan",void 0),Y1(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}var n=e;if(Dp(n)&&(n=Number(n)),n=typeof n=="string"?n:su(n),_p(n)){var r=mi(n);this.negative=r.negative;var o=r.trimStr.split(".");this.integer=BigInt(o[0]);var i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}return cn(t,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(r)}},{key:"negate",value:function(){var n=new t(this.toString());return n.negative=!n.negative,n}},{key:"cal",value:function(n,r,o){var i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),a=this.alignDecimal(i),s=n.alignDecimal(i),l=r(a,s).toString(),c=o(i),u=mi(l),d=u.negativeStr,f=u.trimStr,p="".concat(d).concat(f.padStart(c+1,"0"));return new t("".concat(p.slice(0,-c),".").concat(p.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new t(n);var r=new t(n);return r.isInvalidate()?this:this.cal(r,function(o,i){return o+i},function(o){return o})}},{key:"multi",value:function(n){var r=new t(n);return this.isInvalidate()||r.isInvalidate()?new t(NaN):this.cal(r,function(o,i){return o*i},function(o){return o*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===(n==null?void 0:n.toString())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":mi("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),t}(),KL=function(){function t(e){if(ln(this,t),D(this,"origin",""),D(this,"number",void 0),D(this,"empty",void 0),Y1(e)){this.empty=!0;return}this.origin=String(e),this.number=Number(e)}return cn(t,[{key:"negate",value:function(){return new t(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new t(n);var r=Number(n);if(Number.isNaN(r))return this;var o=this.number+r;if(o>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var i=Math.max(ci(this.number),ci(r));return new t(o.toFixed(i))}},{key:"multi",value:function(n){var r=Number(n);if(this.isInvalidate()||Number.isNaN(r))return new t(NaN);var o=this.number*r;if(o>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var i=Math.max(ci(this.number),ci(r));return new t(o.toFixed(i))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===(n==null?void 0:n.toNumber())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":su(this.number):this.origin}}]),t}();function Mr(t){return th()?new qL(t):new KL(t)}function kl(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="")return"";var o=mi(t),i=o.negativeStr,a=o.integerStr,s=o.decimalStr,l="".concat(e).concat(s),c="".concat(i).concat(a);if(n>=0){var u=Number(s[n]);if(u>=5&&!r){var d=Mr(t).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-u));return kl(d.toString(),e,n,r)}return n===0?c:"".concat(c).concat(e).concat(s.padEnd(n,"0").slice(0,n))}return l===".0"?c:"".concat(c).concat(l)}function GL(t){return!!(t.addonBefore||t.addonAfter)}function UL(t){return!!(t.prefix||t.suffix||t.allowClear)}function C0(t,e,n){var r=e.cloneNode(!0),o=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},o}function mc(t,e,n,r){if(n){var o=e;if(e.type==="click"){o=C0(e,t,""),n(o);return}if(t.type!=="file"&&r!==void 0){o=C0(e,t,r),n(o);return}n(o)}}function jp(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var o=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(o,o);break;default:t.setSelectionRange(0,o)}}}}var Bp=E.forwardRef(function(t,e){var n,r,o,i=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,d=t.addonAfter,f=t.className,p=t.style,m=t.disabled,g=t.readOnly,v=t.focused,b=t.triggerFocus,y=t.allowClear,C=t.value,S=t.handleReset,x=t.hidden,w=t.classes,$=t.classNames,R=t.dataAttrs,M=t.styles,O=t.components,N=t.onClear,I=a??i,T=(O==null?void 0:O.affixWrapper)||"span",P=(O==null?void 0:O.groupWrapper)||"span",A=(O==null?void 0:O.wrapper)||"span",k=(O==null?void 0:O.groupAddon)||"span",B=E.useRef(null),_=function(Q){var ie;(ie=B.current)!==null&&ie!==void 0&&ie.contains(Q.target)&&(b==null||b())},F=UL(t),H=E.cloneElement(I,{value:C,className:G.cn((n=I.props)===null||n===void 0?void 0:n.className,!F&&($==null?void 0:$.variant))||null}),K=E.useRef(null);if(E.useImperativeHandle(e,function(){return{nativeElement:K.current||B.current}}),F){var V=null;if(y){var W=!m&&!g&&C,z="".concat(s,"-clear-icon"),L=Ue(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"✖";V=E.createElement("button",{type:"button",tabIndex:-1,onClick:function(Q){S==null||S(Q),N==null||N()},onMouseDown:function(Q){return Q.preventDefault()},className:G.cn(z,D(D({},"".concat(z,"-hidden"),!W),"".concat(z,"-has-suffix"),!!c))},L)}var J="".concat(s,"-affix-wrapper"),ne=G.cn(J,D(D(D(D(D({},"".concat(s,"-disabled"),m),"".concat(J,"-disabled"),m),"".concat(J,"-focused"),v),"".concat(J,"-readonly"),g),"".concat(J,"-input-with-clear-btn"),c&&y&&C),w==null?void 0:w.affixWrapper,$==null?void 0:$.affixWrapper,$==null?void 0:$.variant),q=(c||y)&&E.createElement("span",{className:G.cn("".concat(s,"-suffix"),$==null?void 0:$.suffix),style:M==null?void 0:M.suffix},V,c);H=E.createElement(T,ge({className:ne,style:M==null?void 0:M.affixWrapper,onClick:_},R==null?void 0:R.affixWrapper,{ref:B}),l&&E.createElement("span",{className:G.cn("".concat(s,"-prefix"),$==null?void 0:$.prefix),style:M==null?void 0:M.prefix},l),H,q)}if(GL(t)){var re="".concat(s,"-group"),ae="".concat(re,"-addon"),ee="".concat(re,"-wrapper"),Y=G.cn("".concat(s,"-wrapper"),re,w==null?void 0:w.wrapper,$==null?void 0:$.wrapper),te=G.cn(ee,D({},"".concat(ee,"-disabled"),m),w==null?void 0:w.group,$==null?void 0:$.groupWrapper);H=E.createElement(P,{className:te,ref:K},E.createElement(A,{className:Y},u&&E.createElement(k,{className:ae},u),H,d&&E.createElement(k,{className:ae},d)))}return E.cloneElement(H,{className:G.cn((r=H.props)===null||r===void 0?void 0:r.className,f)||null,style:j(j({},(o=H.props)===null||o===void 0?void 0:o.style),p),hidden:x})}),XL=["show"];function J1(t,e){return h.useMemo(function(){var n={};e&&(n.show=Ue(e)==="object"&&e.formatter?e.formatter:!!e),n=j(j({},n),t);var r=n,o=r.show,i=lt(r,XL);return j(j({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[t,e])}var YL=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],JL=E.forwardRef(function(t,e){var n=t.autoComplete,r=t.onChange,o=t.onFocus,i=t.onBlur,a=t.onPressEnter,s=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,d=t.disabled,f=t.htmlSize,p=t.className,m=t.maxLength,g=t.suffix,v=t.showCount,b=t.count,y=t.type,C=y===void 0?"text":y,S=t.classes,x=t.classNames,w=t.styles,$=t.onCompositionStart,R=t.onCompositionEnd,M=lt(t,YL),O=E.useState(!1),N=X(O,2),I=N[0],T=N[1],P=E.useRef(!1),A=E.useRef(!1),k=E.useRef(null),B=E.useRef(null),_=function(ue){k.current&&jp(k.current,ue)},F=en(t.defaultValue,{value:t.value}),H=X(F,2),K=H[0],V=H[1],W=K==null?"":String(K),z=E.useState(null),L=X(z,2),J=L[0],ne=L[1],q=J1(b,v),re=q.max||m,ae=q.strategy(W),ee=!!re&&ae>re;E.useImperativeHandle(e,function(){var de;return{focus:_,blur:function(){var pe;(pe=k.current)===null||pe===void 0||pe.blur()},setSelectionRange:function(pe,Ae,_e){var Re;(Re=k.current)===null||Re===void 0||Re.setSelectionRange(pe,Ae,_e)},select:function(){var pe;(pe=k.current)===null||pe===void 0||pe.select()},input:k.current,nativeElement:((de=B.current)===null||de===void 0?void 0:de.nativeElement)||k.current}}),E.useEffect(function(){A.current&&(A.current=!1),T(function(de){return de&&d?!1:de})},[d]);var Y=function(ue,pe,Ae){var _e=pe;if(!P.current&&q.exceedFormatter&&q.max&&q.strategy(pe)>q.max){if(_e=q.exceedFormatter(pe,{max:q.max}),pe!==_e){var Re,$e;ne([((Re=k.current)===null||Re===void 0?void 0:Re.selectionStart)||0,(($e=k.current)===null||$e===void 0?void 0:$e.selectionEnd)||0])}}else if(Ae.source==="compositionEnd")return;V(_e),k.current&&mc(k.current,ue,r,_e)};E.useEffect(function(){if(J){var de;(de=k.current)===null||de===void 0||de.setSelectionRange.apply(de,he(J))}},[J]);var te=function(ue){Y(ue,ue.target.value,{source:"change"})},Z=function(ue){P.current=!1,Y(ue,ue.currentTarget.value,{source:"compositionEnd"}),R==null||R(ue)},Q=function(ue){a&&ue.key==="Enter"&&!A.current&&(A.current=!0,a(ue)),s==null||s(ue)},ie=function(ue){ue.key==="Enter"&&(A.current=!1),l==null||l(ue)},ce=function(ue){T(!0),o==null||o(ue)},se=function(ue){A.current&&(A.current=!1),T(!1),i==null||i(ue)},le=function(ue){V(""),_(),k.current&&mc(k.current,ue,r)},be=ee&&"".concat(u,"-out-of-range"),ye=function(){var ue=vn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return E.createElement("input",ge({autoComplete:n},ue,{onChange:te,onFocus:ce,onBlur:se,onKeyDown:Q,onKeyUp:ie,className:G.cn(u,D({},"".concat(u,"-disabled"),d),x==null?void 0:x.input),style:w==null?void 0:w.input,ref:k,size:f,type:C,onCompositionStart:function(Ae){P.current=!0,$==null||$(Ae)},onCompositionEnd:Z}))},Be=function(){var ue=Number(re)>0;if(g||q.show){var pe=q.showFormatter?q.showFormatter({value:W,count:ae,maxLength:re}):"".concat(ae).concat(ue?" / ".concat(re):"");return E.createElement(E.Fragment,null,q.show&&E.createElement("span",{className:G.cn("".concat(u,"-show-count-suffix"),D({},"".concat(u,"-show-count-has-suffix"),!!g),x==null?void 0:x.count),style:j({},w==null?void 0:w.count)},pe),g)}return null};return E.createElement(Bp,ge({},M,{prefixCls:u,className:G.cn(p,be),handleReset:le,value:W,focused:I,triggerFocus:_,suffix:Be(),disabled:d,classes:S,classNames:x,styles:w,ref:B}),ye())});function ZL(t,e){return typeof Proxy<"u"&&t?new Proxy(t,{get:function(r,o){if(e[o])return e[o];var i=r[o];return typeof i=="function"?i.bind(r):i}}):t}function QL(t,e){var n=E.useRef(null);function r(){try{var i=t.selectionStart,a=t.selectionEnd,s=t.value,l=s.substring(0,i),c=s.substring(a);n.current={start:i,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function o(){if(t&&n.current&&e)try{var i=t.value,a=n.current,s=a.beforeTxt,l=a.afterTxt,c=a.start,u=i.length;if(i.startsWith(s))u=s.length;else if(i.endsWith(l))u=i.length-n.current.afterTxt.length;else{var d=s[c-1],f=i.indexOf(d,c-1);f!==-1&&(u=f+1)}t.setSelectionRange(u,u)}catch(p){at(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(p.message))}}return[r,o]}var eF=function(){var e=E.useState(!1),n=X(e,2),r=n[0],o=n[1];return zt(function(){o(fp())},[]),r},tF=200,nF=600;function rF(t){var e=t.prefixCls,n=t.upNode,r=t.downNode,o=t.upDisabled,i=t.downDisabled,a=t.onStep,s=h.useRef(),l=h.useRef([]),c=h.useRef();c.current=a;var u=function(){clearTimeout(s.current)},d=function(C,S){C.preventDefault(),u(),c.current(S);function x(){c.current(S),s.current=setTimeout(x,tF)}s.current=setTimeout(x,nF)};h.useEffect(function(){return function(){u(),l.current.forEach(function(y){return wt.cancel(y)})}},[]);var f=eF();if(f)return null;var p="".concat(e,"-handler"),m=G.cn(p,"".concat(p,"-up"),D({},"".concat(p,"-up-disabled"),o)),g=G.cn(p,"".concat(p,"-down"),D({},"".concat(p,"-down-disabled"),i)),v=function(){return l.current.push(wt(u))},b={unselectable:"on",role:"button",onMouseUp:v,onMouseLeave:v};return h.createElement("div",{className:"".concat(p,"-wrap")},h.createElement("span",ge({},b,{onMouseDown:function(C){d(C,!0)},"aria-label":"Increase Value","aria-disabled":o,className:m}),n||h.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-up-inner")})),h.createElement("span",ge({},b,{onMouseDown:function(C){d(C,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:g}),r||h.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-down-inner")})))}function S0(t){var e=typeof t=="number"?su(t):mi(t).fullStr,n=e.includes(".");return n?mi(e.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:t+"0"}const oF=function(){var t=E.useRef(0),e=function(){wt.cancel(t.current)};return E.useEffect(function(){return e},[]),function(n){e(),t.current=wt(function(){n()})}};var iF=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],aF=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],x0=function(e,n){return e||n.isEmpty()?n.toString():n.toNumber()},w0=function(e){var n=Mr(e);return n.isInvalidate()?null:n},sF=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,o=t.style,i=t.min,a=t.max,s=t.step,l=s===void 0?1:s,c=t.defaultValue,u=t.value,d=t.disabled,f=t.readOnly,p=t.upHandler,m=t.downHandler,g=t.keyboard,v=t.changeOnWheel,b=v===void 0?!1:v,y=t.controls,C=y===void 0?!0:y;t.classNames;var S=t.stringMode,x=t.parser,w=t.formatter,$=t.precision,R=t.decimalSeparator,M=t.onChange,O=t.onInput,N=t.onPressEnter,I=t.onStep,T=t.changeOnBlur,P=T===void 0?!0:T,A=t.domRef,k=lt(t,iF),B="".concat(n,"-input"),_=h.useRef(null),F=h.useState(!1),H=X(F,2),K=H[0],V=H[1],W=h.useRef(!1),z=h.useRef(!1),L=h.useRef(!1),J=h.useState(function(){return Mr(u??c)}),ne=X(J,2),q=ne[0],re=ne[1];function ae(Pe){u===void 0&&re(Pe)}var ee=h.useCallback(function(Pe,Se){if(!Se)return $>=0?$:Math.max(ci(Pe),ci(l))},[$,l]),Y=h.useCallback(function(Pe){var Se=String(Pe);if(x)return x(Se);var Xe=Se;return R&&(Xe=Xe.replace(R,".")),Xe.replace(/[^\w.-]+/g,"")},[x,R]),te=h.useRef(""),Z=h.useCallback(function(Pe,Se){if(w)return w(Pe,{userTyping:Se,input:String(te.current)});var Xe=typeof Pe=="number"?su(Pe):Pe;if(!Se){var Ge=ee(Xe,Se);if(_p(Xe)&&(R||Ge>=0)){var et=R||".";Xe=kl(Xe,et,Ge)}}return Xe},[w,ee,R]),Q=h.useState(function(){var Pe=c??u;return q.isInvalidate()&&["string","number"].includes(Ue(Pe))?Number.isNaN(Pe)?"":Pe:Z(q.toString(),!1)}),ie=X(Q,2),ce=ie[0],se=ie[1];te.current=ce;function le(Pe,Se){se(Z(Pe.isInvalidate()?Pe.toString(!1):Pe.toString(!Se),Se))}var be=h.useMemo(function(){return w0(a)},[a,$]),ye=h.useMemo(function(){return w0(i)},[i,$]),Be=h.useMemo(function(){return!be||!q||q.isInvalidate()?!1:be.lessEquals(q)},[be,q]),de=h.useMemo(function(){return!ye||!q||q.isInvalidate()?!1:q.lessEquals(ye)},[ye,q]),ue=QL(_.current,K),pe=X(ue,2),Ae=pe[0],_e=pe[1],Re=function(Se){return be&&!Se.lessEquals(be)?be:ye&&!ye.lessEquals(Se)?ye:null},$e=function(Se){return!Re(Se)},We=function(Se,Xe){var Ge=Se,et=$e(Ge)||Ge.isEmpty();if(!Ge.isEmpty()&&!Xe&&(Ge=Re(Ge)||Ge,et=!0),!f&&!d&&et){var je=Ge.toString(),we=ee(je,Xe);return we>=0&&(Ge=Mr(kl(je,".",we)),$e(Ge)||(Ge=Mr(kl(je,".",we,!0)))),Ge.equals(q)||(ae(Ge),M==null||M(Ge.isEmpty()?null:x0(S,Ge)),u===void 0&&le(Ge,Xe)),Ge}return q},ke=oF(),De=function Pe(Se){if(Ae(),te.current=Se,se(Se),!z.current){var Xe=Y(Se),Ge=Mr(Xe);Ge.isNaN()||We(Ge,!0)}O==null||O(Se),ke(function(){var et=Se;x||(et=Se.replace(/。/g,".")),et!==Se&&Pe(et)})},me=function(){z.current=!0},Ne=function(){z.current=!1,De(_.current.value)},Ze=function(Se){De(Se.target.value)},Ie=function(Se){var Xe;if(!(Se&&Be||!Se&&de)){W.current=!1;var Ge=Mr(L.current?S0(l):l);Se||(Ge=Ge.negate());var et=(q||Mr(0)).add(Ge.toString()),je=We(et,!1);I==null||I(x0(S,je),{offset:L.current?S0(l):l,type:Se?"up":"down"}),(Xe=_.current)===null||Xe===void 0||Xe.focus()}},xe=function(Se){var Xe=Mr(Y(ce)),Ge;Xe.isNaN()?Ge=We(q,Se):Ge=We(Xe,Se),u!==void 0?le(q,!1):Ge.isNaN()||le(Ge,!1)},ot=function(){W.current=!0},ft=function(Se){var Xe=Se.key,Ge=Se.shiftKey;W.current=!0,L.current=Ge,Xe==="Enter"&&(z.current||(W.current=!1),xe(!1),N==null||N(Se)),g!==!1&&!z.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Xe)&&(Ie(Xe==="Up"||Xe==="ArrowUp"),Se.preventDefault())},Tt=function(){W.current=!1,L.current=!1};h.useEffect(function(){if(b&&K){var Pe=function(Ge){Ie(Ge.deltaY<0),Ge.preventDefault()},Se=_.current;if(Se)return Se.addEventListener("wheel",Pe,{passive:!1}),function(){return Se.removeEventListener("wheel",Pe)}}});var Bt=function(){P&&xe(!1),V(!1),W.current=!1};return Ua(function(){q.isInvalidate()||le(q,!1)},[$,w]),Ua(function(){var Pe=Mr(u);re(Pe);var Se=Mr(Y(ce));(!Pe.equals(Se)||!W.current||w)&&le(Pe,W.current)},[u]),Ua(function(){w&&_e()},[ce]),h.createElement("div",{ref:A,className:G.cn(n,r,D(D(D(D(D({},"".concat(n,"-focused"),K),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),f),"".concat(n,"-not-a-number"),q.isNaN()),"".concat(n,"-out-of-range"),!q.isInvalidate()&&!$e(q))),style:o,onFocus:function(){V(!0)},onBlur:Bt,onKeyDown:ft,onKeyUp:Tt,onCompositionStart:me,onCompositionEnd:Ne,onBeforeInput:ot},C&&h.createElement(rF,{prefixCls:n,upNode:p,downNode:m,upDisabled:Be,downDisabled:de,onStep:Ie}),h.createElement("div",{className:"".concat(B,"-wrap")},h.createElement("input",ge({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":q.isInvalidate()?null:q.toString(),step:l},k,{ref:Qn(_,e),className:B,value:ce,onChange:Ze,disabled:d,readOnly:f}))))}),Z1=h.forwardRef(function(t,e){var n=t.disabled,r=t.style,o=t.prefixCls,i=o===void 0?"rc-input-number":o,a=t.value,s=t.prefix,l=t.suffix,c=t.addonBefore,u=t.addonAfter,d=t.className,f=t.classNames,p=lt(t,aF),m=h.useRef(null),g=h.useRef(null),v=h.useRef(null),b=function(C){v.current&&jp(v.current,C)};return h.useImperativeHandle(e,function(){return ZL(v.current,{focus:b,nativeElement:m.current.nativeElement||g.current})}),h.createElement(Bp,{className:d,triggerFocus:b,prefixCls:i,value:a,disabled:n,style:r,prefix:s,suffix:l,addonAfter:u,addonBefore:c,classNames:f,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:m},h.createElement(sF,ge({prefixCls:i,disabled:n,ref:v,domRef:g,className:f==null?void 0:f.input},p)))});process.env.NODE_ENV!=="production"&&(Z1.displayName="InputNumber");const lF=t=>{var e;const n=(e=t.handleVisible)!==null&&e!==void 0?e:"auto",r=t.controlHeightSM-t.lineWidth*2;return Object.assign(Object.assign({},Hs(t)),{controlWidth:90,handleWidth:r,handleFontSize:t.fontSize/2,handleVisible:n,handleActiveBg:t.colorFillAlter,handleBg:t.colorBgContainer,filledHandleBg:new Pt(t.colorFillSecondary).onBackground(t.colorBgContainer).toHexString(),handleHoverColor:t.colorPrimary,handleBorderColor:t.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},E0=({componentCls:t,borderRadiusSM:e,borderRadiusLG:n},r)=>{const o=r==="lg"?n:e;return{[`&-${r}`]:{[`${t}-handler-wrap`]:{borderStartEndRadius:o,borderEndEndRadius:o},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderEndEndRadius:o}}}},cF=t=>{const{componentCls:e,lineWidth:n,lineType:r,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:f,paddingInlineLG:p,colorIcon:m,motionDurationMid:g,handleHoverColor:v,handleOpacity:b,paddingInline:y,paddingBlock:C,handleBg:S,handleActiveBg:x,colorTextDisabled:w,borderRadiusSM:$,borderRadiusLG:R,controlWidth:M,handleBorderColor:O,filledHandleBg:N,lineHeightLG:I,calc:T}=t;return[{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),au(t)),{display:"inline-block",width:M,margin:0,padding:0,borderRadius:o}),O1(t,{[`${e}-handler-wrap`]:{background:S,[`${e}-handler-down`]:{borderBlockStart:`${U(n)} ${r} ${O}`}}})),I1(t,{[`${e}-handler-wrap`]:{background:N,[`${e}-handler-down`]:{borderBlockStart:`${U(n)} ${r} ${O}`}},"&:focus-within":{[`${e}-handler-wrap`]:{background:S}}})),A1(t,{[`${e}-handler-wrap`]:{background:S,[`${e}-handler-down`]:{borderBlockStart:`${U(n)} ${r} ${O}`}}})),N1(t)),{"&-rtl":{direction:"rtl",[`${e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:I,borderRadius:R,[`input${e}-input`]:{height:T(s).sub(T(n).mul(2)).equal(),padding:`${U(f)} ${U(p)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:$,[`input${e}-input`]:{height:T(l).sub(T(n).mul(2)).equal(),padding:`${U(d)} ${U(u)}`}},"&-out-of-range":{[`${e}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},An(t)),j1(t)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${e}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${e}-group-addon`]:{borderRadius:R,fontSize:t.fontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:$}}},M1(t)),P1(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${e}-input`]:{cursor:"not-allowed"},[e]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),{width:"100%",padding:`${U(C)} ${U(y)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${g} linear`,appearance:"textfield",fontSize:"inherit"}),k1(t.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1}})},{[e]:Object.assign(Object.assign(Object.assign({[`${e}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:t.handleVisibleWidth,opacity:b,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${g}`,overflow:"hidden",[`${e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
369
369
  ${e}-handler-up-inner,
370
370
  ${e}-handler-down-inner
371
371
  `]:{marginInlineEnd:0,fontSize:t.handleFontSize}}},[`${e}-handler`]:{height:"50%",overflow:"hidden",color:m,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${U(n)} ${r} ${O}`,transition:`all ${g} linear`,"&:active":{background:x},"&:hover":{height:"60%",[`
@@ -377,7 +377,7 @@ html body {
377
377
  `]:{cursor:"not-allowed"},[`
378
378
  ${e}-handler-up-disabled:hover &-handler-up-inner,
379
379
  ${e}-handler-down-disabled:hover &-handler-down-inner
380
- `]:{color:w}})}]},uF=t=>{const{componentCls:e,paddingBlock:n,paddingInline:r,inputAffixPadding:o,controlWidth:i,borderRadiusLG:a,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:f}=t;return{[`${e}-affix-wrapper`]:Object.assign(Object.assign({[`input${e}-input`]:{padding:`${U(n)} 0`}},au(t)),{position:"relative",display:"inline-flex",alignItems:"center",width:i,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:a,paddingInlineStart:l,[`input${e}-input`]:{padding:`${U(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${e}-input`]:{padding:`${U(d)} 0`}},[`&:not(${e}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${e}-disabled`]:{background:"transparent"},[`> div${e}`]:{width:"100%",border:"none",outline:"none",[`&${e}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${e}-handler-wrap`]:{zIndex:2},[e]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:r,marginInlineStart:o,transition:`margin ${f}`}},[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1},[`&:not(${e}-affix-wrapper-without-controls):hover ${e}-suffix`]:{marginInlineEnd:t.calc(t.handleWidth).add(r).equal()}})}},dF=Yt("InputNumber",t=>{const e=Mt(t,Fs(t));return[cF(e),uF(e),Ps(e)]},lF,{unitless:{handleOpacity:!0}});var fF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Q1=h.forwardRef((t,e)=>{if(process.env.NODE_ENV!=="production"){const q=Kt("InputNumber");q.deprecated(!("bordered"in t),"bordered","variant"),q(!(t.type==="number"&&t.changeOnWheel),"usage","When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.")}const{getPrefixCls:n,direction:r}=h.useContext(gt),o=h.useRef(null);h.useImperativeHandle(e,()=>o.current);const{className:i,rootClassName:a,size:s,disabled:l,prefixCls:c,addonBefore:u,addonAfter:d,prefix:f,suffix:p,bordered:m,readOnly:g,status:v,controls:b,variant:y}=t,C=fF(t,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),S=n("input-number",c),x=yo(S),[w,$,R]=dF(S,x),{compactSize:M,compactItemClassnames:O}=Zo(S,r);let N=h.createElement(X1,{className:`${S}-handler-up-inner`}),I=h.createElement(Cp,{className:`${S}-handler-down-inner`});const T=typeof b=="boolean"?b:void 0;typeof b=="object"&&(N=typeof b.upIcon>"u"?N:h.createElement("span",{className:`${S}-handler-up-inner`},b.upIcon),I=typeof b.downIcon>"u"?I:h.createElement("span",{className:`${S}-handler-down-inner`},b.downIcon));const{hasFeedback:P,status:A,isFormItemInput:k,feedbackIcon:B}=h.useContext(wr),_=js(A,v),F=Er(q=>{var re;return(re=s??M)!==null&&re!==void 0?re:q}),H=h.useContext(Dr),K=l??H,[V,W]=tu("inputNumber",y,m),z=P&&h.createElement(h.Fragment,null,B),L=G.cn({[`${S}-lg`]:F==="large",[`${S}-sm`]:F==="small",[`${S}-rtl`]:r==="rtl",[`${S}-in-form-item`]:k},$),J=`${S}-group`,ne=h.createElement(Z1,Object.assign({ref:o,disabled:K,className:G.cn(R,x,i,a,O),upHandler:N,downHandler:I,prefixCls:S,readOnly:g,controls:T,prefix:f,suffix:z||p,addonBefore:u&&h.createElement(Wo,{form:!0,space:!0},u),addonAfter:d&&h.createElement(Wo,{form:!0,space:!0},d),classNames:{input:L,variant:G.cn({[`${S}-${V}`]:W},$i(S,_,P)),affixWrapper:G.cn({[`${S}-affix-wrapper-sm`]:F==="small",[`${S}-affix-wrapper-lg`]:F==="large",[`${S}-affix-wrapper-rtl`]:r==="rtl",[`${S}-affix-wrapper-without-controls`]:b===!1||K},$),wrapper:G.cn({[`${J}-rtl`]:r==="rtl"},$),groupWrapper:G.cn({[`${S}-group-wrapper-sm`]:F==="small",[`${S}-group-wrapper-lg`]:F==="large",[`${S}-group-wrapper-rtl`]:r==="rtl",[`${S}-group-wrapper-${V}`]:W},$i(`${S}-group-wrapper`,_,P),$)}},C));return w(ne)}),zp=Q1,hF=t=>h.createElement(to,{theme:{components:{InputNumber:{handleVisible:!0}}}},h.createElement(Q1,Object.assign({},t)));process.env.NODE_ENV!=="production"&&(zp.displayName="InputNumber");zp._InternalPanelDoNotUseOrYouWillBeFired=hF;const gi=({prefixCls:t,min:e=0,max:n=100,value:r,onChange:o,className:i,formatter:a})=>{const s=`${t}-steppers`,[l,c]=E.useState(0),u=Number.isNaN(r)?l:r;return E.createElement(zp,{className:G.cn(s,i),min:e,max:n,value:u,formatter:a,size:"small",onChange:d=>{c(d||0),o==null||o(d)}})},pF=({prefixCls:t,value:e,onChange:n})=>{const r=`${t}-alpha-input`,[o,i]=E.useState(()=>Ln(e||"#000")),a=e||o,s=l=>{const c=a.toHsb();c.a=(l||0)/100;const u=Ln(c);i(u),n==null||n(u)};return E.createElement(gi,{value:ap(a),prefixCls:t,formatter:l=>`${l}%`,className:r,onChange:s})},ew=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:E.createElement(zc,null)}),e};function tw(t,e){const n=E.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;!((o=t.current)===null||o===void 0)&&o.input&&((i=t.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((a=t.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=t.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return E.useEffect(()=>(e&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[]),r}function mF(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var gF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const $a=E.forwardRef((t,e)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:g,rootClassName:v,onChange:b,classNames:y,variant:C}=t,S=gF(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:le}=Kt("Input");le(!("bordered"in t),"bordered","variant")}const{getPrefixCls:x,direction:w,allowClear:$,autoComplete:R,className:M,style:O,classNames:N,styles:I}=hr("input"),T=x("input",n),P=E.useRef(null),A=yo(T),[k,B,_]=B1(T,v),[F]=z1(T,A),{compactSize:H,compactItemClassnames:K}=Zo(T,w),V=Er(le=>{var be;return(be=i??H)!==null&&be!==void 0?be:le}),W=E.useContext(Dr),z=a??W,{status:L,hasFeedback:J,feedbackIcon:ne}=E.useContext(wr),q=js(L,o),re=mF(t)||!!J,ae=E.useRef(re);if(process.env.NODE_ENV!=="production"){const le=Kt("Input");E.useEffect(()=>{var be;re&&!ae.current&&process.env.NODE_ENV!=="production"&&le(document.activeElement===((be=P.current)===null||be===void 0?void 0:be.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ae.current=re},[re])}const ee=tw(P,!0),Y=le=>{ee(),s==null||s(le)},te=le=>{ee(),l==null||l(le)},Z=le=>{ee(),b==null||b(le)},Q=(J||c)&&E.createElement(E.Fragment,null,c,J&&ne),oe=ew(u??$),[ce,se]=tu("input",C,r);return k(F(E.createElement(JL,Object.assign({ref:Qn(e,P),prefixCls:T,autoComplete:R},S,{disabled:z,onBlur:Y,onFocus:te,style:Object.assign(Object.assign({},O),m),styles:Object.assign(Object.assign({},I),g),suffix:Q,allowClear:oe,className:G.cn(p,v,_,A,K,M),onChange:Z,addonBefore:f&&E.createElement(Wo,{form:!0,space:!0},f),addonAfter:d&&E.createElement(Wo,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},y),N),{input:G.cn({[`${T}-sm`]:V==="small",[`${T}-lg`]:V==="large",[`${T}-rtl`]:w==="rtl"},y==null?void 0:y.input,N.input,B),variant:G.cn({[`${T}-${ce}`]:se},$i(T,q)),affixWrapper:G.cn({[`${T}-affix-wrapper-sm`]:V==="small",[`${T}-affix-wrapper-lg`]:V==="large",[`${T}-affix-wrapper-rtl`]:w==="rtl"},B),wrapper:G.cn({[`${T}-group-rtl`]:w==="rtl"},B),groupWrapper:G.cn({[`${T}-group-wrapper-sm`]:V==="small",[`${T}-group-wrapper-lg`]:V==="large",[`${T}-group-wrapper-rtl`]:w==="rtl",[`${T}-group-wrapper-${ce}`]:se},$i(`${T}-group-wrapper`,q,J),B)})}))))});process.env.NODE_ENV!=="production"&&($a.displayName="Input");const vF=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,bF=t=>vF.test(`#${t}`),yF=({prefixCls:t,value:e,onChange:n})=>{const r=`${t}-hex-input`,[o,i]=E.useState(()=>e?Fa(e.toHexString()):void 0);E.useEffect(()=>{e&&i(Fa(e.toHexString()))},[e]);const a=s=>{const l=s.target.value;i(Fa(l)),bF(Fa(l,!0))&&(n==null||n(Ln(l)))};return E.createElement($a,{className:r,value:o,prefix:"#",onChange:a,size:"small"})},CF=({prefixCls:t,value:e,onChange:n})=>{const r=`${t}-hsb-input`,[o,i]=E.useState(()=>Ln(e||"#000")),a=e||o,s=(l,c)=>{const u=a.toHsb();u[c]=c==="h"?l:(l||0)/100;const d=Ln(u);i(d),n==null||n(d)};return E.createElement("div",{className:r},E.createElement(gi,{max:360,min:0,value:Number(a.toHsb().h),prefixCls:t,className:r,formatter:l=>Il(l||0).toString(),onChange:l=>s(Number(l),"h")}),E.createElement(gi,{max:100,min:0,value:Number(a.toHsb().s)*100,prefixCls:t,className:r,formatter:l=>`${Il(l||0)}%`,onChange:l=>s(Number(l),"s")}),E.createElement(gi,{max:100,min:0,value:Number(a.toHsb().b)*100,prefixCls:t,className:r,formatter:l=>`${Il(l||0)}%`,onChange:l=>s(Number(l),"b")}))},SF=({prefixCls:t,value:e,onChange:n})=>{const r=`${t}-rgb-input`,[o,i]=E.useState(()=>Ln(e||"#000")),a=e||o,s=(l,c)=>{const u=a.toRgb();u[c]=l||0;const d=Ln(u);i(d),n==null||n(d)};return E.createElement("div",{className:r},E.createElement(gi,{max:255,min:0,value:Number(a.toRgb().r),prefixCls:t,className:r,onChange:l=>s(Number(l),"r")}),E.createElement(gi,{max:255,min:0,value:Number(a.toRgb().g),prefixCls:t,className:r,onChange:l=>s(Number(l),"g")}),E.createElement(gi,{max:255,min:0,value:Number(a.toRgb().b),prefixCls:t,className:r,onChange:l=>s(Number(l),"b")}))},xF=[K1,U1,G1].map(t=>({value:t,label:t.toUpperCase()})),wF=t=>{const{prefixCls:e,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:a,disabledFormat:s}=t,[l,c]=en(K1,{value:n,onChange:i}),u=`${e}-input`,d=p=>{c(p)},f=E.useMemo(()=>{const p={value:r,prefixCls:e,onChange:a};switch(l){case U1:return E.createElement(CF,Object.assign({},p));case G1:return E.createElement(SF,Object.assign({},p));default:return E.createElement(yF,Object.assign({},p))}},[l,e,r,a]);return E.createElement("div",{className:`${u}-container`},!s&&E.createElement(ir,{value:l,variant:"borderless",getPopupContainer:p=>p,popupMatchSelectWidth:68,placement:"bottomRight",onChange:d,className:`${e}-format-select`,size:"small",options:xF}),E.createElement("div",{className:u},f),!o&&E.createElement(pF,{prefixCls:e,value:r,onChange:a}))};function nh(t,e,n){return(t-e)/(n-e)}function Lp(t,e,n,r){var o=nh(e,n,r),i={};switch(t){case"rtl":i.right="".concat(o*100,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(o*100,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(o*100,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(o*100,"%"),i.transform="translateX(-50%)";break}return i}function ri(t,e){return Array.isArray(t)?t[e]:t}var Ai=h.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),nw=h.createContext({}),EF=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],rh=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.value,o=t.valueIndex,i=t.onStartMove,a=t.onDelete,s=t.style,l=t.render,c=t.dragging,u=t.draggingDelete,d=t.onOffsetChange,f=t.onChangeComplete,p=t.onFocus,m=t.onMouseEnter,g=lt(t,EF),v=h.useContext(Ai),b=v.min,y=v.max,C=v.direction,S=v.disabled,x=v.keyboard,w=v.range,$=v.tabIndex,R=v.ariaLabelForHandle,M=v.ariaLabelledByForHandle,O=v.ariaRequired,N=v.ariaValueTextFormatterForHandle,I=v.styles,T=v.classNames,P="".concat(n,"-handle"),A=function(L){S||i(L,o)},k=function(L){p==null||p(L,o)},B=function(L){m(L,o)},_=function(L){if(!S&&x){var J=null;switch(L.which||L.keyCode){case Te.LEFT:J=C==="ltr"||C==="btt"?-1:1;break;case Te.RIGHT:J=C==="ltr"||C==="btt"?1:-1;break;case Te.UP:J=C!=="ttb"?1:-1;break;case Te.DOWN:J=C!=="ttb"?-1:1;break;case Te.HOME:J="min";break;case Te.END:J="max";break;case Te.PAGE_UP:J=2;break;case Te.PAGE_DOWN:J=-2;break;case Te.BACKSPACE:case Te.DELETE:a(o);break}J!==null&&(L.preventDefault(),d(J,o))}},F=function(L){switch(L.which||L.keyCode){case Te.LEFT:case Te.RIGHT:case Te.UP:case Te.DOWN:case Te.HOME:case Te.END:case Te.PAGE_UP:case Te.PAGE_DOWN:f==null||f();break}},H=Lp(C,r,b,y),K={};if(o!==null){var V;K={tabIndex:S?null:ri($,o),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":r,"aria-disabled":S,"aria-label":ri(R,o),"aria-labelledby":ri(M,o),"aria-required":ri(O,o),"aria-valuetext":(V=ri(N,o))===null||V===void 0?void 0:V(r),"aria-orientation":C==="ltr"||C==="rtl"?"horizontal":"vertical",onMouseDown:A,onTouchStart:A,onFocus:k,onMouseEnter:B,onKeyDown:_,onKeyUp:F}}var W=h.createElement("div",ge({ref:e,className:G.cn(P,D(D(D({},"".concat(P,"-").concat(o+1),o!==null&&w),"".concat(P,"-dragging"),c),"".concat(P,"-dragging-delete"),u),T.handle),style:j(j(j({},H),s),I.handle)},K,g));return l&&(W=l(W,{index:o,prefixCls:n,value:r,dragging:c,draggingDelete:u})),W});process.env.NODE_ENV!=="production"&&(rh.displayName="Handle");var $F=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],rw=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.style,o=t.onStartMove,i=t.onOffsetChange,a=t.values,s=t.handleRender,l=t.activeHandleRender,c=t.draggingIndex,u=t.draggingDelete,d=t.onFocus,f=lt(t,$F),p=h.useRef({}),m=h.useState(!1),g=X(m,2),v=g[0],b=g[1],y=h.useState(-1),C=X(y,2),S=C[0],x=C[1],w=function(N){x(N),b(!0)},$=function(N,I){w(I),d==null||d(N)},R=function(N,I){w(I)};h.useImperativeHandle(e,function(){return{focus:function(N){var I;(I=p.current[N])===null||I===void 0||I.focus()},hideHelp:function(){Ar.flushSync(function(){b(!1)})}}});var M=j({prefixCls:n,onStartMove:o,onOffsetChange:i,render:s,onFocus:$,onMouseEnter:R},f);return h.createElement(h.Fragment,null,a.map(function(O,N){var I=c===N;return h.createElement(rh,ge({ref:function(P){P?p.current[N]=P:delete p.current[N]},dragging:I,draggingDelete:I&&u,style:ri(r,N),key:N,value:O,valueIndex:N},M))}),l&&v&&h.createElement(rh,ge({key:"a11y"},M,{value:a[S],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});process.env.NODE_ENV!=="production"&&(rw.displayName="Handles");var OF=function(e){var n=e.prefixCls,r=e.style,o=e.children,i=e.value,a=e.onClick,s=h.useContext(Ai),l=s.min,c=s.max,u=s.direction,d=s.includedStart,f=s.includedEnd,p=s.included,m="".concat(n,"-text"),g=Lp(u,i,l,c);return h.createElement("span",{className:G.cn(m,D({},"".concat(m,"-active"),p&&d<=i&&i<=f)),style:j(j({},g),r),onMouseDown:function(b){b.stopPropagation()},onClick:function(){a(i)}},o)},MF=function(e){var n=e.prefixCls,r=e.marks,o=e.onClick,i="".concat(n,"-mark");return r.length?h.createElement("div",{className:i},r.map(function(a){var s=a.value,l=a.style,c=a.label;return h.createElement(OF,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},NF=function(e){var n=e.prefixCls,r=e.value,o=e.style,i=e.activeStyle,a=h.useContext(Ai),s=a.min,l=a.max,c=a.direction,u=a.included,d=a.includedStart,f=a.includedEnd,p="".concat(n,"-dot"),m=u&&d<=r&&r<=f,g=j(j({},Lp(c,r,s,l)),typeof o=="function"?o(r):o);return m&&(g=j(j({},g),typeof i=="function"?i(r):i)),h.createElement("span",{className:G.cn(p,D({},"".concat(p,"-active"),m)),style:g})},RF=function(e){var n=e.prefixCls,r=e.marks,o=e.dots,i=e.style,a=e.activeStyle,s=h.useContext(Ai),l=s.min,c=s.max,u=s.step,d=h.useMemo(function(){var f=new Set;if(r.forEach(function(m){f.add(m.value)}),o&&u!==null)for(var p=l;p<=c;)f.add(p),p+=u;return Array.from(f)},[l,c,u,o,r]);return h.createElement("div",{className:"".concat(n,"-step")},d.map(function(f){return h.createElement(NF,{prefixCls:n,key:f,value:f,style:i,activeStyle:a})}))},$0=function(e){var n=e.prefixCls,r=e.style,o=e.start,i=e.end,a=e.index,s=e.onStartMove,l=e.replaceCls,c=h.useContext(Ai),u=c.direction,d=c.min,f=c.max,p=c.disabled,m=c.range,g=c.classNames,v="".concat(n,"-track"),b=nh(o,d,f),y=nh(i,d,f),C=function($){!p&&s&&s($,-1)},S={};switch(u){case"rtl":S.right="".concat(b*100,"%"),S.width="".concat(y*100-b*100,"%");break;case"btt":S.bottom="".concat(b*100,"%"),S.height="".concat(y*100-b*100,"%");break;case"ttb":S.top="".concat(b*100,"%"),S.height="".concat(y*100-b*100,"%");break;default:S.left="".concat(b*100,"%"),S.width="".concat(y*100-b*100,"%")}var x=l||G.cn(v,D(D({},"".concat(v,"-").concat(a+1),a!==null&&m),"".concat(n,"-track-draggable"),s),g.track);return h.createElement("div",{className:x,style:j(j({},S),r),onMouseDown:C,onTouchStart:C})},IF=function(e){var n=e.prefixCls,r=e.style,o=e.values,i=e.startPoint,a=e.onStartMove,s=h.useContext(Ai),l=s.included,c=s.range,u=s.min,d=s.styles,f=s.classNames,p=h.useMemo(function(){if(!c){if(o.length===0)return[];var g=i??u,v=o[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var b=[],y=0;y<o.length-1;y+=1)b.push({start:o[y],end:o[y+1]});return b},[o,c,i,u]);if(!l)return null;var m=p!=null&&p.length&&(f.tracks||d.tracks)?h.createElement($0,{index:null,prefixCls:n,start:p[0].start,end:p[p.length-1].end,replaceCls:G.cn(f.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return h.createElement(h.Fragment,null,m,p.map(function(g,v){var b=g.start,y=g.end;return h.createElement($0,{index:v,prefixCls:n,style:j(j({},ri(r,v)),d.track),start:b,end:y,key:v,onStartMove:a})}))},PF=130;function O0(t){var e="targetTouches"in t?t.targetTouches[0]:t;return{pageX:e.pageX,pageY:e.pageY}}function TF(t,e,n,r,o,i,a,s,l,c,u){var d=h.useState(null),f=X(d,2),p=f[0],m=f[1],g=h.useState(-1),v=X(g,2),b=v[0],y=v[1],C=h.useState(!1),S=X(C,2),x=S[0],w=S[1],$=h.useState(n),R=X($,2),M=R[0],O=R[1],N=h.useState(n),I=X(N,2),T=I[0],P=I[1],A=h.useRef(null),k=h.useRef(null),B=h.useRef(null),_=h.useContext(nw),F=_.onDragStart,H=_.onDragChange;zt(function(){b===-1&&O(n)},[n,b]),h.useEffect(function(){return function(){document.removeEventListener("mousemove",A.current),document.removeEventListener("mouseup",k.current),B.current&&(B.current.removeEventListener("touchmove",A.current),B.current.removeEventListener("touchend",k.current))}},[]);var K=function(J,ne,q){ne!==void 0&&m(ne),O(J);var re=J;q&&(re=J.filter(function(ae,ee){return ee!==b})),a(re),H&&H({rawValues:J,deleteIndex:q?b:-1,draggingIndex:b,draggingValue:ne})},V=At(function(L,J,ne){if(L===-1){var q=T[0],re=T[T.length-1],ae=r-q,ee=o-re,Y=J*(o-r);Y=Math.max(Y,ae),Y=Math.min(Y,ee);var te=i(q+Y);Y=te-q;var Z=T.map(function(se){return se+Y});K(Z)}else{var Q=(o-r)*J,oe=he(M);oe[L]=T[L];var ce=l(oe,Q,L,"dist");K(ce.values,ce.value,ne)}}),W=function(J,ne,q){J.stopPropagation();var re=q||n,ae=re[ne];y(ne),m(ae),P(re),O(re),w(!1);var ee=O0(J),Y=ee.pageX,te=ee.pageY,Z=!1;F&&F({rawValues:re,draggingIndex:ne,draggingValue:ae});var Q=function(se){se.preventDefault();var le=O0(se),be=le.pageX,ye=le.pageY,Be=be-Y,de=ye-te,ue=t.current.getBoundingClientRect(),pe=ue.width,Ae=ue.height,_e,Re;switch(e){case"btt":_e=-de/Ae,Re=Be;break;case"ttb":_e=de/Ae,Re=Be;break;case"rtl":_e=-Be/pe,Re=de;break;default:_e=Be/pe,Re=de}Z=c?Math.abs(Re)>PF&&u<M.length:!1,w(Z),V(ne,_e,Z)},oe=function ce(se){se.preventDefault(),document.removeEventListener("mouseup",ce),document.removeEventListener("mousemove",Q),B.current&&(B.current.removeEventListener("touchmove",A.current),B.current.removeEventListener("touchend",k.current)),A.current=null,k.current=null,B.current=null,s(Z),y(-1),w(!1)};document.addEventListener("mouseup",oe),document.addEventListener("mousemove",Q),J.currentTarget.addEventListener("touchend",oe),J.currentTarget.addEventListener("touchmove",Q),A.current=Q,k.current=oe,B.current=J.currentTarget},z=h.useMemo(function(){var L=he(n).sort(function(ae,ee){return ae-ee}),J=he(M).sort(function(ae,ee){return ae-ee}),ne={};J.forEach(function(ae){ne[ae]=(ne[ae]||0)+1}),L.forEach(function(ae){ne[ae]=(ne[ae]||0)-1});var q=c?1:0,re=Object.values(ne).reduce(function(ae,ee){return ae+Math.abs(ee)},0);return re<=q?M:n},[n,M,c]);return[b,p,x,z,W]}function AF(t,e,n,r,o,i){var a=h.useCallback(function(p){return Math.max(t,Math.min(e,p))},[t,e]),s=h.useCallback(function(p){if(n!==null){var m=t+Math.round((a(p)-t)/n)*n,g=function(C){return(String(C).split(".")[1]||"").length},v=Math.max(g(n),g(e),g(t)),b=Number(m.toFixed(v));return t<=b&&b<=e?b:null}return null},[n,t,e,a]),l=h.useCallback(function(p){var m=a(p),g=r.map(function(y){return y.value});n!==null&&g.push(s(p)),g.push(t,e);var v=g[0],b=e-t;return g.forEach(function(y){var C=Math.abs(m-y);C<=b&&(v=y,b=C)}),v},[t,e,r,n,a,s]),c=function p(m,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof g=="number"){var y,C=m[v],S=C+g,x=[];r.forEach(function(O){x.push(O.value)}),x.push(t,e),x.push(s(C));var w=g>0?1:-1;b==="unit"?x.push(s(C+w*n)):x.push(s(S)),x=x.filter(function(O){return O!==null}).filter(function(O){return g<0?O<=C:O>=C}),b==="unit"&&(x=x.filter(function(O){return O!==C}));var $=b==="unit"?C:S;y=x[0];var R=Math.abs(y-$);if(x.forEach(function(O){var N=Math.abs(O-$);N<R&&(y=O,R=N)}),y===void 0)return g<0?t:e;if(b==="dist")return y;if(Math.abs(g)>1){var M=he(m);return M[v]=y,p(M,g-w,v,b)}return y}else{if(g==="min")return t;if(g==="max")return e}},u=function(m,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=m[v],C=c(m,g,v,b);return{value:C,changed:C!==y}},d=function(m){return i===null&&m===0||typeof i=="number"&&m<i},f=function(m,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=m.map(l),C=y[v],S=c(y,g,v,b);if(y[v]=S,o===!1){var x=i||0;v>0&&y[v-1]!==C&&(y[v]=Math.max(y[v],y[v-1]+x)),v<y.length-1&&y[v+1]!==C&&(y[v]=Math.min(y[v],y[v+1]-x))}else if(typeof i=="number"||i===null){for(var w=v+1;w<y.length;w+=1)for(var $=!0;d(y[w]-y[w-1])&&$;){var R=u(y,1,w);y[w]=R.value,$=R.changed}for(var M=v;M>0;M-=1)for(var O=!0;d(y[M]-y[M-1])&&O;){var N=u(y,-1,M-1);y[M-1]=N.value,O=N.changed}for(var I=y.length-1;I>0;I-=1)for(var T=!0;d(y[I]-y[I-1])&&T;){var P=u(y,-1,I-1);y[I-1]=P.value,T=P.changed}for(var A=0;A<y.length-1;A+=1)for(var k=!0;d(y[A+1]-y[A])&&k;){var B=u(y,1,A+1);y[A+1]=B.value,k=B.changed}}return{value:y[v],values:y}};return[l,f]}function kF(t){return E.useMemo(function(){if(t===!0||!t)return[!!t,!1,!1,0];var e=t.editable,n=t.draggableTrack,r=t.minCount,o=t.maxCount;return process.env.NODE_ENV!=="production"&&Xr(!e||!n,"`editable` can not work with `draggableTrack`."),[!0,e,!e&&n,r||0,o]},[t])}var ow=h.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-slider":n,o=t.className,i=t.style,a=t.classNames,s=t.styles,l=t.id,c=t.disabled,u=c===void 0?!1:c,d=t.keyboard,f=d===void 0?!0:d,p=t.autoFocus,m=t.onFocus,g=t.onBlur,v=t.min,b=v===void 0?0:v,y=t.max,C=y===void 0?100:y,S=t.step,x=S===void 0?1:S,w=t.value,$=t.defaultValue,R=t.range,M=t.count,O=t.onChange,N=t.onBeforeChange,I=t.onAfterChange,T=t.onChangeComplete,P=t.allowCross,A=P===void 0?!0:P,k=t.pushable,B=k===void 0?!1:k,_=t.reverse,F=t.vertical,H=t.included,K=H===void 0?!0:H,V=t.startPoint,W=t.trackStyle,z=t.handleStyle,L=t.railStyle,J=t.dotStyle,ne=t.activeDotStyle,q=t.marks,re=t.dots,ae=t.handleRender,ee=t.activeHandleRender,Y=t.track,te=t.tabIndex,Z=te===void 0?0:te,Q=t.ariaLabelForHandle,oe=t.ariaLabelledByForHandle,ce=t.ariaRequired,se=t.ariaValueTextFormatterForHandle,le=h.useRef(null),be=h.useRef(null),ye=h.useMemo(function(){return F?_?"ttb":"btt":_?"rtl":"ltr"},[_,F]),Be=kF(R),de=X(Be,5),ue=de[0],pe=de[1],Ae=de[2],_e=de[3],Re=de[4],$e=h.useMemo(function(){return isFinite(b)?b:0},[b]),We=h.useMemo(function(){return isFinite(C)?C:100},[C]),ke=h.useMemo(function(){return x!==null&&x<=0?1:x},[x]),De=h.useMemo(function(){return typeof B=="boolean"?B?ke:!1:B>=0?B:!1},[B,ke]),me=h.useMemo(function(){return Object.keys(q||{}).map(function(He){var ve=q[He],nt={value:Number(He)};return ve&&Ue(ve)==="object"&&!h.isValidElement(ve)&&("label"in ve||"style"in ve)?(nt.style=ve.style,nt.label=ve.label):nt.label=ve,nt}).filter(function(He){var ve=He.label;return ve||typeof ve=="number"}).sort(function(He,ve){return He.value-ve.value})},[q]),Ne=AF($e,We,ke,me,A,De),Ze=X(Ne,2),Ie=Ze[0],xe=Ze[1],ot=en($,{value:w}),ft=X(ot,2),Tt=ft[0],Bt=ft[1],Pe=h.useMemo(function(){var He=Tt==null?[]:Array.isArray(Tt)?Tt:[Tt],ve=X(He,1),nt=ve[0],St=nt===void 0?$e:nt,bt=Tt===null?[]:[St];if(ue){if(bt=he(He),M||Tt===void 0){var Jt=M>=0?M+1:2;for(bt=bt.slice(0,Jt);bt.length<Jt;){var Zt;bt.push((Zt=bt[bt.length-1])!==null&&Zt!==void 0?Zt:$e)}}bt.sort(function(tn,Ut){return tn-Ut})}return bt.forEach(function(tn,Ut){bt[Ut]=Ie(tn)}),bt},[Tt,ue,$e,M,Ie]),Se=function(ve){return ue?ve:ve[0]},Xe=At(function(He){var ve=he(He).sort(function(nt,St){return nt-St});O&&!da(ve,Pe,!0)&&O(Se(ve)),Bt(ve)}),Ge=At(function(He){He&&le.current.hideHelp();var ve=Se(Pe);I==null||I(ve),at(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),T==null||T(ve)}),et=function(ve){if(!(u||!pe||Pe.length<=_e)){var nt=he(Pe);nt.splice(ve,1),N==null||N(Se(nt)),Xe(nt);var St=Math.max(0,ve-1);le.current.hideHelp(),le.current.focus(St)}},je=TF(be,ye,Pe,$e,We,Ie,Xe,Ge,xe,pe,_e),we=X(je,5),Ee=we[0],ut=we[1],ht=we[2],ze=we[3],Ce=we[4],Ke=function(ve,nt){if(!u){var St=he(Pe),bt=0,Jt=0,Zt=We-$e;Pe.forEach(function(Rn,dn){var Cn=Math.abs(ve-Rn);Cn<=Zt&&(Zt=Cn,bt=dn),Rn<ve&&(Jt=dn)});var tn=bt;pe&&Zt!==0&&(!Re||Pe.length<Re)?(St.splice(Jt+1,0,ve),tn=Jt+1):St[bt]=ve,ue&&!Pe.length&&M===void 0&&St.push(ve);var Ut=Se(St);if(N==null||N(Ut),Xe(St),nt){var Qt,pn;(Qt=document.activeElement)===null||Qt===void 0||(pn=Qt.blur)===null||pn===void 0||pn.call(Qt),le.current.focus(tn),Ce(nt,tn,St)}else I==null||I(Ut),at(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),T==null||T(Ut)}},Le=function(ve){ve.preventDefault();var nt=be.current.getBoundingClientRect(),St=nt.width,bt=nt.height,Jt=nt.left,Zt=nt.top,tn=nt.bottom,Ut=nt.right,Qt=ve.clientX,pn=ve.clientY,Rn;switch(ye){case"btt":Rn=(tn-pn)/bt;break;case"ttb":Rn=(pn-Zt)/bt;break;case"rtl":Rn=(Ut-Qt)/St;break;default:Rn=(Qt-Jt)/St}var dn=$e+Rn*(We-$e);Ke(Ie(dn),ve)},Fe=h.useState(null),Qe=X(Fe,2),Et=Qe[0],vt=Qe[1],Ht=function(ve,nt){if(!u){var St=xe(Pe,ve,nt);N==null||N(Se(Pe)),Xe(St.values),vt(St.value)}};h.useEffect(function(){if(Et!==null){var He=Pe.indexOf(Et);He>=0&&le.current.focus(He)}vt(null)},[Et]);var Ct=h.useMemo(function(){return Ae&&ke===null?(process.env.NODE_ENV!=="production"&&at(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):Ae},[Ae,ke]),Nt=At(function(He,ve){Ce(He,ve),N==null||N(Se(Pe))}),Dt=Ee!==-1;h.useEffect(function(){if(!Dt){var He=Pe.lastIndexOf(ut);le.current.focus(He)}},[Dt]);var Vt=h.useMemo(function(){return he(ze).sort(function(He,ve){return He-ve})},[ze]),Nn=h.useMemo(function(){return ue?[Vt[0],Vt[Vt.length-1]]:[$e,Vt[0]]},[Vt,ue,$e]),Wt=X(Nn,2),It=Wt[0],Oe=Wt[1];h.useImperativeHandle(e,function(){return{focus:function(){le.current.focus(0)},blur:function(){var ve,nt=document,St=nt.activeElement;(ve=be.current)!==null&&ve!==void 0&&ve.contains(St)&&(St==null||St.blur())}}}),h.useEffect(function(){p&&le.current.focus(0)},[]);var qe=h.useMemo(function(){return{min:$e,max:We,direction:ye,disabled:u,keyboard:f,step:ke,included:K,includedStart:It,includedEnd:Oe,range:ue,tabIndex:Z,ariaLabelForHandle:Q,ariaLabelledByForHandle:oe,ariaRequired:ce,ariaValueTextFormatterForHandle:se,styles:s||{},classNames:a||{}}},[$e,We,ye,u,f,ke,K,It,Oe,ue,Z,Q,oe,ce,se,s,a]);return h.createElement(Ai.Provider,{value:qe},h.createElement("div",{ref:be,className:G.cn(r,o,D(D(D(D({},"".concat(r,"-disabled"),u),"".concat(r,"-vertical"),F),"".concat(r,"-horizontal"),!F),"".concat(r,"-with-marks"),me.length)),style:i,onMouseDown:Le,id:l},h.createElement("div",{className:G.cn("".concat(r,"-rail"),a==null?void 0:a.rail),style:j(j({},L),s==null?void 0:s.rail)}),Y!==!1&&h.createElement(IF,{prefixCls:r,style:W,values:Pe,startPoint:V,onStartMove:Ct?Nt:void 0}),h.createElement(RF,{prefixCls:r,marks:me,dots:re,style:J,activeStyle:ne}),h.createElement(rw,{ref:le,prefixCls:r,style:z,values:ze,draggingIndex:Ee,draggingDelete:ht,onStartMove:Nt,onOffsetChange:Ht,onFocus:m,onBlur:g,handleRender:ae,activeHandleRender:ee,onChangeComplete:Ge,onDelete:pe?et:void 0}),h.createElement(MF,{prefixCls:r,marks:me,onClick:Ke})))});process.env.NODE_ENV!=="production"&&(ow.displayName="Slider");const iw=E.createContext({}),oh=h.forwardRef((t,e)=>{const{open:n,draggingDelete:r,value:o}=t,i=E.useRef(null),a=n&&!r,s=E.useRef(null);function l(){wt.cancel(s.current),s.current=null}function c(){s.current=wt(()=>{var u;(u=i.current)===null||u===void 0||u.forceAlign(),s.current=null})}return h.useEffect(()=>(a?c():l(),l),[a,t.title,o]),h.createElement(qo,Object.assign({ref:Qn(i,e)},t,{open:a}))});process.env.NODE_ENV!=="production"&&(oh.displayName="SliderTooltip");const DF=t=>{const{componentCls:e,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:p,handleLineWidth:m,handleLineWidthHover:g,motionDurationMid:v}=t;return{[e]:Object.assign(Object.assign({},An(t)),{position:"relative",height:r,margin:`${U(a)} ${U(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${U(i)} ${U(a)}`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.railBg,borderRadius:t.borderRadiusXS,transition:`background-color ${v}`},[`${e}-track,${e}-tracks`]:{position:"absolute",transition:`background-color ${v}`},[`${e}-track`]:{backgroundColor:t.trackBg,borderRadius:t.borderRadiusXS},[`${e}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${e}-rail`]:{backgroundColor:t.railHoverBg},[`${e}-track`]:{backgroundColor:t.trackHoverBg},[`${e}-dot`]:{borderColor:s},[`${e}-handle::after`]:{boxShadow:`0 0 0 ${U(m)} ${t.colorPrimaryBorderHover}`},[`${e}-dot-active`]:{borderColor:t.dotActiveBorderColor}},[`${e}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(m).mul(-1).equal(),insetBlockStart:c(m).mul(-1).equal(),width:c(u).add(c(m).mul(2)).equal(),height:c(u).add(c(m).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:t.colorBgElevated,boxShadow:`0 0 0 ${U(m)} ${t.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
380
+ `]:{color:w}})}]},uF=t=>{const{componentCls:e,paddingBlock:n,paddingInline:r,inputAffixPadding:o,controlWidth:i,borderRadiusLG:a,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:f}=t;return{[`${e}-affix-wrapper`]:Object.assign(Object.assign({[`input${e}-input`]:{padding:`${U(n)} 0`}},au(t)),{position:"relative",display:"inline-flex",alignItems:"center",width:i,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:a,paddingInlineStart:l,[`input${e}-input`]:{padding:`${U(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${e}-input`]:{padding:`${U(d)} 0`}},[`&:not(${e}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${e}-disabled`]:{background:"transparent"},[`> div${e}`]:{width:"100%",border:"none",outline:"none",[`&${e}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${e}-handler-wrap`]:{zIndex:2},[e]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:r,marginInlineStart:o,transition:`margin ${f}`}},[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1},[`&:not(${e}-affix-wrapper-without-controls):hover ${e}-suffix`]:{marginInlineEnd:t.calc(t.handleWidth).add(r).equal()}})}},dF=Yt("InputNumber",t=>{const e=Mt(t,Fs(t));return[cF(e),uF(e),Ps(e)]},lF,{unitless:{handleOpacity:!0}});var fF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const Q1=h.forwardRef((t,e)=>{if(process.env.NODE_ENV!=="production"){const q=Kt("InputNumber");q.deprecated(!("bordered"in t),"bordered","variant"),q(!(t.type==="number"&&t.changeOnWheel),"usage","When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.")}const{getPrefixCls:n,direction:r}=h.useContext(gt),o=h.useRef(null);h.useImperativeHandle(e,()=>o.current);const{className:i,rootClassName:a,size:s,disabled:l,prefixCls:c,addonBefore:u,addonAfter:d,prefix:f,suffix:p,bordered:m,readOnly:g,status:v,controls:b,variant:y}=t,C=fF(t,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),S=n("input-number",c),x=yo(S),[w,$,R]=dF(S,x),{compactSize:M,compactItemClassnames:O}=Zo(S,r);let N=h.createElement(X1,{className:`${S}-handler-up-inner`}),I=h.createElement(Cp,{className:`${S}-handler-down-inner`});const T=typeof b=="boolean"?b:void 0;typeof b=="object"&&(N=typeof b.upIcon>"u"?N:h.createElement("span",{className:`${S}-handler-up-inner`},b.upIcon),I=typeof b.downIcon>"u"?I:h.createElement("span",{className:`${S}-handler-down-inner`},b.downIcon));const{hasFeedback:P,status:A,isFormItemInput:k,feedbackIcon:B}=h.useContext(wr),_=js(A,v),F=Er(q=>{var re;return(re=s??M)!==null&&re!==void 0?re:q}),H=h.useContext(Dr),K=l??H,[V,W]=tu("inputNumber",y,m),z=P&&h.createElement(h.Fragment,null,B),L=G.cn({[`${S}-lg`]:F==="large",[`${S}-sm`]:F==="small",[`${S}-rtl`]:r==="rtl",[`${S}-in-form-item`]:k},$),J=`${S}-group`,ne=h.createElement(Z1,Object.assign({ref:o,disabled:K,className:G.cn(R,x,i,a,O),upHandler:N,downHandler:I,prefixCls:S,readOnly:g,controls:T,prefix:f,suffix:z||p,addonBefore:u&&h.createElement(Wo,{form:!0,space:!0},u),addonAfter:d&&h.createElement(Wo,{form:!0,space:!0},d),classNames:{input:L,variant:G.cn({[`${S}-${V}`]:W},$i(S,_,P)),affixWrapper:G.cn({[`${S}-affix-wrapper-sm`]:F==="small",[`${S}-affix-wrapper-lg`]:F==="large",[`${S}-affix-wrapper-rtl`]:r==="rtl",[`${S}-affix-wrapper-without-controls`]:b===!1||K},$),wrapper:G.cn({[`${J}-rtl`]:r==="rtl"},$),groupWrapper:G.cn({[`${S}-group-wrapper-sm`]:F==="small",[`${S}-group-wrapper-lg`]:F==="large",[`${S}-group-wrapper-rtl`]:r==="rtl",[`${S}-group-wrapper-${V}`]:W},$i(`${S}-group-wrapper`,_,P),$)}},C));return w(ne)}),zp=Q1,hF=t=>h.createElement(to,{theme:{components:{InputNumber:{handleVisible:!0}}}},h.createElement(Q1,Object.assign({},t)));process.env.NODE_ENV!=="production"&&(zp.displayName="InputNumber");zp._InternalPanelDoNotUseOrYouWillBeFired=hF;const gi=({prefixCls:t,min:e=0,max:n=100,value:r,onChange:o,className:i,formatter:a})=>{const s=`${t}-steppers`,[l,c]=E.useState(0),u=Number.isNaN(r)?l:r;return E.createElement(zp,{className:G.cn(s,i),min:e,max:n,value:u,formatter:a,size:"small",onChange:d=>{c(d||0),o==null||o(d)}})},pF=({prefixCls:t,value:e,onChange:n})=>{const r=`${t}-alpha-input`,[o,i]=E.useState(()=>Ln(e||"#000")),a=e||o,s=l=>{const c=a.toHsb();c.a=(l||0)/100;const u=Ln(c);i(u),n==null||n(u)};return E.createElement(gi,{value:ap(a),prefixCls:t,formatter:l=>`${l}%`,className:r,onChange:s})},ew=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:E.createElement(zc,null)}),e};function tw(t,e){const n=E.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;!((o=t.current)===null||o===void 0)&&o.input&&((i=t.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((a=t.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=t.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return E.useEffect(()=>(e&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[]),r}function mF(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var gF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const $a=E.forwardRef((t,e)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:m,styles:g,rootClassName:v,onChange:b,classNames:y,variant:C}=t,S=gF(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:le}=Kt("Input");le(!("bordered"in t),"bordered","variant")}const{getPrefixCls:x,direction:w,allowClear:$,autoComplete:R,className:M,style:O,classNames:N,styles:I}=hr("input"),T=x("input",n),P=E.useRef(null),A=yo(T),[k,B,_]=B1(T,v),[F]=z1(T,A),{compactSize:H,compactItemClassnames:K}=Zo(T,w),V=Er(le=>{var be;return(be=i??H)!==null&&be!==void 0?be:le}),W=E.useContext(Dr),z=a??W,{status:L,hasFeedback:J,feedbackIcon:ne}=E.useContext(wr),q=js(L,o),re=mF(t)||!!J,ae=E.useRef(re);if(process.env.NODE_ENV!=="production"){const le=Kt("Input");E.useEffect(()=>{var be;re&&!ae.current&&process.env.NODE_ENV!=="production"&&le(document.activeElement===((be=P.current)===null||be===void 0?void 0:be.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ae.current=re},[re])}const ee=tw(P,!0),Y=le=>{ee(),s==null||s(le)},te=le=>{ee(),l==null||l(le)},Z=le=>{ee(),b==null||b(le)},Q=(J||c)&&E.createElement(E.Fragment,null,c,J&&ne),ie=ew(u??$),[ce,se]=tu("input",C,r);return k(F(E.createElement(JL,Object.assign({ref:Qn(e,P),prefixCls:T,autoComplete:R},S,{disabled:z,onBlur:Y,onFocus:te,style:Object.assign(Object.assign({},O),m),styles:Object.assign(Object.assign({},I),g),suffix:Q,allowClear:ie,className:G.cn(p,v,_,A,K,M),onChange:Z,addonBefore:f&&E.createElement(Wo,{form:!0,space:!0},f),addonAfter:d&&E.createElement(Wo,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},y),N),{input:G.cn({[`${T}-sm`]:V==="small",[`${T}-lg`]:V==="large",[`${T}-rtl`]:w==="rtl"},y==null?void 0:y.input,N.input,B),variant:G.cn({[`${T}-${ce}`]:se},$i(T,q)),affixWrapper:G.cn({[`${T}-affix-wrapper-sm`]:V==="small",[`${T}-affix-wrapper-lg`]:V==="large",[`${T}-affix-wrapper-rtl`]:w==="rtl"},B),wrapper:G.cn({[`${T}-group-rtl`]:w==="rtl"},B),groupWrapper:G.cn({[`${T}-group-wrapper-sm`]:V==="small",[`${T}-group-wrapper-lg`]:V==="large",[`${T}-group-wrapper-rtl`]:w==="rtl",[`${T}-group-wrapper-${ce}`]:se},$i(`${T}-group-wrapper`,q,J),B)})}))))});process.env.NODE_ENV!=="production"&&($a.displayName="Input");const vF=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,bF=t=>vF.test(`#${t}`),yF=({prefixCls:t,value:e,onChange:n})=>{const r=`${t}-hex-input`,[o,i]=E.useState(()=>e?Fa(e.toHexString()):void 0);E.useEffect(()=>{e&&i(Fa(e.toHexString()))},[e]);const a=s=>{const l=s.target.value;i(Fa(l)),bF(Fa(l,!0))&&(n==null||n(Ln(l)))};return E.createElement($a,{className:r,value:o,prefix:"#",onChange:a,size:"small"})},CF=({prefixCls:t,value:e,onChange:n})=>{const r=`${t}-hsb-input`,[o,i]=E.useState(()=>Ln(e||"#000")),a=e||o,s=(l,c)=>{const u=a.toHsb();u[c]=c==="h"?l:(l||0)/100;const d=Ln(u);i(d),n==null||n(d)};return E.createElement("div",{className:r},E.createElement(gi,{max:360,min:0,value:Number(a.toHsb().h),prefixCls:t,className:r,formatter:l=>Il(l||0).toString(),onChange:l=>s(Number(l),"h")}),E.createElement(gi,{max:100,min:0,value:Number(a.toHsb().s)*100,prefixCls:t,className:r,formatter:l=>`${Il(l||0)}%`,onChange:l=>s(Number(l),"s")}),E.createElement(gi,{max:100,min:0,value:Number(a.toHsb().b)*100,prefixCls:t,className:r,formatter:l=>`${Il(l||0)}%`,onChange:l=>s(Number(l),"b")}))},SF=({prefixCls:t,value:e,onChange:n})=>{const r=`${t}-rgb-input`,[o,i]=E.useState(()=>Ln(e||"#000")),a=e||o,s=(l,c)=>{const u=a.toRgb();u[c]=l||0;const d=Ln(u);i(d),n==null||n(d)};return E.createElement("div",{className:r},E.createElement(gi,{max:255,min:0,value:Number(a.toRgb().r),prefixCls:t,className:r,onChange:l=>s(Number(l),"r")}),E.createElement(gi,{max:255,min:0,value:Number(a.toRgb().g),prefixCls:t,className:r,onChange:l=>s(Number(l),"g")}),E.createElement(gi,{max:255,min:0,value:Number(a.toRgb().b),prefixCls:t,className:r,onChange:l=>s(Number(l),"b")}))},xF=[K1,U1,G1].map(t=>({value:t,label:t.toUpperCase()})),wF=t=>{const{prefixCls:e,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:a,disabledFormat:s}=t,[l,c]=en(K1,{value:n,onChange:i}),u=`${e}-input`,d=p=>{c(p)},f=E.useMemo(()=>{const p={value:r,prefixCls:e,onChange:a};switch(l){case U1:return E.createElement(CF,Object.assign({},p));case G1:return E.createElement(SF,Object.assign({},p));default:return E.createElement(yF,Object.assign({},p))}},[l,e,r,a]);return E.createElement("div",{className:`${u}-container`},!s&&E.createElement(ir,{value:l,variant:"borderless",getPopupContainer:p=>p,popupMatchSelectWidth:68,placement:"bottomRight",onChange:d,className:`${e}-format-select`,size:"small",options:xF}),E.createElement("div",{className:u},f),!o&&E.createElement(pF,{prefixCls:e,value:r,onChange:a}))};function nh(t,e,n){return(t-e)/(n-e)}function Lp(t,e,n,r){var o=nh(e,n,r),i={};switch(t){case"rtl":i.right="".concat(o*100,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(o*100,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(o*100,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(o*100,"%"),i.transform="translateX(-50%)";break}return i}function ri(t,e){return Array.isArray(t)?t[e]:t}var Ai=h.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),nw=h.createContext({}),EF=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],rh=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.value,o=t.valueIndex,i=t.onStartMove,a=t.onDelete,s=t.style,l=t.render,c=t.dragging,u=t.draggingDelete,d=t.onOffsetChange,f=t.onChangeComplete,p=t.onFocus,m=t.onMouseEnter,g=lt(t,EF),v=h.useContext(Ai),b=v.min,y=v.max,C=v.direction,S=v.disabled,x=v.keyboard,w=v.range,$=v.tabIndex,R=v.ariaLabelForHandle,M=v.ariaLabelledByForHandle,O=v.ariaRequired,N=v.ariaValueTextFormatterForHandle,I=v.styles,T=v.classNames,P="".concat(n,"-handle"),A=function(L){S||i(L,o)},k=function(L){p==null||p(L,o)},B=function(L){m(L,o)},_=function(L){if(!S&&x){var J=null;switch(L.which||L.keyCode){case Te.LEFT:J=C==="ltr"||C==="btt"?-1:1;break;case Te.RIGHT:J=C==="ltr"||C==="btt"?1:-1;break;case Te.UP:J=C!=="ttb"?1:-1;break;case Te.DOWN:J=C!=="ttb"?-1:1;break;case Te.HOME:J="min";break;case Te.END:J="max";break;case Te.PAGE_UP:J=2;break;case Te.PAGE_DOWN:J=-2;break;case Te.BACKSPACE:case Te.DELETE:a(o);break}J!==null&&(L.preventDefault(),d(J,o))}},F=function(L){switch(L.which||L.keyCode){case Te.LEFT:case Te.RIGHT:case Te.UP:case Te.DOWN:case Te.HOME:case Te.END:case Te.PAGE_UP:case Te.PAGE_DOWN:f==null||f();break}},H=Lp(C,r,b,y),K={};if(o!==null){var V;K={tabIndex:S?null:ri($,o),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":r,"aria-disabled":S,"aria-label":ri(R,o),"aria-labelledby":ri(M,o),"aria-required":ri(O,o),"aria-valuetext":(V=ri(N,o))===null||V===void 0?void 0:V(r),"aria-orientation":C==="ltr"||C==="rtl"?"horizontal":"vertical",onMouseDown:A,onTouchStart:A,onFocus:k,onMouseEnter:B,onKeyDown:_,onKeyUp:F}}var W=h.createElement("div",ge({ref:e,className:G.cn(P,D(D(D({},"".concat(P,"-").concat(o+1),o!==null&&w),"".concat(P,"-dragging"),c),"".concat(P,"-dragging-delete"),u),T.handle),style:j(j(j({},H),s),I.handle)},K,g));return l&&(W=l(W,{index:o,prefixCls:n,value:r,dragging:c,draggingDelete:u})),W});process.env.NODE_ENV!=="production"&&(rh.displayName="Handle");var $F=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],rw=h.forwardRef(function(t,e){var n=t.prefixCls,r=t.style,o=t.onStartMove,i=t.onOffsetChange,a=t.values,s=t.handleRender,l=t.activeHandleRender,c=t.draggingIndex,u=t.draggingDelete,d=t.onFocus,f=lt(t,$F),p=h.useRef({}),m=h.useState(!1),g=X(m,2),v=g[0],b=g[1],y=h.useState(-1),C=X(y,2),S=C[0],x=C[1],w=function(N){x(N),b(!0)},$=function(N,I){w(I),d==null||d(N)},R=function(N,I){w(I)};h.useImperativeHandle(e,function(){return{focus:function(N){var I;(I=p.current[N])===null||I===void 0||I.focus()},hideHelp:function(){Ar.flushSync(function(){b(!1)})}}});var M=j({prefixCls:n,onStartMove:o,onOffsetChange:i,render:s,onFocus:$,onMouseEnter:R},f);return h.createElement(h.Fragment,null,a.map(function(O,N){var I=c===N;return h.createElement(rh,ge({ref:function(P){P?p.current[N]=P:delete p.current[N]},dragging:I,draggingDelete:I&&u,style:ri(r,N),key:N,value:O,valueIndex:N},M))}),l&&v&&h.createElement(rh,ge({key:"a11y"},M,{value:a[S],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});process.env.NODE_ENV!=="production"&&(rw.displayName="Handles");var OF=function(e){var n=e.prefixCls,r=e.style,o=e.children,i=e.value,a=e.onClick,s=h.useContext(Ai),l=s.min,c=s.max,u=s.direction,d=s.includedStart,f=s.includedEnd,p=s.included,m="".concat(n,"-text"),g=Lp(u,i,l,c);return h.createElement("span",{className:G.cn(m,D({},"".concat(m,"-active"),p&&d<=i&&i<=f)),style:j(j({},g),r),onMouseDown:function(b){b.stopPropagation()},onClick:function(){a(i)}},o)},MF=function(e){var n=e.prefixCls,r=e.marks,o=e.onClick,i="".concat(n,"-mark");return r.length?h.createElement("div",{className:i},r.map(function(a){var s=a.value,l=a.style,c=a.label;return h.createElement(OF,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},NF=function(e){var n=e.prefixCls,r=e.value,o=e.style,i=e.activeStyle,a=h.useContext(Ai),s=a.min,l=a.max,c=a.direction,u=a.included,d=a.includedStart,f=a.includedEnd,p="".concat(n,"-dot"),m=u&&d<=r&&r<=f,g=j(j({},Lp(c,r,s,l)),typeof o=="function"?o(r):o);return m&&(g=j(j({},g),typeof i=="function"?i(r):i)),h.createElement("span",{className:G.cn(p,D({},"".concat(p,"-active"),m)),style:g})},RF=function(e){var n=e.prefixCls,r=e.marks,o=e.dots,i=e.style,a=e.activeStyle,s=h.useContext(Ai),l=s.min,c=s.max,u=s.step,d=h.useMemo(function(){var f=new Set;if(r.forEach(function(m){f.add(m.value)}),o&&u!==null)for(var p=l;p<=c;)f.add(p),p+=u;return Array.from(f)},[l,c,u,o,r]);return h.createElement("div",{className:"".concat(n,"-step")},d.map(function(f){return h.createElement(NF,{prefixCls:n,key:f,value:f,style:i,activeStyle:a})}))},$0=function(e){var n=e.prefixCls,r=e.style,o=e.start,i=e.end,a=e.index,s=e.onStartMove,l=e.replaceCls,c=h.useContext(Ai),u=c.direction,d=c.min,f=c.max,p=c.disabled,m=c.range,g=c.classNames,v="".concat(n,"-track"),b=nh(o,d,f),y=nh(i,d,f),C=function($){!p&&s&&s($,-1)},S={};switch(u){case"rtl":S.right="".concat(b*100,"%"),S.width="".concat(y*100-b*100,"%");break;case"btt":S.bottom="".concat(b*100,"%"),S.height="".concat(y*100-b*100,"%");break;case"ttb":S.top="".concat(b*100,"%"),S.height="".concat(y*100-b*100,"%");break;default:S.left="".concat(b*100,"%"),S.width="".concat(y*100-b*100,"%")}var x=l||G.cn(v,D(D({},"".concat(v,"-").concat(a+1),a!==null&&m),"".concat(n,"-track-draggable"),s),g.track);return h.createElement("div",{className:x,style:j(j({},S),r),onMouseDown:C,onTouchStart:C})},IF=function(e){var n=e.prefixCls,r=e.style,o=e.values,i=e.startPoint,a=e.onStartMove,s=h.useContext(Ai),l=s.included,c=s.range,u=s.min,d=s.styles,f=s.classNames,p=h.useMemo(function(){if(!c){if(o.length===0)return[];var g=i??u,v=o[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var b=[],y=0;y<o.length-1;y+=1)b.push({start:o[y],end:o[y+1]});return b},[o,c,i,u]);if(!l)return null;var m=p!=null&&p.length&&(f.tracks||d.tracks)?h.createElement($0,{index:null,prefixCls:n,start:p[0].start,end:p[p.length-1].end,replaceCls:G.cn(f.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return h.createElement(h.Fragment,null,m,p.map(function(g,v){var b=g.start,y=g.end;return h.createElement($0,{index:v,prefixCls:n,style:j(j({},ri(r,v)),d.track),start:b,end:y,key:v,onStartMove:a})}))},PF=130;function O0(t){var e="targetTouches"in t?t.targetTouches[0]:t;return{pageX:e.pageX,pageY:e.pageY}}function TF(t,e,n,r,o,i,a,s,l,c,u){var d=h.useState(null),f=X(d,2),p=f[0],m=f[1],g=h.useState(-1),v=X(g,2),b=v[0],y=v[1],C=h.useState(!1),S=X(C,2),x=S[0],w=S[1],$=h.useState(n),R=X($,2),M=R[0],O=R[1],N=h.useState(n),I=X(N,2),T=I[0],P=I[1],A=h.useRef(null),k=h.useRef(null),B=h.useRef(null),_=h.useContext(nw),F=_.onDragStart,H=_.onDragChange;zt(function(){b===-1&&O(n)},[n,b]),h.useEffect(function(){return function(){document.removeEventListener("mousemove",A.current),document.removeEventListener("mouseup",k.current),B.current&&(B.current.removeEventListener("touchmove",A.current),B.current.removeEventListener("touchend",k.current))}},[]);var K=function(J,ne,q){ne!==void 0&&m(ne),O(J);var re=J;q&&(re=J.filter(function(ae,ee){return ee!==b})),a(re),H&&H({rawValues:J,deleteIndex:q?b:-1,draggingIndex:b,draggingValue:ne})},V=At(function(L,J,ne){if(L===-1){var q=T[0],re=T[T.length-1],ae=r-q,ee=o-re,Y=J*(o-r);Y=Math.max(Y,ae),Y=Math.min(Y,ee);var te=i(q+Y);Y=te-q;var Z=T.map(function(se){return se+Y});K(Z)}else{var Q=(o-r)*J,ie=he(M);ie[L]=T[L];var ce=l(ie,Q,L,"dist");K(ce.values,ce.value,ne)}}),W=function(J,ne,q){J.stopPropagation();var re=q||n,ae=re[ne];y(ne),m(ae),P(re),O(re),w(!1);var ee=O0(J),Y=ee.pageX,te=ee.pageY,Z=!1;F&&F({rawValues:re,draggingIndex:ne,draggingValue:ae});var Q=function(se){se.preventDefault();var le=O0(se),be=le.pageX,ye=le.pageY,Be=be-Y,de=ye-te,ue=t.current.getBoundingClientRect(),pe=ue.width,Ae=ue.height,_e,Re;switch(e){case"btt":_e=-de/Ae,Re=Be;break;case"ttb":_e=de/Ae,Re=Be;break;case"rtl":_e=-Be/pe,Re=de;break;default:_e=Be/pe,Re=de}Z=c?Math.abs(Re)>PF&&u<M.length:!1,w(Z),V(ne,_e,Z)},ie=function ce(se){se.preventDefault(),document.removeEventListener("mouseup",ce),document.removeEventListener("mousemove",Q),B.current&&(B.current.removeEventListener("touchmove",A.current),B.current.removeEventListener("touchend",k.current)),A.current=null,k.current=null,B.current=null,s(Z),y(-1),w(!1)};document.addEventListener("mouseup",ie),document.addEventListener("mousemove",Q),J.currentTarget.addEventListener("touchend",ie),J.currentTarget.addEventListener("touchmove",Q),A.current=Q,k.current=ie,B.current=J.currentTarget},z=h.useMemo(function(){var L=he(n).sort(function(ae,ee){return ae-ee}),J=he(M).sort(function(ae,ee){return ae-ee}),ne={};J.forEach(function(ae){ne[ae]=(ne[ae]||0)+1}),L.forEach(function(ae){ne[ae]=(ne[ae]||0)-1});var q=c?1:0,re=Object.values(ne).reduce(function(ae,ee){return ae+Math.abs(ee)},0);return re<=q?M:n},[n,M,c]);return[b,p,x,z,W]}function AF(t,e,n,r,o,i){var a=h.useCallback(function(p){return Math.max(t,Math.min(e,p))},[t,e]),s=h.useCallback(function(p){if(n!==null){var m=t+Math.round((a(p)-t)/n)*n,g=function(C){return(String(C).split(".")[1]||"").length},v=Math.max(g(n),g(e),g(t)),b=Number(m.toFixed(v));return t<=b&&b<=e?b:null}return null},[n,t,e,a]),l=h.useCallback(function(p){var m=a(p),g=r.map(function(y){return y.value});n!==null&&g.push(s(p)),g.push(t,e);var v=g[0],b=e-t;return g.forEach(function(y){var C=Math.abs(m-y);C<=b&&(v=y,b=C)}),v},[t,e,r,n,a,s]),c=function p(m,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof g=="number"){var y,C=m[v],S=C+g,x=[];r.forEach(function(O){x.push(O.value)}),x.push(t,e),x.push(s(C));var w=g>0?1:-1;b==="unit"?x.push(s(C+w*n)):x.push(s(S)),x=x.filter(function(O){return O!==null}).filter(function(O){return g<0?O<=C:O>=C}),b==="unit"&&(x=x.filter(function(O){return O!==C}));var $=b==="unit"?C:S;y=x[0];var R=Math.abs(y-$);if(x.forEach(function(O){var N=Math.abs(O-$);N<R&&(y=O,R=N)}),y===void 0)return g<0?t:e;if(b==="dist")return y;if(Math.abs(g)>1){var M=he(m);return M[v]=y,p(M,g-w,v,b)}return y}else{if(g==="min")return t;if(g==="max")return e}},u=function(m,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=m[v],C=c(m,g,v,b);return{value:C,changed:C!==y}},d=function(m){return i===null&&m===0||typeof i=="number"&&m<i},f=function(m,g,v){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=m.map(l),C=y[v],S=c(y,g,v,b);if(y[v]=S,o===!1){var x=i||0;v>0&&y[v-1]!==C&&(y[v]=Math.max(y[v],y[v-1]+x)),v<y.length-1&&y[v+1]!==C&&(y[v]=Math.min(y[v],y[v+1]-x))}else if(typeof i=="number"||i===null){for(var w=v+1;w<y.length;w+=1)for(var $=!0;d(y[w]-y[w-1])&&$;){var R=u(y,1,w);y[w]=R.value,$=R.changed}for(var M=v;M>0;M-=1)for(var O=!0;d(y[M]-y[M-1])&&O;){var N=u(y,-1,M-1);y[M-1]=N.value,O=N.changed}for(var I=y.length-1;I>0;I-=1)for(var T=!0;d(y[I]-y[I-1])&&T;){var P=u(y,-1,I-1);y[I-1]=P.value,T=P.changed}for(var A=0;A<y.length-1;A+=1)for(var k=!0;d(y[A+1]-y[A])&&k;){var B=u(y,1,A+1);y[A+1]=B.value,k=B.changed}}return{value:y[v],values:y}};return[l,f]}function kF(t){return E.useMemo(function(){if(t===!0||!t)return[!!t,!1,!1,0];var e=t.editable,n=t.draggableTrack,r=t.minCount,o=t.maxCount;return process.env.NODE_ENV!=="production"&&Xr(!e||!n,"`editable` can not work with `draggableTrack`."),[!0,e,!e&&n,r||0,o]},[t])}var ow=h.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-slider":n,o=t.className,i=t.style,a=t.classNames,s=t.styles,l=t.id,c=t.disabled,u=c===void 0?!1:c,d=t.keyboard,f=d===void 0?!0:d,p=t.autoFocus,m=t.onFocus,g=t.onBlur,v=t.min,b=v===void 0?0:v,y=t.max,C=y===void 0?100:y,S=t.step,x=S===void 0?1:S,w=t.value,$=t.defaultValue,R=t.range,M=t.count,O=t.onChange,N=t.onBeforeChange,I=t.onAfterChange,T=t.onChangeComplete,P=t.allowCross,A=P===void 0?!0:P,k=t.pushable,B=k===void 0?!1:k,_=t.reverse,F=t.vertical,H=t.included,K=H===void 0?!0:H,V=t.startPoint,W=t.trackStyle,z=t.handleStyle,L=t.railStyle,J=t.dotStyle,ne=t.activeDotStyle,q=t.marks,re=t.dots,ae=t.handleRender,ee=t.activeHandleRender,Y=t.track,te=t.tabIndex,Z=te===void 0?0:te,Q=t.ariaLabelForHandle,ie=t.ariaLabelledByForHandle,ce=t.ariaRequired,se=t.ariaValueTextFormatterForHandle,le=h.useRef(null),be=h.useRef(null),ye=h.useMemo(function(){return F?_?"ttb":"btt":_?"rtl":"ltr"},[_,F]),Be=kF(R),de=X(Be,5),ue=de[0],pe=de[1],Ae=de[2],_e=de[3],Re=de[4],$e=h.useMemo(function(){return isFinite(b)?b:0},[b]),We=h.useMemo(function(){return isFinite(C)?C:100},[C]),ke=h.useMemo(function(){return x!==null&&x<=0?1:x},[x]),De=h.useMemo(function(){return typeof B=="boolean"?B?ke:!1:B>=0?B:!1},[B,ke]),me=h.useMemo(function(){return Object.keys(q||{}).map(function(He){var ve=q[He],nt={value:Number(He)};return ve&&Ue(ve)==="object"&&!h.isValidElement(ve)&&("label"in ve||"style"in ve)?(nt.style=ve.style,nt.label=ve.label):nt.label=ve,nt}).filter(function(He){var ve=He.label;return ve||typeof ve=="number"}).sort(function(He,ve){return He.value-ve.value})},[q]),Ne=AF($e,We,ke,me,A,De),Ze=X(Ne,2),Ie=Ze[0],xe=Ze[1],ot=en($,{value:w}),ft=X(ot,2),Tt=ft[0],Bt=ft[1],Pe=h.useMemo(function(){var He=Tt==null?[]:Array.isArray(Tt)?Tt:[Tt],ve=X(He,1),nt=ve[0],St=nt===void 0?$e:nt,bt=Tt===null?[]:[St];if(ue){if(bt=he(He),M||Tt===void 0){var Jt=M>=0?M+1:2;for(bt=bt.slice(0,Jt);bt.length<Jt;){var Zt;bt.push((Zt=bt[bt.length-1])!==null&&Zt!==void 0?Zt:$e)}}bt.sort(function(tn,Ut){return tn-Ut})}return bt.forEach(function(tn,Ut){bt[Ut]=Ie(tn)}),bt},[Tt,ue,$e,M,Ie]),Se=function(ve){return ue?ve:ve[0]},Xe=At(function(He){var ve=he(He).sort(function(nt,St){return nt-St});O&&!da(ve,Pe,!0)&&O(Se(ve)),Bt(ve)}),Ge=At(function(He){He&&le.current.hideHelp();var ve=Se(Pe);I==null||I(ve),at(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),T==null||T(ve)}),et=function(ve){if(!(u||!pe||Pe.length<=_e)){var nt=he(Pe);nt.splice(ve,1),N==null||N(Se(nt)),Xe(nt);var St=Math.max(0,ve-1);le.current.hideHelp(),le.current.focus(St)}},je=TF(be,ye,Pe,$e,We,Ie,Xe,Ge,xe,pe,_e),we=X(je,5),Ee=we[0],ut=we[1],ht=we[2],ze=we[3],Ce=we[4],Ke=function(ve,nt){if(!u){var St=he(Pe),bt=0,Jt=0,Zt=We-$e;Pe.forEach(function(Rn,dn){var Cn=Math.abs(ve-Rn);Cn<=Zt&&(Zt=Cn,bt=dn),Rn<ve&&(Jt=dn)});var tn=bt;pe&&Zt!==0&&(!Re||Pe.length<Re)?(St.splice(Jt+1,0,ve),tn=Jt+1):St[bt]=ve,ue&&!Pe.length&&M===void 0&&St.push(ve);var Ut=Se(St);if(N==null||N(Ut),Xe(St),nt){var Qt,pn;(Qt=document.activeElement)===null||Qt===void 0||(pn=Qt.blur)===null||pn===void 0||pn.call(Qt),le.current.focus(tn),Ce(nt,tn,St)}else I==null||I(Ut),at(!I,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),T==null||T(Ut)}},Le=function(ve){ve.preventDefault();var nt=be.current.getBoundingClientRect(),St=nt.width,bt=nt.height,Jt=nt.left,Zt=nt.top,tn=nt.bottom,Ut=nt.right,Qt=ve.clientX,pn=ve.clientY,Rn;switch(ye){case"btt":Rn=(tn-pn)/bt;break;case"ttb":Rn=(pn-Zt)/bt;break;case"rtl":Rn=(Ut-Qt)/St;break;default:Rn=(Qt-Jt)/St}var dn=$e+Rn*(We-$e);Ke(Ie(dn),ve)},Fe=h.useState(null),Qe=X(Fe,2),Et=Qe[0],vt=Qe[1],Ht=function(ve,nt){if(!u){var St=xe(Pe,ve,nt);N==null||N(Se(Pe)),Xe(St.values),vt(St.value)}};h.useEffect(function(){if(Et!==null){var He=Pe.indexOf(Et);He>=0&&le.current.focus(He)}vt(null)},[Et]);var Ct=h.useMemo(function(){return Ae&&ke===null?(process.env.NODE_ENV!=="production"&&at(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):Ae},[Ae,ke]),Nt=At(function(He,ve){Ce(He,ve),N==null||N(Se(Pe))}),Dt=Ee!==-1;h.useEffect(function(){if(!Dt){var He=Pe.lastIndexOf(ut);le.current.focus(He)}},[Dt]);var Vt=h.useMemo(function(){return he(ze).sort(function(He,ve){return He-ve})},[ze]),Nn=h.useMemo(function(){return ue?[Vt[0],Vt[Vt.length-1]]:[$e,Vt[0]]},[Vt,ue,$e]),Wt=X(Nn,2),It=Wt[0],Oe=Wt[1];h.useImperativeHandle(e,function(){return{focus:function(){le.current.focus(0)},blur:function(){var ve,nt=document,St=nt.activeElement;(ve=be.current)!==null&&ve!==void 0&&ve.contains(St)&&(St==null||St.blur())}}}),h.useEffect(function(){p&&le.current.focus(0)},[]);var qe=h.useMemo(function(){return{min:$e,max:We,direction:ye,disabled:u,keyboard:f,step:ke,included:K,includedStart:It,includedEnd:Oe,range:ue,tabIndex:Z,ariaLabelForHandle:Q,ariaLabelledByForHandle:ie,ariaRequired:ce,ariaValueTextFormatterForHandle:se,styles:s||{},classNames:a||{}}},[$e,We,ye,u,f,ke,K,It,Oe,ue,Z,Q,ie,ce,se,s,a]);return h.createElement(Ai.Provider,{value:qe},h.createElement("div",{ref:be,className:G.cn(r,o,D(D(D(D({},"".concat(r,"-disabled"),u),"".concat(r,"-vertical"),F),"".concat(r,"-horizontal"),!F),"".concat(r,"-with-marks"),me.length)),style:i,onMouseDown:Le,id:l},h.createElement("div",{className:G.cn("".concat(r,"-rail"),a==null?void 0:a.rail),style:j(j({},L),s==null?void 0:s.rail)}),Y!==!1&&h.createElement(IF,{prefixCls:r,style:W,values:Pe,startPoint:V,onStartMove:Ct?Nt:void 0}),h.createElement(RF,{prefixCls:r,marks:me,dots:re,style:J,activeStyle:ne}),h.createElement(rw,{ref:le,prefixCls:r,style:z,values:ze,draggingIndex:Ee,draggingDelete:ht,onStartMove:Nt,onOffsetChange:Ht,onFocus:m,onBlur:g,handleRender:ae,activeHandleRender:ee,onChangeComplete:Ge,onDelete:pe?et:void 0}),h.createElement(MF,{prefixCls:r,marks:me,onClick:Ke})))});process.env.NODE_ENV!=="production"&&(ow.displayName="Slider");const iw=E.createContext({}),oh=h.forwardRef((t,e)=>{const{open:n,draggingDelete:r,value:o}=t,i=E.useRef(null),a=n&&!r,s=E.useRef(null);function l(){wt.cancel(s.current),s.current=null}function c(){s.current=wt(()=>{var u;(u=i.current)===null||u===void 0||u.forceAlign(),s.current=null})}return h.useEffect(()=>(a?c():l(),l),[a,t.title,o]),h.createElement(qo,Object.assign({ref:Qn(i,e)},t,{open:a}))});process.env.NODE_ENV!=="production"&&(oh.displayName="SliderTooltip");const DF=t=>{const{componentCls:e,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:p,handleLineWidth:m,handleLineWidthHover:g,motionDurationMid:v}=t;return{[e]:Object.assign(Object.assign({},An(t)),{position:"relative",height:r,margin:`${U(a)} ${U(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${U(i)} ${U(a)}`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.railBg,borderRadius:t.borderRadiusXS,transition:`background-color ${v}`},[`${e}-track,${e}-tracks`]:{position:"absolute",transition:`background-color ${v}`},[`${e}-track`]:{backgroundColor:t.trackBg,borderRadius:t.borderRadiusXS},[`${e}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${e}-rail`]:{backgroundColor:t.railHoverBg},[`${e}-track`]:{backgroundColor:t.trackHoverBg},[`${e}-dot`]:{borderColor:s},[`${e}-handle::after`]:{boxShadow:`0 0 0 ${U(m)} ${t.colorPrimaryBorderHover}`},[`${e}-dot-active`]:{borderColor:t.dotActiveBorderColor}},[`${e}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(m).mul(-1).equal(),insetBlockStart:c(m).mul(-1).equal(),width:c(u).add(c(m).mul(2)).equal(),height:c(u).add(c(m).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:t.colorBgElevated,boxShadow:`0 0 0 ${U(m)} ${t.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
381
381
  inset-inline-start ${v},
382
382
  inset-block-start ${v},
383
383
  width ${v},
@@ -389,7 +389,7 @@ html body {
389
389
  `]:{backgroundColor:t.colorBgElevated,borderColor:t.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${e}-handle::after`]:{backgroundColor:t.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${U(m)} ${l}`,insetInlineStart:0,insetBlockStart:0},[`
390
390
  ${e}-mark-text,
391
391
  ${e}-dot
392
- `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},aw=(t,e)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:a,calc:s}=t,l=e?"paddingBlock":"paddingInline",c=e?"width":"height",u=e?"height":"width",d=e?"insetBlockStart":"insetInlineStart",f=e?"top":"insetInlineStart",p=s(r).mul(3).sub(o).div(2).equal(),m=s(o).sub(r).div(2).equal(),g=e?{borderWidth:`${U(m)} 0`,transform:`translateY(${U(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${U(m)}`,transform:`translateX(${U(t.calc(m).mul(-1).equal())})`};return{[l]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:Object.assign({},g),[`${n}-handle`]:{[d]:p},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(e?0:a).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[f]:r,[c]:"100%",[u]:r},[`${n}-dot`]:{position:"absolute",[d]:s(r).sub(i).div(2).equal()}}},_F=t=>{const{componentCls:e,marginPartWithMark:n}=t;return{[`${e}-horizontal`]:Object.assign(Object.assign({},aw(t,!0)),{[`&${e}-with-marks`]:{marginBottom:n}})}},jF=t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:Object.assign(Object.assign({},aw(t,!1)),{height:"100%"})}},BF=t=>{const n=t.controlHeightLG/4,r=t.controlHeightSM/2,o=t.lineWidth+1,i=t.lineWidth+1*1.5,a=t.colorPrimary,s=new Pt(a).setA(.2).toRgbString();return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:i,railBg:t.colorFillTertiary,railHoverBg:t.colorFillSecondary,trackBg:t.colorPrimaryBorder,trackHoverBg:t.colorPrimaryBorderHover,handleColor:t.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:s,handleColorDisabled:new Pt(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString(),dotBorderColor:t.colorBorderSecondary,dotActiveBorderColor:t.colorPrimaryBorder,trackBgDisabled:t.colorBgContainerDisabled}},zF=Yt("Slider",t=>{const e=Mt(t,{marginPart:t.calc(t.controlHeight).sub(t.controlSize).div(2).equal(),marginFull:t.calc(t.controlSize).div(2).equal(),marginPartWithMark:t.calc(t.controlHeightLG).sub(t.controlSize).equal()});return[DF(e),_F(e),jF(e)]},BF);function md(){const[t,e]=h.useState(!1),n=h.useRef(null),r=()=>{wt.cancel(n.current)},o=i=>{r(),i?e(i):n.current=wt(()=>{e(i)})};return h.useEffect(()=>r,[]),[t,o]}var LF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function FF(t,e){return t||t===null?t:e||e===null?e:n=>typeof n=="number"?n.toString():""}const sw=E.forwardRef((t,e)=>{const{prefixCls:n,range:r,className:o,rootClassName:i,style:a,disabled:s,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:f,tooltip:p={},onChangeComplete:m,classNames:g,styles:v}=t,b=LF(t,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:y}=t,{getPrefixCls:C,direction:S,className:x,style:w,classNames:$,styles:R,getPopupContainer:M}=hr("slider"),O=E.useContext(Dr),N=s??O,{handleRender:I,direction:T}=E.useContext(iw),A=(T||S)==="rtl",[k,B]=md(),[_,F]=md(),H=Object.assign({},p),{open:K,placement:V,getPopupContainer:W,prefixCls:z,formatter:L}=H,J=K??u,ne=(k||_)&&J!==!1,q=FF(L,c),[re,ae]=md(),ee=ue=>{m==null||m(ue),ae(!1)},Y=(ue,pe)=>ue||(pe?A?"left":"right":"top"),te=C("slider",n),[Z,Q,oe]=zF(te),ce=G.cn(o,x,$.root,g==null?void 0:g.root,i,{[`${te}-rtl`]:A,[`${te}-lock`]:re},Q,oe);if(A&&!b.vertical&&(b.reverse=!b.reverse),process.env.NODE_ENV!=="production"){const ue=Kt("Slider");[["tooltipPrefixCls","prefixCls"],["getTooltipPopupContainer","getPopupContainer"],["tipFormatter","formatter"],["tooltipPlacement","placement"],["tooltipVisible","open"]].forEach(([pe,Ae])=>{ue.deprecated(!(pe in t),pe,`tooltip.${Ae}`)})}E.useEffect(()=>{const ue=()=>{wt(()=>{F(!1)},1)};return document.addEventListener("mouseup",ue),()=>{document.removeEventListener("mouseup",ue)}},[]);const se=r&&!J,le=I||((ue,pe)=>{const{index:Ae}=pe,_e=ue.props;function Re(De,me,Ne){var Ze,Ie,xe,ot;Ne&&((Ie=(Ze=b)[De])===null||Ie===void 0||Ie.call(Ze,me)),(ot=(xe=_e)[De])===null||ot===void 0||ot.call(xe,me)}const $e=Object.assign(Object.assign({},_e),{onMouseEnter:De=>{B(!0),Re("onMouseEnter",De)},onMouseLeave:De=>{B(!1),Re("onMouseLeave",De)},onMouseDown:De=>{F(!0),ae(!0),Re("onMouseDown",De)},onFocus:De=>{var me;F(!0),(me=b.onFocus)===null||me===void 0||me.call(b,De),Re("onFocus",De,!0)},onBlur:De=>{var me;F(!1),(me=b.onBlur)===null||me===void 0||me.call(b,De),Re("onBlur",De,!0)}}),We=E.cloneElement(ue,$e),ke=(!!J||ne)&&q!==null;return se?We:E.createElement(oh,Object.assign({},H,{prefixCls:C("tooltip",z??l),title:q?q(pe.value):"",value:pe.value,open:ke,placement:Y(V??f,y),key:Ae,classNames:{root:`${te}-tooltip`},getPopupContainer:W||d||M}),We)}),be=se?(ue,pe)=>{const Ae=E.cloneElement(ue,{style:Object.assign(Object.assign({},ue.props.style),{visibility:"hidden"})});return E.createElement(oh,Object.assign({},H,{prefixCls:C("tooltip",z??l),title:q?q(pe.value):"",open:q!==null&&ne,placement:Y(V??f,y),key:"tooltip",classNames:{root:`${te}-tooltip`},getPopupContainer:W||d||M,draggingDelete:pe.draggingDelete}),Ae)}:void 0,ye=Object.assign(Object.assign(Object.assign(Object.assign({},R.root),w),v==null?void 0:v.root),a),Be=Object.assign(Object.assign({},R.tracks),v==null?void 0:v.tracks),de=G.cn($.tracks,g==null?void 0:g.tracks);return Z(E.createElement(ow,Object.assign({},b,{classNames:Object.assign({handle:G.cn($.handle,g==null?void 0:g.handle),rail:G.cn($.rail,g==null?void 0:g.rail),track:G.cn($.track,g==null?void 0:g.track)},de?{tracks:de}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},R.handle),v==null?void 0:v.handle),rail:Object.assign(Object.assign({},R.rail),v==null?void 0:v.rail),track:Object.assign(Object.assign({},R.track),v==null?void 0:v.track)},Object.keys(Be).length?{tracks:Be}:{}),step:b.step,range:r,className:ce,style:ye,disabled:N,ref:e,prefixCls:te,handleRender:le,activeHandleRender:be,onChangeComplete:ee})))});process.env.NODE_ENV!=="production"&&(sw.displayName="Slider");var HF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const lw=t=>{const{prefixCls:e,colors:n,type:r,color:o,range:i=!1,className:a,activeIndex:s,onActive:l,onDragStart:c,onDragChange:u,onKeyDelete:d}=t,f=HF(t,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDragChange","onKeyDelete"]),p=Object.assign(Object.assign({},f),{track:!1}),m=h.useMemo(()=>`linear-gradient(90deg, ${n.map(w=>`${w.color} ${w.percent}%`).join(", ")})`,[n]),g=h.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),v=At(c),b=At(u),y=h.useMemo(()=>({onDragStart:v,onDragChange:b}),[]),C=At((x,w)=>{const{onFocus:$,style:R,className:M,onKeyDown:O}=x.props,N=Object.assign({},R);return r==="gradient"&&(N.background=GS(n,w.value)),h.cloneElement(x,{onFocus:I=>{l==null||l(w.index),$==null||$(I)},style:N,className:G.cn(M,{[`${e}-slider-handle-active`]:s===w.index}),onKeyDown:I=>{(I.key==="Delete"||I.key==="Backspace")&&d&&d(w.index),O==null||O(I)}})}),S=h.useMemo(()=>({direction:"ltr",handleRender:C}),[]);return h.createElement(iw.Provider,{value:S},h.createElement(nw.Provider,{value:y},h.createElement(sw,Object.assign({},p,{className:G.cn(a,`${e}-slider`),tooltip:{open:!1},range:{editable:i,minCount:2},styles:{rail:{background:m},handle:g?{background:g}:{}},classNames:{rail:`${e}-slider-rail`,handle:`${e}-slider-handle`}}))))},VF=t=>{const{value:e,onChange:n,onChangeComplete:r}=t,o=a=>n(a[0]),i=a=>r(a[0]);return h.createElement(lw,Object.assign({},t,{value:[e],onChange:o,onChangeComplete:i}))};function M0(t){return he(t).sort((e,n)=>e.percent-n.percent)}const WF=t=>{const{prefixCls:e,mode:n,onChange:r,onChangeComplete:o,onActive:i,activeIndex:a,onGradientDragging:s,colors:l}=t,c=n==="gradient",u=h.useMemo(()=>l.map(b=>({percent:b.percent,color:b.color.toRgbString()})),[l]),d=h.useMemo(()=>u.map(b=>b.percent),[u]),f=h.useRef(u),p=({rawValues:b,draggingIndex:y,draggingValue:C})=>{if(b.length>u.length){const S=GS(u,C),x=he(u);x.splice(y,0,{percent:C,color:S}),f.current=x}else f.current=u;s(!0),r(new lr(M0(f.current)),!0)},m=({deleteIndex:b,draggingIndex:y,draggingValue:C})=>{let S=he(f.current);b!==-1?S.splice(b,1):(S[y]=Object.assign(Object.assign({},S[y]),{percent:C}),S=M0(S)),r(new lr(S),!0)},g=b=>{const y=he(u);y.splice(b,1);const C=new lr(y);r(C),o(C)},v=b=>{o(new lr(u)),a>=b.length&&i(b.length-1),s(!1)};return c?h.createElement(lw,{min:0,max:100,prefixCls:e,className:`${e}-gradient-slider`,colors:u,color:null,value:d,range:!0,onChangeComplete:v,disabled:!1,type:"gradient",activeIndex:a,onActive:i,onDragStart:p,onDragChange:m,onKeyDelete:g}):null},qF=h.memo(WF);var KF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const GF={slider:VF},N0=()=>{const t=E.useContext(V1),{mode:e,onModeChange:n,modeOptions:r,prefixCls:o,allowClear:i,value:a,disabledAlpha:s,onChange:l,onClear:c,onChangeComplete:u,activeIndex:d,gradientDragging:f}=t,p=KF(t,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=E.useMemo(()=>a.cleared?[{percent:0,color:new lr("")},{percent:100,color:new lr("")}]:a.getColors(),[a]),g=!a.isGradient(),[v,b]=E.useState(a);zt(()=>{var P;g||b((P=m[d])===null||P===void 0?void 0:P.color)},[f,d]);const y=E.useMemo(()=>{var P;return g?a:f?v:(P=m[d])===null||P===void 0?void 0:P.color},[a,d,g,v,f]),[C,S]=E.useState(y),[x,w]=E.useState(0),$=C!=null&&C.equals(y)?y:C;zt(()=>{S(y)},[x,y==null?void 0:y.toHexString()]);const R=(P,A)=>{let k=Ln(P);if(a.cleared){const _=k.toRgb();if(!_.r&&!_.g&&!_.b&&A){const{type:F,value:H=0}=A;k=new lr({h:F==="hue"?H:0,s:1,b:1,a:F==="alpha"?H/100:1})}else k=Pl(k)}if(e==="single")return k;const B=he(m);return B[d]=Object.assign(Object.assign({},B[d]),{color:k}),new lr(B)},M=(P,A,k)=>{const B=R(P,k);S(B.isGradient()?B.getColors()[d].color:B),l(B,A)},O=(P,A)=>{u(R(P,A)),w(k=>k+1)},N=P=>{l(R(P))};let I=null;const T=r.length>1;return(i||T)&&(I=E.createElement("div",{className:`${o}-operation`},T&&E.createElement(H1,{size:"small",options:r,value:e,onChange:n}),E.createElement(q1,Object.assign({prefixCls:o,value:a,onChange:P=>{l(P),c==null||c()}},p)))),E.createElement(E.Fragment,null,I,E.createElement(qF,Object.assign({},t,{colors:m})),E.createElement(HS,{prefixCls:o,value:$==null?void 0:$.toHsb(),disabledAlpha:s,onChange:(P,A)=>{M(P,!0,A)},onChangeComplete:(P,A)=>{O(P,A)},components:GF}),E.createElement(wF,Object.assign({value:y,onChange:N,prefixCls:o,disabledAlpha:s},p)))},R0=()=>{const{prefixCls:t,value:e,presets:n,onChange:r}=E.useContext(W1);return Array.isArray(n)?E.createElement(Lk,{value:e,presets:n,prefixCls:t,onChange:r}):null},cw=t=>{const{prefixCls:e,presets:n,panelRender:r,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:p,onActive:m,format:g,onFormatChange:v,gradientDragging:b,onGradientDragging:y,disabledFormat:C}=t,S=`${e}-inner`,x=E.useMemo(()=>({prefixCls:e,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:p,onActive:m,format:g,onFormatChange:v,gradientDragging:b,onGradientDragging:y,disabledFormat:C}),[e,o,i,a,s,l,c,u,d,f,p,m,g,v,b,y,C]),w=E.useMemo(()=>({prefixCls:e,value:o,presets:n,onChange:i}),[e,o,n,i]),$=E.createElement("div",{className:`${S}-content`},E.createElement(N0,null),Array.isArray(n)&&E.createElement(L1,null),E.createElement(R0,null));return E.createElement(V1.Provider,{value:x},E.createElement(W1.Provider,{value:w},E.createElement("div",{className:S},typeof r=="function"?r($,{components:{Picker:N0,Presets:R0}}):$)))};process.env.NODE_ENV!=="production"&&(cw.displayName="ColorPickerPanel");var UF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const XF=E.forwardRef((t,e)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:a,className:s,showText:l,activeIndex:c}=t,u=UF(t,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),d=`${r}-trigger`,f=`${d}-text`,p=`${f}-cell`,[m]=Qr("ColorPicker"),g=E.useMemo(()=>{if(!l)return"";if(typeof l=="function")return l(n);if(n.cleared)return m.transparent;if(n.isGradient())return n.getColors().map((C,S)=>{const x=c!==-1&&c!==S;return E.createElement("span",{key:S,className:G.cn(p,x&&`${p}-inactive`)},C.color.toRgbString()," ",C.percent,"%")});const b=n.toHexString().toUpperCase(),y=ap(n);switch(a){case"rgb":return n.toRgbString();case"hsb":return n.toHsbString();default:return y<100?`${b.slice(0,7)},${y}%`:b}},[n,a,l,c]),v=E.useMemo(()=>n.cleared?E.createElement(q1,{prefixCls:r}):E.createElement(ep,{prefixCls:r,color:n.toCssString()}),[n,r]);return E.createElement("div",Object.assign({ref:e,className:G.cn(d,s,{[`${d}-active`]:o,[`${d}-disabled`]:i})},Yr(u)),v,l&&E.createElement("div",{className:f},g))});function YF(t,e,n){const[r]=Qr("ColorPicker"),[o,i]=en(t,{value:e}),[a,s]=h.useState("single"),[l,c]=h.useMemo(()=>{const g=(Array.isArray(n)?n:[n]).filter(C=>C);g.length||g.push("single");const v=new Set(g),b=[],y=(C,S)=>{v.has(C)&&b.push({label:S,value:C})};return y("single",r.singleColor),y("gradient",r.gradientColor),[b,v]},[n]),[u,d]=h.useState(null),f=At(g=>{d(g),i(g)}),p=h.useMemo(()=>{const g=Ln(o||"");return g.equals(u)?u:g},[o,u]),m=h.useMemo(()=>{var g;return c.has(a)?a:(g=l[0])===null||g===void 0?void 0:g.value},[c,a,l]);return h.useEffect(()=>{s(p.isGradient()?"gradient":"single")},[p]),[p,f,m,s,l]}const uw=(t,e)=>({backgroundImage:`conic-gradient(${e} 25%, transparent 25% 50%, ${e} 50% 75%, transparent 75% 100%)`,backgroundSize:`${t} ${t}`}),I0=(t,e)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:a}=t;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:r,width:e,height:e,boxShadow:o,flex:"none"},uw("50%",t.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${U(i)} ${a}`,borderRadius:"inherit"}})}},JF=t=>{const{componentCls:e,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:a,paddingXXS:s,controlHeightSM:l,marginXS:c,fontSizeIcon:u,paddingXS:d,colorTextPlaceholder:f,colorPickerInputNumberHandleWidth:p,lineWidth:m}=t;return{[`${e}-input-container`]:{display:"flex",[`${e}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,[`${n}-input-number-input`]:{paddingInlineStart:s,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:p}},[`${e}-steppers${e}-alpha-input`]:{flex:`0 0 ${U(i)}`,marginInlineStart:a},[`${e}-format-select${n}-select`]:{marginInlineEnd:c,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:t.calc(u).add(a).equal(),fontSize:r,lineHeight:U(l)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${e}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${e}-hsb-input,${e}-rgb-input`]:{display:"flex",gap:a,alignItems:"center"},[`${e}-steppers`]:{flex:1},[`${e}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${U(d)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:U(t.calc(l).sub(t.calc(m).mul(2)).equal())},[`${n}-input-prefix`]:{color:f}}}}}},ZF=t=>{const{componentCls:e,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:a,colorFillSecondary:s,lineWidthBold:l,colorPickerHandlerSize:c}=t;return{userSelect:"none",[`${e}-select`]:{[`${e}-palette`]:{minHeight:t.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:r},[`${e}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:i},[`${e}-handler`]:{width:c,height:c,border:`${U(l)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${s}`}}},QF=t=>{const{componentCls:e,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:a,colorText:s,lineHeightSM:l,lineWidth:c,borderRadius:u,colorFill:d,colorWhite:f,marginXXS:p,paddingXS:m,fontHeightSM:g}=t;return{[`${e}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:g,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:p},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${U(m)} 0`},"&-label":{fontSize:a,color:s,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:t.calc(p).mul(1.5).equal(),[`${e}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:t.calc(i).add(t.calc(c).mul(4)).equal(),height:t.calc(i).add(t.calc(c).mul(4)).equal(),position:"absolute",top:t.calc(c).mul(-2).equal(),insetInlineStart:t.calc(c).mul(-2).equal(),borderRadius:u,border:`${U(c)} solid transparent`,transition:`border-color ${t.motionDurationMid} ${t.motionEaseInBack}`},"&:hover::before":{borderColor:d},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:t.calc(i).div(13).mul(5).equal(),height:t.calc(i).div(13).mul(8).equal(),border:`${U(t.lineWidthBold)} solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`},[`&${e}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:f,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`},[`&${e}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:a,color:r}}}},eH=t=>{const{componentCls:e,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:a,colorPickerSliderHeight:s,marginSM:l,marginXS:c}=t,u=t.calc(a).sub(t.calc(i).mul(2).equal()).equal(),d=t.calc(a).add(t.calc(i).mul(2).equal()).equal(),f={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${t.colorPrimaryActive}`}};return{[`${e}-slider`]:[uw(U(s),t.colorFillSecondary),{margin:0,padding:0,height:s,borderRadius:t.calc(s).div(2).equal(),"&-rail":{height:s,borderRadius:t.calc(s).div(2).equal(),boxShadow:n},[`& ${e}-slider-handle`]:{width:u,height:u,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:!0,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:d,height:d,borderRadius:"100%"},"&:after":{width:a,height:a,border:`${U(i)} solid ${r}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":f}}],[`${e}-slider-container`]:{display:"flex",gap:l,marginBottom:l,[`${e}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${e}-gradient-slider`]:{marginBottom:c,[`& ${e}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":f}}}},ih=(t,e,n)=>({borderInlineEndWidth:t.lineWidth,borderColor:e,boxShadow:`0 0 0 ${U(t.controlOutlineWidth)} ${n}`,outline:0}),tH=t=>{const{componentCls:e}=t;return{"&-rtl":{[`${e}-presets-color`]:{"&::after":{direction:"ltr"}},[`${e}-clear`]:{"&::after":{direction:"ltr"}}}}},P0=(t,e,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:a,colorBorder:s,red6:l}=t;return{[`${r}-clear`]:Object.assign(Object.assign({width:e,height:e,borderRadius:o,border:`${U(i)} solid ${a}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${t.motionDurationFast}`},n),{"&::after":{content:'""',position:"absolute",insetInlineEnd:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:l},"&:hover":{borderColor:s}})}},nH=t=>{const{componentCls:e,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:a,colorWarningOutline:s}=t;return{[`&${e}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${e}-trigger-active`]:Object.assign({},ih(t,n,a))},[`&${e}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${e}-trigger-active`]:Object.assign({},ih(t,r,s))}}},rH=t=>{const{componentCls:e,controlHeightLG:n,controlHeightSM:r,controlHeight:o,controlHeightXS:i,borderRadius:a,borderRadiusSM:s,borderRadiusXS:l,borderRadiusLG:c,fontSizeLG:u}=t;return{[`&${e}-lg`]:{minWidth:n,minHeight:n,borderRadius:c,[`${e}-color-block, ${e}-clear`]:{width:o,height:o,borderRadius:a},[`${e}-trigger-text`]:{fontSize:u}},[`&${e}-sm`]:{minWidth:r,minHeight:r,borderRadius:s,[`${e}-color-block, ${e}-clear`]:{width:i,height:i,borderRadius:l},[`${e}-trigger-text`]:{lineHeight:U(i)}}}},oH=t=>{const{antCls:e,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:a,colorTextDisabled:s,colorText:l,colorBgContainerDisabled:c,borderRadius:u,marginXS:d,marginSM:f,controlHeight:p,controlHeightSM:m,colorBgTextActive:g,colorPickerPresetColorSize:v,colorPickerPreviewSize:b,lineWidth:y,colorBorder:C,paddingXXS:S,fontSize:x,colorPrimaryHover:w,controlOutline:$}=t;return[{[n]:Object.assign({[`${n}-inner`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"&-content":{display:"flex",flexDirection:"column",width:r,[`& > ${e}-divider`]:{margin:`${U(f)} 0 ${U(d)}`}},[`${n}-panel`]:Object.assign({},ZF(t))},eH(t)),I0(t,b)),JF(t)),QF(t)),P0(t,v,{marginInlineStart:"auto"})),{[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:d}}),"&-trigger":Object.assign(Object.assign(Object.assign(Object.assign({minWidth:p,minHeight:p,borderRadius:u,border:`${U(y)} solid ${C}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:t.calc(S).sub(y).equal(),[`${n}-trigger-text`]:{marginInlineStart:d,marginInlineEnd:t.calc(d).sub(t.calc(S).sub(y)).equal(),fontSize:x,color:l,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:s}}},"&:hover":{borderColor:w},[`&${n}-trigger-active`]:Object.assign({},ih(t,o,$)),"&-disabled":{color:s,background:c,cursor:"not-allowed","&:hover":{borderColor:g},[`${n}-trigger-text`]:{color:s}}},P0(t,m)),I0(t,m)),nH(t)),rH(t))},tH(t))},Ps(t,{focusElCls:`${n}-trigger-active`})]},iH=Yt("ColorPicker",t=>{const{colorTextQuaternary:e,marginSM:n}=t,r=8,o=Mt(t,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${e}`,colorPickerSliderHeight:r,colorPickerPreviewSize:t.calc(r).mul(2).add(n).equal()});return[oH(o)]});var aH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const lu=t=>{const{mode:e,value:n,defaultValue:r,format:o,defaultFormat:i,allowClear:a=!1,presets:s,children:l,trigger:c="click",open:u,disabled:d,placement:f="bottomLeft",arrow:p=!0,panelRender:m,showText:g,style:v,className:b,size:y,rootClassName:C,prefixCls:S,styles:x,disabledAlpha:w=!1,onFormatChange:$,onChange:R,onClear:M,onOpenChange:O,onChangeComplete:N,getPopupContainer:I,autoAdjustOverflow:T=!0,destroyTooltipOnHide:P,destroyOnHidden:A,disabledFormat:k}=t,B=aH(t,["mode","value","defaultValue","format","defaultFormat","allowClear","presets","children","trigger","open","disabled","placement","arrow","panelRender","showText","style","className","size","rootClassName","prefixCls","styles","disabledAlpha","onFormatChange","onChange","onClear","onOpenChange","onChangeComplete","getPopupContainer","autoAdjustOverflow","destroyTooltipOnHide","destroyOnHidden","disabledFormat"]),{getPrefixCls:_,direction:F,colorPicker:H}=E.useContext(gt),K=E.useContext(Dr),V=d??K,[W,z]=en(!1,{value:u,postState:xe=>!V&&xe,onChange:O}),[L,J]=en(o,{value:o,defaultValue:i,onChange:$}),ne=_("color-picker",S),[q,re,ae,ee,Y]=YF(r,n,e),te=E.useMemo(()=>ap(q)<100,[q]),[Z,Q]=E.useState(null),oe=xe=>{if(N){let ot=Ln(xe);w&&te&&(ot=Pl(xe)),N(ot)}},ce=(xe,ot)=>{let ft=Ln(xe);w&&te&&(ft=Pl(ft)),re(ft),Q(null),R&&R(ft,ft.toCssString()),ot||oe(ft)},[se,le]=E.useState(0),[be,ye]=E.useState(!1),Be=xe=>{if(ee(xe),xe==="single"&&q.isGradient())le(0),ce(new lr(q.getColors()[0].color)),Q(q);else if(xe==="gradient"&&!q.isGradient()){const ot=te?Pl(q):q;ce(new lr(Z||[{percent:0,color:ot},{percent:100,color:ot}]))}},{status:de}=E.useContext(wr),{compactSize:ue,compactItemClassnames:pe}=Zo(ne,F),Ae=Er(xe=>{var ot;return(ot=y??ue)!==null&&ot!==void 0?ot:xe}),_e=yo(ne),[Re,$e,We]=iH(ne,_e),ke={[`${ne}-rtl`]:F},De=G.cn(C,We,_e,ke),me=G.cn($i(ne,de),{[`${ne}-sm`]:Ae==="small",[`${ne}-lg`]:Ae==="large"},pe,H==null?void 0:H.className,De,b,$e),Ne=G.cn(ne,De);if(process.env.NODE_ENV!=="production"){const xe=Kt("ColorPicker");process.env.NODE_ENV!=="production"&&xe(!(w&&te),"usage","`disabledAlpha` will make the alpha to be 100% when use alpha color.")}const Ze={open:W,trigger:c,placement:f,arrow:p,rootClassName:C,getPopupContainer:I,autoAdjustOverflow:T,destroyOnHidden:A??!!P},Ie=Object.assign(Object.assign({},H==null?void 0:H.style),v);return Re(E.createElement($p,Object.assign({style:x==null?void 0:x.popup,styles:{body:x==null?void 0:x.popupOverlayInner},onOpenChange:xe=>{(!xe||!V)&&z(xe)},content:E.createElement(Wo,{form:!0},E.createElement(cw,{mode:ae,onModeChange:Be,modeOptions:Y,prefixCls:ne,value:q,allowClear:a,disabled:V,disabledAlpha:w,presets:s,panelRender:m,format:L,onFormatChange:J,onChange:ce,onChangeComplete:oe,onClear:M,activeIndex:se,onActive:le,gradientDragging:be,onGradientDragging:ye,disabledFormat:k})),classNames:{root:Ne}},Ze),l||E.createElement(XF,Object.assign({activeIndex:W?se:-1,open:W,className:me,style:Ie,prefixCls:ne,disabled:V,showText:g,format:L},B,{color:q}))))};process.env.NODE_ENV!=="production"&&(lu.displayName="ColorPicker");const sH=dp(lu,void 0,t=>Object.assign(Object.assign({},t),{placement:"bottom",autoAdjustOverflow:!1}),"color-picker",t=>t);lu._InternalPanelDoNotUseOrYouWillBeFired=sH;function T0(t){return["small","middle","large"].includes(t)}function A0(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const dw=E.createContext({latestIndex:0}),lH=dw.Provider,cH=({className:t,index:e,children:n,split:r,style:o})=>{const{latestIndex:i}=h.useContext(dw);return n==null?null:h.createElement(h.Fragment,null,h.createElement("div",{className:t,style:o},n),e<i&&r&&h.createElement("span",{className:`${t}-split`},r))};var uH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const dH=h.forwardRef((t,e)=>{var n;const{getPrefixCls:r,direction:o,size:i,className:a,style:s,classNames:l,styles:c}=hr("space"),{size:u=i??"small",align:d,className:f,rootClassName:p,children:m,direction:g="horizontal",prefixCls:v,split:b,style:y,wrap:C=!1,classNames:S,styles:x}=t,w=uH(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[$,R]=Array.isArray(u)?u:[u,u],M=T0(R),O=T0($),N=A0(R),I=A0($),T=dr(m,{keepEmpty:!0}),P=d===void 0&&g==="horizontal"?"center":d,A=r("space",v),[k,B,_]=TS(A),F=G.cn(A,a,B,`${A}-${g}`,{[`${A}-rtl`]:o==="rtl",[`${A}-align-${P}`]:P,[`${A}-gap-row-${R}`]:M,[`${A}-gap-col-${$}`]:O},f,p,_),H=G.cn(`${A}-item`,(n=S==null?void 0:S.item)!==null&&n!==void 0?n:l.item);let K=0;const V=T.map((L,J)=>{var ne;L!=null&&(K=J);const q=(L==null?void 0:L.key)||`${H}-${J}`;return h.createElement(cH,{className:H,key:q,index:J,split:b,style:(ne=x==null?void 0:x.item)!==null&&ne!==void 0?ne:c.item},L)}),W=h.useMemo(()=>({latestIndex:K}),[K]);if(T.length===0)return null;const z={};return C&&(z.flexWrap="wrap"),!O&&I&&(z.columnGap=$),!M&&N&&(z.rowGap=R),k(h.createElement("div",Object.assign({ref:e,className:F,style:Object.assign(Object.assign(Object.assign({},z),s),y)},w),h.createElement(lH,{value:W},V)))}),Fp=dH;Fp.Compact=MA;process.env.NODE_ENV!=="production"&&(Fp.displayName="Space");var fH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const fw=t=>{const{getPopupContainer:e,getPrefixCls:n,direction:r}=h.useContext(gt),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:g,overlay:v,trigger:b,align:y,open:C,onOpenChange:S,placement:x,getPopupContainer:w,href:$,icon:R=h.createElement(Ap,null),title:M,buttonsRender:O=ee=>ee,mouseEnterDelay:N,mouseLeaveDelay:I,overlayClassName:T,overlayStyle:P,destroyOnHidden:A,destroyPopupOnHide:k,dropdownRender:B,popupRender:_}=t,F=fH(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),H=n("dropdown",o),K=`${H}-button`,W={menu:p,arrow:m,autoFocus:g,align:y,disabled:s,trigger:s?[]:b,onOpenChange:S,getPopupContainer:w||e,mouseEnterDelay:N,mouseLeaveDelay:I,overlayClassName:T,overlayStyle:P,destroyOnHidden:A,popupRender:_||B},{compactSize:z,compactItemClassnames:L}=Zo(H,r),J=G.cn(K,L,f);"destroyPopupOnHide"in t&&(W.destroyPopupOnHide=k),"overlay"in t&&(W.overlay=v),"open"in t&&(W.open=C),"placement"in t?W.placement=x:W.placement=r==="rtl"?"bottomLeft":"bottomRight";const ne=h.createElement(mo,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:$,title:M},d),q=h.createElement(mo,{type:i,danger:a,icon:R}),[re,ae]=O([ne,q]);return h.createElement(Fp.Compact,Object.assign({className:J,size:z,block:!0},F),re,h.createElement(Ls,Object.assign({},W),ae))};fw.__ANT_BUTTON=!0;const cu=Ls;cu.Button=fw;var hH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},pH=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:hH}))},hw=h.forwardRef(pH);process.env.NODE_ENV!=="production"&&(hw.displayName="EyeOutlined");const mH=t=>{const{getPrefixCls:e,direction:n}=E.useContext(gt),{prefixCls:r,className:o}=t,i=e("input-group",r),a=e("input"),[s,l,c]=z1(a),u=G.cn(i,c,{[`${i}-lg`]:t.size==="large",[`${i}-sm`]:t.size==="small",[`${i}-compact`]:t.compact,[`${i}-rtl`]:n==="rtl"},l,o),d=E.useContext(wr),f=E.useMemo(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return process.env.NODE_ENV!=="production"&&Kt("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),s(h.createElement("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},h.createElement(wr.Provider,{value:f},t.children)))},gH=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${e}-input-wrapper`]:{position:"relative",[`${e}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${e}-mask-input`]:{color:"transparent",caretColor:"var(--ant-color-text)"},[`${e}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${e}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},vH=Yt(["Input","OTP"],t=>{const e=Mt(t,Fs(t));return[gH(e)]},Hs);var bH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const yH=h.forwardRef((t,e)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:s}=t,l=bH(t,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=h.useContext(gt),u=c("otp"),d=typeof s=="string"?s:r,f=h.useRef(null);h.useImperativeHandle(e,()=>f.current);const p=b=>{o(a,b.target.value)},m=()=>{wt(()=>{var b;const y=(b=f.current)===null||b===void 0?void 0:b.input;document.activeElement===y&&y&&y.select()})},g=b=>{const{key:y,ctrlKey:C,metaKey:S}=b;y==="ArrowLeft"?i(a-1):y==="ArrowRight"?i(a+1):y==="z"&&(C||S)&&b.preventDefault(),m()},v=b=>{b.key==="Backspace"&&!r&&i(a-1),m()};return h.createElement("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&h.createElement("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},d),h.createElement($a,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:f,value:r,onInput:p,onFocus:m,onKeyDown:g,onKeyUp:v,onMouseDown:m,onMouseUp:m,className:G.cn(n,{[`${u}-mask-input`]:s})})))});var CH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function ul(t){return(t||"").split("")}const SH=t=>{const{index:e,prefixCls:n,separator:r}=t,o=typeof r=="function"?r(e):r;return o?h.createElement("span",{className:`${n}-separator`},o):null},xH=h.forwardRef((t,e)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:g,onInput:v,inputMode:b}=t,y=CH(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);if(process.env.NODE_ENV!=="production"){const z=Kt("Input.OTP");process.env.NODE_ENV!=="production"&&z(!(typeof m=="string"&&m.length>1),"usage","`mask` prop should be a single character.")}const{getPrefixCls:C,direction:S}=h.useContext(gt),x=C("otp",n),w=Yr(y,{aria:!0,data:!0,attr:!0}),[$,R,M]=vH(x),O=Er(z=>o??z),N=h.useContext(wr),I=js(N.status,f),T=h.useMemo(()=>Object.assign(Object.assign({},N),{status:I,hasFeedback:!1,feedbackIcon:null}),[N,I]),P=h.useRef(null),A=h.useRef({});h.useImperativeHandle(e,()=>({focus:()=>{var z;(z=A.current[0])===null||z===void 0||z.focus()},blur:()=>{var z;for(let L=0;L<r;L+=1)(z=A.current[L])===null||z===void 0||z.blur()},nativeElement:P.current}));const k=z=>l?l(z):z,[B,_]=h.useState(()=>ul(k(i||"")));h.useEffect(()=>{a!==void 0&&_(ul(a))},[a]);const F=At(z=>{_(z),v&&v(z),s&&z.length===r&&z.every(L=>L)&&z.some((L,J)=>B[J]!==L)&&s(z.join(""))}),H=At((z,L)=>{let J=he(B);for(let q=0;q<z;q+=1)J[q]||(J[q]="");L.length<=1?J[z]=L:J=J.slice(0,z).concat(ul(L)),J=J.slice(0,r);for(let q=J.length-1;q>=0&&!J[q];q-=1)J.pop();const ne=k(J.map(q=>q||" ").join(""));return J=ul(ne).map((q,re)=>q===" "&&!J[re]?J[re]:q),J}),K=(z,L)=>{var J;const ne=H(z,L),q=Math.min(z+L.length,r-1);q!==z&&ne[z]!==void 0&&((J=A.current[q])===null||J===void 0||J.focus()),F(ne)},V=z=>{var L;(L=A.current[z])===null||L===void 0||L.focus()},W={variant:u,disabled:d,status:I,mask:m,type:g,inputMode:b};return $(h.createElement("div",Object.assign({},w,{ref:P,className:G.cn(x,{[`${x}-sm`]:O==="small",[`${x}-lg`]:O==="large",[`${x}-rtl`]:S==="rtl"},M,R),role:"group"}),h.createElement(wr.Provider,{value:T},Array.from({length:r}).map((z,L)=>{const J=`otp-${L}`,ne=B[L]||"";return h.createElement(h.Fragment,{key:J},h.createElement(yH,Object.assign({ref:q=>{A.current[L]=q},index:L,size:O,htmlSize:1,className:`${x}-input`,onChange:K,value:ne,onActiveChange:V,autoFocus:L===0&&p},W)),L<r-1&&h.createElement(SH,{separator:c,index:L,prefixCls:x}))}))))});var wH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},EH=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:wH}))},pw=h.forwardRef(EH);process.env.NODE_ENV!=="production"&&(pw.displayName="EyeInvisibleOutlined");var $H=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const OH=t=>t?h.createElement(hw,null):h.createElement(pw,null),MH={click:"onClick",hover:"onMouseOver"},mw=h.forwardRef((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i=OH}=t,a=h.useContext(Dr),s=n??a,l=typeof o=="object"&&o.visible!==void 0,[c,u]=E.useState(()=>l?o.visible:!1),d=E.useRef(null);h.useEffect(()=>{l&&u(o.visible)},[l,o]);const f=tw(d),p=()=>{var O;if(s)return;c&&f();const N=!c;u(N),typeof o=="object"&&((O=o.onVisibleChange)===null||O===void 0||O.call(o,N))},m=O=>{const N=MH[r]||"",I=i(c),T={[N]:p,className:`${O}-icon`,key:"passwordIcon",onMouseDown:P=>{P.preventDefault()},onMouseUp:P=>{P.preventDefault()}};return h.cloneElement(h.isValidElement(I)?I:h.createElement("span",null,I),T)},{className:g,prefixCls:v,inputPrefixCls:b,size:y}=t,C=$H(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:S}=h.useContext(gt),x=S("input",b),w=S("input-password",v),$=o&&m(w),R=G.cn(w,g,{[`${w}-${y}`]:!!y}),M=Object.assign(Object.assign({},vn(C,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:R,prefixCls:x,suffix:$});return y&&(M.size=y),h.createElement($a,Object.assign({ref:Qn(e,d)},M))});process.env.NODE_ENV!=="production"&&(mw.displayName="Input.Password");var NH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const gw=h.forwardRef((t,e)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m,variant:g}=t,v=NH(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant"]),{getPrefixCls:b,direction:y}=h.useContext(gt),C=h.useRef(!1),S=b("input-search",n),x=b("input",r),{compactSize:w}=Zo(S,y),$=Er(V=>{var W;return(W=i??w)!==null&&W!==void 0?W:V}),R=h.useRef(null),M=V=>{V!=null&&V.target&&V.type==="click"&&d&&d(V.target.value,V,{source:"clear"}),f==null||f(V)},O=V=>{var W;document.activeElement===((W=R.current)===null||W===void 0?void 0:W.input)&&V.preventDefault()},N=V=>{var W,z;d&&d((z=(W=R.current)===null||W===void 0?void 0:W.input)===null||z===void 0?void 0:z.value,V,{source:"input"})},I=V=>{C.current||c||N(V)},T=typeof s=="boolean"?h.createElement(Sp,null):null,P=`${S}-button`;let A;const k=s||{},B=k.type&&k.type.__ANT_BUTTON===!0;B||k.type==="button"?A=xr(k,Object.assign({onMouseDown:O,onClick:V=>{var W,z;(z=(W=k==null?void 0:k.props)===null||W===void 0?void 0:W.onClick)===null||z===void 0||z.call(W,V),N(V)},key:"enterButton"},B?{className:P,size:$}:{})):A=h.createElement(mo,{className:P,color:s?"primary":"default",size:$,disabled:u,key:"enterButton",onMouseDown:O,onClick:N,loading:c,icon:T,variant:g==="borderless"||g==="filled"||g==="underlined"?"text":s?"solid":void 0},s),l&&(A=[A,xr(l,{key:"addonAfter"})]);const _=G.cn(S,{[`${S}-rtl`]:y==="rtl",[`${S}-${$}`]:!!$,[`${S}-with-button`]:!!s},o),F=V=>{C.current=!0,p==null||p(V)},H=V=>{C.current=!1,m==null||m(V)},K=Object.assign(Object.assign({},v),{className:_,prefixCls:x,type:"search",size:$,variant:g,onPressEnter:I,onCompositionStart:F,onCompositionEnd:H,addonAfter:A,suffix:a,onChange:M,disabled:u});return h.createElement($a,Object.assign({ref:Qn(R,e)},K))});process.env.NODE_ENV!=="production"&&(gw.displayName="Search");var RH=`
392
+ `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},aw=(t,e)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:a,calc:s}=t,l=e?"paddingBlock":"paddingInline",c=e?"width":"height",u=e?"height":"width",d=e?"insetBlockStart":"insetInlineStart",f=e?"top":"insetInlineStart",p=s(r).mul(3).sub(o).div(2).equal(),m=s(o).sub(r).div(2).equal(),g=e?{borderWidth:`${U(m)} 0`,transform:`translateY(${U(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${U(m)}`,transform:`translateX(${U(t.calc(m).mul(-1).equal())})`};return{[l]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:Object.assign({},g),[`${n}-handle`]:{[d]:p},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(e?0:a).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[f]:r,[c]:"100%",[u]:r},[`${n}-dot`]:{position:"absolute",[d]:s(r).sub(i).div(2).equal()}}},_F=t=>{const{componentCls:e,marginPartWithMark:n}=t;return{[`${e}-horizontal`]:Object.assign(Object.assign({},aw(t,!0)),{[`&${e}-with-marks`]:{marginBottom:n}})}},jF=t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:Object.assign(Object.assign({},aw(t,!1)),{height:"100%"})}},BF=t=>{const n=t.controlHeightLG/4,r=t.controlHeightSM/2,o=t.lineWidth+1,i=t.lineWidth+1*1.5,a=t.colorPrimary,s=new Pt(a).setA(.2).toRgbString();return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:i,railBg:t.colorFillTertiary,railHoverBg:t.colorFillSecondary,trackBg:t.colorPrimaryBorder,trackHoverBg:t.colorPrimaryBorderHover,handleColor:t.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:s,handleColorDisabled:new Pt(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString(),dotBorderColor:t.colorBorderSecondary,dotActiveBorderColor:t.colorPrimaryBorder,trackBgDisabled:t.colorBgContainerDisabled}},zF=Yt("Slider",t=>{const e=Mt(t,{marginPart:t.calc(t.controlHeight).sub(t.controlSize).div(2).equal(),marginFull:t.calc(t.controlSize).div(2).equal(),marginPartWithMark:t.calc(t.controlHeightLG).sub(t.controlSize).equal()});return[DF(e),_F(e),jF(e)]},BF);function md(){const[t,e]=h.useState(!1),n=h.useRef(null),r=()=>{wt.cancel(n.current)},o=i=>{r(),i?e(i):n.current=wt(()=>{e(i)})};return h.useEffect(()=>r,[]),[t,o]}var LF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function FF(t,e){return t||t===null?t:e||e===null?e:n=>typeof n=="number"?n.toString():""}const sw=E.forwardRef((t,e)=>{const{prefixCls:n,range:r,className:o,rootClassName:i,style:a,disabled:s,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:f,tooltip:p={},onChangeComplete:m,classNames:g,styles:v}=t,b=LF(t,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:y}=t,{getPrefixCls:C,direction:S,className:x,style:w,classNames:$,styles:R,getPopupContainer:M}=hr("slider"),O=E.useContext(Dr),N=s??O,{handleRender:I,direction:T}=E.useContext(iw),A=(T||S)==="rtl",[k,B]=md(),[_,F]=md(),H=Object.assign({},p),{open:K,placement:V,getPopupContainer:W,prefixCls:z,formatter:L}=H,J=K??u,ne=(k||_)&&J!==!1,q=FF(L,c),[re,ae]=md(),ee=ue=>{m==null||m(ue),ae(!1)},Y=(ue,pe)=>ue||(pe?A?"left":"right":"top"),te=C("slider",n),[Z,Q,ie]=zF(te),ce=G.cn(o,x,$.root,g==null?void 0:g.root,i,{[`${te}-rtl`]:A,[`${te}-lock`]:re},Q,ie);if(A&&!b.vertical&&(b.reverse=!b.reverse),process.env.NODE_ENV!=="production"){const ue=Kt("Slider");[["tooltipPrefixCls","prefixCls"],["getTooltipPopupContainer","getPopupContainer"],["tipFormatter","formatter"],["tooltipPlacement","placement"],["tooltipVisible","open"]].forEach(([pe,Ae])=>{ue.deprecated(!(pe in t),pe,`tooltip.${Ae}`)})}E.useEffect(()=>{const ue=()=>{wt(()=>{F(!1)},1)};return document.addEventListener("mouseup",ue),()=>{document.removeEventListener("mouseup",ue)}},[]);const se=r&&!J,le=I||((ue,pe)=>{const{index:Ae}=pe,_e=ue.props;function Re(De,me,Ne){var Ze,Ie,xe,ot;Ne&&((Ie=(Ze=b)[De])===null||Ie===void 0||Ie.call(Ze,me)),(ot=(xe=_e)[De])===null||ot===void 0||ot.call(xe,me)}const $e=Object.assign(Object.assign({},_e),{onMouseEnter:De=>{B(!0),Re("onMouseEnter",De)},onMouseLeave:De=>{B(!1),Re("onMouseLeave",De)},onMouseDown:De=>{F(!0),ae(!0),Re("onMouseDown",De)},onFocus:De=>{var me;F(!0),(me=b.onFocus)===null||me===void 0||me.call(b,De),Re("onFocus",De,!0)},onBlur:De=>{var me;F(!1),(me=b.onBlur)===null||me===void 0||me.call(b,De),Re("onBlur",De,!0)}}),We=E.cloneElement(ue,$e),ke=(!!J||ne)&&q!==null;return se?We:E.createElement(oh,Object.assign({},H,{prefixCls:C("tooltip",z??l),title:q?q(pe.value):"",value:pe.value,open:ke,placement:Y(V??f,y),key:Ae,classNames:{root:`${te}-tooltip`},getPopupContainer:W||d||M}),We)}),be=se?(ue,pe)=>{const Ae=E.cloneElement(ue,{style:Object.assign(Object.assign({},ue.props.style),{visibility:"hidden"})});return E.createElement(oh,Object.assign({},H,{prefixCls:C("tooltip",z??l),title:q?q(pe.value):"",open:q!==null&&ne,placement:Y(V??f,y),key:"tooltip",classNames:{root:`${te}-tooltip`},getPopupContainer:W||d||M,draggingDelete:pe.draggingDelete}),Ae)}:void 0,ye=Object.assign(Object.assign(Object.assign(Object.assign({},R.root),w),v==null?void 0:v.root),a),Be=Object.assign(Object.assign({},R.tracks),v==null?void 0:v.tracks),de=G.cn($.tracks,g==null?void 0:g.tracks);return Z(E.createElement(ow,Object.assign({},b,{classNames:Object.assign({handle:G.cn($.handle,g==null?void 0:g.handle),rail:G.cn($.rail,g==null?void 0:g.rail),track:G.cn($.track,g==null?void 0:g.track)},de?{tracks:de}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},R.handle),v==null?void 0:v.handle),rail:Object.assign(Object.assign({},R.rail),v==null?void 0:v.rail),track:Object.assign(Object.assign({},R.track),v==null?void 0:v.track)},Object.keys(Be).length?{tracks:Be}:{}),step:b.step,range:r,className:ce,style:ye,disabled:N,ref:e,prefixCls:te,handleRender:le,activeHandleRender:be,onChangeComplete:ee})))});process.env.NODE_ENV!=="production"&&(sw.displayName="Slider");var HF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const lw=t=>{const{prefixCls:e,colors:n,type:r,color:o,range:i=!1,className:a,activeIndex:s,onActive:l,onDragStart:c,onDragChange:u,onKeyDelete:d}=t,f=HF(t,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDragChange","onKeyDelete"]),p=Object.assign(Object.assign({},f),{track:!1}),m=h.useMemo(()=>`linear-gradient(90deg, ${n.map(w=>`${w.color} ${w.percent}%`).join(", ")})`,[n]),g=h.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),v=At(c),b=At(u),y=h.useMemo(()=>({onDragStart:v,onDragChange:b}),[]),C=At((x,w)=>{const{onFocus:$,style:R,className:M,onKeyDown:O}=x.props,N=Object.assign({},R);return r==="gradient"&&(N.background=GS(n,w.value)),h.cloneElement(x,{onFocus:I=>{l==null||l(w.index),$==null||$(I)},style:N,className:G.cn(M,{[`${e}-slider-handle-active`]:s===w.index}),onKeyDown:I=>{(I.key==="Delete"||I.key==="Backspace")&&d&&d(w.index),O==null||O(I)}})}),S=h.useMemo(()=>({direction:"ltr",handleRender:C}),[]);return h.createElement(iw.Provider,{value:S},h.createElement(nw.Provider,{value:y},h.createElement(sw,Object.assign({},p,{className:G.cn(a,`${e}-slider`),tooltip:{open:!1},range:{editable:i,minCount:2},styles:{rail:{background:m},handle:g?{background:g}:{}},classNames:{rail:`${e}-slider-rail`,handle:`${e}-slider-handle`}}))))},VF=t=>{const{value:e,onChange:n,onChangeComplete:r}=t,o=a=>n(a[0]),i=a=>r(a[0]);return h.createElement(lw,Object.assign({},t,{value:[e],onChange:o,onChangeComplete:i}))};function M0(t){return he(t).sort((e,n)=>e.percent-n.percent)}const WF=t=>{const{prefixCls:e,mode:n,onChange:r,onChangeComplete:o,onActive:i,activeIndex:a,onGradientDragging:s,colors:l}=t,c=n==="gradient",u=h.useMemo(()=>l.map(b=>({percent:b.percent,color:b.color.toRgbString()})),[l]),d=h.useMemo(()=>u.map(b=>b.percent),[u]),f=h.useRef(u),p=({rawValues:b,draggingIndex:y,draggingValue:C})=>{if(b.length>u.length){const S=GS(u,C),x=he(u);x.splice(y,0,{percent:C,color:S}),f.current=x}else f.current=u;s(!0),r(new lr(M0(f.current)),!0)},m=({deleteIndex:b,draggingIndex:y,draggingValue:C})=>{let S=he(f.current);b!==-1?S.splice(b,1):(S[y]=Object.assign(Object.assign({},S[y]),{percent:C}),S=M0(S)),r(new lr(S),!0)},g=b=>{const y=he(u);y.splice(b,1);const C=new lr(y);r(C),o(C)},v=b=>{o(new lr(u)),a>=b.length&&i(b.length-1),s(!1)};return c?h.createElement(lw,{min:0,max:100,prefixCls:e,className:`${e}-gradient-slider`,colors:u,color:null,value:d,range:!0,onChangeComplete:v,disabled:!1,type:"gradient",activeIndex:a,onActive:i,onDragStart:p,onDragChange:m,onKeyDelete:g}):null},qF=h.memo(WF);var KF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const GF={slider:VF},N0=()=>{const t=E.useContext(V1),{mode:e,onModeChange:n,modeOptions:r,prefixCls:o,allowClear:i,value:a,disabledAlpha:s,onChange:l,onClear:c,onChangeComplete:u,activeIndex:d,gradientDragging:f}=t,p=KF(t,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=E.useMemo(()=>a.cleared?[{percent:0,color:new lr("")},{percent:100,color:new lr("")}]:a.getColors(),[a]),g=!a.isGradient(),[v,b]=E.useState(a);zt(()=>{var P;g||b((P=m[d])===null||P===void 0?void 0:P.color)},[f,d]);const y=E.useMemo(()=>{var P;return g?a:f?v:(P=m[d])===null||P===void 0?void 0:P.color},[a,d,g,v,f]),[C,S]=E.useState(y),[x,w]=E.useState(0),$=C!=null&&C.equals(y)?y:C;zt(()=>{S(y)},[x,y==null?void 0:y.toHexString()]);const R=(P,A)=>{let k=Ln(P);if(a.cleared){const _=k.toRgb();if(!_.r&&!_.g&&!_.b&&A){const{type:F,value:H=0}=A;k=new lr({h:F==="hue"?H:0,s:1,b:1,a:F==="alpha"?H/100:1})}else k=Pl(k)}if(e==="single")return k;const B=he(m);return B[d]=Object.assign(Object.assign({},B[d]),{color:k}),new lr(B)},M=(P,A,k)=>{const B=R(P,k);S(B.isGradient()?B.getColors()[d].color:B),l(B,A)},O=(P,A)=>{u(R(P,A)),w(k=>k+1)},N=P=>{l(R(P))};let I=null;const T=r.length>1;return(i||T)&&(I=E.createElement("div",{className:`${o}-operation`},T&&E.createElement(H1,{size:"small",options:r,value:e,onChange:n}),E.createElement(q1,Object.assign({prefixCls:o,value:a,onChange:P=>{l(P),c==null||c()}},p)))),E.createElement(E.Fragment,null,I,E.createElement(qF,Object.assign({},t,{colors:m})),E.createElement(HS,{prefixCls:o,value:$==null?void 0:$.toHsb(),disabledAlpha:s,onChange:(P,A)=>{M(P,!0,A)},onChangeComplete:(P,A)=>{O(P,A)},components:GF}),E.createElement(wF,Object.assign({value:y,onChange:N,prefixCls:o,disabledAlpha:s},p)))},R0=()=>{const{prefixCls:t,value:e,presets:n,onChange:r}=E.useContext(W1);return Array.isArray(n)?E.createElement(Lk,{value:e,presets:n,prefixCls:t,onChange:r}):null},cw=t=>{const{prefixCls:e,presets:n,panelRender:r,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:p,onActive:m,format:g,onFormatChange:v,gradientDragging:b,onGradientDragging:y,disabledFormat:C}=t,S=`${e}-inner`,x=E.useMemo(()=>({prefixCls:e,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:p,onActive:m,format:g,onFormatChange:v,gradientDragging:b,onGradientDragging:y,disabledFormat:C}),[e,o,i,a,s,l,c,u,d,f,p,m,g,v,b,y,C]),w=E.useMemo(()=>({prefixCls:e,value:o,presets:n,onChange:i}),[e,o,n,i]),$=E.createElement("div",{className:`${S}-content`},E.createElement(N0,null),Array.isArray(n)&&E.createElement(L1,null),E.createElement(R0,null));return E.createElement(V1.Provider,{value:x},E.createElement(W1.Provider,{value:w},E.createElement("div",{className:S},typeof r=="function"?r($,{components:{Picker:N0,Presets:R0}}):$)))};process.env.NODE_ENV!=="production"&&(cw.displayName="ColorPickerPanel");var UF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const XF=E.forwardRef((t,e)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:a,className:s,showText:l,activeIndex:c}=t,u=UF(t,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),d=`${r}-trigger`,f=`${d}-text`,p=`${f}-cell`,[m]=Qr("ColorPicker"),g=E.useMemo(()=>{if(!l)return"";if(typeof l=="function")return l(n);if(n.cleared)return m.transparent;if(n.isGradient())return n.getColors().map((C,S)=>{const x=c!==-1&&c!==S;return E.createElement("span",{key:S,className:G.cn(p,x&&`${p}-inactive`)},C.color.toRgbString()," ",C.percent,"%")});const b=n.toHexString().toUpperCase(),y=ap(n);switch(a){case"rgb":return n.toRgbString();case"hsb":return n.toHsbString();default:return y<100?`${b.slice(0,7)},${y}%`:b}},[n,a,l,c]),v=E.useMemo(()=>n.cleared?E.createElement(q1,{prefixCls:r}):E.createElement(ep,{prefixCls:r,color:n.toCssString()}),[n,r]);return E.createElement("div",Object.assign({ref:e,className:G.cn(d,s,{[`${d}-active`]:o,[`${d}-disabled`]:i})},Yr(u)),v,l&&E.createElement("div",{className:f},g))});function YF(t,e,n){const[r]=Qr("ColorPicker"),[o,i]=en(t,{value:e}),[a,s]=h.useState("single"),[l,c]=h.useMemo(()=>{const g=(Array.isArray(n)?n:[n]).filter(C=>C);g.length||g.push("single");const v=new Set(g),b=[],y=(C,S)=>{v.has(C)&&b.push({label:S,value:C})};return y("single",r.singleColor),y("gradient",r.gradientColor),[b,v]},[n]),[u,d]=h.useState(null),f=At(g=>{d(g),i(g)}),p=h.useMemo(()=>{const g=Ln(o||"");return g.equals(u)?u:g},[o,u]),m=h.useMemo(()=>{var g;return c.has(a)?a:(g=l[0])===null||g===void 0?void 0:g.value},[c,a,l]);return h.useEffect(()=>{s(p.isGradient()?"gradient":"single")},[p]),[p,f,m,s,l]}const uw=(t,e)=>({backgroundImage:`conic-gradient(${e} 25%, transparent 25% 50%, ${e} 50% 75%, transparent 75% 100%)`,backgroundSize:`${t} ${t}`}),I0=(t,e)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:a}=t;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:r,width:e,height:e,boxShadow:o,flex:"none"},uw("50%",t.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${U(i)} ${a}`,borderRadius:"inherit"}})}},JF=t=>{const{componentCls:e,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:a,paddingXXS:s,controlHeightSM:l,marginXS:c,fontSizeIcon:u,paddingXS:d,colorTextPlaceholder:f,colorPickerInputNumberHandleWidth:p,lineWidth:m}=t;return{[`${e}-input-container`]:{display:"flex",[`${e}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,[`${n}-input-number-input`]:{paddingInlineStart:s,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:p}},[`${e}-steppers${e}-alpha-input`]:{flex:`0 0 ${U(i)}`,marginInlineStart:a},[`${e}-format-select${n}-select`]:{marginInlineEnd:c,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:t.calc(u).add(a).equal(),fontSize:r,lineHeight:U(l)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${e}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${e}-hsb-input,${e}-rgb-input`]:{display:"flex",gap:a,alignItems:"center"},[`${e}-steppers`]:{flex:1},[`${e}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${U(d)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:U(t.calc(l).sub(t.calc(m).mul(2)).equal())},[`${n}-input-prefix`]:{color:f}}}}}},ZF=t=>{const{componentCls:e,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:a,colorFillSecondary:s,lineWidthBold:l,colorPickerHandlerSize:c}=t;return{userSelect:"none",[`${e}-select`]:{[`${e}-palette`]:{minHeight:t.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:r},[`${e}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:i},[`${e}-handler`]:{width:c,height:c,border:`${U(l)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${s}`}}},QF=t=>{const{componentCls:e,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:a,colorText:s,lineHeightSM:l,lineWidth:c,borderRadius:u,colorFill:d,colorWhite:f,marginXXS:p,paddingXS:m,fontHeightSM:g}=t;return{[`${e}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:g,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:p},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${U(m)} 0`},"&-label":{fontSize:a,color:s,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:t.calc(p).mul(1.5).equal(),[`${e}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:t.calc(i).add(t.calc(c).mul(4)).equal(),height:t.calc(i).add(t.calc(c).mul(4)).equal(),position:"absolute",top:t.calc(c).mul(-2).equal(),insetInlineStart:t.calc(c).mul(-2).equal(),borderRadius:u,border:`${U(c)} solid transparent`,transition:`border-color ${t.motionDurationMid} ${t.motionEaseInBack}`},"&:hover::before":{borderColor:d},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:t.calc(i).div(13).mul(5).equal(),height:t.calc(i).div(13).mul(8).equal(),border:`${U(t.lineWidthBold)} solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`},[`&${e}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:f,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`},[`&${e}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:a,color:r}}}},eH=t=>{const{componentCls:e,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:a,colorPickerSliderHeight:s,marginSM:l,marginXS:c}=t,u=t.calc(a).sub(t.calc(i).mul(2).equal()).equal(),d=t.calc(a).add(t.calc(i).mul(2).equal()).equal(),f={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${t.colorPrimaryActive}`}};return{[`${e}-slider`]:[uw(U(s),t.colorFillSecondary),{margin:0,padding:0,height:s,borderRadius:t.calc(s).div(2).equal(),"&-rail":{height:s,borderRadius:t.calc(s).div(2).equal(),boxShadow:n},[`& ${e}-slider-handle`]:{width:u,height:u,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:!0,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:d,height:d,borderRadius:"100%"},"&:after":{width:a,height:a,border:`${U(i)} solid ${r}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":f}}],[`${e}-slider-container`]:{display:"flex",gap:l,marginBottom:l,[`${e}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${e}-gradient-slider`]:{marginBottom:c,[`& ${e}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":f}}}},ih=(t,e,n)=>({borderInlineEndWidth:t.lineWidth,borderColor:e,boxShadow:`0 0 0 ${U(t.controlOutlineWidth)} ${n}`,outline:0}),tH=t=>{const{componentCls:e}=t;return{"&-rtl":{[`${e}-presets-color`]:{"&::after":{direction:"ltr"}},[`${e}-clear`]:{"&::after":{direction:"ltr"}}}}},P0=(t,e,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:a,colorBorder:s,red6:l}=t;return{[`${r}-clear`]:Object.assign(Object.assign({width:e,height:e,borderRadius:o,border:`${U(i)} solid ${a}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${t.motionDurationFast}`},n),{"&::after":{content:'""',position:"absolute",insetInlineEnd:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:l},"&:hover":{borderColor:s}})}},nH=t=>{const{componentCls:e,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:a,colorWarningOutline:s}=t;return{[`&${e}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${e}-trigger-active`]:Object.assign({},ih(t,n,a))},[`&${e}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${e}-trigger-active`]:Object.assign({},ih(t,r,s))}}},rH=t=>{const{componentCls:e,controlHeightLG:n,controlHeightSM:r,controlHeight:o,controlHeightXS:i,borderRadius:a,borderRadiusSM:s,borderRadiusXS:l,borderRadiusLG:c,fontSizeLG:u}=t;return{[`&${e}-lg`]:{minWidth:n,minHeight:n,borderRadius:c,[`${e}-color-block, ${e}-clear`]:{width:o,height:o,borderRadius:a},[`${e}-trigger-text`]:{fontSize:u}},[`&${e}-sm`]:{minWidth:r,minHeight:r,borderRadius:s,[`${e}-color-block, ${e}-clear`]:{width:i,height:i,borderRadius:l},[`${e}-trigger-text`]:{lineHeight:U(i)}}}},oH=t=>{const{antCls:e,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:a,colorTextDisabled:s,colorText:l,colorBgContainerDisabled:c,borderRadius:u,marginXS:d,marginSM:f,controlHeight:p,controlHeightSM:m,colorBgTextActive:g,colorPickerPresetColorSize:v,colorPickerPreviewSize:b,lineWidth:y,colorBorder:C,paddingXXS:S,fontSize:x,colorPrimaryHover:w,controlOutline:$}=t;return[{[n]:Object.assign({[`${n}-inner`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"&-content":{display:"flex",flexDirection:"column",width:r,[`& > ${e}-divider`]:{margin:`${U(f)} 0 ${U(d)}`}},[`${n}-panel`]:Object.assign({},ZF(t))},eH(t)),I0(t,b)),JF(t)),QF(t)),P0(t,v,{marginInlineStart:"auto"})),{[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:d}}),"&-trigger":Object.assign(Object.assign(Object.assign(Object.assign({minWidth:p,minHeight:p,borderRadius:u,border:`${U(y)} solid ${C}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:t.calc(S).sub(y).equal(),[`${n}-trigger-text`]:{marginInlineStart:d,marginInlineEnd:t.calc(d).sub(t.calc(S).sub(y)).equal(),fontSize:x,color:l,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:s}}},"&:hover":{borderColor:w},[`&${n}-trigger-active`]:Object.assign({},ih(t,o,$)),"&-disabled":{color:s,background:c,cursor:"not-allowed","&:hover":{borderColor:g},[`${n}-trigger-text`]:{color:s}}},P0(t,m)),I0(t,m)),nH(t)),rH(t))},tH(t))},Ps(t,{focusElCls:`${n}-trigger-active`})]},iH=Yt("ColorPicker",t=>{const{colorTextQuaternary:e,marginSM:n}=t,r=8,o=Mt(t,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${e}`,colorPickerSliderHeight:r,colorPickerPreviewSize:t.calc(r).mul(2).add(n).equal()});return[oH(o)]});var aH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const lu=t=>{const{mode:e,value:n,defaultValue:r,format:o,defaultFormat:i,allowClear:a=!1,presets:s,children:l,trigger:c="click",open:u,disabled:d,placement:f="bottomLeft",arrow:p=!0,panelRender:m,showText:g,style:v,className:b,size:y,rootClassName:C,prefixCls:S,styles:x,disabledAlpha:w=!1,onFormatChange:$,onChange:R,onClear:M,onOpenChange:O,onChangeComplete:N,getPopupContainer:I,autoAdjustOverflow:T=!0,destroyTooltipOnHide:P,destroyOnHidden:A,disabledFormat:k}=t,B=aH(t,["mode","value","defaultValue","format","defaultFormat","allowClear","presets","children","trigger","open","disabled","placement","arrow","panelRender","showText","style","className","size","rootClassName","prefixCls","styles","disabledAlpha","onFormatChange","onChange","onClear","onOpenChange","onChangeComplete","getPopupContainer","autoAdjustOverflow","destroyTooltipOnHide","destroyOnHidden","disabledFormat"]),{getPrefixCls:_,direction:F,colorPicker:H}=E.useContext(gt),K=E.useContext(Dr),V=d??K,[W,z]=en(!1,{value:u,postState:xe=>!V&&xe,onChange:O}),[L,J]=en(o,{value:o,defaultValue:i,onChange:$}),ne=_("color-picker",S),[q,re,ae,ee,Y]=YF(r,n,e),te=E.useMemo(()=>ap(q)<100,[q]),[Z,Q]=E.useState(null),ie=xe=>{if(N){let ot=Ln(xe);w&&te&&(ot=Pl(xe)),N(ot)}},ce=(xe,ot)=>{let ft=Ln(xe);w&&te&&(ft=Pl(ft)),re(ft),Q(null),R&&R(ft,ft.toCssString()),ot||ie(ft)},[se,le]=E.useState(0),[be,ye]=E.useState(!1),Be=xe=>{if(ee(xe),xe==="single"&&q.isGradient())le(0),ce(new lr(q.getColors()[0].color)),Q(q);else if(xe==="gradient"&&!q.isGradient()){const ot=te?Pl(q):q;ce(new lr(Z||[{percent:0,color:ot},{percent:100,color:ot}]))}},{status:de}=E.useContext(wr),{compactSize:ue,compactItemClassnames:pe}=Zo(ne,F),Ae=Er(xe=>{var ot;return(ot=y??ue)!==null&&ot!==void 0?ot:xe}),_e=yo(ne),[Re,$e,We]=iH(ne,_e),ke={[`${ne}-rtl`]:F},De=G.cn(C,We,_e,ke),me=G.cn($i(ne,de),{[`${ne}-sm`]:Ae==="small",[`${ne}-lg`]:Ae==="large"},pe,H==null?void 0:H.className,De,b,$e),Ne=G.cn(ne,De);if(process.env.NODE_ENV!=="production"){const xe=Kt("ColorPicker");process.env.NODE_ENV!=="production"&&xe(!(w&&te),"usage","`disabledAlpha` will make the alpha to be 100% when use alpha color.")}const Ze={open:W,trigger:c,placement:f,arrow:p,rootClassName:C,getPopupContainer:I,autoAdjustOverflow:T,destroyOnHidden:A??!!P},Ie=Object.assign(Object.assign({},H==null?void 0:H.style),v);return Re(E.createElement($p,Object.assign({style:x==null?void 0:x.popup,styles:{body:x==null?void 0:x.popupOverlayInner},onOpenChange:xe=>{(!xe||!V)&&z(xe)},content:E.createElement(Wo,{form:!0},E.createElement(cw,{mode:ae,onModeChange:Be,modeOptions:Y,prefixCls:ne,value:q,allowClear:a,disabled:V,disabledAlpha:w,presets:s,panelRender:m,format:L,onFormatChange:J,onChange:ce,onChangeComplete:ie,onClear:M,activeIndex:se,onActive:le,gradientDragging:be,onGradientDragging:ye,disabledFormat:k})),classNames:{root:Ne}},Ze),l||E.createElement(XF,Object.assign({activeIndex:W?se:-1,open:W,className:me,style:Ie,prefixCls:ne,disabled:V,showText:g,format:L},B,{color:q}))))};process.env.NODE_ENV!=="production"&&(lu.displayName="ColorPicker");const sH=dp(lu,void 0,t=>Object.assign(Object.assign({},t),{placement:"bottom",autoAdjustOverflow:!1}),"color-picker",t=>t);lu._InternalPanelDoNotUseOrYouWillBeFired=sH;function T0(t){return["small","middle","large"].includes(t)}function A0(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const dw=E.createContext({latestIndex:0}),lH=dw.Provider,cH=({className:t,index:e,children:n,split:r,style:o})=>{const{latestIndex:i}=h.useContext(dw);return n==null?null:h.createElement(h.Fragment,null,h.createElement("div",{className:t,style:o},n),e<i&&r&&h.createElement("span",{className:`${t}-split`},r))};var uH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const dH=h.forwardRef((t,e)=>{var n;const{getPrefixCls:r,direction:o,size:i,className:a,style:s,classNames:l,styles:c}=hr("space"),{size:u=i??"small",align:d,className:f,rootClassName:p,children:m,direction:g="horizontal",prefixCls:v,split:b,style:y,wrap:C=!1,classNames:S,styles:x}=t,w=uH(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[$,R]=Array.isArray(u)?u:[u,u],M=T0(R),O=T0($),N=A0(R),I=A0($),T=dr(m,{keepEmpty:!0}),P=d===void 0&&g==="horizontal"?"center":d,A=r("space",v),[k,B,_]=TS(A),F=G.cn(A,a,B,`${A}-${g}`,{[`${A}-rtl`]:o==="rtl",[`${A}-align-${P}`]:P,[`${A}-gap-row-${R}`]:M,[`${A}-gap-col-${$}`]:O},f,p,_),H=G.cn(`${A}-item`,(n=S==null?void 0:S.item)!==null&&n!==void 0?n:l.item);let K=0;const V=T.map((L,J)=>{var ne;L!=null&&(K=J);const q=(L==null?void 0:L.key)||`${H}-${J}`;return h.createElement(cH,{className:H,key:q,index:J,split:b,style:(ne=x==null?void 0:x.item)!==null&&ne!==void 0?ne:c.item},L)}),W=h.useMemo(()=>({latestIndex:K}),[K]);if(T.length===0)return null;const z={};return C&&(z.flexWrap="wrap"),!O&&I&&(z.columnGap=$),!M&&N&&(z.rowGap=R),k(h.createElement("div",Object.assign({ref:e,className:F,style:Object.assign(Object.assign(Object.assign({},z),s),y)},w),h.createElement(lH,{value:W},V)))}),Fp=dH;Fp.Compact=MA;process.env.NODE_ENV!=="production"&&(Fp.displayName="Space");var fH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const fw=t=>{const{getPopupContainer:e,getPrefixCls:n,direction:r}=h.useContext(gt),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:g,overlay:v,trigger:b,align:y,open:C,onOpenChange:S,placement:x,getPopupContainer:w,href:$,icon:R=h.createElement(Ap,null),title:M,buttonsRender:O=ee=>ee,mouseEnterDelay:N,mouseLeaveDelay:I,overlayClassName:T,overlayStyle:P,destroyOnHidden:A,destroyPopupOnHide:k,dropdownRender:B,popupRender:_}=t,F=fH(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),H=n("dropdown",o),K=`${H}-button`,W={menu:p,arrow:m,autoFocus:g,align:y,disabled:s,trigger:s?[]:b,onOpenChange:S,getPopupContainer:w||e,mouseEnterDelay:N,mouseLeaveDelay:I,overlayClassName:T,overlayStyle:P,destroyOnHidden:A,popupRender:_||B},{compactSize:z,compactItemClassnames:L}=Zo(H,r),J=G.cn(K,L,f);"destroyPopupOnHide"in t&&(W.destroyPopupOnHide=k),"overlay"in t&&(W.overlay=v),"open"in t&&(W.open=C),"placement"in t?W.placement=x:W.placement=r==="rtl"?"bottomLeft":"bottomRight";const ne=h.createElement(mo,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:$,title:M},d),q=h.createElement(mo,{type:i,danger:a,icon:R}),[re,ae]=O([ne,q]);return h.createElement(Fp.Compact,Object.assign({className:J,size:z,block:!0},F),re,h.createElement(Ls,Object.assign({},W),ae))};fw.__ANT_BUTTON=!0;const cu=Ls;cu.Button=fw;var hH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},pH=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:hH}))},hw=h.forwardRef(pH);process.env.NODE_ENV!=="production"&&(hw.displayName="EyeOutlined");const mH=t=>{const{getPrefixCls:e,direction:n}=E.useContext(gt),{prefixCls:r,className:o}=t,i=e("input-group",r),a=e("input"),[s,l,c]=z1(a),u=G.cn(i,c,{[`${i}-lg`]:t.size==="large",[`${i}-sm`]:t.size==="small",[`${i}-compact`]:t.compact,[`${i}-rtl`]:n==="rtl"},l,o),d=E.useContext(wr),f=E.useMemo(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return process.env.NODE_ENV!=="production"&&Kt("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),s(h.createElement("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},h.createElement(wr.Provider,{value:f},t.children)))},gH=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${e}-input-wrapper`]:{position:"relative",[`${e}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${e}-mask-input`]:{color:"transparent",caretColor:"var(--ant-color-text)"},[`${e}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${e}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},vH=Yt(["Input","OTP"],t=>{const e=Mt(t,Fs(t));return[gH(e)]},Hs);var bH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const yH=h.forwardRef((t,e)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:s}=t,l=bH(t,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=h.useContext(gt),u=c("otp"),d=typeof s=="string"?s:r,f=h.useRef(null);h.useImperativeHandle(e,()=>f.current);const p=b=>{o(a,b.target.value)},m=()=>{wt(()=>{var b;const y=(b=f.current)===null||b===void 0?void 0:b.input;document.activeElement===y&&y&&y.select()})},g=b=>{const{key:y,ctrlKey:C,metaKey:S}=b;y==="ArrowLeft"?i(a-1):y==="ArrowRight"?i(a+1):y==="z"&&(C||S)&&b.preventDefault(),m()},v=b=>{b.key==="Backspace"&&!r&&i(a-1),m()};return h.createElement("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&h.createElement("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},d),h.createElement($a,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:f,value:r,onInput:p,onFocus:m,onKeyDown:g,onKeyUp:v,onMouseDown:m,onMouseUp:m,className:G.cn(n,{[`${u}-mask-input`]:s})})))});var CH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function ul(t){return(t||"").split("")}const SH=t=>{const{index:e,prefixCls:n,separator:r}=t,o=typeof r=="function"?r(e):r;return o?h.createElement("span",{className:`${n}-separator`},o):null},xH=h.forwardRef((t,e)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:p,mask:m,type:g,onInput:v,inputMode:b}=t,y=CH(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);if(process.env.NODE_ENV!=="production"){const z=Kt("Input.OTP");process.env.NODE_ENV!=="production"&&z(!(typeof m=="string"&&m.length>1),"usage","`mask` prop should be a single character.")}const{getPrefixCls:C,direction:S}=h.useContext(gt),x=C("otp",n),w=Yr(y,{aria:!0,data:!0,attr:!0}),[$,R,M]=vH(x),O=Er(z=>o??z),N=h.useContext(wr),I=js(N.status,f),T=h.useMemo(()=>Object.assign(Object.assign({},N),{status:I,hasFeedback:!1,feedbackIcon:null}),[N,I]),P=h.useRef(null),A=h.useRef({});h.useImperativeHandle(e,()=>({focus:()=>{var z;(z=A.current[0])===null||z===void 0||z.focus()},blur:()=>{var z;for(let L=0;L<r;L+=1)(z=A.current[L])===null||z===void 0||z.blur()},nativeElement:P.current}));const k=z=>l?l(z):z,[B,_]=h.useState(()=>ul(k(i||"")));h.useEffect(()=>{a!==void 0&&_(ul(a))},[a]);const F=At(z=>{_(z),v&&v(z),s&&z.length===r&&z.every(L=>L)&&z.some((L,J)=>B[J]!==L)&&s(z.join(""))}),H=At((z,L)=>{let J=he(B);for(let q=0;q<z;q+=1)J[q]||(J[q]="");L.length<=1?J[z]=L:J=J.slice(0,z).concat(ul(L)),J=J.slice(0,r);for(let q=J.length-1;q>=0&&!J[q];q-=1)J.pop();const ne=k(J.map(q=>q||" ").join(""));return J=ul(ne).map((q,re)=>q===" "&&!J[re]?J[re]:q),J}),K=(z,L)=>{var J;const ne=H(z,L),q=Math.min(z+L.length,r-1);q!==z&&ne[z]!==void 0&&((J=A.current[q])===null||J===void 0||J.focus()),F(ne)},V=z=>{var L;(L=A.current[z])===null||L===void 0||L.focus()},W={variant:u,disabled:d,status:I,mask:m,type:g,inputMode:b};return $(h.createElement("div",Object.assign({},w,{ref:P,className:G.cn(x,{[`${x}-sm`]:O==="small",[`${x}-lg`]:O==="large",[`${x}-rtl`]:S==="rtl"},M,R),role:"group"}),h.createElement(wr.Provider,{value:T},Array.from({length:r}).map((z,L)=>{const J=`otp-${L}`,ne=B[L]||"";return h.createElement(h.Fragment,{key:J},h.createElement(yH,Object.assign({ref:q=>{A.current[L]=q},index:L,size:O,htmlSize:1,className:`${x}-input`,onChange:K,value:ne,onActiveChange:V,autoFocus:L===0&&p},W)),L<r-1&&h.createElement(SH,{separator:c,index:L,prefixCls:x}))}))))});var wH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},EH=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:wH}))},pw=h.forwardRef(EH);process.env.NODE_ENV!=="production"&&(pw.displayName="EyeInvisibleOutlined");var $H=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const OH=t=>t?h.createElement(hw,null):h.createElement(pw,null),MH={click:"onClick",hover:"onMouseOver"},mw=h.forwardRef((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i=OH}=t,a=h.useContext(Dr),s=n??a,l=typeof o=="object"&&o.visible!==void 0,[c,u]=E.useState(()=>l?o.visible:!1),d=E.useRef(null);h.useEffect(()=>{l&&u(o.visible)},[l,o]);const f=tw(d),p=()=>{var O;if(s)return;c&&f();const N=!c;u(N),typeof o=="object"&&((O=o.onVisibleChange)===null||O===void 0||O.call(o,N))},m=O=>{const N=MH[r]||"",I=i(c),T={[N]:p,className:`${O}-icon`,key:"passwordIcon",onMouseDown:P=>{P.preventDefault()},onMouseUp:P=>{P.preventDefault()}};return h.cloneElement(h.isValidElement(I)?I:h.createElement("span",null,I),T)},{className:g,prefixCls:v,inputPrefixCls:b,size:y}=t,C=$H(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:S}=h.useContext(gt),x=S("input",b),w=S("input-password",v),$=o&&m(w),R=G.cn(w,g,{[`${w}-${y}`]:!!y}),M=Object.assign(Object.assign({},vn(C,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:R,prefixCls:x,suffix:$});return y&&(M.size=y),h.createElement($a,Object.assign({ref:Qn(e,d)},M))});process.env.NODE_ENV!=="production"&&(mw.displayName="Input.Password");var NH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const gw=h.forwardRef((t,e)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:p,onCompositionEnd:m,variant:g}=t,v=NH(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant"]),{getPrefixCls:b,direction:y}=h.useContext(gt),C=h.useRef(!1),S=b("input-search",n),x=b("input",r),{compactSize:w}=Zo(S,y),$=Er(V=>{var W;return(W=i??w)!==null&&W!==void 0?W:V}),R=h.useRef(null),M=V=>{V!=null&&V.target&&V.type==="click"&&d&&d(V.target.value,V,{source:"clear"}),f==null||f(V)},O=V=>{var W;document.activeElement===((W=R.current)===null||W===void 0?void 0:W.input)&&V.preventDefault()},N=V=>{var W,z;d&&d((z=(W=R.current)===null||W===void 0?void 0:W.input)===null||z===void 0?void 0:z.value,V,{source:"input"})},I=V=>{C.current||c||N(V)},T=typeof s=="boolean"?h.createElement(Sp,null):null,P=`${S}-button`;let A;const k=s||{},B=k.type&&k.type.__ANT_BUTTON===!0;B||k.type==="button"?A=xr(k,Object.assign({onMouseDown:O,onClick:V=>{var W,z;(z=(W=k==null?void 0:k.props)===null||W===void 0?void 0:W.onClick)===null||z===void 0||z.call(W,V),N(V)},key:"enterButton"},B?{className:P,size:$}:{})):A=h.createElement(mo,{className:P,color:s?"primary":"default",size:$,disabled:u,key:"enterButton",onMouseDown:O,onClick:N,loading:c,icon:T,variant:g==="borderless"||g==="filled"||g==="underlined"?"text":s?"solid":void 0},s),l&&(A=[A,xr(l,{key:"addonAfter"})]);const _=G.cn(S,{[`${S}-rtl`]:y==="rtl",[`${S}-${$}`]:!!$,[`${S}-with-button`]:!!s},o),F=V=>{C.current=!0,p==null||p(V)},H=V=>{C.current=!1,m==null||m(V)},K=Object.assign(Object.assign({},v),{className:_,prefixCls:x,type:"search",size:$,variant:g,onPressEnter:I,onCompositionStart:F,onCompositionEnd:H,addonAfter:A,suffix:a,onChange:M,disabled:u});return h.createElement($a,Object.assign({ref:Qn(R,e)},K))});process.env.NODE_ENV!=="production"&&(gw.displayName="Search");var RH=`
393
393
  min-height:0 !important;
394
394
  max-height:none !important;
395
395
  height:0 !important;
@@ -400,10 +400,10 @@ html body {
400
400
  top:0 !important;
401
401
  right:0 !important;
402
402
  pointer-events: none !important;
403
- `,IH=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],gd={},or;function PH(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&gd[n])return gd[n];var r=window.getComputedStyle(t),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=IH.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return e&&n&&(gd[n]=l),l}function TH(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;or||(or=document.createElement("textarea"),or.setAttribute("tab-index","-1"),or.setAttribute("aria-hidden","true"),or.setAttribute("name","hiddenTextarea"),document.body.appendChild(or)),t.getAttribute("wrap")?or.setAttribute("wrap",t.getAttribute("wrap")):or.removeAttribute("wrap");var o=PH(t,e),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;or.setAttribute("style","".concat(l,";").concat(RH)),or.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,f=or.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=i),n!==null||r!==null){or.value=" ";var p=or.scrollHeight-i;n!==null&&(c=p*n,s==="border-box"&&(c=c+i+a),f=Math.max(c,f)),r!==null&&(u=p*r,s==="border-box"&&(u=u+i+a),d=f>u?"":"hidden",f=Math.min(u,f))}var m={height:f,overflowY:d,resize:"none"};return c&&(m.minHeight=c),u&&(m.maxHeight=u),m}var AH=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],vd=0,bd=1,yd=2,kH=h.forwardRef(function(t,e){var n=t,r=n.prefixCls,o=n.defaultValue,i=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange,f=n.onInternalAutoSize,p=lt(n,AH),m=en(o,{value:i,postState:function(L){return L??""}}),g=X(m,2),v=g[0],b=g[1],y=function(L){b(L.target.value),d==null||d(L)},C=h.useRef();h.useImperativeHandle(e,function(){return{textArea:C.current}});var S=h.useMemo(function(){return a&&Ue(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),x=X(S,2),w=x[0],$=x[1],R=!!a,M=function(){try{if(document.activeElement===C.current){var L=C.current,J=L.selectionStart,ne=L.selectionEnd,q=L.scrollTop;C.current.setSelectionRange(J,ne),C.current.scrollTop=q}}catch{}},O=h.useState(yd),N=X(O,2),I=N[0],T=N[1],P=h.useState(),A=X(P,2),k=A[0],B=A[1],_=function(){T(vd),process.env.NODE_ENV==="test"&&(f==null||f())};zt(function(){R&&_()},[i,w,$,R]),zt(function(){if(I===vd)T(bd);else if(I===bd){var z=TH(C.current,!1,w,$);T(yd),B(z)}else M()},[I]);var F=h.useRef(),H=function(){wt.cancel(F.current)},K=function(L){I===yd&&(s==null||s(L),a&&(H(),F.current=wt(function(){_()})))};h.useEffect(function(){return H},[]);var V=R?k:null,W=j(j({},c),V);return(I===vd||I===bd)&&(W.overflowY="hidden",W.overflowX="hidden"),h.createElement(bo,{onResize:K,disabled:!(a||s)},h.createElement("textarea",ge({},p,{ref:C,style:W,className:G.cn(r,l,D({},"".concat(r,"-disabled"),u)),disabled:u,value:v,onChange:y})))}),DH=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],_H=E.forwardRef(function(t,e){var n,r=t.defaultValue,o=t.value,i=t.onFocus,a=t.onBlur,s=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,f=t.suffix,p=t.prefixCls,m=p===void 0?"rc-textarea":p,g=t.showCount,v=t.count,b=t.className,y=t.style,C=t.disabled,S=t.hidden,x=t.classNames,w=t.styles,$=t.onResize,R=t.onClear,M=t.onPressEnter,O=t.readOnly,N=t.autoSize,I=t.onKeyDown,T=lt(t,DH),P=en(r,{value:o,defaultValue:r}),A=X(P,2),k=A[0],B=A[1],_=k==null?"":String(k),F=E.useState(!1),H=X(F,2),K=H[0],V=H[1],W=E.useRef(!1),z=E.useState(null),L=X(z,2),J=L[0],ne=L[1],q=E.useRef(null),re=E.useRef(null),ae=function(){var Ne;return(Ne=re.current)===null||Ne===void 0?void 0:Ne.textArea},ee=function(){ae().focus()};E.useImperativeHandle(e,function(){var me;return{resizableTextArea:re.current,focus:ee,blur:function(){ae().blur()},nativeElement:((me=q.current)===null||me===void 0?void 0:me.nativeElement)||ae()}}),E.useEffect(function(){V(function(me){return!C&&me})},[C]);var Y=E.useState(null),te=X(Y,2),Z=te[0],Q=te[1];E.useEffect(function(){if(Z){var me;(me=ae()).setSelectionRange.apply(me,he(Z))}},[Z]);var oe=J1(v,g),ce=(n=oe.max)!==null&&n!==void 0?n:c,se=Number(ce)>0,le=oe.strategy(_),be=!!ce&&le>ce,ye=function(Ne,Ze){var Ie=Ze;!W.current&&oe.exceedFormatter&&oe.max&&oe.strategy(Ze)>oe.max&&(Ie=oe.exceedFormatter(Ze,{max:oe.max}),Ze!==Ie&&Q([ae().selectionStart||0,ae().selectionEnd||0])),B(Ie),mc(Ne.currentTarget,Ne,s,Ie)},Be=function(Ne){W.current=!0,u==null||u(Ne)},de=function(Ne){W.current=!1,ye(Ne,Ne.currentTarget.value),d==null||d(Ne)},ue=function(Ne){ye(Ne,Ne.target.value)},pe=function(Ne){Ne.key==="Enter"&&M&&M(Ne),I==null||I(Ne)},Ae=function(Ne){V(!0),i==null||i(Ne)},_e=function(Ne){V(!1),a==null||a(Ne)},Re=function(Ne){B(""),ee(),mc(ae(),Ne,s)},$e=f,We;oe.show&&(oe.showFormatter?We=oe.showFormatter({value:_,count:le,maxLength:ce}):We="".concat(le).concat(se?" / ".concat(ce):""),$e=E.createElement(E.Fragment,null,$e,E.createElement("span",{className:G.cn("".concat(m,"-data-count"),x==null?void 0:x.count),style:w==null?void 0:w.count},We)));var ke=function(Ne){var Ze;$==null||$(Ne),(Ze=ae())!==null&&Ze!==void 0&&Ze.style.height&&ne(!0)},De=!N&&!g&&!l;return E.createElement(Bp,{ref:q,value:_,allowClear:l,handleReset:Re,suffix:$e,prefixCls:m,classNames:j(j({},x),{},{affixWrapper:G.cn(x==null?void 0:x.affixWrapper,D(D({},"".concat(m,"-show-count"),g),"".concat(m,"-textarea-allow-clear"),l))}),disabled:C,focused:K,className:G.cn(b,be&&"".concat(m,"-out-of-range")),style:j(j({},y),J&&!De?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof We=="string"?We:void 0}},hidden:S,readOnly:O,onClear:R},E.createElement(kH,ge({},T,{autoSize:N,maxLength:c,onKeyDown:pe,onChange:ue,onFocus:Ae,onBlur:_e,onCompositionStart:Be,onCompositionEnd:de,className:G.cn(x==null?void 0:x.textarea),style:j(j({},w==null?void 0:w.textarea),{},{resize:y==null?void 0:y.resize}),disabled:C,prefixCls:m,onResize:ke,ref:re,readOnly:O})))});const jH=t=>{const{componentCls:e,paddingLG:n}=t,r=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
403
+ `,IH=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],gd={},or;function PH(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&gd[n])return gd[n];var r=window.getComputedStyle(t),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=IH.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return e&&n&&(gd[n]=l),l}function TH(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;or||(or=document.createElement("textarea"),or.setAttribute("tab-index","-1"),or.setAttribute("aria-hidden","true"),or.setAttribute("name","hiddenTextarea"),document.body.appendChild(or)),t.getAttribute("wrap")?or.setAttribute("wrap",t.getAttribute("wrap")):or.removeAttribute("wrap");var o=PH(t,e),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;or.setAttribute("style","".concat(l,";").concat(RH)),or.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,f=or.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=i),n!==null||r!==null){or.value=" ";var p=or.scrollHeight-i;n!==null&&(c=p*n,s==="border-box"&&(c=c+i+a),f=Math.max(c,f)),r!==null&&(u=p*r,s==="border-box"&&(u=u+i+a),d=f>u?"":"hidden",f=Math.min(u,f))}var m={height:f,overflowY:d,resize:"none"};return c&&(m.minHeight=c),u&&(m.maxHeight=u),m}var AH=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],vd=0,bd=1,yd=2,kH=h.forwardRef(function(t,e){var n=t,r=n.prefixCls,o=n.defaultValue,i=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange,f=n.onInternalAutoSize,p=lt(n,AH),m=en(o,{value:i,postState:function(L){return L??""}}),g=X(m,2),v=g[0],b=g[1],y=function(L){b(L.target.value),d==null||d(L)},C=h.useRef();h.useImperativeHandle(e,function(){return{textArea:C.current}});var S=h.useMemo(function(){return a&&Ue(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),x=X(S,2),w=x[0],$=x[1],R=!!a,M=function(){try{if(document.activeElement===C.current){var L=C.current,J=L.selectionStart,ne=L.selectionEnd,q=L.scrollTop;C.current.setSelectionRange(J,ne),C.current.scrollTop=q}}catch{}},O=h.useState(yd),N=X(O,2),I=N[0],T=N[1],P=h.useState(),A=X(P,2),k=A[0],B=A[1],_=function(){T(vd),process.env.NODE_ENV==="test"&&(f==null||f())};zt(function(){R&&_()},[i,w,$,R]),zt(function(){if(I===vd)T(bd);else if(I===bd){var z=TH(C.current,!1,w,$);T(yd),B(z)}else M()},[I]);var F=h.useRef(),H=function(){wt.cancel(F.current)},K=function(L){I===yd&&(s==null||s(L),a&&(H(),F.current=wt(function(){_()})))};h.useEffect(function(){return H},[]);var V=R?k:null,W=j(j({},c),V);return(I===vd||I===bd)&&(W.overflowY="hidden",W.overflowX="hidden"),h.createElement(bo,{onResize:K,disabled:!(a||s)},h.createElement("textarea",ge({},p,{ref:C,style:W,className:G.cn(r,l,D({},"".concat(r,"-disabled"),u)),disabled:u,value:v,onChange:y})))}),DH=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],_H=E.forwardRef(function(t,e){var n,r=t.defaultValue,o=t.value,i=t.onFocus,a=t.onBlur,s=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,f=t.suffix,p=t.prefixCls,m=p===void 0?"rc-textarea":p,g=t.showCount,v=t.count,b=t.className,y=t.style,C=t.disabled,S=t.hidden,x=t.classNames,w=t.styles,$=t.onResize,R=t.onClear,M=t.onPressEnter,O=t.readOnly,N=t.autoSize,I=t.onKeyDown,T=lt(t,DH),P=en(r,{value:o,defaultValue:r}),A=X(P,2),k=A[0],B=A[1],_=k==null?"":String(k),F=E.useState(!1),H=X(F,2),K=H[0],V=H[1],W=E.useRef(!1),z=E.useState(null),L=X(z,2),J=L[0],ne=L[1],q=E.useRef(null),re=E.useRef(null),ae=function(){var Ne;return(Ne=re.current)===null||Ne===void 0?void 0:Ne.textArea},ee=function(){ae().focus()};E.useImperativeHandle(e,function(){var me;return{resizableTextArea:re.current,focus:ee,blur:function(){ae().blur()},nativeElement:((me=q.current)===null||me===void 0?void 0:me.nativeElement)||ae()}}),E.useEffect(function(){V(function(me){return!C&&me})},[C]);var Y=E.useState(null),te=X(Y,2),Z=te[0],Q=te[1];E.useEffect(function(){if(Z){var me;(me=ae()).setSelectionRange.apply(me,he(Z))}},[Z]);var ie=J1(v,g),ce=(n=ie.max)!==null&&n!==void 0?n:c,se=Number(ce)>0,le=ie.strategy(_),be=!!ce&&le>ce,ye=function(Ne,Ze){var Ie=Ze;!W.current&&ie.exceedFormatter&&ie.max&&ie.strategy(Ze)>ie.max&&(Ie=ie.exceedFormatter(Ze,{max:ie.max}),Ze!==Ie&&Q([ae().selectionStart||0,ae().selectionEnd||0])),B(Ie),mc(Ne.currentTarget,Ne,s,Ie)},Be=function(Ne){W.current=!0,u==null||u(Ne)},de=function(Ne){W.current=!1,ye(Ne,Ne.currentTarget.value),d==null||d(Ne)},ue=function(Ne){ye(Ne,Ne.target.value)},pe=function(Ne){Ne.key==="Enter"&&M&&M(Ne),I==null||I(Ne)},Ae=function(Ne){V(!0),i==null||i(Ne)},_e=function(Ne){V(!1),a==null||a(Ne)},Re=function(Ne){B(""),ee(),mc(ae(),Ne,s)},$e=f,We;ie.show&&(ie.showFormatter?We=ie.showFormatter({value:_,count:le,maxLength:ce}):We="".concat(le).concat(se?" / ".concat(ce):""),$e=E.createElement(E.Fragment,null,$e,E.createElement("span",{className:G.cn("".concat(m,"-data-count"),x==null?void 0:x.count),style:w==null?void 0:w.count},We)));var ke=function(Ne){var Ze;$==null||$(Ne),(Ze=ae())!==null&&Ze!==void 0&&Ze.style.height&&ne(!0)},De=!N&&!g&&!l;return E.createElement(Bp,{ref:q,value:_,allowClear:l,handleReset:Re,suffix:$e,prefixCls:m,classNames:j(j({},x),{},{affixWrapper:G.cn(x==null?void 0:x.affixWrapper,D(D({},"".concat(m,"-show-count"),g),"".concat(m,"-textarea-allow-clear"),l))}),disabled:C,focused:K,className:G.cn(b,be&&"".concat(m,"-out-of-range")),style:j(j({},y),J&&!De?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof We=="string"?We:void 0}},hidden:S,readOnly:O,onClear:R},E.createElement(kH,ge({},T,{autoSize:N,maxLength:c,onKeyDown:pe,onChange:ue,onFocus:Ae,onBlur:_e,onCompositionStart:Be,onCompositionEnd:de,className:G.cn(x==null?void 0:x.textarea),style:j(j({},w==null?void 0:w.textarea),{},{resize:y==null?void 0:y.resize}),disabled:C,prefixCls:m,onResize:ke,ref:re,readOnly:O})))});const jH=t=>{const{componentCls:e,paddingLG:n}=t,r=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
404
404
  &-allow-clear > ${e},
405
405
  &-affix-wrapper${r}-has-feedback ${e}
406
- `]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-rtl`]:{[`${e}-suffix`]:{[`${e}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},BH=Yt(["Input","TextArea"],t=>{const e=Mt(t,Fs(t));return[jH(e)]},Hs,{resetFont:!1});var zH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const LH=E.forwardRef((t,e)=>{var n;const{prefixCls:r,bordered:o=!0,size:i,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:g,onMouseDown:v,onResize:b}=t,y=zH(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:oe}=Kt("TextArea");oe(!("bordered"in t),"bordered","variant")}const{getPrefixCls:C,direction:S,allowClear:x,autoComplete:w,className:$,style:R,classNames:M,styles:O}=hr("textArea"),N=h.useContext(Dr),I=a??N,{status:T,hasFeedback:P,feedbackIcon:A}=h.useContext(wr),k=js(T,s),B=h.useRef(null);h.useImperativeHandle(e,()=>{var oe;return{resizableTextArea:(oe=B.current)===null||oe===void 0?void 0:oe.resizableTextArea,focus:ce=>{var se,le;jp((le=(se=B.current)===null||se===void 0?void 0:se.resizableTextArea)===null||le===void 0?void 0:le.textArea,ce)},blur:()=>{var ce;return(ce=B.current)===null||ce===void 0?void 0:ce.blur()}}});const _=C("input",r),F=yo(_),[H,K,V]=B1(_,u),[W]=BH(_,F),{compactSize:z,compactItemClassnames:L}=Zo(_,S),J=Er(oe=>{var ce;return(ce=i??z)!==null&&ce!==void 0?ce:oe}),[ne,q]=tu("textArea",m,o),re=ew(l??x),[ae,ee]=h.useState(!1),[Y,te]=h.useState(!1),Z=oe=>{ee(!0),v==null||v(oe);const ce=()=>{ee(!1),document.removeEventListener("mouseup",ce)};document.addEventListener("mouseup",ce)},Q=oe=>{var ce,se;if(b==null||b(oe),ae&&typeof getComputedStyle=="function"){const le=(se=(ce=B.current)===null||ce===void 0?void 0:ce.nativeElement)===null||se===void 0?void 0:se.querySelector("textarea");le&&getComputedStyle(le).resize==="both"&&te(!0)}};return H(W(h.createElement(_H,Object.assign({autoComplete:w},y,{style:Object.assign(Object.assign({},R),f),styles:Object.assign(Object.assign({},O),p),disabled:I,allowClear:re,className:G.cn(V,F,d,u,L,$,Y&&`${_}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),M),{textarea:G.cn({[`${_}-sm`]:J==="small",[`${_}-lg`]:J==="large"},K,c==null?void 0:c.textarea,M.textarea,ae&&`${_}-mouse-active`),variant:G.cn({[`${_}-${ne}`]:q},$i(_,k)),affixWrapper:G.cn(`${_}-textarea-affix-wrapper`,{[`${_}-affix-wrapper-rtl`]:S==="rtl",[`${_}-affix-wrapper-sm`]:J==="small",[`${_}-affix-wrapper-lg`]:J==="large",[`${_}-textarea-show-count`]:g||((n=t.count)===null||n===void 0?void 0:n.show)},K)}),prefixCls:_,suffix:P&&h.createElement("span",{className:`${_}-textarea-suffix`},A),showCount:g,ref:B,onResize:Q,onMouseDown:Z}))))}),uo=$a;uo.Group=mH;uo.Search=gw;uo.TextArea=LH;uo.Password=mw;uo.OTP=xH;var FH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const HH=t=>{const{prefixCls:e,className:n,closeIcon:r,closable:o,type:i,title:a,children:s,footer:l}=t,c=FH(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=h.useContext(gt),d=u(),f=e||u("modal"),p=yo(d),[m,g,v]=gx(f,p),b=`${f}-confirm`;let y={};return i?y={closable:o??!1,title:"",footer:"",children:h.createElement(bx,Object.assign({},t,{prefixCls:f,confirmPrefixCls:b,rootPrefixCls:d,content:s}))}:y={closable:o??!0,title:a,footer:l!==null&&h.createElement(fx,Object.assign({},t)),children:s},m(h.createElement(lp,Object.assign({prefixCls:f,className:G.cn(g,`${f}-pure-panel`,i&&b,i&&`${b}-${i}`,n,v,p)},c,{closeIcon:dx(f,r),closable:o},y)))},VH=Mx(HH);function vw(t){return Ds(xx(t))}const $r=vx;$r.useModal=y_;$r.info=function(e){return Ds(wx(e))};$r.success=function(e){return Ds(Ex(e))};$r.error=function(e){return Ds($x(e))};$r.warning=vw;$r.warn=vw;$r.confirm=function(e){return Ds(Ox(e))};$r.destroyAll=function(){for(;li.length;){const e=li.pop();e&&e()}};$r.config=p_;$r._InternalPanelDoNotUseOrYouWillBeFired=VH;process.env.NODE_ENV!=="production"&&($r.displayName="Modal");/**
406
+ `]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-rtl`]:{[`${e}-suffix`]:{[`${e}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},BH=Yt(["Input","TextArea"],t=>{const e=Mt(t,Fs(t));return[jH(e)]},Hs,{resetFont:!1});var zH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const LH=E.forwardRef((t,e)=>{var n;const{prefixCls:r,bordered:o=!0,size:i,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:g,onMouseDown:v,onResize:b}=t,y=zH(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:ie}=Kt("TextArea");ie(!("bordered"in t),"bordered","variant")}const{getPrefixCls:C,direction:S,allowClear:x,autoComplete:w,className:$,style:R,classNames:M,styles:O}=hr("textArea"),N=h.useContext(Dr),I=a??N,{status:T,hasFeedback:P,feedbackIcon:A}=h.useContext(wr),k=js(T,s),B=h.useRef(null);h.useImperativeHandle(e,()=>{var ie;return{resizableTextArea:(ie=B.current)===null||ie===void 0?void 0:ie.resizableTextArea,focus:ce=>{var se,le;jp((le=(se=B.current)===null||se===void 0?void 0:se.resizableTextArea)===null||le===void 0?void 0:le.textArea,ce)},blur:()=>{var ce;return(ce=B.current)===null||ce===void 0?void 0:ce.blur()}}});const _=C("input",r),F=yo(_),[H,K,V]=B1(_,u),[W]=BH(_,F),{compactSize:z,compactItemClassnames:L}=Zo(_,S),J=Er(ie=>{var ce;return(ce=i??z)!==null&&ce!==void 0?ce:ie}),[ne,q]=tu("textArea",m,o),re=ew(l??x),[ae,ee]=h.useState(!1),[Y,te]=h.useState(!1),Z=ie=>{ee(!0),v==null||v(ie);const ce=()=>{ee(!1),document.removeEventListener("mouseup",ce)};document.addEventListener("mouseup",ce)},Q=ie=>{var ce,se;if(b==null||b(ie),ae&&typeof getComputedStyle=="function"){const le=(se=(ce=B.current)===null||ce===void 0?void 0:ce.nativeElement)===null||se===void 0?void 0:se.querySelector("textarea");le&&getComputedStyle(le).resize==="both"&&te(!0)}};return H(W(h.createElement(_H,Object.assign({autoComplete:w},y,{style:Object.assign(Object.assign({},R),f),styles:Object.assign(Object.assign({},O),p),disabled:I,allowClear:re,className:G.cn(V,F,d,u,L,$,Y&&`${_}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),M),{textarea:G.cn({[`${_}-sm`]:J==="small",[`${_}-lg`]:J==="large"},K,c==null?void 0:c.textarea,M.textarea,ae&&`${_}-mouse-active`),variant:G.cn({[`${_}-${ne}`]:q},$i(_,k)),affixWrapper:G.cn(`${_}-textarea-affix-wrapper`,{[`${_}-affix-wrapper-rtl`]:S==="rtl",[`${_}-affix-wrapper-sm`]:J==="small",[`${_}-affix-wrapper-lg`]:J==="large",[`${_}-textarea-show-count`]:g||((n=t.count)===null||n===void 0?void 0:n.show)},K)}),prefixCls:_,suffix:P&&h.createElement("span",{className:`${_}-textarea-suffix`},A),showCount:g,ref:B,onResize:Q,onMouseDown:Z}))))}),uo=$a;uo.Group=mH;uo.Search=gw;uo.TextArea=LH;uo.Password=mw;uo.OTP=xH;var FH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const HH=t=>{const{prefixCls:e,className:n,closeIcon:r,closable:o,type:i,title:a,children:s,footer:l}=t,c=FH(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=h.useContext(gt),d=u(),f=e||u("modal"),p=yo(d),[m,g,v]=gx(f,p),b=`${f}-confirm`;let y={};return i?y={closable:o??!1,title:"",footer:"",children:h.createElement(bx,Object.assign({},t,{prefixCls:f,confirmPrefixCls:b,rootPrefixCls:d,content:s}))}:y={closable:o??!0,title:a,footer:l!==null&&h.createElement(fx,Object.assign({},t)),children:s},m(h.createElement(lp,Object.assign({prefixCls:f,className:G.cn(g,`${f}-pure-panel`,i&&b,i&&`${b}-${i}`,n,v,p)},c,{closeIcon:dx(f,r),closable:o},y)))},VH=Mx(HH);function vw(t){return Ds(xx(t))}const $r=vx;$r.useModal=y_;$r.info=function(e){return Ds(wx(e))};$r.success=function(e){return Ds(Ex(e))};$r.error=function(e){return Ds($x(e))};$r.warning=vw;$r.warn=vw;$r.confirm=function(e){return Ds(Ox(e))};$r.destroyAll=function(){for(;li.length;){const e=li.pop();e&&e()}};$r.config=p_;$r._InternalPanelDoNotUseOrYouWillBeFired=VH;process.env.NODE_ENV!=="production"&&($r.displayName="Modal");/**
407
407
  * @license lucide-react v0.511.0 - ISC
408
408
  *
409
409
  * This source code is licensed under the ISC license.
@@ -588,17 +588,17 @@ html body {
588
588
  *
589
589
  * This source code is licensed under the ISC license.
590
590
  * See the LICENSE file in the root directory of this source tree.
591
- */const QV=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],e5=Rt("x",QV);function gc({value:t,onChange:e}){return ie.jsxRuntimeExports.jsx(lu,{value:t,onChange:e,presets:[{label:"Recommended",colors:["#1677ff","#52c41a","#faad14","#ff4d4f","#722ed1","#13c2c2","#ffffff","#000000"]}]})}function t5({editor:t}){const[e,n]=E.useState("#1677ff"),[r,o]=E.useState("#ffffff"),i=l=>{const c=l.toHexString();n(c),t.chain().focus().setColor(c).run()},a=l=>{const c=l.toHexString();o(c),t.chain().focus().setHighlight({color:c}).run()},s=l=>{l.preventDefault()};return ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-4",children:[ie.jsxRuntimeExports.jsx(qo,{title:"Text Color",children:ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onMouseDown:s,children:[ie.jsxRuntimeExports.jsx(UV,{size:20,color:"black"}),ie.jsxRuntimeExports.jsx(gc,{value:e,onChange:i})]})}),ie.jsxRuntimeExports.jsx(qo,{title:"Highlight Color",children:ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onMouseDown:s,children:[ie.jsxRuntimeExports.jsx(IV,{size:20,color:"black"}),ie.jsxRuntimeExports.jsx(gc,{value:r,onChange:a})]})})]})}function n5({editor:t}){if(!t)return null;const e=()=>{for(let r=1;r<=6;r++)if(t.isActive("heading",{level:r}))switch(r){case 1:return ie.jsxRuntimeExports.jsx(Cd,{size:16});case 2:return ie.jsxRuntimeExports.jsx(D0,{size:16});case 3:return ie.jsxRuntimeExports.jsx(j0,{size:16});case 4:return ie.jsxRuntimeExports.jsx(_0,{size:16});case 5:return ie.jsxRuntimeExports.jsx(B0,{size:16});case 6:return ie.jsxRuntimeExports.jsx(z0,{size:16})}return ie.jsxRuntimeExports.jsx(Cd,{size:16})},n=[...Array.from({length:6},(r,o)=>({key:`${o+1}`,label:ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onClick:()=>t.chain().focus().toggleHeading({level:o+1}).run(),children:[E.createElement([Cd,D0,j0,_0,B0,z0][o],{size:16}),ie.jsxRuntimeExports.jsxs("span",{children:["Heading",o+1]})]}),className:t.isActive("heading",{level:o+1})?"ant-dropdown-menu-item-active":""}))];return ie.jsxRuntimeExports.jsx(cu,{menu:{items:n},trigger:["hover"],placement:"bottomLeft",children:ie.jsxRuntimeExports.jsx("button",{className:"ce:flex ce:items-center ce:gap-1 ce:p-2 ce:rounded-md ce:hover:bg-blue-100 ce:hover:text-blue-600",type:"button",children:e()})})}const r5=8,o5=8;function i5({editor:t,buttonClass:e,activeClass:n}){const[r,o]=E.useState({rows:0,cols:0}),[i,a]=E.useState(!1),s=E.useCallback((l,c)=>{t&&(t.chain().focus().insertTable({rows:l,cols:c,withHeaderRow:!0}).run(),a(!1))},[t]);return ie.jsxRuntimeExports.jsx(cu,{open:i,onOpenChange:l=>a(l),trigger:["hover"],dropdownRender:()=>ie.jsxRuntimeExports.jsxs("div",{className:"ce:w-56 ce:p-4 ce:bg-white ce:border ce:border-gray-300 ce:rounded-lg ce:shadow-xl",children:[ie.jsxRuntimeExports.jsx("div",{className:"ce:grid ce:grid-cols-8 ce:gap-1",children:Array.from({length:r5}).map((l,c)=>Array.from({length:o5}).map((u,d)=>{const f=c<r.rows&&d<r.cols;return ie.jsxRuntimeExports.jsx("div",{className:`ce:w-5 ce:h-5 ce:border ce:rounded-sm ce:cursor-pointer ce:transition-all ce:duration-200 ${f?"ce:bg-blue-400 ce:border-white ce:scale-110":"ce:bg-gray-200 ce:hover:bg-gray-300"}`,onMouseEnter:()=>o({rows:c+1,cols:d+1}),onClick:p=>{p.stopPropagation(),s(c+1,d+1)}},`cell-${c}-${d}`)}))}),ie.jsxRuntimeExports.jsx("div",{className:"ce:mt-3 ce:text-sm ce:font-medium ce:text-center ce:text-gray-700",children:r.rows>0&&r.cols>0?`${r.rows} × ${r.cols} Table`:"Insert Table"})]}),children:ie.jsxRuntimeExports.jsx("button",{type:"button",className:`${e} ${i?n:""} ce:transition-all`,onClick:l=>{l.preventDefault(),a(!i)},children:ie.jsxRuntimeExports.jsx(KV,{className:"ce:w-5 ce:h-5"})})})}function a5({editor:t}){const[e,n]=E.useState(!1);return ie.jsxRuntimeExports.jsxs("div",{className:"ce:relative",children:[ie.jsxRuntimeExports.jsx("button",{type:"button",className:`ce:p-1 ce:text-black ce:transition-all ce:duration-300 ce:rounded-md ce:shadow-lg ce:hover:bg-blue-100 ce:hover:text-blue-600 ${e?"ce:bg-blue-100 ce:text-blue-600":""}`,onClick:r=>{r.preventDefault(),r.stopPropagation(),n(!e)},children:e?ie.jsxRuntimeExports.jsx(e5,{size:24}):ie.jsxRuntimeExports.jsx(xV,{size:24})}),e&&ie.jsxRuntimeExports.jsx("div",{className:"ce:fixed ce:z-40 ce:w-64 ce:p-4 ce:bg-white ce:border ce:border-gray-200 ce:rounded-lg ce:shadow-xl ce:bottom-20 ce:right-4 ce:animate-slide-up",children:ie.jsxRuntimeExports.jsxs("div",{className:"ce:space-y-2",children:[ie.jsxRuntimeExports.jsx("h3",{className:"ce:mb-3 ce:font-bold ce:text-center ce:text-gray-700",children:"Custom Extensions"}),ie.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{t.chain().focus().insertContent({type:"accordion",content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()},className:"ce:flex ce:items-center ce:justify-center ce:w-full ce:gap-2 ce:px-3 ce:py-1 ce:text-blue-600 ce:duration-300 ce:rounded-md ce:bg-blue-50 ce:hover:bg-blue-100 ce:hover:text-blue-700",children:[ie.jsxRuntimeExports.jsx(TV,{size:16})," ","Accordion"]})]})})]})}function s5({editor:t}){if(!t)return null;const e="ce:p-2 ce:rounded-md ce:transition-all ce:duration-200 ce:hover:bg-blue-100 ce:hover:text-blue-600",n="ce:bg-blue-100 ce:text-blue-600",r=(o,i,a,s,l)=>ie.jsxRuntimeExports.jsx(qo,{title:l,children:ie.jsxRuntimeExports.jsx("button",{type:"button",onClick:i,disabled:s,className:`
591
+ */const QV=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],e5=Rt("x",QV);function gc({value:t,onChange:e}){return oe.jsxRuntimeExports.jsx(lu,{value:t,onChange:e,presets:[{label:"Recommended",colors:["#1677ff","#52c41a","#faad14","#ff4d4f","#722ed1","#13c2c2","#ffffff","#000000"]}]})}function t5({editor:t}){const[e,n]=E.useState("#1677ff"),[r,o]=E.useState("#ffffff"),i=l=>{const c=l.toHexString();n(c),t.chain().focus().setColor(c).run()},a=l=>{const c=l.toHexString();o(c),t.chain().focus().setHighlight({color:c}).run()},s=l=>{l.preventDefault()};return oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-4",children:[oe.jsxRuntimeExports.jsx(qo,{title:"Text Color",children:oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onMouseDown:s,children:[oe.jsxRuntimeExports.jsx(UV,{size:20,color:"black"}),oe.jsxRuntimeExports.jsx(gc,{value:e,onChange:i})]})}),oe.jsxRuntimeExports.jsx(qo,{title:"Highlight Color",children:oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onMouseDown:s,children:[oe.jsxRuntimeExports.jsx(IV,{size:20,color:"black"}),oe.jsxRuntimeExports.jsx(gc,{value:r,onChange:a})]})})]})}function n5({editor:t}){if(!t)return null;const e=()=>{for(let r=1;r<=6;r++)if(t.isActive("heading",{level:r}))switch(r){case 1:return oe.jsxRuntimeExports.jsx(Cd,{size:16});case 2:return oe.jsxRuntimeExports.jsx(D0,{size:16});case 3:return oe.jsxRuntimeExports.jsx(j0,{size:16});case 4:return oe.jsxRuntimeExports.jsx(_0,{size:16});case 5:return oe.jsxRuntimeExports.jsx(B0,{size:16});case 6:return oe.jsxRuntimeExports.jsx(z0,{size:16})}return oe.jsxRuntimeExports.jsx(Cd,{size:16})},n=[...Array.from({length:6},(r,o)=>({key:`${o+1}`,label:oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-2",onClick:()=>t.chain().focus().toggleHeading({level:o+1}).run(),children:[(()=>{const i=[Cd,D0,j0,_0,B0,z0][o];return i?oe.jsxRuntimeExports.jsx(i,{size:16}):null})(),oe.jsxRuntimeExports.jsxs("span",{children:["Heading",o+1]})]}),className:t.isActive("heading",{level:o+1})?"ant-dropdown-menu-item-active":""}))];return oe.jsxRuntimeExports.jsx(cu,{menu:{items:n},trigger:["hover"],placement:"bottomLeft",children:oe.jsxRuntimeExports.jsx("button",{className:"ce:flex ce:items-center ce:gap-1 ce:p-2 ce:rounded-md ce:hover:bg-blue-100 ce:hover:text-blue-600",type:"button",children:e()})})}const r5=8,o5=8;function i5({editor:t,buttonClass:e,activeClass:n}){const[r,o]=E.useState({rows:0,cols:0}),[i,a]=E.useState(!1),s=E.useCallback((l,c)=>{t&&(t.chain().focus().insertTable({rows:l,cols:c,withHeaderRow:!0}).run(),a(!1))},[t]);return oe.jsxRuntimeExports.jsx(cu,{open:i,onOpenChange:l=>a(l),trigger:["hover"],dropdownRender:()=>oe.jsxRuntimeExports.jsxs("div",{className:"ce:w-56 ce:p-4 ce:bg-white ce:border ce:border-gray-300 ce:rounded-lg ce:shadow-xl",children:[oe.jsxRuntimeExports.jsx("div",{className:"ce:grid ce:grid-cols-8 ce:gap-1",children:Array.from({length:r5}).map((l,c)=>Array.from({length:o5}).map((u,d)=>{const f=c<r.rows&&d<r.cols;return oe.jsxRuntimeExports.jsx("div",{className:`ce:w-5 ce:h-5 ce:border ce:rounded-sm ce:cursor-pointer ce:transition-all ce:duration-200 ${f?"ce:bg-blue-400 ce:border-white ce:scale-110":"ce:bg-gray-200 ce:hover:bg-gray-300"}`,onMouseEnter:()=>o({rows:c+1,cols:d+1}),onClick:p=>{p.stopPropagation(),s(c+1,d+1)}},`cell-${c}-${d}`)}))}),oe.jsxRuntimeExports.jsx("div",{className:"ce:mt-3 ce:text-sm ce:font-medium ce:text-center ce:text-gray-700",children:r.rows>0&&r.cols>0?`${r.rows} × ${r.cols} Table`:"Insert Table"})]}),children:oe.jsxRuntimeExports.jsx("button",{type:"button",className:`${e} ${i?n:""} ce:transition-all`,onClick:l=>{l.preventDefault(),a(!i)},children:oe.jsxRuntimeExports.jsx(KV,{className:"ce:w-5 ce:h-5"})})})}function a5({editor:t}){const[e,n]=E.useState(!1);return oe.jsxRuntimeExports.jsxs("div",{className:"ce:relative",children:[oe.jsxRuntimeExports.jsx("button",{type:"button",className:`ce:p-1 ce:text-black ce:transition-all ce:duration-300 ce:rounded-md ce:shadow-lg ce:hover:bg-blue-100 ce:hover:text-blue-600 ${e?"ce:bg-blue-100 ce:text-blue-600":""}`,onClick:r=>{r.preventDefault(),r.stopPropagation(),n(!e)},children:e?oe.jsxRuntimeExports.jsx(e5,{size:24}):oe.jsxRuntimeExports.jsx(xV,{size:24})}),e&&oe.jsxRuntimeExports.jsx("div",{className:"ce:fixed ce:z-40 ce:w-64 ce:p-4 ce:bg-white ce:border ce:border-gray-200 ce:rounded-lg ce:shadow-xl ce:bottom-20 ce:right-4 ce:animate-slide-up",children:oe.jsxRuntimeExports.jsxs("div",{className:"ce:space-y-2",children:[oe.jsxRuntimeExports.jsx("h3",{className:"ce:mb-3 ce:font-bold ce:text-center ce:text-gray-700",children:"Custom Extensions"}),oe.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{t.chain().focus().insertContent({type:"accordion",content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()},className:"ce:flex ce:items-center ce:justify-center ce:w-full ce:gap-2 ce:px-3 ce:py-1 ce:text-blue-600 ce:duration-300 ce:rounded-md ce:bg-blue-50 ce:hover:bg-blue-100 ce:hover:text-blue-700",children:[oe.jsxRuntimeExports.jsx(TV,{size:16})," ","Accordion"]})]})})]})}function s5({editor:t}){if(!t)return null;const e="ce:p-2 ce:rounded-md ce:transition-all ce:duration-200 ce:hover:bg-blue-100 ce:hover:text-blue-600",n="ce:bg-blue-100 ce:text-blue-600",r=(o,i,a,s,l)=>oe.jsxRuntimeExports.jsx(qo,{title:l,children:oe.jsxRuntimeExports.jsx("button",{type:"button",onClick:i,disabled:s,className:`
592
592
  ${e}
593
593
  ${a?n:""}
594
594
  ${s?"ce:opacity-50 ce:cursor-not-allowed":""}
595
- `,children:o})});return ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:flex-wrap ce:items-center ce:gap-2 ce:p-2 ce:border-b ce:border-gray-200 ce:rounded-t-lg ce:bg-gray-50",children:[ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ie.jsxRuntimeExports.jsx(oV,{size:16}),()=>t.chain().focus().toggleBold().run(),t.isActive("bold"),!1,"Bold"),r(ie.jsxRuntimeExports.jsx(CV,{size:16}),()=>t.chain().focus().toggleItalic().run(),t.isActive("italic"),!1,"Italic"),r(ie.jsxRuntimeExports.jsx(YV,{size:16}),()=>t.chain().focus().toggleUnderline().run(),t.isActive("underline"),!1,"Underline"),r(ie.jsxRuntimeExports.jsx(LV,{size:16}),()=>t.chain().focus().toggleStrike().run(),t.isActive("strike"),!1,"Strikethrough"),r(ie.jsxRuntimeExports.jsx(lV,{size:16}),()=>t.chain().focus().toggleCode().run(),t.isActive("code"),!1,"Code"),r(ie.jsxRuntimeExports.jsx(HV,{size:16}),()=>t.chain().focus().toggleSubscript().run(),t.isActive("subscript"),!1,"Subscript"),r(ie.jsxRuntimeExports.jsx(WV,{size:16}),()=>t.chain().focus().toggleSuperscript().run(),t.isActive("superscript"),!1,"Superscript")]}),ie.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),ie.jsxRuntimeExports.jsx(n5,{editor:t}),ie.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ie.jsxRuntimeExports.jsx(eV,{size:16}),()=>t.chain().focus().setTextAlign("left").run(),t.isActive({textAlign:"left"}),!1,"Align Left"),r(ie.jsxRuntimeExports.jsx(YH,{size:16}),()=>t.chain().focus().setTextAlign("center").run(),t.isActive({textAlign:"center"}),!1,"Align Center"),r(ie.jsxRuntimeExports.jsx(nV,{size:16}),()=>t.chain().focus().setTextAlign("right").run(),t.isActive({textAlign:"right"}),!1,"Align Right"),r(ie.jsxRuntimeExports.jsx(ZH,{size:16}),()=>t.chain().focus().setTextAlign("justify").run(),t.isActive({textAlign:"justify"}),!1,"Align Justify")]}),ie.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ie.jsxRuntimeExports.jsx(OV,{size:16}),()=>t.chain().focus().toggleBulletList().run(),t.isActive("bulletList"),!1,"Bullet List"),r(ie.jsxRuntimeExports.jsx(EV,{size:16}),()=>t.chain().focus().toggleOrderedList().run(),t.isActive("orderedList"),!1,"Ordered List"),r(ie.jsxRuntimeExports.jsx(BV,{size:16}),()=>t.chain().focus().toggleTaskList().run(),t.isActive("taskList"),!1,"Task List")]}),ie.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ie.jsxRuntimeExports.jsx(kV,{size:16}),()=>t.chain().focus().toggleBlockquote().run(),t.isActive("blockquote"),!1,"Blockquote"),ie.jsxRuntimeExports.jsx(i5,{editor:t,buttonClass:e,activeClass:n}),r(ie.jsxRuntimeExports.jsx(NV,{size:16}),()=>t.chain().focus().setHorizontalRule().run(),!1,!1,"Horizontal Rule"),r(ie.jsxRuntimeExports.jsx(uV,{size:16}),()=>t.chain().focus().setHardBreak().run(),!1,!1,"Line Break")]}),ie.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ie.jsxRuntimeExports.jsx(ZV,{size:16}),()=>t.chain().focus().undo().run(),!1,!t.can().chain().focus().undo().run()),r(ie.jsxRuntimeExports.jsx(_V,{size:16}),()=>t.chain().focus().redo().run(),!1,!t.can().chain().focus().redo().run())]}),ie.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),r(ie.jsxRuntimeExports.jsx(bV,{size:16}),()=>{const o=prompt("Enter the image URL");o&&t.chain().focus().insertContent({type:"image",attrs:{src:o,width:50,height:50,marginLeft:0,marginRight:0}}).run()},!1,!1,"Insert Image"),ie.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),ie.jsxRuntimeExports.jsx(t5,{editor:t}),ie.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),ie.jsxRuntimeExports.jsx(a5,{editor:t})]})}const l5=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,o;const i=n.getAttribute("style"),a=(o=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||o===void 0?void 0:o.getAttribute("style");n.setAttribute("style",`${a};${i}`)})},L0=Zr.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&l5(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(o=>o.type===this.type).some(o=>Object.values(o.attrs).some(i=>!!i))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),c5=kn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),u5=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,d5=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,f5=Zr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[xi({find:u5,type:this.type})]},addPasteRules(){return[wi({find:d5,type:this.type})]}}),yw=sn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ft(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),h5=Zr.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),p5=Zr.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});var ah,sh;if(typeof WeakMap<"u"){let t=new WeakMap;ah=e=>t.get(e),sh=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;ah=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},sh=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var an=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,a=o+1;for(let s=1;i<this.width&&this.map[e+s]==n;s++)i++;for(let s=1;a<this.height&&this.map[e+this.width*s]==n;s++)a++;return{left:r,top:o,right:i,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:a==this.height)?null:this.map[r+this.width*(n<0?i-1:a)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:a,right:s,top:l,bottom:c}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(o,l),right:Math.max(r,s),bottom:Math.max(i,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,!(o==t.left&&o&&this.map[i-1]==a||r==t.top&&r&&this.map[i-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let a=e+t*this.width;const s=(t+1)*this.width;for(;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}}static get(t){return ah(t)||sh(t,m5(t))}};function m5(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=g5(t),n=t.childCount,r=[];let o=0,i=null;const a=[];for(let c=0,u=e*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const d=t.child(c);u++;for(let m=0;;m++){for(;o<r.length&&r[o]!=0;)o++;if(m==d.childCount)break;const g=d.child(m),{colspan:v,rowspan:b,colwidth:y}=g.attrs;for(let C=0;C<b;C++){if(C+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:b-C});break}const S=o+C*e;for(let x=0;x<v;x++){r[S+x]==0?r[S+x]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:v-x});const w=y&&y[x];if(w){const $=(S+x)%e*2,R=a[$];R==null||R!=w&&a[$+1]==1?(a[$]=w,a[$+1]=1):R==w&&a[$+1]++}}}o+=v,u+=g.nodeSize}const f=(c+1)*e;let p=0;for(;o<f;)r[o++]==0&&p++;p&&(i||(i=[])).push({type:"missing",row:c,n:p}),u++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const s=new an(e,n,r,i);let l=!1;for(let c=0;!l&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(l=!0);return l&&v5(s,a,t),s}function g5(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let a=0;a<r;a++){const s=t.child(a);for(let l=0;l<s.childCount;l++){const c=s.child(l);a+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}}for(let a=0;a<o.childCount;a++){const s=o.child(a);i+=s.attrs.colspan,s.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function v5(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;r[i]=!0;const a=n.nodeAt(i);if(!a)throw new RangeError(`No cell with offset ${i} found`);let s=null;const l=a.attrs;for(let c=0;c<l.colspan;c++){const u=(o+c)%t.width,d=e[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((s||(s=b5(l)))[c]=d)}s&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}function b5(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Fn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}var Io=new fr("selectingCells");function Oa(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function y5(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function Br(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function uu(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Oa(e.$head)||C5(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function C5(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function lh(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function S5(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Hp(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Cw(t,e,n){const r=t.node(-1),o=an.get(r),i=t.start(-1),a=o.nextCell(t.pos-i,e,n);return a==null?null:t.node(0).resolve(i+a)}function Oi(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function Sw(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function x5(t,e,n){const r=Fn(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var Gt=class io extends it{constructor(e,n=e){const r=e.node(-1),o=an.get(r),i=e.start(-1),a=o.rectBetween(e.pos-i,n.pos-i),s=e.node(0),l=o.cellsInRect(a).filter(u=>u!=n.pos-i);l.unshift(n.pos-i);const c=l.map(u=>{const d=r.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const f=i+u+1;return new Fb(s.resolve(f),s.resolve(f+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(lh(r)&&lh(o)&&Hp(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?io.rowSelection(r,o):i&&this.isColSelection()?io.colSelection(r,o):new io(r,o)}return rt.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=an.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},a=[];for(let l=o.top;l<o.bottom;l++){const c=[];for(let u=l*n.width+o.left,d=o.left;d<o.right;d++,u++){const f=n.map[u];if(i[f])continue;i[f]=!0;const p=n.findCell(f);let m=e.nodeAt(f);if(!m)throw RangeError(`No cell with offset ${f} found`);const g=o.left-p.left,v=p.right-o.right;if(g>0||v>0){let b=m.attrs;if(g>0&&(b=Oi(b,0,g)),v>0&&(b=Oi(b,b.colspan-v,v)),p.left<o.left){if(m=m.type.createAndFill(b),!m)throw RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else m=m.type.create(b,m.content)}if(p.top<o.top||p.bottom>o.bottom){const b={...m.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top<o.top?m=m.type.createAndFill(b):m=m.type.create(b,m.content)}c.push(m)}a.push(e.child(l).copy(fe.from(c)))}const s=this.isColSelection()&&this.isRowSelection()?e:a;return new Me(fe.from(s),1,1)}replace(e,n=Me.empty){const r=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){const{$from:s,$to:l}=o[a],c=e.mapping.slice(r);e.replace(c.map(s.pos),c.map(l.pos),a?Me.empty:n)}const i=it.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Me(fe.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=an.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let a=0;a<i.length;a++)e(n.nodeAt(i[a]),o+i[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=an.get(r),i=e.start(-1),a=o.findCell(e.pos-i),s=o.findCell(n.pos-i),l=e.node(0);return a.top<=s.top?(a.top>0&&(e=l.resolve(i+o.map[a.left])),s.bottom<o.height&&(n=l.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))):(s.top>0&&(n=l.resolve(i+o.map[s.left])),a.bottom<o.height&&(e=l.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))),new io(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=an.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(o,i)>0)return!1;const a=o+this.$anchorCell.nodeAfter.attrs.colspan,s=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,s)==n.width}eq(e){return e instanceof io&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=an.get(r),i=e.start(-1),a=o.findCell(e.pos-i),s=o.findCell(n.pos-i),l=e.node(0);return a.left<=s.left?(a.left>0&&(e=l.resolve(i+o.map[a.top*o.width])),s.right<o.width&&(n=l.resolve(i+o.map[o.width*(s.top+1)-1]))):(s.left>0&&(n=l.resolve(i+o.map[s.top*o.width])),a.right<o.width&&(e=l.resolve(i+o.map[o.width*(a.top+1)-1]))),new io(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new io(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new io(e.resolve(n),e.resolve(r))}getBookmark(){return new w5(this.$anchorCell.pos,this.$headCell.pos)}};Gt.prototype.visible=!1;it.jsonID("cell",Gt);var w5=class xw{constructor(e,n){this.anchor=e,this.head=n}map(e){return new xw(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Hp(n,r)?new Gt(n,r):it.near(r,1)}};function E5(t){if(!(t.selection instanceof Gt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Wn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),rn.create(t.doc,e)}function $5({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function O5({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=e.depth;o>0;o--){const i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&e.parentOffset===0}function M5(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,a;if(r instanceof tt&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")i=Gt.create(o,r.from);else if(a=="row"){const s=o.resolve(r.from+1);i=Gt.rowSelection(s,s)}else if(!n){const s=an.get(r.node),l=r.from+1,c=l+s.map[s.width*s.height-1];i=Gt.create(o,l+1,c)}}else r instanceof rt&&$5(r)?i=rt.create(o,r.from):r instanceof rt&&O5(r)&&(i=rt.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var N5=new fr("fix-tables");function ww(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let a=0,s=0;a<i;a++){const l=e.child(a);for(let c=s,u=Math.min(o,a+3);c<u;c++)if(t.child(c)==l){s=c+1,n+=l.nodeSize;continue e}r(l,n),s<o&&t.child(s).sameMarkup(l)?ww(t.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function Ew(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=R5(t,o,i,n))};return e?e.doc!=t.doc&&ww(e.doc,t.doc,0,r):t.doc.descendants(r),n}function R5(t,e,n,r){const o=an.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let l=0;l<o.height;l++)i.push(0);for(let l=0;l<o.problems.length;l++){const c=o.problems[l];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const d=u.attrs;for(let f=0;f<d.rowspan;f++)i[c.row+f]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Oi(d,d.colspan-c.n,c.n))}else if(c.type=="missing")i[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const u=r.mapping.map(n);r.delete(u,u+e.nodeSize)}}let a,s;for(let l=0;l<i.length;l++)i[l]&&(a==null&&(a=l),s=l);for(let l=0,c=n+1;l<o.height;l++){const u=e.child(l),d=c+u.nodeSize,f=i[l];if(f>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const m=[];for(let v=0;v<f;v++){const b=Fn(t.schema)[p].createAndFill();b&&m.push(b)}const g=(l==0||a==l-1)&&s==l?c+1:d-1;r.insert(r.mapping.map(g),m)}c=d}return r.setMeta(N5,{fixTables:!0})}function no(t){const e=t.selection,n=uu(t),r=n.node(-1),o=n.start(-1),i=an.get(r);return{...e instanceof Gt?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function $w(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;x5(e,r,o+i)&&(i=o==0||o==e.width?null:0);for(let a=0;a<e.height;a++){const s=a*e.width+o;if(o>0&&o<e.width&&e.map[s-1]==e.map[s]){const l=e.map[s],c=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,Sw(c.attrs,o-e.colCount(l))),a+=c.attrs.rowspan-1}else{const l=i==null?Fn(r.type.schema).cell:r.nodeAt(e.map[s+i]).type,c=e.positionAt(a,o,r);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function I5(t,e){if(!Br(t))return!1;if(e){const n=no(t);e($w(t.tr,n,n.left))}return!0}function P5(t,e){if(!Br(t))return!1;if(e){const n=no(t);e($w(t.tr,n,n.right))}return!0}function T5(t,{map:e,table:n,tableStart:r},o){const i=t.mapping.maps.length;for(let a=0;a<e.height;){const s=a*e.width+o,l=e.map[s],c=n.nodeAt(l),u=c.attrs;if(o>0&&e.map[s-1]==l||o<e.width-1&&e.map[s+1]==l)t.setNodeMarkup(t.mapping.slice(i).map(r+l),null,Oi(u,o-e.colCount(l)));else{const d=t.mapping.slice(i).map(r+l);t.delete(d,d+c.nodeSize)}a+=u.rowspan}}function A5(t,e){if(!Br(t))return!1;if(e){const n=no(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;T5(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=an.get(i)}e(r)}return!0}function k5(t,e,n){var r;const o=Fn(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))==null?void 0:r.type)!=o)return!1;return!0}function Ow(t,{map:e,tableStart:n,table:r},o){var i;let a=n;for(let c=0;c<o;c++)a+=r.child(c).nodeSize;const s=[];let l=o>0?-1:0;k5(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let c=0,u=e.width*o;c<e.width;c++,u++)if(o>0&&o<e.height&&e.map[u]==e.map[u-e.width]){const d=e.map[u],f=r.nodeAt(d).attrs;t.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),c+=f.colspan-1}else{const d=l==null?Fn(r.type.schema).cell:(i=r.nodeAt(e.map[u+l*e.width]))==null?void 0:i.type,f=d==null?void 0:d.createAndFill();f&&s.push(f)}return t.insert(a,Fn(r.type.schema).row.create(null,s)),t}function D5(t,e){if(!Br(t))return!1;if(e){const n=no(t);e(Ow(t.tr,n,n.top))}return!0}function _5(t,e){if(!Br(t))return!1;if(e){const n=no(t);e(Ow(t.tr,n,n.bottom))}return!0}function j5(t,{map:e,table:n,tableStart:r},o){let i=0;for(let c=0;c<o;c++)i+=n.child(c).nodeSize;const a=i+n.child(o).nodeSize,s=t.mapping.maps.length;t.delete(i+r,a+r);const l=new Set;for(let c=0,u=o*e.width;c<e.width;c++,u++){const d=e.map[u];if(!l.has(d)){if(l.add(d),o>0&&d==e.map[u-e.width]){const f=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(s).map(d+r),null,{...f,rowspan:f.rowspan-1}),c+=f.colspan-1}else if(o<e.height&&d==e.map[u+e.width]){const f=n.nodeAt(d),p=f.attrs,m=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=e.positionAt(o+1,c,n);t.insert(t.mapping.slice(s).map(r+g),m),c+=p.colspan-1}}}}function B5(t,e){if(!Br(t))return!1;if(e){const n=no(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;j5(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=an.get(n.table)}e(r)}return!0}function F0(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function z5({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,a=(r.bottom-1)*t+r.left,s=o+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[i]==n[i-1]||r.right<t&&n[s]==n[s+1])return!0;i+=t,s+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[a]==n[a+t])return!0;o++,a++}return!1}function H0(t,e){const n=t.selection;if(!(n instanceof Gt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=no(t),{map:o}=r;if(z5(o,r))return!1;if(e){const i=t.tr,a={};let s=fe.empty,l,c;for(let u=r.top;u<r.bottom;u++)for(let d=r.left;d<r.right;d++){const f=o.map[u*o.width+d],p=r.table.nodeAt(f);if(!(a[f]||!p))if(a[f]=!0,l==null)l=f,c=p;else{F0(p)||(s=s.append(p.content));const m=i.mapping.map(f+r.tableStart);i.delete(m,m+p.nodeSize)}}if(l==null||c==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{...Sw(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),s.size){const u=l+1+c.content.size,d=F0(c)?l+1:u;i.replaceWith(d+r.tableStart,u+r.tableStart,s)}i.setSelection(new Gt(i.doc.resolve(l+r.tableStart))),e(i)}return!0}function V0(t,e){const n=Fn(t.schema);return L5(({node:r})=>n[r.type.spec.tableRole])(t,e)}function L5(t){return(e,n)=>{var r;const o=e.selection;let i,a;if(o instanceof Gt){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(i=y5(o.$from),!i)return!1;a=(r=Oa(o.$from))==null?void 0:r.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let s=i.attrs;const l=[],c=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const u=no(e),d=e.tr;for(let p=0;p<u.right-u.left;p++)l.push(c?{...s,colwidth:c&&c[p]?[c[p]]:null}:s);let f;for(let p=u.top;p<u.bottom;p++){let m=u.map.positionAt(p,u.left,u.table);p==u.top&&(m+=i.nodeSize);for(let g=u.left,v=0;g<u.right;g++,v++)g==u.left&&p==u.top||d.insert(f=d.mapping.map(m+u.tableStart,1),t({node:i,row:p,col:g}).createAndFill(l[v]))}d.setNodeMarkup(a,t({node:i,row:u.top,col:u.left}),l[0]),o instanceof Gt&&d.setSelection(new Gt(d.doc.resolve(o.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function F5(t,e){return function(n,r){if(!Br(n))return!1;const o=uu(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof Gt?n.selection.forEachCell((a,s)=>{a.attrs[t]!==e&&i.setNodeMarkup(s,null,{...a.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function H5(t){return function(e,n){if(!Br(e))return!1;if(n){const r=Fn(e.schema),o=no(e),i=e.tr,a=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=a.map(l=>o.table.nodeAt(l));for(let l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(i.steps.length==0)for(let l=0;l<a.length;l++)i.setNodeMarkup(o.tableStart+a[l],r.header_cell,s[l].attrs);n(i)}return!0}}function W0(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function Cs(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?H5(t):function(n,r){if(!Br(n))return!1;if(r){const o=Fn(n.schema),i=no(n),a=n.tr,s=W0("row",i,o),l=W0("column",i,o),u=(t==="column"?s:t==="row"?l:!1)?1:0,d=t=="column"?{left:0,top:u,right:1,bottom:i.map.height}:t=="row"?{left:u,top:0,right:i.map.width,bottom:1}:i,f=t=="column"?l?o.cell:o.header_cell:t=="row"?s?o.cell:o.header_cell:o.cell;i.map.cellsInRect(d).forEach(p=>{const m=p+i.tableStart,g=a.doc.nodeAt(m);g&&a.setNodeMarkup(m,f,g.attrs)}),r(a)}return!0}}Cs("row",{useDeprecatedLogic:!0});Cs("column",{useDeprecatedLogic:!0});var V5=Cs("cell",{useDeprecatedLogic:!0});function W5(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const i=t.node(-1).child(r),a=i.lastChild;if(a)return o-1-a.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function q0(t){return function(e,n){if(!Br(e))return!1;const r=W5(uu(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(rt.between(o,S5(o))).scrollIntoView())}return!0}}function q5(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function dl(t,e){const n=t.selection;if(!(n instanceof Gt))return!1;if(e){const r=t.tr,o=Fn(t.schema).cell.createAndFill().content;n.forEachCell((i,a)=>{i.content.eq(o)||r.replace(r.mapping.map(a+1),r.mapping.map(a+i.nodeSize-1),new Me(o,0,0))}),r.docChanged&&e(r)}return!0}function K5(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,a=o.type.schema,s=[];if(i=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const u=l?0:Math.max(0,n-1),d=l<e.childCount-1?0:Math.max(0,r-1);(u||d)&&(c=ch(Fn(a).row,new Me(c,u,d)).content),s.push(c)}else if(i=="cell"||i=="header_cell")s.push(n||r?ch(Fn(a).row,new Me(e,n,r)).content:e);else return null;return G5(a,s)}function G5(t,e){const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(let a=i.childCount-1;a>=0;a--){const{rowspan:s,colspan:l}=i.child(a).attrs;for(let c=o;c<o+s;c++)n[c]=(n[c]||0)+l}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(fe.empty),n[o]<r){const i=Fn(t).cell.createAndFill(),a=[];for(let s=n[o];s<r;s++)a.push(i);e[o]=e[o].append(fe.from(a))}return{height:e.length,width:r,rows:e}}function ch(t,e){const n=t.createAndFill();return new Lb(n).replace(0,n.content.size,e).doc}function U5({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],a=[];for(let s=0;s<n.length;s++){const l=n[s],c=[];for(let u=i[s]||0,d=0;u<r;d++){let f=l.child(d%l.childCount);u+f.attrs.colspan>r&&(f=f.type.createChecked(Oi(f.attrs,f.attrs.colspan,u+f.attrs.colspan-r),f.content)),c.push(f),u+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)i[s+p]=(i[s+p]||0)+f.attrs.colspan}a.push(fe.from(c))}n=a,t=r}if(e!=o){const i=[];for(let a=0,s=0;a<o;a++,s++){const l=[],c=n[s%e];for(let u=0;u<c.childCount;u++){let d=c.child(u);a+d.attrs.rowspan>o&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}i.push(fe.from(l))}n=i,e=o}return{width:t,height:e,rows:n}}function X5(t,e,n,r,o,i,a){const s=t.doc.type.schema,l=Fn(s);let c,u;if(o>e.width)for(let d=0,f=0;d<e.height;d++){const p=n.child(d);f+=p.nodeSize;const m=[];let g;p.lastChild==null||p.lastChild.type==l.cell?g=c||(c=l.cell.createAndFill()):g=u||(u=l.header_cell.createAndFill());for(let v=e.width;v<o;v++)m.push(g);t.insert(t.mapping.slice(a).map(f-1+r),m)}if(i>e.height){const d=[];for(let m=0,g=(e.height-1)*e.width;m<Math.max(e.width,o);m++){const v=m>=e.width?!1:n.nodeAt(e.map[g+m]).type==l.header_cell;d.push(v?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const f=l.row.create(null,fe.from(d)),p=[];for(let m=e.height;m<i;m++)p.push(f);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),p)}return!!(c||u)}function K0(t,e,n,r,o,i,a,s){if(a==0||a==e.height)return!1;let l=!1;for(let c=o;c<i;c++){const u=a*e.width+c,d=e.map[u];if(e.map[u-e.width]==d){l=!0;const f=n.nodeAt(d),{top:p,left:m}=e.findCell(d);t.setNodeMarkup(t.mapping.slice(s).map(d+r),null,{...f.attrs,rowspan:a-p}),t.insert(t.mapping.slice(s).map(e.positionAt(a,m,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-a})),c+=f.attrs.colspan-1}}return l}function G0(t,e,n,r,o,i,a,s){if(a==0||a==e.width)return!1;let l=!1;for(let c=o;c<i;c++){const u=c*e.width+a,d=e.map[u];if(e.map[u-1]==d){l=!0;const f=n.nodeAt(d),p=e.colCount(d),m=t.mapping.slice(s).map(d+r);t.setNodeMarkup(m,null,Oi(f.attrs,a-p,f.attrs.colspan-(a-p))),t.insert(m+f.nodeSize,f.type.createAndFill(Oi(f.attrs,0,a-p))),c+=f.attrs.rowspan-1}}return l}function U0(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let a=an.get(i);const{top:s,left:l}=r,c=l+o.width,u=s+o.height,d=t.tr;let f=0;function p(){if(i=n?d.doc.nodeAt(n-1):d.doc,!i)throw new Error("No table found");a=an.get(i),f=d.mapping.maps.length}X5(d,a,i,n,c,u,f)&&p(),K0(d,a,i,n,l,c,s,f)&&p(),K0(d,a,i,n,l,c,u,f)&&p(),G0(d,a,i,n,s,u,l,f)&&p(),G0(d,a,i,n,s,u,c,f)&&p();for(let m=s;m<u;m++){const g=a.positionAt(m,l,i),v=a.positionAt(m,c,i);d.replace(d.mapping.slice(f).map(g+n),d.mapping.slice(f).map(v+n),new Me(o.rows[m-s],0,0))}p(),d.setSelection(new Gt(d.doc.resolve(n+a.positionAt(s,l,i)),d.doc.resolve(n+a.positionAt(u-1,c-1,i)))),e(d)}var Y5=$h({ArrowLeft:fl("horiz",-1),ArrowRight:fl("horiz",1),ArrowUp:fl("vert",-1),ArrowDown:fl("vert",1),"Shift-ArrowLeft":hl("horiz",-1),"Shift-ArrowRight":hl("horiz",1),"Shift-ArrowUp":hl("vert",-1),"Shift-ArrowDown":hl("vert",1),Backspace:dl,"Mod-Backspace":dl,Delete:dl,"Mod-Delete":dl});function Dl(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function fl(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof Gt)return Dl(n,r,it.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const a=Mw(o,t,e);if(a==null)return!1;if(t=="horiz")return Dl(n,r,it.near(n.doc.resolve(i.head+e),e));{const s=n.doc.resolve(a),l=Cw(s,t,e);let c;return l?c=it.near(l,1):e<0?c=it.near(n.doc.resolve(s.before(-1)),-1):c=it.near(n.doc.resolve(s.after(-1)),1),Dl(n,r,c)}}}function hl(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let a;if(i instanceof Gt)a=i;else{const l=Mw(o,t,e);if(l==null)return!1;a=new Gt(n.doc.resolve(l))}const s=Cw(a.$headCell,t,e);return s?Dl(n,r,new Gt(a.$anchorCell,s)):!1}}function J5(t,e){const n=t.state.doc,r=Oa(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Gt(r))),!0):!1}function Z5(t,e,n){if(!Br(t.state))return!1;let r=K5(n);const o=t.state.selection;if(o instanceof Gt){r||(r={width:1,height:1,rows:[fe.from(ch(Fn(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),s=an.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=U5(r,s.right-s.left,s.bottom-s.top),U0(t.state,t.dispatch,a,s,r),!0}else if(r){const i=uu(t.state),a=i.start(-1);return U0(t.state,t.dispatch,a,an.get(i.node(-1)).findCell(i.pos-a),r),!0}else return!1}function Q5(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=X0(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof Gt)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=Oa(t.state.selection.$anchor))!=null&&((n=Sd(t,e))==null?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(l,c){let u=Sd(t,c);const d=Io.getState(t.state)==null;if(!u||!Hp(l,u))if(d)u=l;else return;const f=new Gt(l,u);if(d||!t.state.selection.eq(f)){const p=t.state.tr.setSelection(f);d&&p.setMeta(Io,l.pos),t.dispatch(p)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",s),Io.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Io,-1))}function s(l){const c=l,u=Io.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(X0(t,c.target)!=r&&(d=Sd(t,e),!d))return a();d&&i(d,c)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",s)}function Mw(t,e,n){if(!(t.state.selection instanceof rt))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const s=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?s:null}}return null}function X0(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Sd(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Oa(t.state.doc.resolve(n.pos)):null}var e4=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),uh(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,uh(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function uh(t,e,n,r,o,i){var a;let s=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){const{colspan:p,colwidth:m}=u.child(d).attrs;for(let g=0;g<p;g++,f++){const v=o==f?i:m&&m[g],b=v?v+"px":"";if(s+=v||r,v||(l=!1),c)c.style.width!=b&&(c.style.width=b),c=c.nextSibling;else{const y=document.createElement("col");y.style.width=b,e.appendChild(y)}}}for(;c;){const d=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=d}l?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}var sr=new fr("tableColumnResizing");function t4({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=e4,lastColumnResizable:o=!0}={}){const i=new Vn({key:sr,state:{init(a,s){var l,c;const u=(c=(l=i.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,d=Fn(s.schema).table.name;return r&&u&&(u[d]=(f,p)=>new r(f,n,p)),new n4(-1,!1)},apply(a,s){return s.apply(a)}},props:{attributes:a=>{const s=sr.getState(a);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,s)=>{r4(a,s,t,o)},mouseleave:a=>{o4(a)},mousedown:(a,s)=>{i4(a,s,e,n)}},decorations:a=>{const s=sr.getState(a);if(s&&s.activeHandle>-1)return u4(a,s.activeHandle)},nodeViews:{}}});return i}var n4=class _l{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(sr);if(r&&r.setHandle!=null)return new _l(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new _l(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return lh(e.doc.resolve(o))||(o=-1),new _l(o,n.dragging)}return n}};function r4(t,e,n,r){if(!t.editable)return;const o=sr.getState(t.state);if(o&&!o.dragging){const i=s4(e.target);let a=-1;if(i){const{left:s,right:l}=i.getBoundingClientRect();e.clientX-s<=n?a=Y0(t,e,"left",n):l-e.clientX<=n&&(a=Y0(t,e,"right",n))}if(a!=o.activeHandle){if(!r&&a!==-1){const s=t.state.doc.resolve(a),l=s.node(-1),c=an.get(l),u=s.start(-1);if(c.colCount(s.pos-u)+s.nodeAfter.attrs.colspan-1==c.width-1)return}Nw(t,a)}}}function o4(t){if(!t.editable)return;const e=sr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Nw(t,-1)}function i4(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!=null?o:window,a=sr.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const s=t.state.doc.nodeAt(a.activeHandle),l=a4(t,a.activeHandle,s.attrs);t.dispatch(t.state.tr.setMeta(sr,{setDragging:{startX:e.clientX,startWidth:l}}));function c(d){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",u);const f=sr.getState(t.state);f!=null&&f.dragging&&(l4(t,f.activeHandle,J0(f.dragging,d,n)),t.dispatch(t.state.tr.setMeta(sr,{setDragging:null})))}function u(d){if(!d.which)return c(d);const f=sr.getState(t.state);if(f&&f.dragging){const p=J0(f.dragging,d,n);Z0(t,f.activeHandle,p,r)}}return Z0(t,a.activeHandle,l,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",u),e.preventDefault(),!0}function a4(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let c=0;c<n;c++)r[c]&&(s-=r[c],l--);return s/l}function s4(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Y0(t,e,n,r){const o=n=="right"?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:a}=i,s=Oa(t.state.doc.resolve(a));if(!s)return-1;if(n=="right")return s.pos;const l=an.get(s.node(-1)),c=s.start(-1),u=l.map.indexOf(s.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function J0(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Nw(t,e){t.dispatch(t.state.tr.setMeta(sr,{setHandle:e}))}function l4(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=an.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<i.height;c++){const u=c*i.width+s;if(c&&i.map[u]==i.map[u-i.width])continue;const d=i.map[u],f=o.nodeAt(d).attrs,p=f.colspan==1?0:s-i.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;const m=f.colwidth?f.colwidth.slice():c4(f.colspan);m[p]=n,l.setNodeMarkup(a+d,null,{...f,colwidth:m})}l.docChanged&&t.dispatch(l)}function Z0(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),a=o.start(-1),s=an.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;let l=t.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&uh(i,l.firstChild,l,r,s,n)}function c4(t){return Array(t).fill(0)}function u4(t,e){var n;const r=[],o=t.doc.resolve(e),i=o.node(-1);if(!i)return rn.empty;const a=an.get(i),s=o.start(-1),l=a.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const u=l+c*a.width;if((l==a.width-1||a.map[u]!=a.map[u+1])&&(c==0||a.map[u]!=a.map[u-a.width])){const d=a.map[u],f=s+d+i.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",(n=sr.getState(t))!=null&&n.dragging&&r.push(Wn.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),r.push(Wn.widget(f,p))}}return rn.create(t.doc,r)}function d4({allowTableNodeSelection:t=!1}={}){return new Vn({key:Io,state:{init(){return null},apply(e,n){const r=e.getMeta(Io);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:i}=e.mapping.mapResult(n);return o?null:i}},props:{decorations:E5,handleDOMEvents:{mousedown:Q5},createSelectionBetween(e){return Io.getState(e.state)!=null?e.state.selection:null},handleTripleClick:J5,handleKeyDown:Y5,handlePaste:Z5},appendTransaction(e,n,r){return M5(r,Ew(r,n),t)}})}function dh(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Q0(t,e,n,r,o,i){var a;let s=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u!==null)for(let d=0,f=0;d<u.childCount;d+=1){const{colspan:p,colwidth:m}=u.child(d).attrs;for(let g=0;g<p;g+=1,f+=1){const v=o===f?i:m&&m[g],b=v?`${v}px`:"";if(s+=v||r,v||(l=!1),c){if(c.style.width!==b){const[y,C]=dh(r,v);c.style.setProperty(y,C)}c=c.nextSibling}else{const y=document.createElement("col"),[C,S]=dh(r,v);y.style.setProperty(C,S),e.appendChild(y)}}}for(;c;){const d=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=d}l?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}class f4{constructor(e,n){this.node=e,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Q0(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,Q0(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function h4(t,e,n,r){let o=0,i=!0;const a=[],s=t.firstChild;if(!s)return{};for(let d=0,f=0;d<s.childCount;d+=1){const{colspan:p,colwidth:m}=s.child(d).attrs;for(let g=0;g<p;g+=1,f+=1){const v=n===f?r:m&&m[g];o+=v||e,v||(i=!1);const[b,y]=dh(e,v);a.push(["col",{style:`${b}: ${y}`}])}}const l=i?`${o}px`:"",c=i?"":`${o}px`;return{colgroup:["colgroup",{},...a],tableWidth:l,tableMinWidth:c}}function eb(t,e){return t.createAndFill()}function p4(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function m4(t,e,n,r,o){const i=p4(t),a=[],s=[];for(let c=0;c<n;c+=1){const u=eb(i.cell);if(u&&s.push(u),r){const d=eb(i.header_cell);d&&a.push(d)}}const l=[];for(let c=0;c<e;c+=1)l.push(i.row.createChecked(null,r&&c===0?a:s));return i.table.createChecked(null,l)}function g4(t){return t instanceof Gt}const pl=({editor:t})=>{const{selection:e}=t.state;if(!g4(e))return!1;let n=0;const r=Ky(e.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},v4=sn.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:f4,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=h4(t,this.options.cellMinWidth);return["table",Ft(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const a=m4(i.schema,t,e,n);if(o){const s=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(rt.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>I5(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>P5(t,e),deleteColumn:()=>({state:t,dispatch:e})=>A5(t,e),addRowBefore:()=>({state:t,dispatch:e})=>D5(t,e),addRowAfter:()=>({state:t,dispatch:e})=>_5(t,e),deleteRow:()=>({state:t,dispatch:e})=>B5(t,e),deleteTable:()=>({state:t,dispatch:e})=>q5(t,e),mergeCells:()=>({state:t,dispatch:e})=>H0(t,e),splitCell:()=>({state:t,dispatch:e})=>V0(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Cs("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Cs("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>V5(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>H0(t,e)?!0:V0(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>F5(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>q0(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>q0(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Ew(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Gt.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:pl,"Mod-Backspace":pl,Delete:pl,"Mod-Delete":pl}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[t4({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],d4({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:mt(Je(t,"tableRole",e))}}}),b4=sn.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Ft(this.options.HTMLAttributes,t),0]}}),y4=sn.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Ft(this.options.HTMLAttributes,t),0]}}),C4=sn.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Ft(this.options.HTMLAttributes,t),0]}}),S4=/^\s*(\[([( |x])?\])\s$/,x4=sn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Ft(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),a=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",c=>c.preventDefault()),s.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:u}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:d})=>{const f=n();if(typeof f!="number")return!1;const p=d.doc.nodeAt(f);return d.setNodeMarkup(f,void 0,{...p==null?void 0:p.attrs,checked:u}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,u)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,u])=>{o.setAttribute(c,u)}),o.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,i.append(s,a),o.append(i,l),Object.entries(e).forEach(([c,u])=>{o.setAttribute(c,u)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,s.checked=c.attrs.checked,!0)}}},addInputRules(){return[ca({find:S4,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),w4=sn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Ft(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),E4=kn.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),$4=Zr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),O4=/^\s*>\s$/,M4=sn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[ca({find:O4,type:this.type})]}}),N4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,R4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,I4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,P4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,T4=Zr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[xi({find:N4,type:this.type}),xi({find:I4,type:this.type})]},addPasteRules(){return[wi({find:R4,type:this.type}),wi({find:P4,type:this.type})]}}),A4="listItem",tb="textStyle",nb=/^\s*([-+*])\s$/,k4=sn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(A4,this.editor.getAttributes(tb)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=ca({find:nb,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=ca({find:nb,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(tb),editor:this.editor})),[t]}}),D4=/(^|[^`])`([^`]+)`(?!`)/,_4=/(^|[^`])`([^`]+)`(?!`)/g,j4=Zr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[xi({find:D4,type:this.type})]},addPasteRules(){return[wi({find:_4,type:this.type})]}}),B4=/^```([a-z]+)?[\s\n]$/,z4=/^~~~([a-z]+)?[\s\n]$/,L4=sn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,i=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Ft(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
595
+ `,children:o})});return oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:flex-wrap ce:items-center ce:gap-2 ce:p-2 ce:border-b ce:border-gray-200 ce:rounded-t-lg ce:bg-gray-50",children:[oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(oe.jsxRuntimeExports.jsx(oV,{size:16}),()=>t.chain().focus().toggleBold().run(),t.isActive("bold"),!1,"Bold"),r(oe.jsxRuntimeExports.jsx(CV,{size:16}),()=>t.chain().focus().toggleItalic().run(),t.isActive("italic"),!1,"Italic"),r(oe.jsxRuntimeExports.jsx(YV,{size:16}),()=>t.chain().focus().toggleUnderline().run(),t.isActive("underline"),!1,"Underline"),r(oe.jsxRuntimeExports.jsx(LV,{size:16}),()=>t.chain().focus().toggleStrike().run(),t.isActive("strike"),!1,"Strikethrough"),r(oe.jsxRuntimeExports.jsx(lV,{size:16}),()=>t.chain().focus().toggleCode().run(),t.isActive("code"),!1,"Code"),r(oe.jsxRuntimeExports.jsx(HV,{size:16}),()=>t.chain().focus().toggleSubscript().run(),t.isActive("subscript"),!1,"Subscript"),r(oe.jsxRuntimeExports.jsx(WV,{size:16}),()=>t.chain().focus().toggleSuperscript().run(),t.isActive("superscript"),!1,"Superscript")]}),oe.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),oe.jsxRuntimeExports.jsx(n5,{editor:t}),oe.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(oe.jsxRuntimeExports.jsx(eV,{size:16}),()=>t.chain().focus().setTextAlign("left").run(),t.isActive({textAlign:"left"}),!1,"Align Left"),r(oe.jsxRuntimeExports.jsx(YH,{size:16}),()=>t.chain().focus().setTextAlign("center").run(),t.isActive({textAlign:"center"}),!1,"Align Center"),r(oe.jsxRuntimeExports.jsx(nV,{size:16}),()=>t.chain().focus().setTextAlign("right").run(),t.isActive({textAlign:"right"}),!1,"Align Right"),r(oe.jsxRuntimeExports.jsx(ZH,{size:16}),()=>t.chain().focus().setTextAlign("justify").run(),t.isActive({textAlign:"justify"}),!1,"Align Justify")]}),oe.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(oe.jsxRuntimeExports.jsx(OV,{size:16}),()=>t.chain().focus().toggleBulletList().run(),t.isActive("bulletList"),!1,"Bullet List"),r(oe.jsxRuntimeExports.jsx(EV,{size:16}),()=>t.chain().focus().toggleOrderedList().run(),t.isActive("orderedList"),!1,"Ordered List"),r(oe.jsxRuntimeExports.jsx(BV,{size:16}),()=>t.chain().focus().toggleTaskList().run(),t.isActive("taskList"),!1,"Task List")]}),oe.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(oe.jsxRuntimeExports.jsx(kV,{size:16}),()=>t.chain().focus().toggleBlockquote().run(),t.isActive("blockquote"),!1,"Blockquote"),oe.jsxRuntimeExports.jsx(i5,{editor:t,buttonClass:e,activeClass:n}),r(oe.jsxRuntimeExports.jsx(NV,{size:16}),()=>t.chain().focus().setHorizontalRule().run(),!1,!1,"Horizontal Rule"),r(oe.jsxRuntimeExports.jsx(uV,{size:16}),()=>t.chain().focus().setHardBreak().run(),!1,!1,"Line Break")]}),oe.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(oe.jsxRuntimeExports.jsx(ZV,{size:16}),()=>t.chain().focus().undo().run(),!1,!t.can().chain().focus().undo().run()),r(oe.jsxRuntimeExports.jsx(_V,{size:16}),()=>t.chain().focus().redo().run(),!1,!t.can().chain().focus().redo().run())]}),oe.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),r(oe.jsxRuntimeExports.jsx(bV,{size:16}),()=>{const o=prompt("Enter the image URL");o&&t.chain().focus().insertContent({type:"image",attrs:{src:o,width:50,height:50,marginLeft:0,marginRight:0}}).run()},!1,!1,"Insert Image"),oe.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),oe.jsxRuntimeExports.jsx(t5,{editor:t}),oe.jsxRuntimeExports.jsx("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"}),oe.jsxRuntimeExports.jsx(a5,{editor:t})]})}const l5=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,o;const i=n.getAttribute("style"),a=(o=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||o===void 0?void 0:o.getAttribute("style");n.setAttribute("style",`${a};${i}`)})},L0=Zr.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&l5(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(o=>o.type===this.type).some(o=>Object.values(o.attrs).some(i=>!!i))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),c5=kn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),u5=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,d5=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,f5=Zr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[xi({find:u5,type:this.type})]},addPasteRules(){return[wi({find:d5,type:this.type})]}}),yw=sn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ft(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),h5=Zr.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),p5=Zr.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});var ah,sh;if(typeof WeakMap<"u"){let t=new WeakMap;ah=e=>t.get(e),sh=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;ah=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},sh=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var an=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,a=o+1;for(let s=1;i<this.width&&this.map[e+s]==n;s++)i++;for(let s=1;a<this.height&&this.map[e+this.width*s]==n;s++)a++;return{left:r,top:o,right:i,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:a==this.height)?null:this.map[r+this.width*(n<0?i-1:a)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:a,right:s,top:l,bottom:c}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(o,l),right:Math.max(r,s),bottom:Math.max(i,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,!(o==t.left&&o&&this.map[i-1]==a||r==t.top&&r&&this.map[i-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let a=e+t*this.width;const s=(t+1)*this.width;for(;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}}static get(t){return ah(t)||sh(t,m5(t))}};function m5(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=g5(t),n=t.childCount,r=[];let o=0,i=null;const a=[];for(let c=0,u=e*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const d=t.child(c);u++;for(let m=0;;m++){for(;o<r.length&&r[o]!=0;)o++;if(m==d.childCount)break;const g=d.child(m),{colspan:v,rowspan:b,colwidth:y}=g.attrs;for(let C=0;C<b;C++){if(C+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:b-C});break}const S=o+C*e;for(let x=0;x<v;x++){r[S+x]==0?r[S+x]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:v-x});const w=y&&y[x];if(w){const $=(S+x)%e*2,R=a[$];R==null||R!=w&&a[$+1]==1?(a[$]=w,a[$+1]=1):R==w&&a[$+1]++}}}o+=v,u+=g.nodeSize}const f=(c+1)*e;let p=0;for(;o<f;)r[o++]==0&&p++;p&&(i||(i=[])).push({type:"missing",row:c,n:p}),u++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const s=new an(e,n,r,i);let l=!1;for(let c=0;!l&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(l=!0);return l&&v5(s,a,t),s}function g5(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let a=0;a<r;a++){const s=t.child(a);for(let l=0;l<s.childCount;l++){const c=s.child(l);a+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}}for(let a=0;a<o.childCount;a++){const s=o.child(a);i+=s.attrs.colspan,s.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function v5(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;r[i]=!0;const a=n.nodeAt(i);if(!a)throw new RangeError(`No cell with offset ${i} found`);let s=null;const l=a.attrs;for(let c=0;c<l.colspan;c++){const u=(o+c)%t.width,d=e[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((s||(s=b5(l)))[c]=d)}s&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}function b5(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Fn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}var Io=new fr("selectingCells");function Oa(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function y5(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function Br(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function uu(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Oa(e.$head)||C5(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function C5(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function lh(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function S5(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Hp(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Cw(t,e,n){const r=t.node(-1),o=an.get(r),i=t.start(-1),a=o.nextCell(t.pos-i,e,n);return a==null?null:t.node(0).resolve(i+a)}function Oi(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function Sw(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function x5(t,e,n){const r=Fn(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var Gt=class io extends it{constructor(e,n=e){const r=e.node(-1),o=an.get(r),i=e.start(-1),a=o.rectBetween(e.pos-i,n.pos-i),s=e.node(0),l=o.cellsInRect(a).filter(u=>u!=n.pos-i);l.unshift(n.pos-i);const c=l.map(u=>{const d=r.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const f=i+u+1;return new Fb(s.resolve(f),s.resolve(f+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(lh(r)&&lh(o)&&Hp(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?io.rowSelection(r,o):i&&this.isColSelection()?io.colSelection(r,o):new io(r,o)}return rt.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=an.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},a=[];for(let l=o.top;l<o.bottom;l++){const c=[];for(let u=l*n.width+o.left,d=o.left;d<o.right;d++,u++){const f=n.map[u];if(i[f])continue;i[f]=!0;const p=n.findCell(f);let m=e.nodeAt(f);if(!m)throw RangeError(`No cell with offset ${f} found`);const g=o.left-p.left,v=p.right-o.right;if(g>0||v>0){let b=m.attrs;if(g>0&&(b=Oi(b,0,g)),v>0&&(b=Oi(b,b.colspan-v,v)),p.left<o.left){if(m=m.type.createAndFill(b),!m)throw RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else m=m.type.create(b,m.content)}if(p.top<o.top||p.bottom>o.bottom){const b={...m.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top<o.top?m=m.type.createAndFill(b):m=m.type.create(b,m.content)}c.push(m)}a.push(e.child(l).copy(fe.from(c)))}const s=this.isColSelection()&&this.isRowSelection()?e:a;return new Me(fe.from(s),1,1)}replace(e,n=Me.empty){const r=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){const{$from:s,$to:l}=o[a],c=e.mapping.slice(r);e.replace(c.map(s.pos),c.map(l.pos),a?Me.empty:n)}const i=it.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Me(fe.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=an.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let a=0;a<i.length;a++)e(n.nodeAt(i[a]),o+i[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=an.get(r),i=e.start(-1),a=o.findCell(e.pos-i),s=o.findCell(n.pos-i),l=e.node(0);return a.top<=s.top?(a.top>0&&(e=l.resolve(i+o.map[a.left])),s.bottom<o.height&&(n=l.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))):(s.top>0&&(n=l.resolve(i+o.map[s.left])),a.bottom<o.height&&(e=l.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))),new io(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=an.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(o,i)>0)return!1;const a=o+this.$anchorCell.nodeAfter.attrs.colspan,s=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,s)==n.width}eq(e){return e instanceof io&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=an.get(r),i=e.start(-1),a=o.findCell(e.pos-i),s=o.findCell(n.pos-i),l=e.node(0);return a.left<=s.left?(a.left>0&&(e=l.resolve(i+o.map[a.top*o.width])),s.right<o.width&&(n=l.resolve(i+o.map[o.width*(s.top+1)-1]))):(s.left>0&&(n=l.resolve(i+o.map[s.top*o.width])),a.right<o.width&&(e=l.resolve(i+o.map[o.width*(a.top+1)-1]))),new io(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new io(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new io(e.resolve(n),e.resolve(r))}getBookmark(){return new w5(this.$anchorCell.pos,this.$headCell.pos)}};Gt.prototype.visible=!1;it.jsonID("cell",Gt);var w5=class xw{constructor(e,n){this.anchor=e,this.head=n}map(e){return new xw(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Hp(n,r)?new Gt(n,r):it.near(r,1)}};function E5(t){if(!(t.selection instanceof Gt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Wn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),rn.create(t.doc,e)}function $5({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function O5({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=e.depth;o>0;o--){const i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&e.parentOffset===0}function M5(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,a;if(r instanceof tt&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")i=Gt.create(o,r.from);else if(a=="row"){const s=o.resolve(r.from+1);i=Gt.rowSelection(s,s)}else if(!n){const s=an.get(r.node),l=r.from+1,c=l+s.map[s.width*s.height-1];i=Gt.create(o,l+1,c)}}else r instanceof rt&&$5(r)?i=rt.create(o,r.from):r instanceof rt&&O5(r)&&(i=rt.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var N5=new fr("fix-tables");function ww(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let a=0,s=0;a<i;a++){const l=e.child(a);for(let c=s,u=Math.min(o,a+3);c<u;c++)if(t.child(c)==l){s=c+1,n+=l.nodeSize;continue e}r(l,n),s<o&&t.child(s).sameMarkup(l)?ww(t.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function Ew(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=R5(t,o,i,n))};return e?e.doc!=t.doc&&ww(e.doc,t.doc,0,r):t.doc.descendants(r),n}function R5(t,e,n,r){const o=an.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let l=0;l<o.height;l++)i.push(0);for(let l=0;l<o.problems.length;l++){const c=o.problems[l];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const d=u.attrs;for(let f=0;f<d.rowspan;f++)i[c.row+f]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Oi(d,d.colspan-c.n,c.n))}else if(c.type=="missing")i[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const u=r.mapping.map(n);r.delete(u,u+e.nodeSize)}}let a,s;for(let l=0;l<i.length;l++)i[l]&&(a==null&&(a=l),s=l);for(let l=0,c=n+1;l<o.height;l++){const u=e.child(l),d=c+u.nodeSize,f=i[l];if(f>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const m=[];for(let v=0;v<f;v++){const b=Fn(t.schema)[p].createAndFill();b&&m.push(b)}const g=(l==0||a==l-1)&&s==l?c+1:d-1;r.insert(r.mapping.map(g),m)}c=d}return r.setMeta(N5,{fixTables:!0})}function no(t){const e=t.selection,n=uu(t),r=n.node(-1),o=n.start(-1),i=an.get(r);return{...e instanceof Gt?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function $w(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;x5(e,r,o+i)&&(i=o==0||o==e.width?null:0);for(let a=0;a<e.height;a++){const s=a*e.width+o;if(o>0&&o<e.width&&e.map[s-1]==e.map[s]){const l=e.map[s],c=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,Sw(c.attrs,o-e.colCount(l))),a+=c.attrs.rowspan-1}else{const l=i==null?Fn(r.type.schema).cell:r.nodeAt(e.map[s+i]).type,c=e.positionAt(a,o,r);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function I5(t,e){if(!Br(t))return!1;if(e){const n=no(t);e($w(t.tr,n,n.left))}return!0}function P5(t,e){if(!Br(t))return!1;if(e){const n=no(t);e($w(t.tr,n,n.right))}return!0}function T5(t,{map:e,table:n,tableStart:r},o){const i=t.mapping.maps.length;for(let a=0;a<e.height;){const s=a*e.width+o,l=e.map[s],c=n.nodeAt(l),u=c.attrs;if(o>0&&e.map[s-1]==l||o<e.width-1&&e.map[s+1]==l)t.setNodeMarkup(t.mapping.slice(i).map(r+l),null,Oi(u,o-e.colCount(l)));else{const d=t.mapping.slice(i).map(r+l);t.delete(d,d+c.nodeSize)}a+=u.rowspan}}function A5(t,e){if(!Br(t))return!1;if(e){const n=no(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;T5(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=an.get(i)}e(r)}return!0}function k5(t,e,n){var r;const o=Fn(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))==null?void 0:r.type)!=o)return!1;return!0}function Ow(t,{map:e,tableStart:n,table:r},o){var i;let a=n;for(let c=0;c<o;c++)a+=r.child(c).nodeSize;const s=[];let l=o>0?-1:0;k5(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let c=0,u=e.width*o;c<e.width;c++,u++)if(o>0&&o<e.height&&e.map[u]==e.map[u-e.width]){const d=e.map[u],f=r.nodeAt(d).attrs;t.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),c+=f.colspan-1}else{const d=l==null?Fn(r.type.schema).cell:(i=r.nodeAt(e.map[u+l*e.width]))==null?void 0:i.type,f=d==null?void 0:d.createAndFill();f&&s.push(f)}return t.insert(a,Fn(r.type.schema).row.create(null,s)),t}function D5(t,e){if(!Br(t))return!1;if(e){const n=no(t);e(Ow(t.tr,n,n.top))}return!0}function _5(t,e){if(!Br(t))return!1;if(e){const n=no(t);e(Ow(t.tr,n,n.bottom))}return!0}function j5(t,{map:e,table:n,tableStart:r},o){let i=0;for(let c=0;c<o;c++)i+=n.child(c).nodeSize;const a=i+n.child(o).nodeSize,s=t.mapping.maps.length;t.delete(i+r,a+r);const l=new Set;for(let c=0,u=o*e.width;c<e.width;c++,u++){const d=e.map[u];if(!l.has(d)){if(l.add(d),o>0&&d==e.map[u-e.width]){const f=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(s).map(d+r),null,{...f,rowspan:f.rowspan-1}),c+=f.colspan-1}else if(o<e.height&&d==e.map[u+e.width]){const f=n.nodeAt(d),p=f.attrs,m=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=e.positionAt(o+1,c,n);t.insert(t.mapping.slice(s).map(r+g),m),c+=p.colspan-1}}}}function B5(t,e){if(!Br(t))return!1;if(e){const n=no(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;j5(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=an.get(n.table)}e(r)}return!0}function F0(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function z5({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,a=(r.bottom-1)*t+r.left,s=o+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[i]==n[i-1]||r.right<t&&n[s]==n[s+1])return!0;i+=t,s+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[a]==n[a+t])return!0;o++,a++}return!1}function H0(t,e){const n=t.selection;if(!(n instanceof Gt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=no(t),{map:o}=r;if(z5(o,r))return!1;if(e){const i=t.tr,a={};let s=fe.empty,l,c;for(let u=r.top;u<r.bottom;u++)for(let d=r.left;d<r.right;d++){const f=o.map[u*o.width+d],p=r.table.nodeAt(f);if(!(a[f]||!p))if(a[f]=!0,l==null)l=f,c=p;else{F0(p)||(s=s.append(p.content));const m=i.mapping.map(f+r.tableStart);i.delete(m,m+p.nodeSize)}}if(l==null||c==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{...Sw(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),s.size){const u=l+1+c.content.size,d=F0(c)?l+1:u;i.replaceWith(d+r.tableStart,u+r.tableStart,s)}i.setSelection(new Gt(i.doc.resolve(l+r.tableStart))),e(i)}return!0}function V0(t,e){const n=Fn(t.schema);return L5(({node:r})=>n[r.type.spec.tableRole])(t,e)}function L5(t){return(e,n)=>{var r;const o=e.selection;let i,a;if(o instanceof Gt){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(i=y5(o.$from),!i)return!1;a=(r=Oa(o.$from))==null?void 0:r.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let s=i.attrs;const l=[],c=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const u=no(e),d=e.tr;for(let p=0;p<u.right-u.left;p++)l.push(c?{...s,colwidth:c&&c[p]?[c[p]]:null}:s);let f;for(let p=u.top;p<u.bottom;p++){let m=u.map.positionAt(p,u.left,u.table);p==u.top&&(m+=i.nodeSize);for(let g=u.left,v=0;g<u.right;g++,v++)g==u.left&&p==u.top||d.insert(f=d.mapping.map(m+u.tableStart,1),t({node:i,row:p,col:g}).createAndFill(l[v]))}d.setNodeMarkup(a,t({node:i,row:u.top,col:u.left}),l[0]),o instanceof Gt&&d.setSelection(new Gt(d.doc.resolve(o.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function F5(t,e){return function(n,r){if(!Br(n))return!1;const o=uu(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof Gt?n.selection.forEachCell((a,s)=>{a.attrs[t]!==e&&i.setNodeMarkup(s,null,{...a.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function H5(t){return function(e,n){if(!Br(e))return!1;if(n){const r=Fn(e.schema),o=no(e),i=e.tr,a=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=a.map(l=>o.table.nodeAt(l));for(let l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(i.steps.length==0)for(let l=0;l<a.length;l++)i.setNodeMarkup(o.tableStart+a[l],r.header_cell,s[l].attrs);n(i)}return!0}}function W0(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function Cs(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?H5(t):function(n,r){if(!Br(n))return!1;if(r){const o=Fn(n.schema),i=no(n),a=n.tr,s=W0("row",i,o),l=W0("column",i,o),u=(t==="column"?s:t==="row"?l:!1)?1:0,d=t=="column"?{left:0,top:u,right:1,bottom:i.map.height}:t=="row"?{left:u,top:0,right:i.map.width,bottom:1}:i,f=t=="column"?l?o.cell:o.header_cell:t=="row"?s?o.cell:o.header_cell:o.cell;i.map.cellsInRect(d).forEach(p=>{const m=p+i.tableStart,g=a.doc.nodeAt(m);g&&a.setNodeMarkup(m,f,g.attrs)}),r(a)}return!0}}Cs("row",{useDeprecatedLogic:!0});Cs("column",{useDeprecatedLogic:!0});var V5=Cs("cell",{useDeprecatedLogic:!0});function W5(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const i=t.node(-1).child(r),a=i.lastChild;if(a)return o-1-a.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function q0(t){return function(e,n){if(!Br(e))return!1;const r=W5(uu(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(rt.between(o,S5(o))).scrollIntoView())}return!0}}function q5(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function dl(t,e){const n=t.selection;if(!(n instanceof Gt))return!1;if(e){const r=t.tr,o=Fn(t.schema).cell.createAndFill().content;n.forEachCell((i,a)=>{i.content.eq(o)||r.replace(r.mapping.map(a+1),r.mapping.map(a+i.nodeSize-1),new Me(o,0,0))}),r.docChanged&&e(r)}return!0}function K5(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,a=o.type.schema,s=[];if(i=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const u=l?0:Math.max(0,n-1),d=l<e.childCount-1?0:Math.max(0,r-1);(u||d)&&(c=ch(Fn(a).row,new Me(c,u,d)).content),s.push(c)}else if(i=="cell"||i=="header_cell")s.push(n||r?ch(Fn(a).row,new Me(e,n,r)).content:e);else return null;return G5(a,s)}function G5(t,e){const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(let a=i.childCount-1;a>=0;a--){const{rowspan:s,colspan:l}=i.child(a).attrs;for(let c=o;c<o+s;c++)n[c]=(n[c]||0)+l}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(fe.empty),n[o]<r){const i=Fn(t).cell.createAndFill(),a=[];for(let s=n[o];s<r;s++)a.push(i);e[o]=e[o].append(fe.from(a))}return{height:e.length,width:r,rows:e}}function ch(t,e){const n=t.createAndFill();return new Lb(n).replace(0,n.content.size,e).doc}function U5({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],a=[];for(let s=0;s<n.length;s++){const l=n[s],c=[];for(let u=i[s]||0,d=0;u<r;d++){let f=l.child(d%l.childCount);u+f.attrs.colspan>r&&(f=f.type.createChecked(Oi(f.attrs,f.attrs.colspan,u+f.attrs.colspan-r),f.content)),c.push(f),u+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)i[s+p]=(i[s+p]||0)+f.attrs.colspan}a.push(fe.from(c))}n=a,t=r}if(e!=o){const i=[];for(let a=0,s=0;a<o;a++,s++){const l=[],c=n[s%e];for(let u=0;u<c.childCount;u++){let d=c.child(u);a+d.attrs.rowspan>o&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}i.push(fe.from(l))}n=i,e=o}return{width:t,height:e,rows:n}}function X5(t,e,n,r,o,i,a){const s=t.doc.type.schema,l=Fn(s);let c,u;if(o>e.width)for(let d=0,f=0;d<e.height;d++){const p=n.child(d);f+=p.nodeSize;const m=[];let g;p.lastChild==null||p.lastChild.type==l.cell?g=c||(c=l.cell.createAndFill()):g=u||(u=l.header_cell.createAndFill());for(let v=e.width;v<o;v++)m.push(g);t.insert(t.mapping.slice(a).map(f-1+r),m)}if(i>e.height){const d=[];for(let m=0,g=(e.height-1)*e.width;m<Math.max(e.width,o);m++){const v=m>=e.width?!1:n.nodeAt(e.map[g+m]).type==l.header_cell;d.push(v?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const f=l.row.create(null,fe.from(d)),p=[];for(let m=e.height;m<i;m++)p.push(f);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),p)}return!!(c||u)}function K0(t,e,n,r,o,i,a,s){if(a==0||a==e.height)return!1;let l=!1;for(let c=o;c<i;c++){const u=a*e.width+c,d=e.map[u];if(e.map[u-e.width]==d){l=!0;const f=n.nodeAt(d),{top:p,left:m}=e.findCell(d);t.setNodeMarkup(t.mapping.slice(s).map(d+r),null,{...f.attrs,rowspan:a-p}),t.insert(t.mapping.slice(s).map(e.positionAt(a,m,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-a})),c+=f.attrs.colspan-1}}return l}function G0(t,e,n,r,o,i,a,s){if(a==0||a==e.width)return!1;let l=!1;for(let c=o;c<i;c++){const u=c*e.width+a,d=e.map[u];if(e.map[u-1]==d){l=!0;const f=n.nodeAt(d),p=e.colCount(d),m=t.mapping.slice(s).map(d+r);t.setNodeMarkup(m,null,Oi(f.attrs,a-p,f.attrs.colspan-(a-p))),t.insert(m+f.nodeSize,f.type.createAndFill(Oi(f.attrs,0,a-p))),c+=f.attrs.rowspan-1}}return l}function U0(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let a=an.get(i);const{top:s,left:l}=r,c=l+o.width,u=s+o.height,d=t.tr;let f=0;function p(){if(i=n?d.doc.nodeAt(n-1):d.doc,!i)throw new Error("No table found");a=an.get(i),f=d.mapping.maps.length}X5(d,a,i,n,c,u,f)&&p(),K0(d,a,i,n,l,c,s,f)&&p(),K0(d,a,i,n,l,c,u,f)&&p(),G0(d,a,i,n,s,u,l,f)&&p(),G0(d,a,i,n,s,u,c,f)&&p();for(let m=s;m<u;m++){const g=a.positionAt(m,l,i),v=a.positionAt(m,c,i);d.replace(d.mapping.slice(f).map(g+n),d.mapping.slice(f).map(v+n),new Me(o.rows[m-s],0,0))}p(),d.setSelection(new Gt(d.doc.resolve(n+a.positionAt(s,l,i)),d.doc.resolve(n+a.positionAt(u-1,c-1,i)))),e(d)}var Y5=$h({ArrowLeft:fl("horiz",-1),ArrowRight:fl("horiz",1),ArrowUp:fl("vert",-1),ArrowDown:fl("vert",1),"Shift-ArrowLeft":hl("horiz",-1),"Shift-ArrowRight":hl("horiz",1),"Shift-ArrowUp":hl("vert",-1),"Shift-ArrowDown":hl("vert",1),Backspace:dl,"Mod-Backspace":dl,Delete:dl,"Mod-Delete":dl});function Dl(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function fl(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof Gt)return Dl(n,r,it.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const a=Mw(o,t,e);if(a==null)return!1;if(t=="horiz")return Dl(n,r,it.near(n.doc.resolve(i.head+e),e));{const s=n.doc.resolve(a),l=Cw(s,t,e);let c;return l?c=it.near(l,1):e<0?c=it.near(n.doc.resolve(s.before(-1)),-1):c=it.near(n.doc.resolve(s.after(-1)),1),Dl(n,r,c)}}}function hl(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let a;if(i instanceof Gt)a=i;else{const l=Mw(o,t,e);if(l==null)return!1;a=new Gt(n.doc.resolve(l))}const s=Cw(a.$headCell,t,e);return s?Dl(n,r,new Gt(a.$anchorCell,s)):!1}}function J5(t,e){const n=t.state.doc,r=Oa(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Gt(r))),!0):!1}function Z5(t,e,n){if(!Br(t.state))return!1;let r=K5(n);const o=t.state.selection;if(o instanceof Gt){r||(r={width:1,height:1,rows:[fe.from(ch(Fn(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),s=an.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=U5(r,s.right-s.left,s.bottom-s.top),U0(t.state,t.dispatch,a,s,r),!0}else if(r){const i=uu(t.state),a=i.start(-1);return U0(t.state,t.dispatch,a,an.get(i.node(-1)).findCell(i.pos-a),r),!0}else return!1}function Q5(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=X0(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof Gt)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=Oa(t.state.selection.$anchor))!=null&&((n=Sd(t,e))==null?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(l,c){let u=Sd(t,c);const d=Io.getState(t.state)==null;if(!u||!Hp(l,u))if(d)u=l;else return;const f=new Gt(l,u);if(d||!t.state.selection.eq(f)){const p=t.state.tr.setSelection(f);d&&p.setMeta(Io,l.pos),t.dispatch(p)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",s),Io.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Io,-1))}function s(l){const c=l,u=Io.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(X0(t,c.target)!=r&&(d=Sd(t,e),!d))return a();d&&i(d,c)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",s)}function Mw(t,e,n){if(!(t.state.selection instanceof rt))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const s=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?s:null}}return null}function X0(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Sd(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Oa(t.state.doc.resolve(n.pos)):null}var e4=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),uh(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,uh(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function uh(t,e,n,r,o,i){var a;let s=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){const{colspan:p,colwidth:m}=u.child(d).attrs;for(let g=0;g<p;g++,f++){const v=o==f?i:m&&m[g],b=v?v+"px":"";if(s+=v||r,v||(l=!1),c)c.style.width!=b&&(c.style.width=b),c=c.nextSibling;else{const y=document.createElement("col");y.style.width=b,e.appendChild(y)}}}for(;c;){const d=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=d}l?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}var sr=new fr("tableColumnResizing");function t4({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=e4,lastColumnResizable:o=!0}={}){const i=new Vn({key:sr,state:{init(a,s){var l,c;const u=(c=(l=i.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,d=Fn(s.schema).table.name;return r&&u&&(u[d]=(f,p)=>new r(f,n,p)),new n4(-1,!1)},apply(a,s){return s.apply(a)}},props:{attributes:a=>{const s=sr.getState(a);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,s)=>{r4(a,s,t,o)},mouseleave:a=>{o4(a)},mousedown:(a,s)=>{i4(a,s,e,n)}},decorations:a=>{const s=sr.getState(a);if(s&&s.activeHandle>-1)return u4(a,s.activeHandle)},nodeViews:{}}});return i}var n4=class _l{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(sr);if(r&&r.setHandle!=null)return new _l(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new _l(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return lh(e.doc.resolve(o))||(o=-1),new _l(o,n.dragging)}return n}};function r4(t,e,n,r){if(!t.editable)return;const o=sr.getState(t.state);if(o&&!o.dragging){const i=s4(e.target);let a=-1;if(i){const{left:s,right:l}=i.getBoundingClientRect();e.clientX-s<=n?a=Y0(t,e,"left",n):l-e.clientX<=n&&(a=Y0(t,e,"right",n))}if(a!=o.activeHandle){if(!r&&a!==-1){const s=t.state.doc.resolve(a),l=s.node(-1),c=an.get(l),u=s.start(-1);if(c.colCount(s.pos-u)+s.nodeAfter.attrs.colspan-1==c.width-1)return}Nw(t,a)}}}function o4(t){if(!t.editable)return;const e=sr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Nw(t,-1)}function i4(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!=null?o:window,a=sr.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const s=t.state.doc.nodeAt(a.activeHandle),l=a4(t,a.activeHandle,s.attrs);t.dispatch(t.state.tr.setMeta(sr,{setDragging:{startX:e.clientX,startWidth:l}}));function c(d){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",u);const f=sr.getState(t.state);f!=null&&f.dragging&&(l4(t,f.activeHandle,J0(f.dragging,d,n)),t.dispatch(t.state.tr.setMeta(sr,{setDragging:null})))}function u(d){if(!d.which)return c(d);const f=sr.getState(t.state);if(f&&f.dragging){const p=J0(f.dragging,d,n);Z0(t,f.activeHandle,p,r)}}return Z0(t,a.activeHandle,l,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",u),e.preventDefault(),!0}function a4(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let c=0;c<n;c++)r[c]&&(s-=r[c],l--);return s/l}function s4(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Y0(t,e,n,r){const o=n=="right"?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:a}=i,s=Oa(t.state.doc.resolve(a));if(!s)return-1;if(n=="right")return s.pos;const l=an.get(s.node(-1)),c=s.start(-1),u=l.map.indexOf(s.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function J0(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Nw(t,e){t.dispatch(t.state.tr.setMeta(sr,{setHandle:e}))}function l4(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=an.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<i.height;c++){const u=c*i.width+s;if(c&&i.map[u]==i.map[u-i.width])continue;const d=i.map[u],f=o.nodeAt(d).attrs,p=f.colspan==1?0:s-i.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;const m=f.colwidth?f.colwidth.slice():c4(f.colspan);m[p]=n,l.setNodeMarkup(a+d,null,{...f,colwidth:m})}l.docChanged&&t.dispatch(l)}function Z0(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),a=o.start(-1),s=an.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;let l=t.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&uh(i,l.firstChild,l,r,s,n)}function c4(t){return Array(t).fill(0)}function u4(t,e){var n;const r=[],o=t.doc.resolve(e),i=o.node(-1);if(!i)return rn.empty;const a=an.get(i),s=o.start(-1),l=a.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const u=l+c*a.width;if((l==a.width-1||a.map[u]!=a.map[u+1])&&(c==0||a.map[u]!=a.map[u-a.width])){const d=a.map[u],f=s+d+i.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",(n=sr.getState(t))!=null&&n.dragging&&r.push(Wn.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),r.push(Wn.widget(f,p))}}return rn.create(t.doc,r)}function d4({allowTableNodeSelection:t=!1}={}){return new Vn({key:Io,state:{init(){return null},apply(e,n){const r=e.getMeta(Io);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:i}=e.mapping.mapResult(n);return o?null:i}},props:{decorations:E5,handleDOMEvents:{mousedown:Q5},createSelectionBetween(e){return Io.getState(e.state)!=null?e.state.selection:null},handleTripleClick:J5,handleKeyDown:Y5,handlePaste:Z5},appendTransaction(e,n,r){return M5(r,Ew(r,n),t)}})}function dh(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Q0(t,e,n,r,o,i){var a;let s=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u!==null)for(let d=0,f=0;d<u.childCount;d+=1){const{colspan:p,colwidth:m}=u.child(d).attrs;for(let g=0;g<p;g+=1,f+=1){const v=o===f?i:m&&m[g],b=v?`${v}px`:"";if(s+=v||r,v||(l=!1),c){if(c.style.width!==b){const[y,C]=dh(r,v);c.style.setProperty(y,C)}c=c.nextSibling}else{const y=document.createElement("col"),[C,S]=dh(r,v);y.style.setProperty(C,S),e.appendChild(y)}}}for(;c;){const d=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=d}l?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}class f4{constructor(e,n){this.node=e,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Q0(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,Q0(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function h4(t,e,n,r){let o=0,i=!0;const a=[],s=t.firstChild;if(!s)return{};for(let d=0,f=0;d<s.childCount;d+=1){const{colspan:p,colwidth:m}=s.child(d).attrs;for(let g=0;g<p;g+=1,f+=1){const v=n===f?r:m&&m[g];o+=v||e,v||(i=!1);const[b,y]=dh(e,v);a.push(["col",{style:`${b}: ${y}`}])}}const l=i?`${o}px`:"",c=i?"":`${o}px`;return{colgroup:["colgroup",{},...a],tableWidth:l,tableMinWidth:c}}function eb(t,e){return t.createAndFill()}function p4(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function m4(t,e,n,r,o){const i=p4(t),a=[],s=[];for(let c=0;c<n;c+=1){const u=eb(i.cell);if(u&&s.push(u),r){const d=eb(i.header_cell);d&&a.push(d)}}const l=[];for(let c=0;c<e;c+=1)l.push(i.row.createChecked(null,r&&c===0?a:s));return i.table.createChecked(null,l)}function g4(t){return t instanceof Gt}const pl=({editor:t})=>{const{selection:e}=t.state;if(!g4(e))return!1;let n=0;const r=Ky(e.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},v4=sn.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:f4,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=h4(t,this.options.cellMinWidth);return["table",Ft(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const a=m4(i.schema,t,e,n);if(o){const s=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(rt.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>I5(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>P5(t,e),deleteColumn:()=>({state:t,dispatch:e})=>A5(t,e),addRowBefore:()=>({state:t,dispatch:e})=>D5(t,e),addRowAfter:()=>({state:t,dispatch:e})=>_5(t,e),deleteRow:()=>({state:t,dispatch:e})=>B5(t,e),deleteTable:()=>({state:t,dispatch:e})=>q5(t,e),mergeCells:()=>({state:t,dispatch:e})=>H0(t,e),splitCell:()=>({state:t,dispatch:e})=>V0(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Cs("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Cs("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>V5(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>H0(t,e)?!0:V0(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>F5(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>q0(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>q0(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Ew(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Gt.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:pl,"Mod-Backspace":pl,Delete:pl,"Mod-Delete":pl}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[t4({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],d4({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:mt(Je(t,"tableRole",e))}}}),b4=sn.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",Ft(this.options.HTMLAttributes,t),0]}}),y4=sn.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",Ft(this.options.HTMLAttributes,t),0]}}),C4=sn.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Ft(this.options.HTMLAttributes,t),0]}}),S4=/^\s*(\[([( |x])?\])\s$/,x4=sn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Ft(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),a=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",c=>c.preventDefault()),s.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:u}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:d})=>{const f=n();if(typeof f!="number")return!1;const p=d.doc.nodeAt(f);return d.setNodeMarkup(f,void 0,{...p==null?void 0:p.attrs,checked:u}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,u)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,u])=>{o.setAttribute(c,u)}),o.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,i.append(s,a),o.append(i,l),Object.entries(e).forEach(([c,u])=>{o.setAttribute(c,u)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,s.checked=c.attrs.checked,!0)}}},addInputRules(){return[ca({find:S4,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),w4=sn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Ft(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),E4=kn.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),$4=Zr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),O4=/^\s*>\s$/,M4=sn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[ca({find:O4,type:this.type})]}}),N4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,R4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,I4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,P4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,T4=Zr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[xi({find:N4,type:this.type}),xi({find:I4,type:this.type})]},addPasteRules(){return[wi({find:R4,type:this.type}),wi({find:P4,type:this.type})]}}),A4="listItem",tb="textStyle",nb=/^\s*([-+*])\s$/,k4=sn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(A4,this.editor.getAttributes(tb)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=ca({find:nb,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=ca({find:nb,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(tb),editor:this.editor})),[t]}}),D4=/(^|[^`])`([^`]+)`(?!`)/,_4=/(^|[^`])`([^`]+)`(?!`)/g,j4=Zr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[xi({find:D4,type:this.type})]},addPasteRules(){return[wi({find:_4,type:this.type})]}}),B4=/^```([a-z]+)?[\s\n]$/,z4=/^~~~([a-z]+)?[\s\n]$/,L4=sn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,i=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Ft(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
596
596
 
597
597
  `);return!i||!a?!1:t.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const s=o.after();return s===void 0?!1:r.nodeAt(s)?t.commands.command(({tr:c})=>(c.setSelection(it.near(r.resolve(s))),!0)):t.commands.exitCode()}}},addInputRules(){return[Vd({find:B4,type:this.type,getAttributes:t=>({language:t[1]})}),Vd({find:z4,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Vn({key:new fr("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!n||!i)return!1;const{tr:a,schema:s}=t.state,l=s.text(n.replace(/\r\n?/g,`
598
598
  `));return a.replaceSelectionWith(this.type.create({language:i},l)),a.selection.$from.parent.type!==this.type&&a.setSelection(rt.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),F4=sn.create({name:"doc",topNode:!0,content:"block+"});function H4(t={}){return new Vn({view(e){return new V4(e,t)}})}class V4{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=a=>{this[o](a)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),a=i.width/o.offsetWidth,s=i.height/o.offsetHeight;if(n){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let m=p.getBoundingClientRect(),g=d?m.bottom:m.top;d&&f&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let v=this.width/2*s;r={left:m.left,right:m.right,top:g-v,bottom:g+v}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*a;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;c=d.left-l.scrollLeft*f,u=d.top-l.scrollTop*p}this.element.style.left=(r.left-c)/a+"px",this.element.style.top=(r.top-u)/s+"px",this.element.style.width=(r.right-r.left)/a+"px",this.element.style.height=(r.bottom-r.top)/s+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=Db(this.editorView.state.doc,a,this.editorView.dragging.slice);s!=null&&(a=s)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const W4=kn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[H4(this.options)]}});class on extends it{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return on.valid(r)?new on(r):it.near(r)}content(){return Me.empty}eq(e){return e instanceof on&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new on(e.resolve(n.pos))}getBookmark(){return new Vp(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!q4(e)||!K4(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&on.valid(e))return e;let o=e.pos,i=null;for(let a=e.depth;;a--){let s=e.node(a);if(n>0?e.indexAfter(a)<s.childCount:e.index(a)>0){i=s.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;o+=n;let l=e.doc.resolve(o);if(on.valid(l))return l}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!tt.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=a,o+=n;let s=e.doc.resolve(o);if(on.valid(s))return s}return null}}}on.prototype.visible=!1;on.findFrom=on.findGapCursorFrom;it.jsonID("gapcursor",on);class Vp{constructor(e){this.pos=e}map(e){return new Vp(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return on.valid(n)?new on(n):it.near(n)}}function q4(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function K4(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function G4(){return new Vn({props:{decorations:J4,createSelectionBetween(t,e,n){return e.pos==n.pos&&on.valid(n)?new on(n):null},handleClick:X4,handleKeyDown:U4,handleDOMEvents:{beforeinput:Y4}}})}const U4=$h({ArrowLeft:ml("horiz",-1),ArrowRight:ml("horiz",1),ArrowUp:ml("vert",-1),ArrowDown:ml("vert",1)});function ml(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let a=r.selection,s=e>0?a.$to:a.$from,l=a.empty;if(a instanceof rt){if(!i.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(e>0?s.after():s.before())}let c=on.findGapCursorFrom(s,e,l);return c?(o&&o(r.tr.setSelection(new on(c))),!0):!1}}function X4(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!on.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&tt.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new on(r))),!0)}function Y4(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof on))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=fe.empty;for(let a=r.length-1;a>=0;a--)o=fe.from(r[a].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new Me(o,0,0));return i.setSelection(rt.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function J4(t){if(!(t.selection instanceof on))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",rn.create(t.doc,[Wn.widget(t.selection.head,e,{key:"gapcursor"})])}const Z4=kn.create({name:"gapCursor",addProseMirrorPlugins(){return[G4()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=mt(Je(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),Q4=sn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Ft(this.options.HTMLAttributes,t)]},renderText(){return`
599
- `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&a){const d=l.filter(f=>s.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),e6=sn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ft(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Vd({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var vc=200,On=function(){};On.prototype.append=function(e){return e.length?(e=On.from(e),!this.length&&e||e.length<vc&&this.leafAppend(e)||this.length<vc&&e.leafPrepend(this)||this.appendInner(e)):this};On.prototype.prepend=function(e){return e.length?On.from(e).append(this):this};On.prototype.appendInner=function(e){return new t6(this,e)};On.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?On.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};On.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};On.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};On.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(e(i,a))},n,r),o};On.from=function(e){return e instanceof On?e:e&&e.length?new Rw(e):On.empty};var Rw=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,a,s){for(var l=i;l<a;l++)if(o(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,a,s){for(var l=i-1;l>=a;l--)if(o(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=vc)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=vc)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(On);On.empty=new Rw([]);var t6=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,a){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(i,s),a)===!1||i>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,i)-s,a+s)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,a){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(i,s)-s,a+s)===!1||i<s&&this.left.forEachInvertedInner(r,Math.min(o,s),i,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(On);const n6=500;class Ir{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let a=e.tr,s,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new Hr(d.map));let p=d.step.map(o.slice(i)),m;p&&a.maybeStep(p).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new Hr(m,void 0,void 0,c.length+u.length))),i--,m&&o.appendMap(m,i)}else a.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(i)):d.selection,l=new Ir(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:s}}addTransform(e,n,r,o){let i=[],a=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new Hr(e.mapping.maps[u],d,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():s=s.slice(0,s.length-1)),i.push(f),n&&(a++,n=void 0),o||(l=f)}let c=a-r.depth;return c>o6&&(s=r6(s,c),a-=c),new Ir(s.append(i),a)}remapping(e,n){let r=new es;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new Ir(this.items.append(e.map(n=>new Hr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;a=Math.min(a,p);let m=i.maps[p];if(f.step){let g=e.steps[p].invert(e.docs[p]),v=f.selection&&f.selection.map(i.slice(l+1,p));v&&s++,r.push(new Hr(m,g,v))}else r.push(new Hr(m))},o);let c=[];for(let f=n;f<a;f++)c.push(new Hr(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Ir(u,s);return d.emptyItemCount()>n6&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=e)o.push(a),a.selection&&i++;else if(a.step){let l=a.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=a.selection&&a.selection.map(n.slice(r));u&&i++;let d=new Hr(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else a.map&&r--},this.items.length,0),new Ir(On.from(o.reverse()),i)}}Ir.empty=new Ir(On.empty,0);function r6(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Hr{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Hr(n.getMap().invert(),n,this.selection)}}}class Mo{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const o6=20;function i6(t,e,n,r){let o=n.getMeta(vi),i;if(o)return o.historyState;n.getMeta(l6)&&(t=new Mo(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(vi))return a.getMeta(vi).redo?new Mo(t.done.addTransform(n,void 0,r,jl(e)),t.undone,rb(n.mapping.maps),t.prevTime,t.prevComposition):new Mo(t.done,t.undone.addTransform(n,void 0,r,jl(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=t.prevTime==0||!a&&t.prevComposition!=s&&(t.prevTime<(n.time||0)-r.newGroupDelay||!a6(n,t.prevRanges)),c=a?xd(t.prevRanges,n.mapping):rb(n.mapping.maps);return new Mo(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,jl(e)),Ir.empty,c,n.time,s??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Mo(t.done.rebased(n,i),t.undone.rebased(n,i),xd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Mo(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),xd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function a6(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function rb(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,a)=>e.push(i,a));return e}function xd(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function s6(t,e,n){let r=jl(e),o=vi.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),s=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new Mo(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(a).setMeta(vi,{redo:n,historyState:l})}let wd=!1,ob=null;function jl(t){let e=t.plugins;if(ob!=e){wd=!1,ob=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){wd=!0;break}}return wd}const vi=new fr("history"),l6=new fr("closeHistory");function c6(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Vn({key:vi,state:{init(){return new Mo(Ir.empty,Ir.empty,null,0,-1)},apply(e,n,r){return i6(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?Pw:r=="historyRedo"?Tw:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function Iw(t,e){return(n,r)=>{let o=vi.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=s6(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Pw=Iw(!1,!0),Tw=Iw(!0,!0),u6=kn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Pw(t,e),redo:()=>({state:t,dispatch:e})=>Tw(t,e)}},addProseMirrorPlugins(){return[c6(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),d6=sn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Ft(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,i=t();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):UM(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:a,dispatch:s})=>{var l;if(s){const{$to:c}=a.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(rt.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(tt.create(a.doc,c.pos)):a.setSelection(rt.create(a.doc,c.pos));else{const d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(a.insert(u,d),a.setSelection(rt.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[ON({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),f6=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,h6=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,p6=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,m6=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,g6=Zr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[xi({find:f6,type:this.type}),xi({find:p6,type:this.type})]},addPasteRules(){return[wi({find:h6,type:this.type}),wi({find:m6,type:this.type})]}}),v6="listItem",ib="textStyle",ab=/^(\d+)\.\s$/,b6=sn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Ft(this.options.HTMLAttributes,n),0]:["ol",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(v6,this.editor.getAttributes(ib)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=ca({find:ab,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=ca({find:ab,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(ib)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),y6=sn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),C6=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,S6=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,x6=Zr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[xi({find:C6,type:this.type})]},addPasteRules(){return[wi({find:S6,type:this.type})]}}),w6=sn.create({name:"text",group:"inline"}),E6=kn.create({name:"starterKit",addExtensions(){const t=[];return this.options.bold!==!1&&t.push(T4.configure(this.options.bold)),this.options.blockquote!==!1&&t.push(M4.configure(this.options.blockquote)),this.options.bulletList!==!1&&t.push(k4.configure(this.options.bulletList)),this.options.code!==!1&&t.push(j4.configure(this.options.code)),this.options.codeBlock!==!1&&t.push(L4.configure(this.options.codeBlock)),this.options.document!==!1&&t.push(F4.configure(this.options.document)),this.options.dropcursor!==!1&&t.push(W4.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&t.push(Z4.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&t.push(Q4.configure(this.options.hardBreak)),this.options.heading!==!1&&t.push(e6.configure(this.options.heading)),this.options.history!==!1&&t.push(u6.configure(this.options.history)),this.options.horizontalRule!==!1&&t.push(d6.configure(this.options.horizontalRule)),this.options.italic!==!1&&t.push(g6.configure(this.options.italic)),this.options.listItem!==!1&&t.push(yw.configure(this.options.listItem)),this.options.orderedList!==!1&&t.push(b6.configure(this.options.orderedList)),this.options.paragraph!==!1&&t.push(y6.configure(this.options.paragraph)),this.options.strike!==!1&&t.push(x6.configure(this.options.strike)),this.options.text!==!1&&t.push(w6.configure(this.options.text)),t}});function Aw({title:t,childrenContent:e,editable:n,childrenEdit:r}){const[o,i]=E.useState(!1),a=n?ie.jsxRuntimeExports.jsx(Ko,{children:ie.jsxRuntimeExports.jsx(Ko.Item,{onClick:()=>i(!0),children:"Edit"},"edit")}):null;return ie.jsxRuntimeExports.jsxs("div",{children:[n&&a?ie.jsxRuntimeExports.jsx(cu,{dropdownRender:()=>a,trigger:["contextMenu"],children:e}):e,ie.jsxRuntimeExports.jsx($r,{title:`Edit ${t}`,open:o,onOk:()=>i(!1),onCancel:()=>i(!1),children:r})]})}function $6({node:t,editor:e}){const[n,r]=E.useState(!1),[o,i]=E.useState(t.attrs.bgColor||"#f3f4f6"),[a,s]=E.useState(t.attrs.titleColor||"#000000"),l=d=>{d.preventDefault()},c=d=>{i(d.toHexString())},u=d=>{s(d.toHexString())};return ie.jsxRuntimeExports.jsx(Yy,{className:"accordion-wrapper",children:ie.jsxRuntimeExports.jsx(Aw,{title:"Accordion",childrenContent:ie.jsxRuntimeExports.jsxs("div",{className:"ce:my-4 ce:transition-all ce:duration-300 ce:border ce:rounded-lg ce:shadow-sm",onContextMenu:l,children:[ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:justify-between ce:p-4 ce:transition-colors ce:accordion-header",style:{backgroundColor:o},onClick:()=>r(!n),children:[ie.jsxRuntimeExports.jsx("input",{className:"ce:w-full ce:text-lg ce:font-medium ce:bg-transparent ce:border-none ce:outline-none",style:{color:a},defaultValue:t.attrs.title||"Accordion Title",disabled:!e.isEditable,suppressContentEditableWarning:!0,contentEditable:!0,placeholder:"Accordion title"}),ie.jsxRuntimeExports.jsx(aV,{className:`ce:transition-transform ce:duration-300 ${n?"ce:rotate-180":""}`,size:20})]}),ie.jsxRuntimeExports.jsx("div",{className:`ce:overflow-hidden ce:duration-300 ce:ease-in-out ${n?"ce:max-h-96 ce:opacity-100":"ce:max-h-0 ce:opacity-0"} `,children:ie.jsxRuntimeExports.jsx("div",{className:"ce:p-4 ce:border-t",children:ie.jsxRuntimeExports.jsx(UN,{contentEditable:e.isEditable})})})]}),editable:e.isEditable,childrenEdit:ie.jsxRuntimeExports.jsxs("div",{className:"ce:px-6 ce:py-4 ce:space-y-6 ce:rounded-lg ce:bg-gray-50",children:[ie.jsxRuntimeExports.jsxs("div",{className:"ce:grid ce:grid-cols-1 ce:gap-6",children:[ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[ie.jsxRuntimeExports.jsx("label",{className:"ce:font-medium ce:text-gray-700",children:"Background Color"}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[ie.jsxRuntimeExports.jsx("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:o}}),ie.jsxRuntimeExports.jsx(gc,{value:o,onChange:c})]})]}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[ie.jsxRuntimeExports.jsx("label",{className:"ce:font-medium ce:text-gray-700",children:"Title Color"}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[ie.jsxRuntimeExports.jsx("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:a}}),ie.jsxRuntimeExports.jsx(gc,{value:a,onChange:u})]})]})]}),ie.jsxRuntimeExports.jsx("div",{className:"ce:pt-4 ce:border-t ce:border-gray-200",children:ie.jsxRuntimeExports.jsxs("div",{className:"ce:p-3 ce:bg-white ce:border ce:rounded-md",children:[ie.jsxRuntimeExports.jsx("div",{className:"ce:text-sm ce:text-gray-600",children:"Preview"}),ie.jsxRuntimeExports.jsx("div",{className:"ce:p-2 ce:mt-2 ce:rounded",style:{backgroundColor:o},children:ie.jsxRuntimeExports.jsx("span",{style:{color:a,fontWeight:500},children:"Accordion Title"})})]})})]})})})}const O6=sn.create({name:"accordion",group:"block",content:"block+",atom:!1,draggable:!0,selectable:!0,inline:!1,defining:!0,addAttributes(){return{title:{default:"Accordion Title"},bgColor:{default:"#f3f4f6"},titleColor:{default:"#000000"}}},parseHTML(){return[{tag:"accordion"}]},renderHTML({HTMLAttributes:t}){return["accordion",Ft(t)]},addNodeView(){return Jy($6)},addCommands(){return{setAccordion:t=>({chain:e})=>e().insertContent({type:"accordion",attrs:t,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});function M6({node:t,updateAttributes:e,editor:n}){const[r,o]=E.useState({width:t.attrs.width??50,height:t.attrs.height??"auto"}),[i,a]=E.useState({left:t.attrs.marginLeft??"0%",right:t.attrs.marginRight??"0%"}),[s,l]=E.useState(t.attrs.src||""),c=E.useRef(null);E.useEffect(()=>{if(t.attrs.src&&c.current){const f=new Image;f.onload=()=>{t.attrs.width===void 0&&o({width:100,height:"auto"})},f.src=t.attrs.src}},[t.attrs.src,t.attrs.width,t.attrs.height]);const u=()=>{e({src:s,width:r.width,height:r.height,marginLeft:i.left,marginRight:i.right})},d=f=>{f.preventDefault()};return ie.jsxRuntimeExports.jsx(Yy,{className:"image-wrapper ce:w-full",children:ie.jsxRuntimeExports.jsx(Aw,{title:"Image",childrenContent:ie.jsxRuntimeExports.jsx("div",{className:"ce:relative ce:w-full ce:max-w-full ce:overflow-hidden",style:{marginLeft:`${i.left}%`,marginRight:`${i.right}%`},onContextMenu:d,children:ie.jsxRuntimeExports.jsx("img",{ref:c,src:t.attrs.src,alt:"Uploaded",className:"ce:w-full ce:h-auto ce:object-contain ce:inline-block",style:{width:`${r.width}%`,height:r.height==="auto"?"auto":`${r.height}%`,maxWidth:"100%"},draggable:!1})}),editable:n.isEditable,childrenEdit:ie.jsxRuntimeExports.jsxs("div",{className:"ce:space-y-4",children:[ie.jsxRuntimeExports.jsxs("div",{children:[ie.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Image URL"}),ie.jsxRuntimeExports.jsx(uo,{type:"text",value:s,onChange:f=>l(f.target.value),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable})]}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:gap-4",children:[ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex-1",children:[ie.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Width (%)"}),ie.jsxRuntimeExports.jsx(uo,{type:"number",value:r.width,onChange:f=>o({...r,width:Number(f.target.value)}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex-1",children:[ie.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Height"}),ie.jsxRuntimeExports.jsxs(ir,{value:r.height,onChange:f=>o({...r,height:f}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable,children:[ie.jsxRuntimeExports.jsx(ir.Option,{value:"auto",children:"Auto"}),ie.jsxRuntimeExports.jsx(ir.Option,{value:"25",children:"25%"}),ie.jsxRuntimeExports.jsx(ir.Option,{value:"50",children:"50%"}),ie.jsxRuntimeExports.jsx(ir.Option,{value:"75",children:"75%"}),ie.jsxRuntimeExports.jsx(ir.Option,{value:"100",children:"100%"})]})]})]}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:gap-4",children:[ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex-1",children:[ie.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Left (%)"}),ie.jsxRuntimeExports.jsx(uo,{type:"number",value:i.left,onChange:f=>a({...i,left:String(Number(f.target.value))}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]}),ie.jsxRuntimeExports.jsxs("div",{className:"ce:flex-1",children:[ie.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Right (%)"}),ie.jsxRuntimeExports.jsx(uo,{type:"number",value:i.right,onChange:f=>a({...i,right:String(Number(f.target.value))}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]})]}),ie.jsxRuntimeExports.jsx("button",{type:"button",onClick:u,className:"ce:w-full ce:py-2 ce:px-4 ce:bg-indigo-600 ce:text-white ce:rounded-md ce:hover:bg-indigo-700 ce:focus:outline-none ce:focus:ring-2 ce:focus:ring-indigo-500 ce:focus:ring-offset-2",disabled:!n.isEditable,children:"Update Image"})]})})})}const N6=sn.create({name:"image",group:"block",content:"inline*",atom:!0,draggable:!0,selectable:!0,addAttributes(){return{src:{default:null},width:{default:50},height:{default:"auto"},marginLeft:{default:0},marginRight:{default:0}}},parseHTML(){return[{tag:"img",getAttrs:t=>t instanceof HTMLElement?{src:t.getAttribute("src"),width:t.getAttribute("width")?Number(t.getAttribute("width")):50,height:t.getAttribute("height")||"auto",marginLeft:t.getAttribute("marginleft")?Number(t.getAttribute("marginleft")):0,marginRight:t.getAttribute("marginright")?Number(t.getAttribute("marginright")):0}:null}]},renderHTML({HTMLAttributes:t}){return["img",Ft(t)]},addNodeView(){return Jy(M6)},addCommands(){return{setImage:t=>({chain:e})=>e().insertContent({type:"image",attrs:{...t,width:(t==null?void 0:t.width)??50,height:(t==null?void 0:t.height)??"auto"}}).run()}}}),R6=[c5.configure({types:[L0.name,yw.name]}),L0,f5.configure({multicolor:!0}),E6.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),$4,h5,p5,E4.configure({types:["heading","paragraph"]}),w4,x4,v4.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),C4,y4,b4.configure({HTMLAttributes:{class:"table-cell"}}),N6,O6],I6={"cyber-editor":"_cyber-editor_1liko_1"};function P6({content:t="",slotBefore:e=!1,className:n="",editorClassName:r="",editable:o=!0,onChange:i}){const a=KN({extensions:R6,content:t,editable:o,onUpdate:({editor:s})=>{i==null||i(s.getHTML())}});return E.useEffect(()=>{a&&t!==a.getHTML()&&a.commands.setContent(t,!1)},[a,t]),a?ie.jsxRuntimeExports.jsxs("div",{className:G.cn(I6["cyber-editor"],n),children:[e&&ie.jsxRuntimeExports.jsx(s5,{editor:a}),ie.jsxRuntimeExports.jsx(_N,{editor:a,className:r})]}):ie.jsxRuntimeExports.jsx(G.g,{full:!0})}function T6(){const[t,e]=E.useState(`
599
+ `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&a){const d=l.filter(f=>s.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),e6=sn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ft(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Vd({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var vc=200,On=function(){};On.prototype.append=function(e){return e.length?(e=On.from(e),!this.length&&e||e.length<vc&&this.leafAppend(e)||this.length<vc&&e.leafPrepend(this)||this.appendInner(e)):this};On.prototype.prepend=function(e){return e.length?On.from(e).append(this):this};On.prototype.appendInner=function(e){return new t6(this,e)};On.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?On.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};On.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};On.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};On.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(e(i,a))},n,r),o};On.from=function(e){return e instanceof On?e:e&&e.length?new Rw(e):On.empty};var Rw=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,a,s){for(var l=i;l<a;l++)if(o(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,a,s){for(var l=i-1;l>=a;l--)if(o(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=vc)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=vc)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(On);On.empty=new Rw([]);var t6=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,a){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(i,s),a)===!1||i>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,i)-s,a+s)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,a){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(i,s)-s,a+s)===!1||i<s&&this.left.forEachInvertedInner(r,Math.min(o,s),i,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(On);const n6=500;class Ir{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let a=e.tr,s,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new Hr(d.map));let p=d.step.map(o.slice(i)),m;p&&a.maybeStep(p).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new Hr(m,void 0,void 0,c.length+u.length))),i--,m&&o.appendMap(m,i)}else a.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(i)):d.selection,l=new Ir(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:s}}addTransform(e,n,r,o){let i=[],a=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new Hr(e.mapping.maps[u],d,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():s=s.slice(0,s.length-1)),i.push(f),n&&(a++,n=void 0),o||(l=f)}let c=a-r.depth;return c>o6&&(s=r6(s,c),a-=c),new Ir(s.append(i),a)}remapping(e,n){let r=new es;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new Ir(this.items.append(e.map(n=>new Hr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;a=Math.min(a,p);let m=i.maps[p];if(f.step){let g=e.steps[p].invert(e.docs[p]),v=f.selection&&f.selection.map(i.slice(l+1,p));v&&s++,r.push(new Hr(m,g,v))}else r.push(new Hr(m))},o);let c=[];for(let f=n;f<a;f++)c.push(new Hr(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Ir(u,s);return d.emptyItemCount()>n6&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=e)o.push(a),a.selection&&i++;else if(a.step){let l=a.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=a.selection&&a.selection.map(n.slice(r));u&&i++;let d=new Hr(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else a.map&&r--},this.items.length,0),new Ir(On.from(o.reverse()),i)}}Ir.empty=new Ir(On.empty,0);function r6(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Hr{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Hr(n.getMap().invert(),n,this.selection)}}}class Mo{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const o6=20;function i6(t,e,n,r){let o=n.getMeta(vi),i;if(o)return o.historyState;n.getMeta(l6)&&(t=new Mo(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(vi))return a.getMeta(vi).redo?new Mo(t.done.addTransform(n,void 0,r,jl(e)),t.undone,rb(n.mapping.maps),t.prevTime,t.prevComposition):new Mo(t.done,t.undone.addTransform(n,void 0,r,jl(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=t.prevTime==0||!a&&t.prevComposition!=s&&(t.prevTime<(n.time||0)-r.newGroupDelay||!a6(n,t.prevRanges)),c=a?xd(t.prevRanges,n.mapping):rb(n.mapping.maps);return new Mo(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,jl(e)),Ir.empty,c,n.time,s??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Mo(t.done.rebased(n,i),t.undone.rebased(n,i),xd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Mo(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),xd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function a6(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function rb(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,a)=>e.push(i,a));return e}function xd(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function s6(t,e,n){let r=jl(e),o=vi.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),s=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new Mo(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(a).setMeta(vi,{redo:n,historyState:l})}let wd=!1,ob=null;function jl(t){let e=t.plugins;if(ob!=e){wd=!1,ob=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){wd=!0;break}}return wd}const vi=new fr("history"),l6=new fr("closeHistory");function c6(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Vn({key:vi,state:{init(){return new Mo(Ir.empty,Ir.empty,null,0,-1)},apply(e,n,r){return i6(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?Pw:r=="historyRedo"?Tw:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function Iw(t,e){return(n,r)=>{let o=vi.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=s6(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Pw=Iw(!1,!0),Tw=Iw(!0,!0),u6=kn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Pw(t,e),redo:()=>({state:t,dispatch:e})=>Tw(t,e)}},addProseMirrorPlugins(){return[c6(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),d6=sn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Ft(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,i=t();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):UM(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:a,dispatch:s})=>{var l;if(s){const{$to:c}=a.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(rt.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(tt.create(a.doc,c.pos)):a.setSelection(rt.create(a.doc,c.pos));else{const d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(a.insert(u,d),a.setSelection(rt.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[ON({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),f6=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,h6=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,p6=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,m6=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,g6=Zr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[xi({find:f6,type:this.type}),xi({find:p6,type:this.type})]},addPasteRules(){return[wi({find:h6,type:this.type}),wi({find:m6,type:this.type})]}}),v6="listItem",ib="textStyle",ab=/^(\d+)\.\s$/,b6=sn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Ft(this.options.HTMLAttributes,n),0]:["ol",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(v6,this.editor.getAttributes(ib)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=ca({find:ab,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=ca({find:ab,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(ib)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),y6=sn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),C6=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,S6=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,x6=Zr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Ft(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[xi({find:C6,type:this.type})]},addPasteRules(){return[wi({find:S6,type:this.type})]}}),w6=sn.create({name:"text",group:"inline"}),E6=kn.create({name:"starterKit",addExtensions(){const t=[];return this.options.bold!==!1&&t.push(T4.configure(this.options.bold)),this.options.blockquote!==!1&&t.push(M4.configure(this.options.blockquote)),this.options.bulletList!==!1&&t.push(k4.configure(this.options.bulletList)),this.options.code!==!1&&t.push(j4.configure(this.options.code)),this.options.codeBlock!==!1&&t.push(L4.configure(this.options.codeBlock)),this.options.document!==!1&&t.push(F4.configure(this.options.document)),this.options.dropcursor!==!1&&t.push(W4.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&t.push(Z4.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&t.push(Q4.configure(this.options.hardBreak)),this.options.heading!==!1&&t.push(e6.configure(this.options.heading)),this.options.history!==!1&&t.push(u6.configure(this.options.history)),this.options.horizontalRule!==!1&&t.push(d6.configure(this.options.horizontalRule)),this.options.italic!==!1&&t.push(g6.configure(this.options.italic)),this.options.listItem!==!1&&t.push(yw.configure(this.options.listItem)),this.options.orderedList!==!1&&t.push(b6.configure(this.options.orderedList)),this.options.paragraph!==!1&&t.push(y6.configure(this.options.paragraph)),this.options.strike!==!1&&t.push(x6.configure(this.options.strike)),this.options.text!==!1&&t.push(w6.configure(this.options.text)),t}});function Aw({title:t,childrenContent:e,editable:n,childrenEdit:r}){const[o,i]=E.useState(!1),a=n?oe.jsxRuntimeExports.jsx(Ko,{children:oe.jsxRuntimeExports.jsx(Ko.Item,{onClick:()=>i(!0),children:"Edit"},"edit")}):null;return oe.jsxRuntimeExports.jsxs("div",{children:[n&&a?oe.jsxRuntimeExports.jsx(cu,{dropdownRender:()=>a,trigger:["contextMenu"],children:e}):e,oe.jsxRuntimeExports.jsx($r,{title:`Edit ${t}`,open:o,onOk:()=>i(!1),onCancel:()=>i(!1),children:r})]})}function $6({node:t,editor:e}){const[n,r]=E.useState(!1),[o,i]=E.useState(t.attrs.bgColor||"#f3f4f6"),[a,s]=E.useState(t.attrs.titleColor||"#000000"),l=d=>{d.preventDefault()},c=d=>{i(d.toHexString())},u=d=>{s(d.toHexString())};return oe.jsxRuntimeExports.jsx(Yy,{className:"accordion-wrapper",children:oe.jsxRuntimeExports.jsx(Aw,{title:"Accordion",childrenContent:oe.jsxRuntimeExports.jsxs("div",{className:"ce:my-4 ce:transition-all ce:duration-300 ce:border ce:rounded-lg ce:shadow-sm",onContextMenu:l,children:[oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:justify-between ce:p-4 ce:transition-colors ce:accordion-header",style:{backgroundColor:o},onClick:()=>r(!n),children:[oe.jsxRuntimeExports.jsx("input",{className:"ce:w-full ce:text-lg ce:font-medium ce:bg-transparent ce:border-none ce:outline-none",style:{color:a},defaultValue:t.attrs.title||"Accordion Title",disabled:!e.isEditable,suppressContentEditableWarning:!0,contentEditable:!0,placeholder:"Accordion title"}),oe.jsxRuntimeExports.jsx(aV,{className:`ce:transition-transform ce:duration-300 ${n?"ce:rotate-180":""}`,size:20})]}),oe.jsxRuntimeExports.jsx("div",{className:`ce:overflow-hidden ce:duration-300 ce:ease-in-out ${n?"ce:max-h-96 ce:opacity-100":"ce:max-h-0 ce:opacity-0"} `,children:oe.jsxRuntimeExports.jsx("div",{className:"ce:p-4 ce:border-t",children:oe.jsxRuntimeExports.jsx(UN,{contentEditable:e.isEditable})})})]}),editable:e.isEditable,childrenEdit:oe.jsxRuntimeExports.jsxs("div",{className:"ce:px-6 ce:py-4 ce:space-y-6 ce:rounded-lg ce:bg-gray-50",children:[oe.jsxRuntimeExports.jsxs("div",{className:"ce:grid ce:grid-cols-1 ce:gap-6",children:[oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[oe.jsxRuntimeExports.jsx("label",{className:"ce:font-medium ce:text-gray-700",children:"Background Color"}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[oe.jsxRuntimeExports.jsx("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:o}}),oe.jsxRuntimeExports.jsx(gc,{value:o,onChange:c})]})]}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[oe.jsxRuntimeExports.jsx("label",{className:"ce:font-medium ce:text-gray-700",children:"Title Color"}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[oe.jsxRuntimeExports.jsx("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:a}}),oe.jsxRuntimeExports.jsx(gc,{value:a,onChange:u})]})]})]}),oe.jsxRuntimeExports.jsx("div",{className:"ce:pt-4 ce:border-t ce:border-gray-200",children:oe.jsxRuntimeExports.jsxs("div",{className:"ce:p-3 ce:bg-white ce:border ce:rounded-md",children:[oe.jsxRuntimeExports.jsx("div",{className:"ce:text-sm ce:text-gray-600",children:"Preview"}),oe.jsxRuntimeExports.jsx("div",{className:"ce:p-2 ce:mt-2 ce:rounded",style:{backgroundColor:o},children:oe.jsxRuntimeExports.jsx("span",{style:{color:a,fontWeight:500},children:"Accordion Title"})})]})})]})})})}const O6=sn.create({name:"accordion",group:"block",content:"block+",atom:!1,draggable:!0,selectable:!0,inline:!1,defining:!0,addAttributes(){return{title:{default:"Accordion Title"},bgColor:{default:"#f3f4f6"},titleColor:{default:"#000000"}}},parseHTML(){return[{tag:"accordion"}]},renderHTML({HTMLAttributes:t}){return["accordion",Ft(t)]},addNodeView(){return Jy($6)},addCommands(){return{setAccordion:t=>({chain:e})=>e().insertContent({type:"accordion",attrs:t,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});function M6({node:t,updateAttributes:e,editor:n}){const[r,o]=E.useState({width:t.attrs.width??50,height:t.attrs.height??"auto"}),[i,a]=E.useState({left:t.attrs.marginLeft??"0%",right:t.attrs.marginRight??"0%"}),[s,l]=E.useState(t.attrs.src||""),c=E.useRef(null);E.useEffect(()=>{if(t.attrs.src&&c.current){const f=new Image;f.onload=()=>{t.attrs.width===void 0&&o({width:100,height:"auto"})},f.src=t.attrs.src}},[t.attrs]);const u=()=>{e({src:s,width:r.width,height:r.height,marginLeft:i.left,marginRight:i.right})},d=f=>{f.preventDefault()};return oe.jsxRuntimeExports.jsx(Yy,{className:"image-wrapper ce:w-full",children:oe.jsxRuntimeExports.jsx(Aw,{title:"Image",childrenContent:oe.jsxRuntimeExports.jsx("div",{className:"ce:relative ce:w-full ce:max-w-full ce:overflow-hidden",style:{marginLeft:`${i.left}%`,marginRight:`${i.right}%`},onContextMenu:d,children:oe.jsxRuntimeExports.jsx("img",{ref:c,src:t.attrs.src,alt:"Uploaded",className:"ce:w-full ce:h-auto ce:object-contain ce:inline-block",style:{width:`${r.width}%`,height:r.height==="auto"?"auto":`${r.height}%`,maxWidth:"100%"},draggable:!1})}),editable:n.isEditable,childrenEdit:oe.jsxRuntimeExports.jsxs("div",{className:"ce:space-y-4",children:[oe.jsxRuntimeExports.jsxs("div",{children:[oe.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Image URL"}),oe.jsxRuntimeExports.jsx(uo,{type:"text",value:s,onChange:f=>l(f.target.value),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable})]}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:gap-4",children:[oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex-1",children:[oe.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Width (%)"}),oe.jsxRuntimeExports.jsx(uo,{type:"number",value:r.width,onChange:f=>o({...r,width:Number(f.target.value)}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex-1",children:[oe.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Height"}),oe.jsxRuntimeExports.jsxs(ir,{value:r.height,onChange:f=>o({...r,height:f}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable,children:[oe.jsxRuntimeExports.jsx(ir.Option,{value:"auto",children:"Auto"}),oe.jsxRuntimeExports.jsx(ir.Option,{value:"25",children:"25%"}),oe.jsxRuntimeExports.jsx(ir.Option,{value:"50",children:"50%"}),oe.jsxRuntimeExports.jsx(ir.Option,{value:"75",children:"75%"}),oe.jsxRuntimeExports.jsx(ir.Option,{value:"100",children:"100%"})]})]})]}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex ce:gap-4",children:[oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex-1",children:[oe.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Left (%)"}),oe.jsxRuntimeExports.jsx(uo,{type:"number",value:i.left,onChange:f=>a({...i,left:String(Number(f.target.value))}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]}),oe.jsxRuntimeExports.jsxs("div",{className:"ce:flex-1",children:[oe.jsxRuntimeExports.jsx("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Right (%)"}),oe.jsxRuntimeExports.jsx(uo,{type:"number",value:i.right,onChange:f=>a({...i,right:String(Number(f.target.value))}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable})]})]}),oe.jsxRuntimeExports.jsx("button",{type:"button",onClick:u,className:"ce:w-full ce:py-2 ce:px-4 ce:bg-indigo-600 ce:text-white ce:rounded-md ce:hover:bg-indigo-700 ce:focus:outline-none ce:focus:ring-2 ce:focus:ring-indigo-500 ce:focus:ring-offset-2",disabled:!n.isEditable,children:"Update Image"})]})})})}const N6=sn.create({name:"image",group:"block",content:"inline*",atom:!0,draggable:!0,selectable:!0,addAttributes(){return{src:{default:null},width:{default:50},height:{default:"auto"},marginLeft:{default:0},marginRight:{default:0}}},parseHTML(){return[{tag:"img",getAttrs:t=>t instanceof HTMLElement?{src:t.getAttribute("src"),width:t.getAttribute("width")?Number(t.getAttribute("width")):50,height:t.getAttribute("height")||"auto",marginLeft:t.getAttribute("marginleft")?Number(t.getAttribute("marginleft")):0,marginRight:t.getAttribute("marginright")?Number(t.getAttribute("marginright")):0}:null}]},renderHTML({HTMLAttributes:t}){return["img",Ft(t)]},addNodeView(){return Jy(M6)},addCommands(){return{setImage:t=>({chain:e})=>e().insertContent({type:this.name,attrs:{...t,width:(t==null?void 0:t.width)??50,height:(t==null?void 0:t.height)??"auto"}}).run()}}}),R6=[c5.configure({types:[L0.name,yw.name]}),L0,f5.configure({multicolor:!0}),E6.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),$4,h5,p5,E4.configure({types:["heading","paragraph"]}),w4,x4,v4.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),C4,y4,b4.configure({HTMLAttributes:{class:"table-cell"}}),N6,O6],I6={"cyber-editor":"_cyber-editor_1liko_1"};function P6({content:t="",slotBefore:e=!1,className:n="",editorClassName:r="",editable:o=!0,onChange:i}){const a=KN({extensions:R6,content:t,editable:o,onUpdate:({editor:s})=>{i==null||i(s.getHTML())}});return E.useEffect(()=>{a&&t!==a.getHTML()&&a.commands.setContent(t,!1)},[a,t]),a?oe.jsxRuntimeExports.jsxs("div",{className:G.cn(I6["cyber-editor"],n),children:[e&&oe.jsxRuntimeExports.jsx(s5,{editor:a}),oe.jsxRuntimeExports.jsx(_N,{editor:a,className:r})]}):oe.jsxRuntimeExports.jsx(G.g,{full:!0})}function T6(){const[t,e]=E.useState(`
600
600
  <h1>Welcome to the Editor</h1>
601
601
  <img src="https://d1hjkbq40fs2x4.cloudfront.net/2017-08-21/files/landscape-photography_1645.jpg" width="300" height="300" marginleft="0" marginright="0">
602
602
  <p>This is a paragraph.</p>
603
603
  <accordion title="Accordion Title" bgcolor="#f3f4f6" titlecolor="#000000"></accordion>
604
- `),n=r=>{e(r)};return ie.jsxRuntimeExports.jsx(P6,{content:t,onChange:n,slotBefore:!0})}const A6=kw.withComponentProps(T6);module.exports=A6;
604
+ `),n=r=>{e(r)};return oe.jsxRuntimeExports.jsx(P6,{content:t,onChange:n,slotBefore:!0})}const A6=kw.withComponentProps(T6);module.exports=A6;