@cyberskill/cyber-editor 3.9.0 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.cts +196 -0
- package/dist/_tsup-dts-rollup.d.ts +196 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +1 -0
- package/dist/modules/accordion/accordion-extension.cjs +1 -0
- package/dist/modules/accordion/accordion-extension.d.cts +1 -0
- package/dist/modules/accordion/accordion-extension.d.ts +1 -0
- package/dist/modules/accordion/accordion-extension.js +1 -0
- package/dist/modules/accordion/accordion-view.component.cjs +1 -0
- package/dist/modules/accordion/accordion-view.component.d.cts +1 -0
- package/dist/modules/accordion/accordion-view.component.d.ts +1 -0
- package/dist/modules/accordion/accordion-view.component.js +1 -0
- package/dist/modules/accordion/accordion-view.type.cjs +1 -0
- package/dist/modules/accordion/accordion-view.type.d.cts +2 -0
- package/dist/modules/accordion/accordion-view.type.d.ts +2 -0
- package/dist/modules/accordion/accordion-view.type.js +0 -0
- package/dist/modules/accordion/index.cjs +1 -0
- package/dist/modules/accordion/index.d.cts +4 -0
- package/dist/modules/accordion/index.d.ts +4 -0
- package/dist/modules/accordion/index.js +1 -0
- package/dist/modules/color-picker/color-picker.component.cjs +1 -0
- package/dist/modules/color-picker/color-picker.component.d.cts +1 -0
- package/dist/modules/color-picker/color-picker.component.d.ts +1 -0
- package/dist/modules/color-picker/color-picker.component.js +1 -0
- package/dist/modules/color-picker/color-picker.type.cjs +1 -0
- package/dist/modules/color-picker/color-picker.type.d.cts +1 -0
- package/dist/modules/color-picker/color-picker.type.d.ts +1 -0
- package/dist/modules/color-picker/color-picker.type.js +0 -0
- package/dist/modules/color-picker/index.cjs +1 -0
- package/dist/modules/color-picker/index.d.cts +2 -0
- package/dist/modules/color-picker/index.d.ts +2 -0
- package/dist/modules/color-picker/index.js +1 -0
- package/dist/modules/editor/editor.component.cjs +1 -0
- package/dist/modules/editor/editor.component.d.cts +1 -0
- package/dist/modules/editor/editor.component.d.ts +1 -0
- package/dist/modules/editor/editor.component.js +1 -0
- package/dist/modules/editor/editor.constant.cjs +1 -0
- package/dist/modules/editor/editor.constant.d.cts +1 -0
- package/dist/modules/editor/editor.constant.d.ts +1 -0
- package/dist/modules/editor/editor.constant.js +1 -0
- package/dist/modules/editor/editor.module.d.cts +1 -0
- package/dist/modules/editor/editor.module.d.ts +1 -0
- package/dist/modules/editor/editor.module.scss +313 -0
- package/dist/modules/editor/editor.type.cjs +1 -0
- package/dist/modules/editor/editor.type.d.cts +1 -0
- package/dist/modules/editor/editor.type.d.ts +1 -0
- package/dist/modules/editor/editor.type.js +0 -0
- package/dist/modules/editor/index.cjs +1 -0
- package/dist/modules/editor/index.d.cts +3 -0
- package/dist/modules/editor/index.d.ts +3 -0
- package/dist/modules/editor/index.js +1 -0
- package/dist/modules/heading/heading.component.cjs +1 -0
- package/dist/modules/heading/heading.component.d.cts +1 -0
- package/dist/modules/heading/heading.component.d.ts +1 -0
- package/dist/modules/heading/heading.component.js +1 -0
- package/dist/modules/heading/heading.type.cjs +1 -0
- package/dist/modules/heading/heading.type.d.cts +1 -0
- package/dist/modules/heading/heading.type.d.ts +1 -0
- package/dist/modules/heading/heading.type.js +0 -0
- package/dist/modules/heading/index.cjs +1 -0
- package/dist/modules/heading/index.d.cts +2 -0
- package/dist/modules/heading/index.d.ts +2 -0
- package/dist/modules/heading/index.js +1 -0
- package/dist/modules/home/home.page.cjs +1 -0
- package/dist/modules/home/home.page.d.cts +1 -0
- package/dist/modules/home/home.page.d.ts +1 -0
- package/dist/modules/home/home.page.js +1 -0
- package/dist/modules/home/index.cjs +1 -0
- package/dist/modules/home/index.d.cts +1 -0
- package/dist/modules/home/index.d.ts +1 -0
- package/dist/modules/home/index.js +1 -0
- package/dist/modules/image/image-view.component.cjs +1 -0
- package/dist/modules/image/image-view.component.d.cts +1 -0
- package/dist/modules/image/image-view.component.d.ts +1 -0
- package/dist/modules/image/image-view.component.js +1 -0
- package/dist/modules/image/image-view.type.cjs +1 -0
- package/dist/modules/image/image-view.type.d.cts +2 -0
- package/dist/modules/image/image-view.type.d.ts +2 -0
- package/dist/modules/image/image-view.type.js +0 -0
- package/dist/modules/image/image.cjs +1 -0
- package/dist/modules/image/image.d.cts +1 -0
- package/dist/modules/image/image.d.ts +1 -0
- package/dist/modules/image/image.js +1 -0
- package/dist/modules/image/index.cjs +1 -0
- package/dist/modules/image/index.d.cts +4 -0
- package/dist/modules/image/index.d.ts +4 -0
- package/dist/modules/image/index.js +1 -0
- package/dist/modules/index.cjs +1 -0
- package/dist/modules/index.d.cts +20 -0
- package/dist/modules/index.d.ts +20 -0
- package/dist/modules/index.js +1 -0
- package/dist/modules/table/index.cjs +1 -0
- package/dist/modules/table/index.d.cts +2 -0
- package/dist/modules/table/index.d.ts +2 -0
- package/dist/modules/table/index.js +1 -0
- package/dist/modules/table/table.component.cjs +1 -0
- package/dist/modules/table/table.component.d.cts +1 -0
- package/dist/modules/table/table.component.d.ts +1 -0
- package/dist/modules/table/table.component.js +1 -0
- package/dist/modules/table/table.type.cjs +1 -0
- package/dist/modules/table/table.type.d.cts +1 -0
- package/dist/modules/table/table.type.d.ts +1 -0
- package/dist/modules/table/table.type.js +0 -0
- package/dist/modules/toolbar/index.cjs +1 -0
- package/dist/modules/toolbar/index.d.cts +2 -0
- package/dist/modules/toolbar/index.d.ts +2 -0
- package/dist/modules/toolbar/index.js +1 -0
- package/dist/modules/toolbar/toolbar.component.cjs +1 -0
- package/dist/modules/toolbar/toolbar.component.d.cts +1 -0
- package/dist/modules/toolbar/toolbar.component.d.ts +1 -0
- package/dist/modules/toolbar/toolbar.component.js +1 -0
- package/dist/modules/toolbar/toolbar.custom.component.cjs +1 -0
- package/dist/modules/toolbar/toolbar.custom.component.d.cts +1 -0
- package/dist/modules/toolbar/toolbar.custom.component.d.ts +1 -0
- package/dist/modules/toolbar/toolbar.custom.component.js +1 -0
- package/dist/shared/component/color-picker/color-picker.component.cjs +1 -0
- package/dist/shared/component/color-picker/color-picker.component.d.cts +1 -0
- package/dist/shared/component/color-picker/color-picker.component.d.ts +1 -0
- package/dist/shared/component/color-picker/color-picker.component.js +1 -0
- package/dist/shared/component/color-picker/color-picker.type.cjs +1 -0
- package/dist/shared/component/color-picker/color-picker.type.d.cts +1 -0
- package/dist/shared/component/color-picker/color-picker.type.d.ts +1 -0
- package/dist/shared/component/color-picker/color-picker.type.js +0 -0
- package/dist/shared/component/color-picker/index.cjs +1 -0
- package/dist/shared/component/color-picker/index.d.cts +2 -0
- package/dist/shared/component/color-picker/index.d.ts +2 -0
- package/dist/shared/component/color-picker/index.js +1 -0
- package/dist/shared/component/index.cjs +1 -0
- package/dist/shared/component/index.d.cts +4 -0
- package/dist/shared/component/index.d.ts +4 -0
- package/dist/shared/component/index.js +1 -0
- package/dist/shared/component/modal-edit/index.cjs +1 -0
- package/dist/shared/component/modal-edit/index.d.cts +2 -0
- package/dist/shared/component/modal-edit/index.d.ts +2 -0
- package/dist/shared/component/modal-edit/index.js +1 -0
- package/dist/shared/component/modal-edit/modal-edit.component.cjs +1 -0
- package/dist/shared/component/modal-edit/modal-edit.component.d.cts +1 -0
- package/dist/shared/component/modal-edit/modal-edit.component.d.ts +1 -0
- package/dist/shared/component/modal-edit/modal-edit.component.js +1 -0
- package/dist/shared/component/modal-edit/modal-edit.type.cjs +1 -0
- package/dist/shared/component/modal-edit/modal-edit.type.d.cts +1 -0
- package/dist/shared/component/modal-edit/modal-edit.type.d.ts +1 -0
- package/dist/shared/component/modal-edit/modal-edit.type.js +0 -0
- package/dist/shared/style/global.css +2 -0
- package/dist/shared/style/global.d.cts +1 -0
- package/dist/shared/style/global.d.ts +1 -0
- package/dist/shared/typescript/style.d.cjs +1 -0
- package/dist/shared/typescript/style.d.d.cts +1 -0
- package/dist/shared/typescript/style.d.d.ts +1 -0
- package/dist/shared/typescript/style.d.js +0 -0
- package/package.json +42 -32
- package/dist/client/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/client/_commonjsHelpers-DwGv2jUC.cjs +0 -1
- package/dist/client/assets/manifest-e1ae6e39.js +0 -1
- package/dist/client/chunk-D4RADZKF-CqCYZIAv.js +0 -6257
- package/dist/client/chunk-D4RADZKF-sLhgGPy5.cjs +0 -56
- package/dist/client/cyber-editor.cjs.js +0 -259
- package/dist/client/cyber-editor.cjs2.js +0 -1
- package/dist/client/cyber-editor.cjs3.js +0 -1
- package/dist/client/cyber-editor.cjs4.js +0 -604
- package/dist/client/cyber-editor.cjs5.js +0 -1
- package/dist/client/cyber-editor.css +0 -1
- package/dist/client/cyber-editor.es.js +0 -25364
- package/dist/client/cyber-editor.es2.js +0 -43
- package/dist/client/cyber-editor.es3.js +0 -11
- package/dist/client/cyber-editor.es4.js +0 -46769
- package/dist/client/cyber-editor.es5.js +0 -11
- package/dist/client/index-HJNgKdvE.cjs +0 -5
- package/dist/client/index-rkLJDvut.js +0 -156
- package/dist/client/index.d.ts +0 -23
- package/dist/client/index.html +0 -6
- package/dist/client/with-props-Ba4118z_.js +0 -27
- package/dist/client/with-props-CuGIah2q.cjs +0 -1
- /package/{dist/client → public}/assets/icons/index.ts +0 -0
- /package/{dist/client → public}/favicon.svg +0 -0
|
@@ -1,604 +0,0 @@
|
|
|
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
|
-
`)}}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
|
-
`);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
|
-
`),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(`
|
|
5
|
-
`))}})}function pE(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function mE(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new $n(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Me(fe.from(a),0,0),1,!0))}function fo(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>i;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),m=r&&r[u+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let g=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(p))return!1}let s=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(s,s,l?l.type:o.node(i+1).type)}function gE(t,e,n=1,r){let o=t.doc.resolve(e),i=fe.empty,a=fe.empty;for(let s=o.depth,l=o.depth-n,c=n-1;s>l;s--,c--){i=fe.from(o.node(s).copy(i));let u=r&&r[c];a=fe.from(u?u.type.create(u.attrs,a):o.node(s).copy(a))}t.step(new En(e,e,new Me(i.append(a),n,n),!0))}function Go(t,e){let n=t.resolve(e),r=n.index();return kb(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function vE(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),a=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(a),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function kb(t,e){return!!(t&&e&&!t.isLeaf&&vE(t,e))}function yc(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,a,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&kb(i,a)&&r.node(o).canReplace(s,s+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function bE(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),a=i.node().type;if(o&&a.inlineContent){let u=a.whitespace=="pre",d=!!a.contentMatch.matchType(o);u&&!d?r=!1:!u&&d&&(r=!0)}let s=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);Ab(t,u.node(),u.before(),s)}a.inlineContent&&hh(t,e+n-1,a,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(s),c=l.map(e-n);if(t.step(new En(c,l.map(e+n,-1),Me.empty,!0)),r===!0){let u=t.doc.resolve(c);Tb(t,u.node(),u.before(),t.steps.length)}return t}function yE(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function Db(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,l=r.index(a)+(s>0?1:0),c=r.node(a),u=!1;if(i==1)u=c.canReplace(l,l,o);else{let d=c.contentMatchAt(l).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function Cc(t,e,n=e,r=Me.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return _b(o,i,r)?new En(e,n,r):new CE(o,i,r).fit()}function _b(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class CE{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=fe.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=fe.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,a=r.depth,s=o.depth;for(;a&&s&&i.childCount==1;)i=i.firstChild.content,a--,s--;let l=new Me(i,a,s);return e>-1?new $n(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new En(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=bu(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let a=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:c}=this.frontier[s],u,d=null;if(n==1&&(a?c.matchType(a.type)||(d=c.fillBefore(fe.from(a),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:s,parent:i,inject:d};if(n==2&&a&&(u=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=bu(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Me(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=bu(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new Me(ja(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Me(ja(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g<i.length;g++)this.openFrontierNode(i[g]);let a=this.unplaced,s=r?r.content:a.content,l=a.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[n];if(o){for(let g=0;g<o.childCount;g++)u.push(o.child(g));d=d.matchFragment(o)}let p=s.size+e-(a.content.size-a.openEnd);for(;c<s.childCount;){let g=s.child(c),v=d.matchType(g.type);if(!v)break;c++,(c>1||l==0||g.content.size)&&(d=v,u.push(jb(g.mark(f.allowedMarks(g.marks)),c==1?l:0,c==s.childCount?p:-1)))}let m=c==s.childCount;m||(p=-1),this.placed=Ba(this.placed,n,fe.from(u)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,v=s;g<p;g++){let b=v.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),v=b.content}this.unplaced=m?e==0?Me.empty:new Me(ja(a.content,e-1,1),e-1,p<0?a.openEnd:e-1):new Me(ja(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!yu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),a=yu(e,n,o,r,i);if(a){for(let s=n-1;s>=0;s--){let{match:l,type:c}=this.frontier[s],u=yu(e,s,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:a,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ba(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Ba(this.placed,this.depth,fe.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(fe.empty,!0);n.childCount&&(this.placed=Ba(this.placed,this.frontier.length,n))}}function ja(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(ja(t.firstChild.content,e-1,n)))}function Ba(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Ba(t.lastChild.content,e-1,n)))}function bu(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function jb(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,jb(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(fe.empty,!0)))),t.copy(r)}function yu(t,e,n,r,o){let i=t.node(e),a=o?t.indexAfter(e):t.index(e);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!SE(n,i.content,a)?s:null}function SE(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function xE(t){return t.spec.defining||t.spec.definingForContent}function wE(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(_b(o,i,r))return t.step(new En(e,n,r));let a=zb(o,t.doc.resolve(n));a[a.length-1]==0&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let f=o.depth,p=o.pos-1;f>0;f--,p--){let m=o.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;a.indexOf(f)>-1?s=f:o.before(f)==p&&a.splice(1,0,-f)}let l=a.indexOf(s),c=[],u=r.openStart;for(let f=r.content,p=0;;p++){let m=f.firstChild;if(c.push(m),p==r.openStart)break;f=m.content}for(let f=u-1;f>=0;f--){let p=c[f],m=xE(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(s)-1)))u=f;else if(m||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+u+1)%(r.openStart+1),m=c[p];if(m)for(let g=0;g<a.length;g++){let v=a[(g+l)%a.length],b=!0;v<0&&(b=!1,v=-v);let y=o.node(v-1),C=o.index(v-1);if(y.canReplaceWith(C,C,m.type,m.marks))return t.replace(o.before(v),b?i.after(v):n,new Me(Bb(r.content,0,r.openStart,p),p,r.openEnd))}}let d=t.steps.length;for(let f=a.length-1;f>=0&&(t.replace(e,n,r),!(t.steps.length>d));f--){let p=a[f];p<0||(e=o.before(p),n=i.after(p))}}function Bb(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(Bb(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),a=i.fillBefore(t).append(t);t=a.append(i.matchFragment(a).fillBefore(fe.empty,!0))}return t}function EE(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=yE(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Me(fe.from(r),0,0))}function $E(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=zb(r,o);for(let a=0;a<i.length;a++){let s=i[a],l=a==i.length-1;if(l&&s==0||r.node(s).type.contentMatch.validEnd)return t.delete(r.start(s),o.end(s));if(s>0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return t.delete(r.before(s),o.after(s))}for(let a=1;a<=r.depth&&a<=o.depth;a++)if(e-r.start(a)==r.depth-a&&n>r.end(a)&&o.end(a)-n!=o.depth-a&&r.start(a-1)==o.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),o.index(a-1)))return t.delete(r.before(a),n);t.delete(e,n)}function zb(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class Qi extends Hn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return hn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return hn.fromReplace(e,this.pos,this.pos+1,new Me(fe.from(o),0,n.isLeaf?0:1))}getMap(){return ar.empty}invert(e){return new Qi(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Qi(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Qi(n.pos,n.attr,n.value)}}Hn.jsonID("attr",Qi);class ts extends Hn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return hn.ok(r)}getMap(){return ar.empty}invert(e){return new ts(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new ts(n.attr,n.value)}}Hn.jsonID("docAttr",ts);let ia=class extends Error{};ia=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};ia.prototype=Object.create(Error.prototype);ia.prototype.constructor=ia;ia.prototype.name="TransformError";let Lb=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new es}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new ia(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Me.empty){let o=Cc(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Me(fe.from(r),0,0))}delete(e,n){return this.replace(e,n,Me.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return wE(this,e,n,r),this}replaceRangeWith(e,n,r){return EE(this,e,n,r),this}deleteRange(e,n){return $E(this,e,n),this}lift(e,n){return cE(this,e,n),this}join(e,n=1){return bE(this,e,n),this}wrap(e,n){return fE(this,e,n),this}setBlockType(e,n=e,r,o=null){return hE(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return mE(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Qi(e,n,r)),this}setDocAttribute(e,n){return this.step(new ts(e,n)),this}addNodeMark(e,n){return this.step(new To(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof qt)n.isInSet(r.marks)&&this.step(new yi(e,n));else{let o=r.marks,i,a=[];for(;i=n.isInSet(o);)a.push(new yi(e,i)),o=i.removeFromSet(o);for(let s=a.length-1;s>=0;s--)this.step(a[s])}return this}split(e,n=1,r){return gE(this,e,n,r),this}addMark(e,n,r){return aE(this,e,n,r),this}removeMark(e,n,r){return sE(this,e,n,r),this}clearIncompatible(e,n,r){return hh(this,e,n,r),this}};const Cu=Object.create(null);class it{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new Fb(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Me.empty){let r=n.content.lastChild,o=null;for(let s=0;s<n.openEnd;s++)o=r,r=r.lastChild;let i=e.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:l,$to:c}=a[s],u=e.mapping.slice(i);e.replaceRange(u.map(l.pos),u.map(c.pos),s?Me.empty:n),s==0&&am(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:a,$to:s}=o[i],l=e.mapping.slice(r),c=l.map(a.pos),u=l.map(s.pos);i?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),am(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new rt(e):Ki(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let a=n<0?Ki(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Ki(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(a)return a}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new ur(e.node(0))}static atStart(e){return Ki(e,e,0,0,1)||new ur(e)}static atEnd(e){return Ki(e,e,e.content.size,e.childCount,-1)||new ur(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Cu[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Cu)throw new RangeError("Duplicate use of selection JSON ID "+e);return Cu[e]=n,n.prototype.jsonID=e,n}getBookmark(){return rt.between(this.$anchor,this.$head).getBookmark()}}it.prototype.visible=!0;class Fb{constructor(e,n){this.$from=e,this.$to=n}}let om=!1;function im(t){!om&&!t.parent.inlineContent&&(om=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class rt extends it{constructor(e,n=e){im(e),im(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return it.near(r);let o=e.resolve(n.map(this.anchor));return new rt(o.parent.inlineContent?o:r,r)}replace(e,n=Me.empty){if(super.replace(e,n),n==Me.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof rt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Sc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new rt(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=it.findFrom(n,r,!0)||it.findFrom(n,-r,!0);if(i)n=i.$head;else return it.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(it.findFrom(e,-r,!0)||it.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new rt(e,n)}}it.jsonID("text",rt);class Sc{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Sc(e.map(this.anchor),e.map(this.head))}resolve(e){return rt.between(e.resolve(this.anchor),e.resolve(this.head))}}class tt extends it{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?it.near(i):new tt(i)}content(){return new Me(fe.from(this.node),0,0)}eq(e){return e instanceof tt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new mh(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new tt(e.resolve(n.anchor))}static create(e,n){return new tt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}tt.prototype.visible=!1;it.jsonID("node",tt);class mh{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Sc(r,r):new mh(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&tt.isSelectable(r)?new tt(n):it.near(n)}}class ur extends it{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Me.empty){if(n==Me.empty){e.delete(0,e.doc.content.size);let r=it.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new ur(e)}map(e){return new ur(e)}eq(e){return e instanceof ur}getBookmark(){return OE}}it.jsonID("all",ur);const OE={map(){return this},resolve(t){return new ur(t)}};function Ki(t,e,n,r,o,i=!1){if(e.inlineContent)return rt.create(t,n);for(let a=r-(o>0?0:1);o>0?a<e.childCount:a>=0;a+=o){let s=e.child(a);if(s.isAtom){if(!i&&tt.isSelectable(s))return tt.create(t,n-(o<0?s.nodeSize:0))}else{let l=Ki(t,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}return null}function am(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof En||o instanceof $n))return;let i=t.mapping.maps[r],a;i.forEach((s,l,c,u)=>{a==null&&(a=u)}),t.setSelection(it.near(t.doc.resolve(a),n))}const sm=1,lm=2,cm=4;class ME extends Lb{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|sm)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&sm)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=lm,this}ensureMarks(e){return qt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&lm)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||qt.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let a=this.doc.resolve(n);i=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(it.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=cm,this}get scrolledIntoView(){return(this.updated&cm)>0}}function um(t,e){return!e||!t?t:t.bind(e)}class za{constructor(e,n,r){this.name=e,this.init=um(n.init,r),this.apply=um(n.apply,r)}}const NE=[new za("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new za("selection",{init(t,e){return t.selection||it.atStart(e.doc)},apply(t){return t.selection}}),new za("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new za("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Su{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=NE.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new za(r.key,r.spec.state,r))})}}class Ui{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let s=this.config.plugins[a];if(s.spec.appendTransaction){let l=o?o[a].n:0,c=o?o[a].state:this,u=l<n.length&&s.spec.appendTransaction.call(s,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,a)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<a?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}o&&(o[a]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Ui(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new ME(this)}static create(e){let n=new Su(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Ui(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new Su(this.schema,e.plugins),r=n.fields,o=new Ui(n);for(let i=0;i<r.length;i++){let a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Su(e.schema,e.plugins),i=new Ui(o);return o.fields.forEach(a=>{if(a.name=="doc")i.doc=_o.fromJSON(e.schema,n.doc);else if(a.name=="selection")i.selection=it.fromJSON(i.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let s in r){let l=r[s],c=l.spec.state;if(l.key==a.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){i[a.name]=c.fromJSON.call(l,e,n[s],i);return}}i[a.name]=a.init(e,i)}}),i}}function Hb(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=Hb(o,e,{})),n[r]=o}return n}class Vn{constructor(e){this.spec=e,this.props={},e.props&&Hb(e.props,this,this.props),this.key=e.key?e.key.key:Vb("plugin")}getState(e){return e[this.key]}}const xu=Object.create(null);function Vb(t){return t in xu?t+"$"+ ++xu[t]:(xu[t]=0,t+"$")}class fr{constructor(e="key"){this.key=Vb(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Pn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},aa=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Id=null;const ao=function(t,e,n){let r=Id||(Id=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},RE=function(){Id=null},Ci=function(t,e,n,r){return n&&(dm(t,e,n,r,-1)||dm(t,e,n,r,1))},IE=/^(img|br|input|textarea|hr)$/i;function dm(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:yr(t))){let i=t.parentNode;if(!i||i.nodeType!=1||Ss(t)||IE.test(t.nodeName)||t.contentEditable=="false")return!1;e=Pn(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?yr(t):0}else return!1}}function yr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function PE(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=yr(t)}else if(t.parentNode&&!Ss(t))e=Pn(t),t=t.parentNode;else return null}}function TE(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Ss(t))e=Pn(t)+1,t=t.parentNode;else return null}}function AE(t,e,n){for(let r=e==0,o=e==yr(t);r||o;){if(t==n)return!0;let i=Pn(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==yr(t)}}function Ss(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const xc=function(t){return t.focusNode&&Ci(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ei(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function kE(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function DE(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(yr(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(yr(r.startContainer),r.startOffset)}}}const Gr=typeof navigator<"u"?navigator:null,fm=typeof document<"u"?document:null,Uo=Gr&&Gr.userAgent||"",Pd=/Edge\/(\d+)/.exec(Uo),Wb=/MSIE \d/.exec(Uo),Td=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Uo),Zn=!!(Wb||Td||Pd),Bo=Wb?document.documentMode:Td?+Td[1]:Pd?+Pd[1]:0,kr=!Zn&&/gecko\/(\d+)/i.test(Uo);kr&&+(/Firefox\/(\d+)/.exec(Uo)||[0,0])[1];const Ad=!Zn&&/Chrome\/(\d+)/.exec(Uo),Bn=!!Ad,qb=Ad?+Ad[1]:0,qn=!Zn&&!!Gr&&/Apple Computer/.test(Gr.vendor),sa=qn&&(/Mobile\/\w+/.test(Uo)||!!Gr&&Gr.maxTouchPoints>2),br=sa||(Gr?/Mac/.test(Gr.platform):!1),_E=Gr?/Win/.test(Gr.platform):!1,lo=/Android \d/.test(Uo),xs=!!fm&&"webkitFontSmoothing"in fm.documentElement.style,jE=xs?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function BE(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function ro(t,e){return typeof t=="number"?t:t[e]}function zE(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function hm(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let a=n||t.dom;a;){if(a.nodeType!=1){a=aa(a);continue}let s=a,l=s==i.body,c=l?BE(i):zE(s),u=0,d=0;if(e.top<c.top+ro(r,"top")?d=-(c.top-e.top+ro(o,"top")):e.bottom>c.bottom-ro(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+ro(o,"top")-c.top:e.bottom-c.bottom+ro(o,"bottom")),e.left<c.left+ro(r,"left")?u=-(c.left-e.left+ro(o,"left")):e.right>c.right-ro(r,"right")&&(u=e.right-c.right+ro(o,"right")),u||d)if(l)i.defaultView.scrollBy(u,d);else{let p=s.scrollLeft,m=s.scrollTop;d&&(s.scrollTop+=d),u&&(s.scrollLeft+=u);let g=s.scrollLeft-p,v=s.scrollTop-m;e={left:e.left-g,top:e.top-v,right:e.right-g,bottom:e.bottom-v}}let f=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(f))break;a=f=="absolute"?a.offsetParent:aa(a)}}function LE(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,a=n+1;a<Math.min(innerHeight,e.bottom);a+=5){let s=t.root.elementFromPoint(i,a);if(!s||s==t.dom||!t.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=n-20){r=s,o=l.top;break}}return{refDOM:r,refTop:o,stack:Kb(t.dom)}}function Kb(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=aa(r));return e}function FE({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Gb(n,r==0?0:r-e)}function Gb(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Di=null;function HE(t){if(t.setActive)return t.setActive();if(Di)return t.focus(Di);let e=Kb(t);t.focus(Di==null?{get preventScroll(){return Di={preventScroll:!0},!0}}:void 0),Di||(Di=!1,Gb(e,0))}function Ub(t,e){let n,r=2e8,o,i=0,a=e.top,s=e.top,l,c;for(let u=t.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=ao(u).getClientRects();else continue;for(let p=0;p<f.length;p++){let m=f[p];if(m.top<=a&&m.bottom>=s){a=Math.max(m.bottom,a),s=Math.min(m.top,s);let g=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(g<r){n=u,r=g,o=g&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,u.nodeType==1&&g&&(i=d+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!l&&m.left<=e.left&&m.right>=e.left&&(l=u,c={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!n&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(i=d+1)}}return!n&&l&&(n=l,o=c,r=0),n&&n.nodeType==3?VE(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:Ub(n,o)}function VE(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let i=Eo(r,1);if(i.top!=i.bottom&&gh(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function gh(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function WE(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function qE(t,e,n){let{node:r,offset:o}=Ub(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();i=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function KE(t,e,n,r){let o=-1;for(let i=e,a=!1;i!=t.dom;){let s=t.docView.nearestDesc(i,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&(!a&&l.left>r.left||l.top>r.top?o=s.posBefore:(!a&&l.right<r.left||l.bottom<r.top)&&(o=s.posAfter),a=!0),!s.contentDOM&&o<0&&!s.node.isText))return(s.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;i=s.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function Xb(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let a=t.childNodes[i];if(a.nodeType==1){let s=a.getClientRects();for(let l=0;l<s.length;l++){let c=s[l];if(gh(e,c))return Xb(a,e,c)}}if((i=(i+1)%r)==o)break}return t}function GE(t,e){let n=t.dom.ownerDocument,r,o=0,i=DE(n,e.left,e.top);i&&({node:r,offset:o}=i);let a=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),s;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=t.dom.getBoundingClientRect();if(!gh(e,c)||(a=Xb(t.dom,e,c),!a))return null}if(qn)for(let c=a;r&&c;c=aa(c))c.draggable&&(r=void 0);if(a=WE(a,e),r){if(kr&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&o++}let c;xs&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=KE(t,r,o,e))}s==null&&(s=qE(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function pm(t){return t.top<t.bottom||t.left<t.right}function Eo(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(pm(r))return r}return Array.prototype.find.call(n,pm)||t.getBoundingClientRect()}const UE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Yb(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),a=xs||kr;if(r.nodeType==3)if(a&&(UE.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=Eo(ao(r,o,o),n);if(kr&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=Eo(ao(r,o-1,o-1),-1);if(c.top==l.top){let u=Eo(ao(r,o,o+1),-1);if(u.top!=l.top)return Ra(u,u.left<c.left)}}return l}else{let l=o,c=o,u=n<0?1:-1;return n<0&&!o?(c++,u=-1):n>=0&&o==r.nodeValue.length?(l--,u=1):n<0?l--:c++,Ra(Eo(ao(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==yr(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return wu(l.getBoundingClientRect(),!1)}if(i==null&&o<yr(r)){let l=r.childNodes[o];if(l.nodeType==1)return wu(l.getBoundingClientRect(),!0)}return wu(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==yr(r))){let l=r.childNodes[o-1],c=l.nodeType==3?ao(l,yr(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Ra(Eo(c,1),!1)}if(i==null&&o<yr(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?ao(l,0,a?0:1):l.nodeType==1?l:null:null;if(c)return Ra(Eo(c,-1),!0)}return Ra(Eo(r.nodeType==3?ao(r):r,-n),n>=0)}function Ra(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function wu(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Jb(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function XE(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return Jb(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=t.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let a=Yb(t,o.pos,1);for(let s=i.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=ao(s,0,s.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?a.top-u.top>(u.bottom-a.top)*2:u.bottom-a.bottom>(a.bottom-u.top)*2))return!1}}return!0})}const YE=/[\u0590-\u08ac]/;function JE(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=t.domSelection();return s?!YE.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?i:a:Jb(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),f=s.caretBidiLevel;s.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:m,focusOffset:g}=t.domSelectionRange(),v=m&&!p.contains(m.nodeType==1?m:m.parentNode)||l==m&&c==g;try{s.collapse(u,d),l&&(l!=u||c!=d)&&s.extend&&s.extend(l,c)}catch{}return f!=null&&(s.caretBidiLevel=f),v}):r.pos==r.start()||r.pos==r.end()}let mm=null,gm=null,vm=!1;function ZE(t,e,n){return mm==e&&gm==n?vm:(mm=e,gm=n,vm=n=="up"||n=="down"?XE(t,e,n):JE(t,e,n))}const Cr=0,bm=1,oi=2,Ur=3;class ws{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Cr,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,a;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>Pn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),a;if(i&&(!n||i.node))if(r&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let a=0;a<o.children.length;a++){let s=o.children[a];if(s.size){o=s;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let a=this.children[r],s=i+a.size;if(s>e||a instanceof Qb){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Zb&&i.side>=0;r--);if(n<=0){let i,a=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,a=!1);return i&&n&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Pn(i.dom)+1:0}}else{let i,a=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Pn(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let a=r,s=0;;s++){let l=this.children[s],c=a+l.size;if(o==-1&&e<=c){let u=a+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=a;for(let d=s;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=Pn(f.dom)+1;break}e-=f.size}o==-1&&(o=0)}if(o>-1&&(c>n||s==this.children.length-1)){n=c;for(let u=s+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){i=Pn(d.dom);break}n+=d.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=c}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),a=Math.max(e,n);for(let p=0,m=0;p<this.children.length;p++){let g=this.children[p],v=m+g.size;if(i>m&&a<v)return g.setSelection(e-m-g.border,n-m-g.border,r,o);m=v}let s=this.domFromPos(e,e?-1:1),l=n==e?s:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),d=!1;if((kr||qn)&&e==n){let{node:p,offset:m}=s;if(p.nodeType==3){if(d=!!(m&&p.nodeValue[m-1]==`
|
|
6
|
-
`),d&&m==p.nodeValue.length)for(let g=p,v;g;g=g.parentNode){if(v=g.nextSibling){v.nodeName=="BR"&&(s=l={node:v.parentNode,offset:Pn(v)+1});break}let b=g.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let g=p.childNodes[m-1];d=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(kr&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(o=!0)}if(!(o||d&&qn)&&Ci(s.node,s.offset,u.anchorNode,u.anchorOffset)&&Ci(l.node,l.offset,u.focusNode,u.focusOffset))return;let f=!1;if((c.extend||e==n)&&!d){c.collapse(s.node,s.offset);try{e!=n&&c.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(e>n){let m=s;s=l,l=m}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(s.node,s.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],a=r+i.size;if(r==a?e<=a&&n>=r:e<a&&n>r){let s=r+i.border,l=a-i.border;if(e>=s&&n<=l){this.dirty=e==r||n==a?oi:bm,e==s&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ur:i.markDirty(e-s,n-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?oi:Ur}r=a}this.dirty=oi}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?oi:bm;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Zb extends ws{constructor(e,n,r,o){let i,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==Cr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class QE extends ws{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Si extends ws{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return(!a||!a.dom)&&(a=Mi.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Si(e,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&Ur||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ur&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Cr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Cr}}slice(e,n,r){let o=Si.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=Dd(i,n,a,r)),e>0&&(i=Dd(i,0,e,r));for(let s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class zo extends ws{constructor(e,n,r,o,i,a,s,l,c){super(e,[],i,a),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=s}static create(e,n,r,o,i,a){let s=i.nodeViews[n.type.name],l,c=s&&s(n,i,()=>{if(!l)return a;if(l.parent)return l.parent.posBeforeChild(l)},r,o),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Mi.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=ny(u,r,n),c?l=new e$(e,n,r,o,u,d||null,f,c,i,a+1):n.isText?new wc(e,n,r,o,u,f,i):new zo(e,n,r,o,u,d||null,f,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>fe.empty)}return e}matchesNode(e,n,r){return this.dirty==Cr&&e.eq(this.node)&&Vl(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new n$(this,a&&a.node,e);i$(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?qt.none:this.node.child(u).marks,r,e),l.placeWidget(c,e,o)},(c,u,d,f)=>{l.syncToMarks(c.marks,r,e);let p;l.findNodeMatch(c,u,d,f)||s&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(p=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(c,u,d,p,e)||l.updateNextNode(c,u,d,e,f,o)||l.addNode(c,u,d,e,o),o+=c.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==oi)&&(a&&this.protectLocalComposition(e,a),ey(this.contentDOM,this.children,e),sa&&a$(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof rt)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let a=i.nodeValue,s=s$(this.node.content,a,r-n,o-n);return s<0?null:{node:i,pos:s,text:a}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new QE(this,i,n,o);e.input.compositionNodes.push(a),this.children=Dd(this.children,r,r+o.length,e,a)}update(e,n,r,o){return this.dirty==Ur||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Cr}updateOuterDeco(e){if(Vl(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=ty(this.dom,this.nodeDOM,kd(this.outerDeco,this.node,n),kd(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function ym(t,e,n,r,o){ny(r,e,t);let i=new zo(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class wc extends zo{constructor(e,n,r,o,i,a,s){super(e,n,r,o,i,null,a,s,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Ur||this.dirty!=Cr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Cr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=Cr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new wc(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ur)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Qb extends ws{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Cr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class e$ extends zo{constructor(e,n,r,o,i,a,s,l,c,u){super(e,n,r,o,i,a,s,c,u),this.spec=l}update(e,n,r,o){if(this.dirty==Ur)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function ey(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let a=e[i],s=a.dom;if(s.parentNode==t){for(;s!=r;)r=Cm(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(s,r);if(a instanceof Si){let l=r?r.previousSibling:t.lastChild;ey(a.contentDOM,a.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=Cm(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const qa=function(t){t&&(this.nodeName=t)};qa.prototype=Object.create(null);const ii=[new qa];function kd(t,e,n){if(t.length==0)return ii;let r=n?ii[0]:new qa,o=[r];for(let i=0;i<t.length;i++){let a=t[i].type.attrs;if(a){a.nodeName&&o.push(r=new qa(a.nodeName));for(let s in a){let l=a[s];l!=null&&(n&&o.length==1&&o.push(r=new qa(e.isInline?"span":"div")),s=="class"?r.class=(r.class?r.class+" ":"")+l:s=="style"?r.style=(r.style?r.style+";":"")+l:s!="nodeName"&&(r[s]=l))}}}return o}function ty(t,e,n,r){if(n==ii&&r==ii)return e;let o=e;for(let i=0;i<r.length;i++){let a=r[i],s=n[i];if(i){let l;s&&s.nodeName==a.nodeName&&o!=t&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName),l.pmIsDeco=!0,l.appendChild(o),s=ii[0]),o=l}t$(o,s||ii[0],a)}return o}function t$(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function ny(t,e,n){return ty(t,t,ii,kd(e,n,t.nodeType!=1))}function Vl(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Cm(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class n${constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=r$(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let o=0,i=this.stack.length>>1,a=Math.min(i,e.length);for(;o<a&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=Cr,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[i])&&!this.isLocked(c.dom)){s=l;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let l=Si.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(e,n,r))i=this.top.children.indexOf(a,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let c=this.top.children[s];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){i=s;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let a=this.top.children[o];return a.dirty==Ur&&a.dom==a.contentDOM&&(a.dirty=oi),a.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,a){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof zo){let c=this.preMatch.matched.get(l);if(c!=null&&c!=i)return!1;let u=l.dom,d,f=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Ur&&Vl(n,l.outerDeco));if(!f&&l.update(e,n,r,o))return this.destroyBetween(this.index,s),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,e,n,r,o,a)))return this.destroyBetween(this.index,s),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=oi,d.updateChildren(o,a+1),d.dirty=Cr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,a){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Vl(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let s=zo.create(this.top,n,r,o,i,a);if(s.contentDOM){s.children=e.children,e.children=[];for(let l of s.children)l.parent=s}return e.destroy(),s}addNode(e,n,r,o,i){let a=zo.create(this.top,e,n,r,o,i);a.contentDOM&&a.updateChildren(o,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new Zb(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Si;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof wc)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((qn||Bn)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new Qb(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function r$(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,a=[];e:for(;o>0;){let s;for(;;)if(r){let c=n.children[r-1];if(c instanceof Si)n=c,r=c.children.length;else{s=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=t.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}function o$(t,e){return t.type.side-e.type.side}function i$(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,o,e.forChild(i,u),c),i+=u.nodeSize}return}let a=0,s=[],l=null;for(let c=0;;){let u,d;for(;a<o.length&&o[a].to==i;){let v=o[a++];v.widget&&(u?(d||(d=[u])).push(v):u=v)}if(u)if(d){d.sort(o$);for(let v=0;v<d.length;v++)n(d[v],c,!!l)}else n(u,c,!!l);let f,p;if(l)p=-1,f=l,l=null;else if(c<t.childCount)p=c,f=t.child(c++);else break;for(let v=0;v<s.length;v++)s[v].to<=i&&s.splice(v--,1);for(;a<o.length&&o[a].from<=i&&o[a].to>i;)s.push(o[a++]);let m=i+f.nodeSize;if(f.isText){let v=m;a<o.length&&o[a].from<v&&(v=o[a].from);for(let b=0;b<s.length;b++)s[b].to<v&&(v=s[b].to);v<m&&(l=f.cut(v-i),f=f.cut(0,v-i),m=v,p=-1)}else for(;a<o.length&&o[a].to<m;)a++;let g=f.isInline&&!f.isLeaf?s.filter(v=>!v.inline):s.slice();r(f,g,e.forChild(i,f),p),i=m}}function a$(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function s$(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let a=t.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<t.childCount;){let c=t.child(o++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){if(i>=r&&l.slice(r-e.length-s,r-s)==e)return r-e.length;let c=s<r?l.lastIndexOf(e,r-s-1):-1;if(c>=0&&c+e.length+s>=n)return s+c;if(n==r&&l.length>=r+e.length-s&&l.slice(r-s,r-s+e.length)==e)return r}}return-1}function Dd(t,e,n,r,o){let i=[];for(let a=0,s=0;a<t.length;a++){let l=t[a],c=s,u=s+=l.size;c>=n||u<=e?i.push(l):(c<e&&i.push(l.slice(0,e-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function vh(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,a=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),l,c;if(xc(n)){for(l=a;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&tt.isSelectable(d)&&o.parent&&!(d.isInline&&AE(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;c=new tt(a==f?s:r.resolve(f))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=a,f=a;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);d=Math.min(d,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[l,a]=f==t.state.selection.anchor?[f,d]:[d,f],s=r.resolve(a)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let d=e=="pointer"||t.state.selection.head<s.pos&&!i?1:-1;c=bh(t,u,s,d)}return c}function ry(t){return t.editable?t.hasFocus():iy(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ho(t,e=!1){let n=t.state.selection;if(oy(t,n),!!ry(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Bn){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Ci(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)c$(t);else{let{anchor:r,head:o}=n,i,a;Sm&&!(n instanceof rt)&&(n.$from.parent.inlineContent||(i=xm(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=xm(t,n.to))),t.docView.setSelection(r,o,t,e),Sm&&(i&&wm(i),a&&wm(a)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&l$(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Sm=qn||Bn&&qb<63;function xm(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(qn&&o&&o.contentEditable=="false")return Eu(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return Eu(o);if(i)return Eu(i)}}function Eu(t){return t.contentEditable="true",qn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function wm(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function l$(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!ry(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function c$(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setStart(r.parentNode,Pn(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&Zn&&Bo<=11&&(r.disabled=!0,r.disabled=!1)}function oy(t,e){if(e instanceof tt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Em(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Em(t)}function Em(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function bh(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||rt.between(e,n,r)}function $m(t){return t.editable&&!t.hasFocus()?!1:iy(t)}function iy(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function u$(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Ci(e.node,e.offset,n.anchorNode,n.anchorOffset)}function _d(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&it.findFrom(i,e)}function Oo(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Om(t,e,n){let r=t.state.selection;if(r instanceof rt)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return Oo(t,new rt(r.$anchor,a))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=_d(t.state,e);return o&&o instanceof tt?Oo(t,o):!1}else if(!(br&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,a;if(!i||i.isText)return!1;let s=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(a=t.docView.descAt(s))&&!a.contentDOM?tt.isSelectable(i)?Oo(t,new tt(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):xs?Oo(t,new rt(t.state.doc.resolve(e<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof tt&&r.node.isInline)return Oo(t,new rt(e>0?r.$to:r.$from));{let o=_d(t.state,e);return o?Oo(t,o):!1}}}function Wl(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ka(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function _i(t,e){return e<0?d$(t):f$(t)}function d$(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,a=!1;for(kr&&n.nodeType==1&&r<Wl(n)&&Ka(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(Ka(s,-1))o=n,i=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(ay(n))break;{let s=n.previousSibling;for(;s&&Ka(s,-1);)o=n.parentNode,i=Pn(s),s=s.previousSibling;if(s)n=s,r=Wl(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?jd(t,n,r):o&&jd(t,o,i)}function f$(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Wl(n),i,a;for(;;)if(r<o){if(n.nodeType!=1)break;let s=n.childNodes[r];if(Ka(s,1))i=n,a=++r;else break}else{if(ay(n))break;{let s=n.nextSibling;for(;s&&Ka(s,1);)i=s.parentNode,a=Pn(s)+1,s=s.nextSibling;if(s)n=s,r=0,o=Wl(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&jd(t,i,a)}function ay(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function h$(t,e){for(;t&&e==t.childNodes.length&&!Ss(t);)e=Pn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function p$(t,e){for(;t&&!e&&!Ss(t);)e=Pn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function jd(t,e,n){if(e.nodeType!=3){let i,a;(a=h$(e,n))?(e=a,n=0):(i=p$(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(xc(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&ho(t)},50)}function Mm(t,e){let n=t.state.doc.resolve(e);if(!(Bn||_E)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Nm(t,e,n){let r=t.state.selection;if(r instanceof rt&&!r.empty||n.indexOf("s")>-1||br&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=_d(t.state,e);if(a&&a instanceof tt)return Oo(t,a)}if(!o.parent.inlineContent){let a=e<0?o:i,s=r instanceof ur?it.near(a,e):it.findFrom(a,e);return s?Oo(t,s):!1}return!1}function Rm(t,e){if(!(t.state.selection instanceof rt))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let a=t.state.tr;return e<0?a.delete(n.pos-i.nodeSize,n.pos):a.delete(n.pos,n.pos+i.nodeSize),t.dispatch(a),!0}return!1}function Im(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function m$(t){if(!qn||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Im(t,r,"true"),setTimeout(()=>Im(t,r,"false"),20)}return!1}function g$(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function v$(t,e){let n=e.keyCode,r=g$(e);if(n==8||br&&n==72&&r=="c")return Rm(t,-1)||_i(t,-1);if(n==46&&!e.shiftKey||br&&n==68&&r=="c")return Rm(t,1)||_i(t,1);if(n==13||n==27)return!0;if(n==37||br&&n==66&&r=="c"){let o=n==37?Mm(t,t.state.selection.from)=="ltr"?-1:1:-1;return Om(t,o,r)||_i(t,o)}else if(n==39||br&&n==70&&r=="c"){let o=n==39?Mm(t,t.state.selection.from)=="ltr"?1:-1:1;return Om(t,o,r)||_i(t,o)}else{if(n==38||br&&n==80&&r=="c")return Nm(t,-1,r)||_i(t,-1);if(n==40||br&&n==78&&r=="c")return m$(t)||Nm(t,1,r)||_i(t,1);if(r==(br?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function yh(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let a=t.someProp("clipboardSerializer")||Mi.fromSchema(t.state.schema),s=fy(),l=s.createElement("div");l.appendChild(a.serializeFragment(r,{document:s}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=dy[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=s.createElement(u[p]);for(;l.firstChild;)m.appendChild(l.firstChild);l.appendChild(m),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
|
|
7
|
-
|
|
8
|
-
`);return{dom:l,text:f,slice:e}}function sy(t,e,n,r,o){let i=o.parent.type.spec.code,a,s;if(!n&&!e)return null;let l=e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",f=>{e=f(e,i||r,t)}),i)return e?new Me(fe.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
9
|
-
`))),0,0):Me.empty;let d=t.someProp("clipboardTextParser",f=>f(e,o,r,t));if(d)s=d;else{let f=o.marks(),{schema:p}=t.state,m=Mi.fromSchema(p);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let v=a.appendChild(document.createElement("p"));g&&v.appendChild(m.serializeNode(p.text(g,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),a=S$(n),xs&&x$(a);let c=a&&a.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=a.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;a=f}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||jo.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!b$.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)s=w$(Pm(s,+u[1],+u[2]),u[4]);else if(s=Me.maxOpen(y$(s.content,o),!0),s.openStart||s.openEnd){let d=0,f=0;for(let p=s.content.firstChild;d<s.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=s.content.lastChild;f<s.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);s=Pm(s,d,f)}return t.someProp("transformPasted",d=>{s=d(s,t)}),s}const b$=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function y$(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,a=[];if(t.forEach(s=>{if(!a)return;let l=o.findWrapping(s.type),c;if(!l)return a=null;if(c=a.length&&i.length&&cy(l,i,s,a[a.length-1],0))a[a.length-1]=c;else{a.length&&(a[a.length-1]=uy(a[a.length-1],i.length));let u=ly(s,l);a.push(u),o=o.matchType(u.type),i=l}}),a)return fe.from(a)}return t}function ly(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,fe.from(t));return t}function cy(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=cy(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(fe.from(ly(n,t,o+1))))}}function uy(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,uy(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(fe.empty,!0);return t.copy(n.append(r))}function Bd(t,e,n,r,o,i){let a=e<0?t.firstChild:t.lastChild,s=a.content;return t.childCount>1&&(i=0),o<r-1&&(s=Bd(s,e,n,r,o+1,i)),o>=n&&(s=e<0?a.contentMatchAt(0).fillBefore(s,i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(fe.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(s))}function Pm(t,e,n){return e<t.openStart&&(t=new Me(Bd(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Me(Bd(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const dy={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Tm=null;function fy(){return Tm||(Tm=document.implementation.createHTMLDocument("title"))}let $u=null;function C$(t){let e=window.trustedTypes;return e?($u||($u=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),$u.createHTML(t)):t}function S$(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=fy().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&dy[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=C$(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function x$(t){let e=t.querySelectorAll(Bn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function w$(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:a}=t;for(let s=r.length-2;s>=0;s-=2){let l=n.nodes[r[s]];if(!l||l.hasRequiredAttrs())break;o=fe.from(l.create(r[s+1],o)),i++,a++}return new Me(o,i,a)}const Kn={},Gn={},E$={touchstart:!0,touchmove:!0};class $${constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function O$(t){for(let e in Kn){let n=Kn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{N$(t,r)&&!Ch(t,r)&&(t.editable||!(r.type in Gn))&&n(t,r)},E$[e]?{passive:!0}:void 0)}qn&&t.dom.addEventListener("input",()=>null),zd(t)}function Ao(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function M$(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function zd(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Ch(t,r))})}function Ch(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function N$(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function R$(t,e){!Ch(t,e)&&Kn[e.type]&&(t.editable||!(e.type in Gn))&&Kn[e.type](t,e)}Gn.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!py(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(lo&&Bn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),sa&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,ei(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||v$(t,n)?n.preventDefault():Ao(t,"key")};Gn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Gn.keypress=(t,e)=>{let n=e;if(py(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||br&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof rt)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function Ec(t){return{left:t.clientX,top:t.clientY}}function I$(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Sh(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(t.someProp(e,s=>a>i.depth?s(t,n,i.nodeAfter,i.before(a),o,!0):s(t,n,i.node(a),i.before(a),o,!1)))return!0;return!1}function ea(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function P$(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&tt.isSelectable(r)?(ea(t,new tt(n)),!0):!1}function T$(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof tt&&(r=n.node);let i=t.state.doc.resolve(e);for(let a=i.depth+1;a>0;a--){let s=a>i.depth?i.nodeAfter:i.node(a);if(tt.isSelectable(s)){r&&n.$from.depth>0&&a>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(a);break}}return o!=null?(ea(t,tt.create(t.state.doc,o)),!0):!1}function A$(t,e,n,r,o){return Sh(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?T$(t,n):P$(t,n))}function k$(t,e,n,r){return Sh(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function D$(t,e,n,r){return Sh(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||_$(t,n,r)}function _$(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(ea(t,rt.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)ea(t,rt.create(r,s+1,s+1+a.content.size));else if(tt.isSelectable(a))ea(t,tt.create(r,s));else continue;return!0}}function xh(t){return ql(t)}const hy=br?"metaKey":"ctrlKey";Kn.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=xh(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&I$(n,t.input.lastClick)&&!n[hy]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let a=t.posAtCoords(Ec(n));a&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new j$(t,a,n,!!r)):(i=="doubleClick"?k$:D$)(t,a.pos,a.inside,n)?n.preventDefault():Ao(t,"pointer"))};class j${constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[hy],this.allowDefault=r.shiftKey;let i,a;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),a=n.inside;else{let u=e.state.doc.resolve(n.pos);i=u.parent,a=u.depth?u.before():0}const s=o?null:r.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof tt&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&kr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ao(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ho(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ec(e))),this.updateAllowDefault(e),this.allowDefault||!n?Ao(this.view,"pointer"):A$(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||qn&&this.mightDrag&&!this.mightDrag.node.isAtom||Bn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ea(this.view,it.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Ao(this.view,"pointer")}move(e){this.updateAllowDefault(e),Ao(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Kn.touchstart=t=>{t.input.lastTouch=Date.now(),xh(t),Ao(t,"pointer")};Kn.touchmove=t=>{t.input.lastTouch=Date.now(),Ao(t,"pointer")};Kn.contextmenu=t=>xh(t);function py(t,e){return t.composing?!0:qn&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const B$=lo?5e3:-1;Gn.compositionstart=Gn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof rt&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),ql(t,!0),t.markCursor=null;else if(ql(t,!e.selection.empty),kr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(a.nodeType==3){let s=t.domSelection();s&&s.collapse(a,a.nodeValue.length);break}else o=a,i=-1}}t.input.composing=!0}my(t,B$)};Gn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,my(t,20))};function my(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ql(t),e))}function gy(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=L$());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function z$(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=PE(e.focusNode,e.focusOffset),r=TE(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function L$(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function ql(t,e=!1){if(!(lo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),gy(t),e||t.docView&&t.docView.dirty){let n=vh(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function F$(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const ns=Zn&&Bo<15||sa&&jE<604;Kn.copy=Gn.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=ns?null:n.clipboardData,a=r.content(),{dom:s,text:l}=yh(t,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):F$(t,s),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function H$(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function V$(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?rs(t,r.value,null,o,e):rs(t,r.textContent,r.innerHTML,o,e)},50)}function rs(t,e,n,r,o){let i=sy(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,i||Me.empty)))return!0;if(!i)return!1;let a=H$(i),s=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(i);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function vy(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Gn.paste=(t,e)=>{let n=e;if(t.composing&&!lo)return;let r=ns?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&rs(t,vy(r),r.getData("text/html"),o,n)?n.preventDefault():V$(t,n)};class by{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const W$=br?"altKey":"ctrlKey";function yy(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[W$]}Kn.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(Ec(n)),a;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof tt?o.to-1:o.to))){if(r&&r.mightDrag)a=tt.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(a=tt.create(t.state.doc,d.posBefore))}}let s=(a||t.state.selection).content(),{dom:l,text:c,slice:u}=yh(t,s);(!n.dataTransfer.files.length||!Bn||qb>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ns?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ns||n.dataTransfer.setData("text/plain",c),t.dragging=new by(u,yy(t,n),a)};Kn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Gn.dragover=Gn.dragenter=(t,e)=>e.preventDefault();Gn.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(Ec(n));if(!o)return;let i=t.state.doc.resolve(o.pos),a=r&&r.slice;a?t.someProp("transformPasted",m=>{a=m(a,t)}):a=sy(t,vy(n.dataTransfer),ns?null:n.dataTransfer.getData("text/html"),!1,i);let s=!!(r&&yy(t,n));if(t.someProp("handleDrop",m=>m(t,n,a||Me.empty,s))){n.preventDefault();return}if(!a)return;n.preventDefault();let l=a?Db(t.state.doc,i.pos,a):i.pos;l==null&&(l=i.pos);let c=t.state.tr;if(s){let{node:m}=r;m?m.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,a.content.firstChild):c.replaceRange(u,u,a),c.doc.eq(f))return;let p=c.doc.resolve(u);if(d&&tt.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new tt(p));else{let m=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((g,v,b,y)=>m=y),c.setSelection(bh(t,p,c.doc.resolve(m)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};Kn.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&ho(t)},20))};Kn.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Kn.beforeinput=(t,e)=>{if(Bn&&lo&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,ei(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in Gn)Kn[t]=Gn[t];function is(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Kl{constructor(e,n){this.toDOM=e,this.spec=n||fi,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:a}=e.mapResult(n.from+o,this.side<0?-1:1);return a?null:new Wn(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Kl&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&is(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Lo{constructor(e,n){this.attrs=e,this.spec=n||fi}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,a=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new Wn(i,a,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Lo&&is(this.attrs,e.attrs)&&is(this.spec,e.spec)}static is(e){return e.type instanceof Lo}destroy(){}}class wh{constructor(e,n){this.attrs=e,this.spec=n||fi}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let a=e.mapResult(n.to+o,-1);return a.deleted||a.pos<=i.pos?null:new Wn(i.pos-r,a.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof wh&&is(this.attrs,e.attrs)&&is(this.spec,e.spec)}destroy(){}}class Wn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Wn(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Wn(e,e,new Kl(n,r))}static inline(e,n,r,o){return new Wn(e,n,new Lo(r,o))}static node(e,n,r,o){return new Wn(e,n,new wh(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Lo}get widget(){return this.type instanceof Kl}}const Gi=[],fi={};class rn{constructor(e,n){this.local=e.length?e:Gi,this.children=n.length?n:Gi}static create(e,n){return n.length?Gl(n,e,0,fi):_n}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let a=0;a<this.local.length;a++){let s=this.local[a];s.from<=n&&s.to>=e&&(!i||i(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>e){let s=this.children[a]+1;this.children[a+2].findInner(e-s,n-s,r,o+s,i)}}map(e,n,r){return this==_n||e.maps.length==0?this:this.mapInner(e,n,0,0,r||fi)}mapInner(e,n,r,o,i){let a;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?q$(this.children,a||[],e,n,r,o,i):a?new rn(a.sort(hi),Gi):_n}add(e,n){return n.length?this==_n?rn.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((s,l)=>{let c=l+r,u;if(u=Sy(n,s,c)){for(o||(o=this.children.slice());i<o.length&&o[i]<l;)i+=3;o[i]==l?o[i+2]=o[i+2].addInner(s,u,c+1):o.splice(i,0,l,l+s.nodeSize,Gl(u,s,c+1,fi)),i+=3}});let a=Cy(i?xy(n):n,-r);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new rn(a.length?this.local.concat(a).sort(hi):this.local,o||this.children)}remove(e){return e.length==0||this==_n?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let a,s=r[i]+n,l=r[i+1]+n;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>s&&d.to<l&&(e[u]=null,(a||(a=[])).push(d));if(!a)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(a,s+1);c!=_n?r[i+2]=c:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,a;i<e.length;i++)if(a=e[i])for(let s=0;s<o.length;s++)o[s].eq(a,n)&&(o==this.local&&(o=this.local.slice()),o.splice(s--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new rn(o,r):_n}forChild(e,n){if(this==_n)return this;if(n.isLeaf)return rn.empty;let r,o;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(r=this.children[s+2]);break}let i=e+1,a=i+n.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<a&&l.to>i&&l.type instanceof Lo){let c=Math.max(i,l.from)-i,u=Math.min(a,l.to)-i;c<u&&(o||(o=[])).push(l.copy(c,u))}}if(o){let s=new rn(o.sort(hi),Gi);return r?new No([s,r]):s}return r||_n}eq(e){if(this==e)return!0;if(!(e instanceof rn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Eh(this.localsInner(e))}localsInner(e){if(this==_n)return Gi;if(e.inlineContent||!this.local.some(Lo.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Lo||n.push(this.local[r]);return n}forEachSet(e){e(this)}}rn.empty=new rn([],[]);rn.removeOverlap=Eh;const _n=rn.empty;class No{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,fi));return No.from(r)}forChild(e,n){if(n.isLeaf)return rn.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=_n&&(i instanceof No?r=r.concat(i.members):r.push(i))}return No.from(r)}eq(e){if(!(e instanceof No)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let a=0;a<i.length;a++)n.push(i[a])}}return n?Eh(r?n:n.sort(hi)):Gi}static from(e){switch(e.length){case 0:return _n;case 1:return e[0];default:return new No(e.every(n=>n instanceof rn)?e:e.reduce((n,r)=>n.concat(r instanceof rn?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function q$(t,e,n,r,o,i,a){let s=t.slice();for(let c=0,u=i;c<n.maps.length;c++){let d=0;n.maps[c].forEach((f,p,m,g)=>{let v=g-m-(p-f);for(let b=0;b<s.length;b+=3){let y=s[b+1];if(y<0||f>y+u-d)continue;let C=s[b]+u-d;p>=C?s[b+1]=f<=C?-2:-1:f>=u&&v&&(s[b]+=v,s[b+1]+=v)}d+=v}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<s.length;c+=3)if(s[c+1]<0){if(s[c+1]==-2){l=!0,s[c+1]=-1;continue}let u=n.map(t[c]+i),d=u-o;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(t[c+1]+i,-1),p=f-o,{index:m,offset:g}=r.content.findIndex(d),v=r.maybeChild(m);if(v&&g==d&&g+v.nodeSize==p){let b=s[c+2].mapInner(n,v,u+1,t[c]+i+1,a);b!=_n?(s[c]=d,s[c+1]=p,s[c+2]=b):(s[c+1]=-2,l=!0)}else l=!0}if(l){let c=K$(s,t,e,n,o,i,a),u=Gl(c,r,0,a);e=u.local;for(let d=0;d<s.length;d+=3)s[d+1]<0&&(s.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let p=u.children[d];for(;f<s.length&&s[f]<p;)f+=3;s.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new rn(e.sort(hi),s)}function Cy(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new Wn(o.from+e,o.to+e,o.type))}return n}function K$(t,e,n,r,o,i,a){function s(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(r,o,c);d?n.push(d):a.onRemove&&a.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)s(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&s(t[l+2],e[l]+i+1);return n}function Sy(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,a;i<t.length;i++)(a=t[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),t[i]=null);return o}function xy(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Gl(t,e,n,r){let o=[],i=!1;e.forEach((s,l)=>{let c=Sy(t,s,l+n);if(c){i=!0;let u=Gl(c,s,n+l+1,r);u!=_n&&o.push(l,l+s.nodeSize,u)}});let a=Cy(i?xy(t):t,-n).sort(hi);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new rn(a,o):_n}function hi(t,e){return t.from-e.from||t.to-e.to}function Eh(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),Am(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),Am(e,o,r.copy(i.from,r.to)));break}}}return e}function Am(t,e,n){for(;e<t.length&&hi(n,t[e])>0;)e++;t.splice(e,0,n)}function Ou(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=_n&&e.push(r)}),t.cursorWrapper&&e.push(rn.create(t.state.doc,[t.cursorWrapper.deco])),No.from(e)}const G$={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},U$=Zn&&Bo<=11;class X${constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Y${constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new X$,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Zn&&Bo<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),U$&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,G$)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if($m(this.view)){if(this.suppressingSelectionUpdates)return ho(this.view);if(Zn&&Bo<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ci(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=aa(i))n.add(i);for(let i=e.anchorNode;i;i=aa(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&$m(e)&&!this.ignoreSelectionChange(r),i=-1,a=-1,s=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(i=i<0?d.from:Math.min(d.from,i),a=a<0?d.to:Math.max(d.to,a),d.typeOver&&(s=!0))}if(kr&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||Q$(e,d)!=p)&&f.remove()}}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&xc(r)&&(c=vh(e))&&c.eq(it.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ho(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,a),J$(e)),this.handleDOMChange(i,a,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ho(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let d=e.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(Zn&&Bo<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f)}let a=o&&o.parentNode==e.target?Pn(o)+1:0,s=r.localPosFromDOM(e.target,a,-1),l=i&&i.parentNode==e.target?Pn(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:s,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let km=new WeakMap,Dm=!1;function J$(t){if(!km.has(t)&&(km.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=kr,Dm)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Dm=!0}}function _m(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return Ci(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function Z$(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return _m(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?_m(t,n):null}function Q$(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function eO(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:a,to:s}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],xc(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Bn&&t.input.lastKeyCode===8)for(let v=i;v>o;v--){let b=r.childNodes[v-1],y=b.pmViewDesc;if(b.nodeName=="BR"&&!y){i=v;break}if(!y||y.size)break}let d=t.state.doc,f=t.someProp("domParser")||jo.fromSchema(t.state.schema),p=d.resolve(a),m=null,g=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:tO,context:p});if(c&&c[0].pos!=null){let v=c[0].pos,b=c[1]&&c[1].pos;b==null&&(b=v),m={anchor:v+a,head:b+a}}return{doc:g,sel:m,from:a,to:s}}function tO(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(qn&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||qn&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const nO=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function rO(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let M=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=vh(t,M);if(O&&!t.state.selection.eq(O)){if(Bn&&lo&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",I=>I(t,ei(13,"Enter"))))return;let N=t.state.tr.setSelection(O);M=="pointer"?N.setMeta("pointer",!0):M=="key"&&N.scrollIntoView(),i&&N.setMeta("composition",i),t.dispatch(N)}return}let a=t.state.doc.resolve(e),s=a.sharedDepth(n);e=a.before(s+1),n=t.state.doc.resolve(n).after(s+1);let l=t.state.selection,c=eO(t,e,n),u=t.state.doc,d=u.slice(c.from,c.to),f,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(f=t.state.selection.to,p="end"):(f=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let m=aO(d.content,c.doc.content,c.from,f,p);if(m&&t.input.domChangeCount++,(sa&&t.input.lastIOSEnter>Date.now()-225||lo)&&o.some(M=>M.nodeType==1&&!nO.test(M.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",M=>M(t,ei(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&l instanceof rt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))m={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let M=jm(t,t.state.doc,c.sel);if(M&&!M.eq(t.state.selection)){let O=t.state.tr.setSelection(M);i&&O.setMeta("composition",i),t.dispatch(O)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof rt&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Zn&&Bo<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>c.from&&c.doc.textBetween(m.start-c.from-1,m.start-c.from+1)==" "&&(m.start--,m.endA--,m.endB--);let g=c.doc.resolveNoCache(m.start-c.from),v=c.doc.resolveNoCache(m.endB-c.from),b=u.resolve(m.start),y=g.sameParent(v)&&g.parent.inlineContent&&b.end()>=m.endA,C;if((sa&&t.input.lastIOSEnter>Date.now()-225&&(!y||o.some(M=>M.nodeName=="DIV"||M.nodeName=="P"))||!y&&g.pos<c.doc.content.size&&(!g.sameParent(v)||!g.parent.inlineContent)&&!/\S/.test(c.doc.textBetween(g.pos,v.pos,"",""))&&(C=it.findFrom(c.doc.resolve(g.pos+1),1,!0))&&C.head>g.pos)&&t.someProp("handleKeyDown",M=>M(t,ei(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&iO(u,m.start,m.endA,g,v)&&t.someProp("handleKeyDown",M=>M(t,ei(8,"Backspace")))){lo&&Bn&&t.domObserver.suppressSelectionUpdates();return}Bn&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),lo&&!y&&g.start()!=v.start()&&v.parentOffset==0&&g.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==m.endA&&(m.endB-=2,v=c.doc.resolveNoCache(m.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(M){return M(t,ei(13,"Enter"))})},20));let S=m.start,x=m.endA,w,$,R;if(y){if(g.pos==v.pos)Zn&&Bo<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ho(t),20)),w=t.state.tr.delete(S,x),$=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(R=oO(g.parent.content.cut(g.parentOffset,v.parentOffset),b.parent.content.cut(b.parentOffset,m.endA-b.start()))))w=t.state.tr,R.type=="add"?w.addMark(S,x,R.mark):w.removeMark(S,x,R.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let M=g.parent.textBetween(g.parentOffset,v.parentOffset);if(t.someProp("handleTextInput",O=>O(t,S,x,M)))return;w=t.state.tr.insertText(M,S,x)}}if(w||(w=t.state.tr.replace(S,x,c.doc.slice(m.start-c.from,m.endB-c.from))),c.sel){let M=jm(t,w.doc,c.sel);M&&!(Bn&&t.composing&&M.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(M.head==S||M.head==w.mapping.map(x)-1)||Zn&&M.empty&&M.head==S)&&w.setSelection(M)}$&&w.ensureMarks($),i&&w.setMeta("composition",i),t.dispatch(w.scrollIntoView())}function jm(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:bh(t,e.resolve(n.anchor),e.resolve(n.head))}function oO(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,a,s,l;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(o.length==1&&i.length==0)s=o[0],a="add",l=u=>u.mark(s.addToSet(u.marks));else if(o.length==0&&i.length==1)s=i[0],a="remove",l=u=>u.mark(s.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(fe.from(c).eq(t))return{mark:s,type:a}}function iO(t,e,n,r,o){if(n-e<=o.pos-r.pos||Mu(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let s=i.nodeAfter;return s!=null&&n==e+s.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=t.resolve(Mu(i,!0,!0));return!a.parent.isTextblock||a.pos>n||Mu(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function Mu(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function aO(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a,b:s}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let l=Math.max(0,i-Math.min(a,s));r-=a+l-i}if(a<i&&t.size<e.size){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<e.size&&Bm(e.textBetween(i-1,i+1))&&(i+=l?1:-1),s=i+(s-a),a=i}else if(s<i){let l=r<=i&&r>=s?i-r:0;i-=l,i&&i<t.size&&Bm(t.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}return{start:i,endA:a,endB:s}}function Bm(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class sO{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new $$,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Vm),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Fm(this),Lm(this),this.nodeViews=Hm(this),this.docView=ym(this.state.doc,zm(this),Ou(this),this.dom,this),this.domObserver=new Y$(this,(r,o,i,a)=>rO(this,r,o,i,a)),this.domObserver.start(),O$(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&zd(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Vm),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,a=!1;e.storedMarks&&this.composing&&(gy(this),a=!0),this.state=e;let s=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=Hm(this);cO(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&zd(this),this.editable=Fm(this),Lm(this);let l=Ou(this),c=zm(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(o.selection))&&(a=!0);let f=u=="preserve"&&a&&this.dom.style.overflowAnchor==null&&LE(this);if(a){this.domObserver.stop();let p=d&&(Zn||Bn)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&lO(o.selection,e.selection);if(d){let m=Bn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=z$(this)),(i||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=ym(e.doc,c,l,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&u$(this))?ho(this,p):(oy(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&FE(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof tt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&hm(this,n.getBoundingClientRect(),e)}else hm(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new by(e.slice,e.move,o<0?void 0:tt.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let a=0;a<this.directPlugins.length;a++){let s=this.directPlugins[a].props[e];if(s!=null&&(o=n?n(s):s))return o}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let s=i[a].props[e];if(s!=null&&(o=n?n(s):s))return o}}hasFocus(){if(Zn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&HE(this.dom),ho(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return GE(this,e)}coordsAtPos(e,n=1){return Yb(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return ZE(this,n||this.state,e)}pasteHTML(e,n){return rs(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return rs(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return yh(this,e)}destroy(){this.docView&&(M$(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ou(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,RE())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return R$(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?qn&&this.root.nodeType===11&&kE(this.dom.ownerDocument)==this.dom&&Z$(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function zm(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Wn.node(0,t.state.doc.content.size,e)]}function Lm(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Wn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Fm(t){return!t.someProp("editable",e=>e(t.state)===!1)}function lO(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function Hm(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function cO(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function Vm(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Fo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ul={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},uO=typeof navigator<"u"&&/Mac/.test(navigator.platform),dO=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Tn=0;Tn<10;Tn++)Fo[48+Tn]=Fo[96+Tn]=String(Tn);for(var Tn=1;Tn<=24;Tn++)Fo[Tn+111]="F"+Tn;for(var Tn=65;Tn<=90;Tn++)Fo[Tn]=String.fromCharCode(Tn+32),Ul[Tn]=String.fromCharCode(Tn);for(var Nu in Fo)Ul.hasOwnProperty(Nu)||(Ul[Nu]=Fo[Nu]);function fO(t){var e=uO&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||dO&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ul:Fo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const hO=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),pO=typeof navigator<"u"&&/Win/.test(navigator.platform);function mO(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<e.length-1;s++){let l=e[s];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))hO?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),a&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function gO(t){let e=Object.create(null);for(let n in t)e[mO(n)]=t[n];return e}function Ru(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function vO(t){return new Vn({props:{handleKeyDown:$h(t)}})}function $h(t){let e=gO(t);return function(n,r){let o=fO(r),i,a=e[Ru(o,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=e[Ru(o,r,!1)];if(s&&s(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(pO&&r.ctrlKey&&r.altKey)&&(i=Fo[r.keyCode])&&i!=o){let s=e[Ru(i,r)];if(s&&s(n.state,n.dispatch,n))return!0}}return!1}}const Oh=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function wy(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Ey=(t,e,n)=>{let r=wy(t,n);if(!r)return!1;let o=Mh(r);if(!o){let a=r.blockRange(),s=a&&Ca(a);return s==null?!1:(e&&e(t.tr.lift(a,s).scrollIntoView()),!0)}let i=o.nodeBefore;if(Ay(t,o,e,-1))return!0;if(r.parent.content.size==0&&(la(i,"end")||tt.isSelectable(i)))for(let a=r.depth;;a--){let s=Cc(t.doc,r.before(a),r.after(a),Me.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(la(i,"end")?it.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):tt.create(l.doc,o.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},bO=(t,e,n)=>{let r=wy(t,n);if(!r)return!1;let o=Mh(r);return o?$y(t,o,e):!1},yO=(t,e,n)=>{let r=My(t,n);if(!r)return!1;let o=Nh(r);return o?$y(t,o,e):!1};function $y(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let a=e.nodeAfter,s=a,l=e.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let u=s.firstChild;if(!u)return!1;s=u}let c=Cc(t.doc,i,l,Me.empty);if(!c||c.from!=i||c instanceof En&&c.slice.size>=l-i)return!1;if(n){let u=t.tr.step(c);u.setSelection(rt.create(u.doc,i)),n(u.scrollIntoView())}return!0}function la(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Oy=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=Mh(r)}let a=i&&i.nodeBefore;return!a||!tt.isSelectable(a)?!1:(e&&e(t.tr.setSelection(tt.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function Mh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function My(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Ny=(t,e,n)=>{let r=My(t,n);if(!r)return!1;let o=Nh(r);if(!o)return!1;let i=o.nodeAfter;if(Ay(t,o,e,1))return!0;if(r.parent.content.size==0&&(la(i,"start")||tt.isSelectable(i))){let a=Cc(t.doc,r.before(),r.after(),Me.empty);if(a&&a.slice.size<a.to-a.from){if(e){let s=t.tr.step(a);s.setSelection(la(i,"start")?it.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):tt.create(s.doc,s.mapping.map(o.pos))),e(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},Ry=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=Nh(r)}let a=i&&i.nodeAfter;return!a||!tt.isSelectable(a)?!1:(e&&e(t.tr.setSelection(tt.create(t.doc,i.pos)).scrollIntoView()),!0)};function Nh(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const CO=(t,e)=>{let n=t.selection,r=n instanceof tt,o;if(r){if(n.node.isTextblock||!Go(t.doc,n.from))return!1;o=n.from}else if(o=yc(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(tt.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},SO=(t,e)=>{let n=t.selection,r;if(n instanceof tt){if(n.node.isTextblock||!Go(t.doc,n.to))return!1;r=n.to}else if(r=yc(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},xO=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&Ca(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},Iy=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
10
|
-
`).scrollIntoView()),!0)};function Rh(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const wO=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),a=Rh(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(e){let s=n.after(),l=t.tr.replaceWith(s,s,a.createAndFill());l.setSelection(it.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},Py=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof ur||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Rh(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=t.tr.insert(a,i.createAndFill());s.setSelection(rt.create(s.doc,a+1)),e(s.scrollIntoView())}return!0},Ty=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(fo(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Ca(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function EO(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof tt&&e.selection.node.isBlock)return!r.parentOffset||!fo(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],a,s,l=!1,c=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){l=r.end(p)==r.pos+(r.depth-p),c=r.start(p)==r.pos-(r.depth-p),s=Rh(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),i.unshift(l&&s?{type:s}:null),a=p;break}else{if(p==1)return!1;i.unshift(null)}let u=e.tr;(e.selection instanceof rt||e.selection instanceof ur)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=fo(u.doc,d,i.length,i);if(f||(i[0]=s?{type:s}:null,f=fo(u.doc,d,i.length,i)),!f)return!1;if(u.split(d,i.length,i),!l&&c&&r.node(a).type!=s){let p=u.mapping.map(r.before(a)),m=u.doc.resolve(p);s&&r.node(a-1).canReplaceWith(m.index(),m.index()+1,s)&&u.setNodeMarkup(u.mapping.map(r.before(a)),s)}return n&&n(u.scrollIntoView()),!0}}const $O=EO(),OO=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(tt.create(t.doc,o))),!0)};function MO(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Go(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Ay(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,a,s,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&MO(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(a=(s=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&s.matchType(a[0]||i.type).validEnd){if(n){let p=e.pos+i.nodeSize,m=fe.empty;for(let b=a.length-1;b>=0;b--)m=fe.from(a[b].create(null,m));m=fe.from(o.copy(m));let g=t.tr.step(new $n(e.pos-1,p,e.pos,p,new Me(m,1,0),a.length,!0)),v=g.doc.resolve(p+2*a.length);v.nodeAfter&&v.nodeAfter.type==o.type&&Go(g.doc,v.pos)&&g.join(v.pos),n(g.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&l?null:it.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),f=d&&Ca(d);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(d,f).scrollIntoView()),!0;if(c&&la(i,"start",!0)&&la(o,"end")){let p=o,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let g=i,v=1;for(;!g.isTextblock;g=g.firstChild)v++;if(p.canReplace(p.childCount,p.childCount,g.content)){if(n){let b=fe.empty;for(let C=m.length-1;C>=0;C--)b=fe.from(m[C].copy(b));let y=t.tr.step(new $n(e.pos-m.length,e.pos+i.nodeSize,e.pos+v,e.pos+i.nodeSize-v,new Me(b,m.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function ky(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(rt.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const NO=ky(-1),RO=ky(1);function IO(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=a&&ph(a,t,e);return s?(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0):!1}}function Wm(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:a},$to:{pos:s}}=n.selection.ranges[i];n.doc.nodesBetween(a,s,(l,c)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)o=!0;else{let u=n.doc.resolve(c),d=u.index();o=u.parent.canReplaceWith(d,d+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[a];i.setBlockType(s,l,t,e)}r(i.scrollIntoView())}return!0}}function Ih(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}Ih(Oh,Ey,Oy);Ih(Oh,Ny,Ry);Ih(Iy,Py,Ty,$O);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function PO(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i);if(!a)return!1;let s=r?n.tr:null;return TO(s,a,t,e)?(r&&r(s.scrollIntoView()),!0):!1}}function TO(t,e,n,r=null){let o=!1,i=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=a.resolve(e.start-2);i=new Fl(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Fl(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let s=ph(i,n,r,e);return s?(t&&AO(t,e,s,o,n),!0):!1}function AO(t,e,n,r,o){let i=fe.empty;for(let u=n.length-1;u>=0;u--)i=fe.from(n[u].type.create(n[u].attrs,i));t.step(new $n(e.start-(r?2:0),e.end,e.start,e.end,new Me(i,0,0),n.length,!0));let a=0;for(let u=0;u<n.length;u++)n[u].type==o&&(a=u+1);let s=n.length-a,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,f=!0;u<d;u++,f=!1)!f&&fo(t.doc,l,s)&&(t.split(l,s),l+=2*s),l+=c.child(u).nodeSize;return t}function kO(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,a=>a.childCount>0&&a.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?DO(e,n,t,i):_O(e,n,i):!0:!1}}function DO(t,e,n,r){let o=t.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new $n(i-1,a,i,a,new Me(fe.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Fl(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const s=Ca(r);if(s==null)return!1;o.lift(r,s);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return Go(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function _O(t,e,n){let r=t.tr,o=n.parent;for(let p=n.end,m=n.endIndex-1,g=n.startIndex;m>g;m--)p-=o.child(m).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,l=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(s?0:1),u+1,a.content.append(l?fe.empty:fe.from(o))))return!1;let d=i.pos,f=d+a.nodeSize;return r.step(new $n(d-(s?1:0),f+(l?1:0),d+1,f-1,new Me((s?fe.empty:fe.from(o.copy(fe.empty))).append(l?fe.empty:fe.from(o.copy(fe.empty))),s?0:1,l?0:1),s?0:1)),e(r.scrollIntoView()),!0}function jO(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==t);if(!i)return!1;let a=i.startIndex;if(a==0)return!1;let s=i.parent,l=s.child(a-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==s.type,u=fe.from(c?t.create():null),d=new Me(fe.from(t.create(null,fe.from(s.type.create(null,u)))),c?3:1,0),f=i.start,p=i.end;n(e.tr.step(new $n(f-(c?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function $c(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class Oc{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([s,l])=>[s,(...u)=>{const d=l(...u)(a);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s=[],l=!!e,c=e||i.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(c),s.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,p])=>[f,(...g)=>{const v=this.buildProps(c,n),b=p(...g)(v);return s.push(b),d}])),run:u};return d}createCan(e){const{rawCommands:n,state:r}=this,o=!1,i=e||r.tr,a=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)({...a,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s={tr:e,editor:o,view:a,state:$c({state:i,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(s)]))}};return s}}class BO{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(o=>o!==n):delete this.callbacks[e]),this}once(e,n){const r=(...o)=>{this.off(e,r),n.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function Je(t,e,n){return t.config[e]===void 0&&t.parent?Je(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Je(t.parent,e,n):null}):t.config[e]}function Mc(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function Dy(t){const e=[],{nodeExtensions:n,markExtensions:r}=Mc(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage,extensions:o},l=Je(a,"addGlobalAttributes",s);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,p])=>{e.push({type:d,name:f,attribute:{...i,...p}})})})})}),o.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage},l=Je(a,"addAttributes",s);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const f={...i,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:a.name,name:u,attribute:f})})}),e}function Mn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Ft(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const s=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],c=s.filter(u=>!l.includes(u));r[o]=[...l,...c].join(" ")}else if(o==="style"){const s=i?i.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[d,f]=u.split(":").map(p=>p.trim());c.set(d,f)}),s.forEach(u=>{const[d,f]=u.split(":").map(p=>p.trim());c.set(d,f)}),r[o]=Array.from(c.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[o]=i}),r},{})}function Xl(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Ft(n,r),{})}function _y(t){return typeof t=="function"}function mt(t,e=void 0,...n){return _y(t)?e?t.bind(e)(...n):t(...n):t}function zO(t={}){return Object.keys(t).length===0&&t.constructor===Object}function LO(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function qm(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,a)=>{const s=a.attribute.parseHTML?a.attribute.parseHTML(n):LO(n.getAttribute(a.name));return s==null?i:{...i,[a.name]:s}},{});return{...r,...o}}}}function Km(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&zO(n)?!1:n!=null))}function FO(t,e){var n;const r=Dy(t),{nodeExtensions:o,markExtensions:i}=Mc(t),a=(n=o.find(c=>Je(c,"topNode")))===null||n===void 0?void 0:n.name,s=Object.fromEntries(o.map(c=>{const u=r.filter(b=>b.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((b,y)=>{const C=Je(y,"extendNodeSchema",d);return{...b,...C?C(c):{}}},{}),p=Km({...f,content:mt(Je(c,"content",d)),marks:mt(Je(c,"marks",d)),group:mt(Je(c,"group",d)),inline:mt(Je(c,"inline",d)),atom:mt(Je(c,"atom",d)),selectable:mt(Je(c,"selectable",d)),draggable:mt(Je(c,"draggable",d)),code:mt(Je(c,"code",d)),whitespace:mt(Je(c,"whitespace",d)),linebreakReplacement:mt(Je(c,"linebreakReplacement",d)),defining:mt(Je(c,"defining",d)),isolating:mt(Je(c,"isolating",d)),attrs:Object.fromEntries(u.map(b=>{var y;return[b.name,{default:(y=b==null?void 0:b.attribute)===null||y===void 0?void 0:y.default}]}))}),m=mt(Je(c,"parseHTML",d));m&&(p.parseDOM=m.map(b=>qm(b,u)));const g=Je(c,"renderHTML",d);g&&(p.toDOM=b=>g({node:b,HTMLAttributes:Xl(b,u)}));const v=Je(c,"renderText",d);return v&&(p.toText=v),[c.name,p]})),l=Object.fromEntries(i.map(c=>{const u=r.filter(v=>v.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((v,b)=>{const y=Je(b,"extendMarkSchema",d);return{...v,...y?y(c):{}}},{}),p=Km({...f,inclusive:mt(Je(c,"inclusive",d)),excludes:mt(Je(c,"excludes",d)),group:mt(Je(c,"group",d)),spanning:mt(Je(c,"spanning",d)),code:mt(Je(c,"code",d)),attrs:Object.fromEntries(u.map(v=>{var b;return[v.name,{default:(b=v==null?void 0:v.attribute)===null||b===void 0?void 0:b.default}]}))}),m=mt(Je(c,"parseHTML",d));m&&(p.parseDOM=m.map(v=>qm(v,u)));const g=Je(c,"renderHTML",d);return g&&(p.toDOM=v=>g({mark:v,HTMLAttributes:Xl(v,u)})),[c.name,p]}));return new Eb({topNode:a,nodes:s,marks:l})}function Iu(t,e){return e.nodes[t]||e.marks[t]||null}function Gm(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Ph(t,e){const n=Mi.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const HO=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,a,s)=>{var l,c;const u=((c=(l=o.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:o,pos:i,parent:a,index:s}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?u:u.slice(0,Math.max(0,r-i))}),n};function Th(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class Nc{constructor(e){this.find=e.find,this.handler=e.handler}}const VO=(t,e)=>{if(Th(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Xs(t){var e;const{editor:n,from:r,to:o,text:i,rules:a,plugin:s}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=HO(c)+i;return a.forEach(f=>{if(u)return;const p=VO(d,f.find);if(!p)return;const m=l.state.tr,g=$c({state:l.state,transaction:m}),v={from:r-(p[0].length-i.length),to:o},{commands:b,chain:y,can:C}=new Oc({editor:n,state:g});f.handler({state:g,range:v,match:p,commands:b,chain:y,can:C})===null||!m.steps.length||(m.setMeta(s,{transform:m,from:r,to:o,text:i}),l.dispatch(m),u=!0)}),u}function WO(t){const{editor:e,rules:n}=t,r=new Vn({state:{init(){return null},apply(o,i,a){const s=o.getMeta(r);if(s)return s;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=Ph(fe.from(u),a.schema);const{from:d}=l,f=d+u.length;Xs({editor:e,from:d,to:f,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,a,s){return Xs({editor:e,from:i,to:a,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Xs({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:a}=o.state.selection;return a?Xs({editor:e,from:a.pos,to:a.pos,text:`
|
|
11
|
-
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function qO(t){return Object.prototype.toString.call(t).slice(8,-1)}function Ys(t){return qO(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Rc(t,e){const n={...t};return Ys(t)&&Ys(e)&&Object.keys(e).forEach(r=>{Ys(e[r])&&Ys(t[r])?n[r]=Rc(t[r],e[r]):n[r]=e[r]}),n}let Zr=class Ld{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=mt(Je(this,"addOptions",{name:this.name}))),this.storage=mt(Je(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ld(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Rc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Ld(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=mt(Je(n,"addOptions",{name:n.name})),n.storage=mt(Je(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const a=o.marks();if(!!!a.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=a.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}};function KO(t){return typeof t=="number"}class GO{constructor(e){this.find=e.find,this.handler=e.handler}}const UO=(t,e,n)=>{if(Th(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function XO(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:a,dropEvent:s}=t,{commands:l,chain:c,can:u}=new Oc({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,m)=>{if(!p.isTextblock||p.type.spec.code)return;const g=Math.max(r,m),v=Math.min(o,m+p.content.size),b=p.textBetween(g-m,v-m,void 0,"");UO(b,i.find,a).forEach(C=>{if(C.index===void 0)return;const S=g+C.index+1,x=S+C[0].length,w={from:n.tr.mapping.map(S),to:n.tr.mapping.map(x)},$=i.handler({state:n,range:w,match:C,commands:l,chain:c,can:u,pasteEvent:a,dropEvent:s});d.push($)})}),d.every(p=>p!==null)}let Js=null;const YO=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function JO(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s;try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}const l=({state:u,from:d,to:f,rule:p,pasteEvt:m})=>{const g=u.tr,v=$c({state:u,transaction:g});if(!(!XO({editor:e,state:v,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:m,dropEvent:s})||!g.steps.length)){try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g}};return n.map(u=>new Vn({view(d){const f=m=>{var g;r=!((g=d.dom.parentElement)===null||g===void 0)&&g.contains(m.target)?d.dom.parentElement:null,r&&(Js=e)},p=()=>{Js&&(Js=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,s=f,!i){const p=Js;p&&setTimeout(()=>{const m=p.state.selection;m&&p.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(d,f)=>{var p;const m=(p=f.clipboardData)===null||p===void 0?void 0:p.getData("text/html");return a=f,o=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,p)=>{const m=d[0],g=m.getMeta("uiEvent")==="paste"&&!o,v=m.getMeta("uiEvent")==="drop"&&!i,b=m.getMeta("applyPasteRules"),y=!!b;if(!g&&!v&&!y)return;if(y){let{text:x}=b;typeof x=="string"?x=x:x=Ph(fe.from(x),p.schema);const{from:w}=b,$=w+x.length,R=YO(x);return l({rule:u,state:p,from:w,to:{b:$},pasteEvt:R})}const C=f.doc.content.findDiffStart(p.doc.content),S=f.doc.content.findDiffEnd(p.doc.content);if(!(!KO(C)||!S||C===S.b))return l({rule:u,state:p,from:C,to:S,pasteEvt:a})}}))}function ZO(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class Xi{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=Xi.resolve(e),this.schema=FO(this.extensions,n),this.setupExtensions()}static resolve(e){const n=Xi.sort(Xi.flatten(e)),r=ZO(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=Je(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=Je(r,"priority")||100,a=Je(o,"priority")||100;return i>a?-1:i<a?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:Iu(n.name,this.schema)},o=Je(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=Xi.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:e,type:Iu(a.name,this.schema)},l=[],c=Je(a,"addKeyboardShortcuts",s);let u={};if(a.type==="mark"&&Je(a,"exitable",s)&&(u.ArrowRight=()=>Zr.handleExit({editor:e,mark:a})),c){const g=Object.fromEntries(Object.entries(c()).map(([v,b])=>[v,()=>b({editor:e})]));u={...u,...g}}const d=vO(u);l.push(d);const f=Je(a,"addInputRules",s);Gm(a,e.options.enableInputRules)&&f&&r.push(...f());const p=Je(a,"addPasteRules",s);Gm(a,e.options.enablePasteRules)&&p&&o.push(...p());const m=Je(a,"addProseMirrorPlugins",s);if(m){const g=m();l.push(...g)}return l}).flat();return[WO({editor:e,rules:r}),...JO({editor:e,rules:o}),...i]}get attributes(){return Dy(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=Mc(this.extensions);return Object.fromEntries(n.filter(r=>!!Je(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:Mn(r.name,this.schema)},a=Je(r,"addNodeView",i);if(!a)return[];const s=(l,c,u,d,f)=>{const p=Xl(l,o);return a()({node:l,view:c,getPos:u,decorations:d,innerDecorations:f,editor:e,extension:r,HTMLAttributes:p})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(e=>{var n;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Iu(e.name,this.schema)};e.type==="mark"&&(!((n=mt(Je(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=Je(e,"onBeforeCreate",r),i=Je(e,"onCreate",r),a=Je(e,"onUpdate",r),s=Je(e,"onSelectionUpdate",r),l=Je(e,"onTransaction",r),c=Je(e,"onFocus",r),u=Je(e,"onBlur",r),d=Je(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),a&&this.editor.on("update",a),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}}class kn{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=mt(Je(this,"addOptions",{name:this.name}))),this.storage=mt(Je(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new kn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Rc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new kn({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=mt(Je(n,"addOptions",{name:n.name})),n.storage=mt(Je(n,"addStorage",{name:n.name,options:n.options})),n}}function jy(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
12
|
-
|
|
13
|
-
`,textSerializers:a={}}=n||{};let s="";return t.nodesBetween(r,o,(l,c,u,d)=>{var f;l.isBlock&&c>r&&(s+=i);const p=a==null?void 0:a[l.type.name];if(p)return u&&(s+=p({node:l,pos:c,parent:u,index:d,range:e})),!1;l.isText&&(s+=(f=l==null?void 0:l.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,o-c))}),s}function By(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const QO=kn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Vn({key:new fr("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o,a=Math.min(...i.map(u=>u.$from.pos)),s=Math.max(...i.map(u=>u.$to.pos)),l=By(n);return jy(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),eM=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),tM=(t=!1)=>({commands:e})=>e.setContent("",t),nM=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:a})=>{t.doc.nodesBetween(i.pos,a.pos,(s,l)=>{if(s.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+s.nodeSize)),p=d.blockRange(f);if(!p)return;const m=Ca(p);if(s.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(p.start,g)}(m||m===0)&&e.lift(p,m)})}),!0},rM=t=>e=>t(e),oM=()=>({state:t,dispatch:e})=>Py(t,e),iM=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const a=r.mapping.map(e);return r.insert(a,i.content),r.setSelection(new rt(r.doc.resolve(a-1))),!0},aM=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const s=o.before(i),l=o.after(i);t.delete(s,l).scrollIntoView()}return!0}return!1},sM=t=>({tr:e,state:n,dispatch:r})=>{const o=Mn(t,n.schema),i=e.selection.$anchor;for(let a=i.depth;a>0;a-=1)if(i.node(a).type===o){if(r){const l=i.before(a),c=i.after(a);e.delete(l,c).scrollIntoView()}return!0}return!1},lM=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},cM=()=>({state:t,dispatch:e})=>Oh(t,e),uM=()=>({commands:t})=>t.keyboardShortcut("Enter"),dM=()=>({state:t,dispatch:e})=>wO(t,e);function Yl(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Th(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function zy(t,e,n={}){return t.find(r=>r.type===e&&Yl(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function Um(t,e,n={}){return!!zy(t,e,n)}function Ah(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===e)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!zy([...o.node.marks],e,n)))return;let a=o.index,s=t.start()+o.offset,l=a+1,c=s+o.node.nodeSize;for(;a>0&&Um([...t.parent.child(a-1).marks],e,n);)a-=1,s-=t.parent.child(a).nodeSize;for(;l<t.parent.childCount&&Um([...t.parent.child(l).marks],e,n);)c+=t.parent.child(l).nodeSize,l+=1;return{from:s,to:c}}function Xo(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const fM=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=Xo(t,r.schema),{doc:a,selection:s}=n,{$from:l,from:c,to:u}=s;if(o){const d=Ah(l,i,e);if(d&&d.from<=c&&d.to>=u){const f=rt.create(a,d.from,d.to);n.setSelection(f)}}return!0},hM=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function Ly(t){return t instanceof rt}function ai(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function Fy(t,e=null){if(!e)return null;const n=it.atStart(t),r=it.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?rt.create(t,ai(0,o,i),ai(t.content.size,o,i)):rt.create(t,ai(e,o,i),ai(e,o,i))}function Hy(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Ic(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const pM=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const a=()=>{(Ic()||Hy())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(i&&t===null&&!Ly(n.state.selection))return a(),!0;const s=Fy(o.doc,t)||n.state.selection,l=n.state.selection.eq(s);return i&&(l||o.setSelection(s),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},mM=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),gM=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),Vy=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&Vy(r)}return t};function Zs(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return Vy(n)}function Jl(t,e,n){if(t instanceof _o||t instanceof fe)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return fe.fromArray(t.map(s=>e.nodeFromJSON(s)));const a=e.nodeFromJSON(t);return n.errorOnInvalidContent&&a.check(),a}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),Jl("",e,n)}if(o){if(n.errorOnInvalidContent){let a=!1,s="";const l=new Eb({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,s=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?jo.fromSchema(l).parseSlice(Zs(t),n.parseOptions):jo.fromSchema(l).parse(Zs(t),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const i=jo.fromSchema(e);return n.slice?i.parseSlice(Zs(t),n.parseOptions).content:i.parse(Zs(t),n.parseOptions)}return Jl("",e,n)}function vM(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof En||o instanceof $n))return;const i=t.mapping.maps[r];let a=0;i.forEach((s,l,c,u)=>{a===0&&(a=u)}),t.setSelection(it.near(t.doc.resolve(a),n))}const bM=t=>!("type"in t),yM=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var a;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let s;try{s=Jl(e,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(a=n.errorOnInvalidContent)!==null&&a!==void 0?a:i.options.enableContentCheck})}catch(m){return i.emit("contentError",{editor:i,error:m,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:c}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},u=!0,d=!0;if((bM(s)?s:[s]).forEach(m=>{m.check(),u=u?m.isText&&m.marks.length===0:!1,d=d?m.isBlock:!1}),l===c&&d){const{parent:m}=r.doc.resolve(l);m.isTextblock&&!m.type.spec.code&&!m.childCount&&(l-=1,c+=1)}let p;if(u){if(Array.isArray(e))p=e.map(m=>m.text||"").join("");else if(e instanceof fe){let m="";e.forEach(g=>{g.text&&(m+=g.text)}),p=m}else typeof e=="object"&&e&&e.text?p=e.text:p=e;r.insertText(p,l,c)}else p=s,r.replaceWith(l,c,p);n.updateSelection&&vM(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:p}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:p})}return!0},CM=()=>({state:t,dispatch:e})=>CO(t,e),SM=()=>({state:t,dispatch:e})=>SO(t,e),xM=()=>({state:t,dispatch:e})=>Ey(t,e),wM=()=>({state:t,dispatch:e})=>Ny(t,e),EM=()=>({state:t,dispatch:e,tr:n})=>{try{const r=yc(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},$M=()=>({state:t,dispatch:e,tr:n})=>{try{const r=yc(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},OM=()=>({state:t,dispatch:e})=>bO(t,e),MM=()=>({state:t,dispatch:e})=>yO(t,e);function Wy(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function NM(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<e.length-1;s+=1){const l=e[s];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))Ic()||Wy()?a=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}const RM=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=NM(t).split(/-(?!$)/),a=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),s=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,s))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function as(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,a=e?Mn(e,t.schema):null,s=[];t.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;const p=Math.max(r,f),m=Math.min(o,f+d.nodeSize);s.push({node:d,from:p,to:m})});const l=o-r,c=s.filter(d=>a?a.name===d.node.type.name:!0).filter(d=>Yl(d.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}const IM=(t,e={})=>({state:n,dispatch:r})=>{const o=Mn(t,n.schema);return as(n,o,e)?xO(n,r):!1},PM=()=>({state:t,dispatch:e})=>Ty(t,e),TM=t=>({state:e,dispatch:n})=>{const r=Mn(t,e.schema);return kO(r)(e,n)},AM=()=>({state:t,dispatch:e})=>Iy(t,e);function Pc(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Xm(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}const kM=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=Pc(typeof t=="string"?t:t.name,r.schema);return s?(s==="node"&&(i=Mn(t,r.schema)),s==="mark"&&(a=Xo(t,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{i&&i===c.type&&n.setNodeMarkup(u,void 0,Xm(c.attrs,e)),a&&c.marks.length&&c.marks.forEach(d=>{a===d.type&&n.addMark(u,u+c.nodeSize,a.create(Xm(d.attrs,e)))})})}),!0):!1},DM=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),_M=()=>({tr:t,dispatch:e})=>{if(e){const n=new ur(t.doc);t.setSelection(n)}return!0},jM=()=>({state:t,dispatch:e})=>Oy(t,e),BM=()=>({state:t,dispatch:e})=>Ry(t,e),zM=()=>({state:t,dispatch:e})=>OO(t,e),LM=()=>({state:t,dispatch:e})=>RO(t,e),FM=()=>({state:t,dispatch:e})=>NO(t,e);function Fd(t,e,n={},r={}){return Jl(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const HM=(t,e=!1,n={},r={})=>({editor:o,tr:i,dispatch:a,commands:s})=>{var l,c;const{doc:u}=i;if(n.preserveWhitespace!=="full"){const d=Fd(t,o.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return a&&i.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!e),!0}return a&&i.setMeta("preventUpdate",!e),s.insertContentAt({from:0,to:u.content.size},t,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function qy(t,e){const n=Xo(e,t.schema),{from:r,to:o,empty:i}=t.selection,a=[];i?(t.storedMarks&&a.push(...t.storedMarks),a.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,l=>{a.push(...l.marks)});const s=a.find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function VM(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Ky(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function kh(t){return e=>Ky(e.$from,t)}function WM(t,e){const n={from:0,to:t.content.size};return jy(t,n,e)}function qM(t,e){const n=Mn(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,s=>{i.push(s)});const a=i.reverse().find(s=>s.type.name===n.name);return a?{...a.attrs}:{}}function KM(t,e){const n=Pc(typeof e=="string"?e:e.name,t.schema);return n==="node"?qM(t,e):n==="mark"?qy(t,e):{}}function Gy(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),a=Ah(i,o.type);a&&r.push({mark:o,...a})}):n.nodesBetween(t,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(a=>({from:i,to:i+o.nodeSize,mark:a})))}),r}function yl(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function Hd(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?Xo(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>Yl(d.attrs,n,{strict:!1}));let a=0;const s=[];if(o.forEach(({$from:d,$to:f})=>{const p=d.pos,m=f.pos;t.doc.nodesBetween(p,m,(g,v)=>{if(!g.isText&&!g.marks.length)return;const b=Math.max(p,v),y=Math.min(m,v+g.nodeSize),C=y-b;a+=C,s.push(...g.marks.map(S=>({mark:S,from:b,to:y})))})}),a===0)return!1;const l=s.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>Yl(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=s.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=a}function GM(t,e,n={}){if(!e)return as(t,null,n)||Hd(t,null,n);const r=Pc(e,t.schema);return r==="node"?as(t,e,n):r==="mark"?Hd(t,e,n):!1}function Ym(t,e){const{nodeExtensions:n}=Mc(e),r=n.find(a=>a.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=mt(Je(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Dh(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!==null&&r!==void 0?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(Dh(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function UM(t){return t instanceof tt}function XM(t,e,n){var r;const{selection:o}=e;let i=null;if(Ly(o)&&(i=o.$cursor),i){const s=(r=t.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(s)||!s.some(l=>l.type.excludes(n))}const{ranges:a}=o;return a.some(({$from:s,$to:l})=>{let c=s.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(s.pos,l.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const p=!f||f.type.allowsMarkType(n),m=!!n.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(n));c=p&&m}return!c}),c})}const YM=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:a,ranges:s}=i,l=Xo(t,r.schema);if(o)if(a){const c=qy(r,l);n.addStoredMark(l.create({...c,...e}))}else s.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,p)=>{const m=Math.max(p,u),g=Math.min(p+f.nodeSize,d);f.marks.find(b=>b.type===l)?f.marks.forEach(b=>{l===b.type&&n.addMark(m,g,l.create({...b.attrs,...e}))}):n.addMark(m,g,l.create(e))})});return XM(r,n,l)},JM=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),ZM=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=Mn(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:s})=>Wm(i,{...a,...e})(n)?!0:s.clearNodes()).command(({state:s})=>Wm(i,{...a,...e})(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},QM=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=ai(t,0,r.content.size),i=tt.create(r,o);e.setSelection(i)}return!0},eN=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,a=rt.atStart(r).from,s=rt.atEnd(r).to,l=ai(o,a,s),c=ai(i,a,s),u=rt.create(r,l,c);e.setSelection(u)}return!0},tN=t=>({state:e,dispatch:n})=>{const r=Mn(t,e.schema);return jO(r)(e,n)};function Jm(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}const nN=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:a}=e,{$from:s,$to:l}=i,c=o.extensionManager.attributes,u=yl(c,s.node().type.name,s.node().attrs);if(i instanceof tt&&i.node.isBlock)return!s.parentOffset||!fo(a,s.pos)?!1:(r&&(t&&Jm(n,o.extensionManager.splittableMarks),e.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,f=s.depth===0?void 0:VM(s.node(-1).contentMatchAt(s.indexAfter(-1)));let p=d&&f?[{type:f,attrs:u}]:void 0,m=fo(e.doc,e.mapping.map(s.pos),1,p);if(!p&&!m&&fo(e.doc,e.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(m&&(i instanceof rt&&e.deleteSelection(),e.split(e.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){const g=e.mapping.map(s.before()),v=e.doc.resolve(g);s.node(-1).canReplaceWith(v.index(),v.index()+1,f)&&e.setNodeMarkup(e.mapping.map(s.before()),f)}t&&Jm(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return m},rN=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var a;const s=Mn(t,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const d=l.node(-1);if(d.type!==s)return!1;const f=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let b=fe.empty;const y=l.index(-1)?1:l.index(-2)?2:3;for(let R=l.depth-y;R>=l.depth-3;R-=1)b=fe.from(l.node(R).copy(b));const C=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,S={...yl(f,l.node().type.name,l.node().attrs),...e},x=((a=s.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(S))||void 0;b=b.append(fe.from(s.createAndFill(null,x)||void 0));const w=l.before(l.depth-(y-1));n.replace(w,l.after(-C),new Me(b,4-y,0));let $=-1;n.doc.nodesBetween(w,n.doc.content.size,(R,M)=>{if($>-1)return!1;R.isTextblock&&R.content.size===0&&($=M+1)}),$>-1&&n.setSelection(rt.near(n.doc.resolve($))),n.scrollIntoView()}return!0}const p=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,m={...yl(f,d.type.name,d.attrs),...e},g={...yl(f,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const v=p?[{type:s,attrs:m},{type:p,attrs:g}]:[{type:s,attrs:m}];if(!fo(n.doc,l.pos,2))return!1;if(o){const{selection:b,storedMarks:y}=r,{splittableMarks:C}=i.extensionManager,S=y||b.$to.parentOffset&&b.$from.marks();if(n.split(l.pos,2,v).scrollIntoView(),!S||!o)return!0;const x=S.filter(w=>C.includes(w.type.name));n.ensureMarks(x)}return!0},Pu=(t,e)=>{const n=kh(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Go(t.doc,n.pos)&&t.join(n.pos),!0},Tu=(t,e)=>{const n=kh(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Go(t.doc,r)&&t.join(r),!0},oN=(t,e,n,r={})=>({editor:o,tr:i,state:a,dispatch:s,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,p=Mn(t,a.schema),m=Mn(e,a.schema),{selection:g,storedMarks:v}=a,{$from:b,$to:y}=g,C=b.blockRange(y),S=v||g.$to.parentOffset&&g.$from.marks();if(!C)return!1;const x=kh(w=>Ym(w.type.name,d))(g);if(C.depth>=1&&x&&C.depth-x.depth<=1){if(x.node.type===p)return c.liftListItem(m);if(Ym(x.node.type.name,d)&&p.validContent(x.node.content)&&s)return l().command(()=>(i.setNodeMarkup(x.pos,p),!0)).command(()=>Pu(i,p)).command(()=>Tu(i,p)).run()}return!n||!S||!s?l().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>Pu(i,p)).command(()=>Tu(i,p)).run():l().command(()=>{const w=u().wrapInList(p,r),$=S.filter(R=>f.includes(R.type.name));return i.ensureMarks($),w?!0:c.clearNodes()}).wrapInList(p,r).command(()=>Pu(i,p)).command(()=>Tu(i,p)).run()},iN=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,a=Xo(t,r.schema);return Hd(r,a,e)?o.unsetMark(a,{extendEmptyMarkRange:i}):o.setMark(a,e)},aN=(t,e,n={})=>({state:r,commands:o})=>{const i=Mn(t,r.schema),a=Mn(e,r.schema),s=as(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),s?o.setNode(a,l):o.setNode(i,{...l,...n})},sN=(t,e={})=>({state:n,commands:r})=>{const o=Mn(t,n.schema);return as(n,o,e)?r.lift(o):r.wrapIn(o,e)},lN=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const a=t.tr,s=i.transform;for(let l=s.steps.length-1;l>=0;l-=1)a.step(s.steps[l].invert(s.docs[l]));if(i.text){const l=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else a.delete(i.from,i.to)}return!0}}return!1},cN=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},uN=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:a=!1}=e,{selection:s}=n,l=Xo(t,r.schema),{$from:c,empty:u,ranges:d}=s;if(!o)return!0;if(u&&a){let{from:f,to:p}=s;const m=(i=c.marks().find(v=>v.type===l))===null||i===void 0?void 0:i.attrs,g=Ah(c,l,m);g&&(f=g.from,p=g.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},dN=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=Pc(typeof t=="string"?t:t.name,r.schema);return s?(s==="node"&&(i=Mn(t,r.schema)),s==="mark"&&(a=Xo(t,r.schema)),o&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;let d,f,p,m;n.selection.empty?r.doc.nodesBetween(c,u,(g,v)=>{i&&i===g.type&&(p=Math.max(v,c),m=Math.min(v+g.nodeSize,u),d=v,f=g)}):r.doc.nodesBetween(c,u,(g,v)=>{v<c&&i&&i===g.type&&(p=Math.max(v,c),m=Math.min(v+g.nodeSize,u),d=v,f=g),v>=c&&v<=u&&(i&&i===g.type&&n.setNodeMarkup(v,void 0,{...g.attrs,...e}),a&&g.marks.length&&g.marks.forEach(b=>{if(a===b.type){const y=Math.max(v,c),C=Math.min(v+g.nodeSize,u);n.addMark(y,C,a.create({...b.attrs,...e}))}}))}),f&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...f.attrs,...e}),a&&f.marks.length&&f.marks.forEach(g=>{a===g.type&&n.addMark(p,m,a.create({...g.attrs,...e}))}))}),!0):!1},fN=(t,e={})=>({state:n,dispatch:r})=>{const o=Mn(t,n.schema);return IO(o,e)(n,r)},hN=(t,e={})=>({state:n,dispatch:r})=>{const o=Mn(t,n.schema);return PO(o,e)(n,r)};var pN=Object.freeze({__proto__:null,blur:eM,clearContent:tM,clearNodes:nM,command:rM,createParagraphNear:oM,cut:iM,deleteCurrentNode:aM,deleteNode:sM,deleteRange:lM,deleteSelection:cM,enter:uM,exitCode:dM,extendMarkRange:fM,first:hM,focus:pM,forEach:mM,insertContent:gM,insertContentAt:yM,joinBackward:xM,joinDown:SM,joinForward:wM,joinItemBackward:EM,joinItemForward:$M,joinTextblockBackward:OM,joinTextblockForward:MM,joinUp:CM,keyboardShortcut:RM,lift:IM,liftEmptyBlock:PM,liftListItem:TM,newlineInCode:AM,resetAttributes:kM,scrollIntoView:DM,selectAll:_M,selectNodeBackward:jM,selectNodeForward:BM,selectParentNode:zM,selectTextblockEnd:LM,selectTextblockStart:FM,setContent:HM,setMark:YM,setMeta:JM,setNode:ZM,setNodeSelection:QM,setTextSelection:eN,sinkListItem:tN,splitBlock:nN,splitListItem:rN,toggleList:oN,toggleMark:iN,toggleNode:aN,toggleWrap:sN,undoInputRule:lN,unsetAllMarks:cN,unsetMark:uN,updateAttributes:dN,wrapIn:fN,wrapInList:hN});const mN=kn.create({name:"commands",addCommands(){return{...pN}}}),gN=kn.create({name:"drop",addProseMirrorPlugins(){return[new Vn({key:new fr("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),vN=kn.create({name:"editable",addProseMirrorPlugins(){return[new Vn({key:new fr("editable"),props:{editable:()=>this.editor.options.editable}})]}}),bN=new fr("focusEvents"),yN=kn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Vn({key:bN,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),CN=kn.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:s})=>{const{selection:l,doc:c}=s,{empty:u,$anchor:d}=l,{pos:f,parent:p}=d,m=d.parent.isTextblock&&f>0?s.doc.resolve(f-1):d,g=m.parent.type.spec.isolating,v=d.pos-d.parentOffset,b=g&&m.parent.childCount===1?v===d.pos:it.atStart(c).from===f;return!u||!p.type.isTextblock||p.textContent.length||!b||b&&d.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Ic()||Wy()?i:o},addProseMirrorPlugins(){return[new Vn({key:new fr("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(g=>g.getMeta("composition")))return;const r=t.some(g=>g.docChanged)&&!e.doc.eq(n.doc),o=t.some(g=>g.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:a,to:s}=e.selection,l=it.atStart(e.doc).from,c=it.atEnd(e.doc).to;if(i||!(a===l&&s===c)||!Dh(n.doc))return;const f=n.tr,p=$c({state:n,transaction:f}),{commands:m}=new Oc({editor:this.editor,state:p});if(m.clearNodes(),!!f.steps.length)return f}})]}}),SN=kn.create({name:"paste",addProseMirrorPlugins(){return[new Vn({key:new fr("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),xN=kn.create({name:"tabindex",addProseMirrorPlugins(){return[new Vn({key:new fr("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class ti{get name(){return this.node.type.name}constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new ti(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ti(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ti(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,a=this.pos+r+(i?0:1),s=this.resolvedPos.doc.resolve(a);if(!o&&s.depth<=this.depth)return;const l=new ti(s,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),e.push(new ti(s,this.editor,o,o?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,a=Object.keys(n);for(let s=0;s<a.length;s+=1){const l=a[s];if(i[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(a=>{r&&o.length>0||(a.node.type.name===e&&i.every(l=>n[l]===a.node.attrs[l])&&o.push(a),!(r&&o.length>0)&&(o=o.concat(a.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}}const wN=`.ProseMirror {
|
|
14
|
-
position: relative;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ProseMirror {
|
|
18
|
-
word-wrap: break-word;
|
|
19
|
-
white-space: pre-wrap;
|
|
20
|
-
white-space: break-spaces;
|
|
21
|
-
-webkit-font-variant-ligatures: none;
|
|
22
|
-
font-variant-ligatures: none;
|
|
23
|
-
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.ProseMirror [contenteditable="false"] {
|
|
27
|
-
white-space: normal;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
31
|
-
white-space: pre-wrap;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.ProseMirror pre {
|
|
35
|
-
white-space: pre-wrap;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
img.ProseMirror-separator {
|
|
39
|
-
display: inline !important;
|
|
40
|
-
border: none !important;
|
|
41
|
-
margin: 0 !important;
|
|
42
|
-
width: 0 !important;
|
|
43
|
-
height: 0 !important;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.ProseMirror-gapcursor {
|
|
47
|
-
display: none;
|
|
48
|
-
pointer-events: none;
|
|
49
|
-
position: absolute;
|
|
50
|
-
margin: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.ProseMirror-gapcursor:after {
|
|
54
|
-
content: "";
|
|
55
|
-
display: block;
|
|
56
|
-
position: absolute;
|
|
57
|
-
top: -2px;
|
|
58
|
-
width: 20px;
|
|
59
|
-
border-top: 1px solid black;
|
|
60
|
-
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@keyframes ProseMirror-cursor-blink {
|
|
64
|
-
to {
|
|
65
|
-
visibility: hidden;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.ProseMirror-hideselection *::selection {
|
|
70
|
-
background: transparent;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.ProseMirror-hideselection *::-moz-selection {
|
|
74
|
-
background: transparent;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.ProseMirror-hideselection * {
|
|
78
|
-
caret-color: transparent;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
82
|
-
display: block;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
86
|
-
opacity: 0
|
|
87
|
-
}`;function EN(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}class $N extends BO{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:o})=>this.options.onDrop(n,r,o)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=EN(wN,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,n){const r=_y(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(i=>{const a=typeof i=="string"?`${i}$`:i.key;r=r.filter(s=>!s.key.startsWith(a))}),n.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var e,n;const o=[...this.options.enableCoreExtensions?[vN,QO.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),mN,yN,CN,xN,gN,SN].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new Xi(o,this)}createCommandManager(){this.commandManager=new Oc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=Fd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(a){if(!(a instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(a.message))throw a;this.emit("contentError",{editor:this,error:a,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),n=Fd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=Fy(n,this.options.autofocus);this.view=new sO(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Ui.create({doc:n,selection:r||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(a=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(a)});return}const n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return KM(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return GM(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ph(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
|
88
|
-
|
|
89
|
-
`,textSerializers:r={}}=e||{};return WM(this.state.doc,{blockSeparator:n,textSerializers:{...By(this.schema),...r}})}get isEmpty(){return Dh(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new ti(n,this)}get $doc(){return this.$pos(0)}}function xi(t){return new Nc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=mt(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,a=r[r.length-1],s=r[0];if(a){const l=s.search(/\S/),c=n.from+s.indexOf(a),u=c+a.length;if(Gy(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===t.type&&g!==p.mark.type)).filter(p=>p.to>c).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+l,c);const f=n.from+l+a.length;i.addMark(n.from+l,f,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function ON(t){return new Nc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=mt(t.getAttributes,void 0,r)||{},{tr:i}=e,a=n.from;let s=n.to;const l=t.type.create(o);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=a+c;u>s?u=s:s=u+r[1].length;const d=r[0][r[0].length-1];i.insertText(d,a+r[0].length-1),i.replaceWith(u,s,l)}else if(r[0]){const c=t.type.isInline?a:a-1;i.insert(c,t.type.create(o)).delete(i.mapping.map(a),i.mapping.map(s))}i.scrollIntoView()}})}function Vd(t){return new Nc({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=mt(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function ca(t){return new Nc({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=mt(t.getAttributes,void 0,r)||{},a=e.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),c=l&&ph(l,t.type,i);if(!c)return null;if(a.wrap(l,c),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:p}=t.editor.extensionManager,m=f||d.$to.parentOffset&&d.$from.marks();if(m){const g=m.filter(v=>p.includes(v.type.name));a.ensureMarks(g)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}const u=a.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Go(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&a.join(n.from-1)}})}class sn{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=mt(Je(this,"addOptions",{name:this.name}))),this.storage=mt(Je(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new sn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Rc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new sn(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=mt(Je(n,"addOptions",{name:n.name})),n.storage=mt(Je(n,"addStorage",{name:n.name,options:n.options})),n}}class MN{constructor(e,n,r){this.isDragging=!1,this.component=e,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var n,r,o,i,a,s,l;const{view:c}=this.editor,u=e.target,d=u.nodeType===3?(n=u.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(u)||!d)return;let f=0,p=0;if(this.dom!==d){const y=this.dom.getBoundingClientRect(),C=d.getBoundingClientRect(),S=(o=e.offsetX)!==null&&o!==void 0?o:(i=e.nativeEvent)===null||i===void 0?void 0:i.offsetX,x=(a=e.offsetY)!==null&&a!==void 0?a:(s=e.nativeEvent)===null||s===void 0?void 0:s.offsetY;f=C.x-y.x+S,p=C.y-y.y+x}const m=this.dom.cloneNode(!0);(l=e.dataTransfer)===null||l===void 0||l.setDragImage(m,f,p);const g=this.getPos();if(typeof g!="number")return;const v=tt.create(c.state.doc,g),b=c.state.tr.setSelection(v);c.dispatch(b)}stopEvent(e){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=e.type.startsWith("drag"),a=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!a&&!i)return!0;const{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,d=tt.isSelectable(this.node),f=e.type==="copy",p=e.type==="paste",m=e.type==="cut",g=e.type==="mousedown";if(!u&&d&&i&&e.target===this.dom&&e.preventDefault(),u&&i&&!c&&e.target===this.dom)return e.preventDefault(),!1;if(u&&l&&!c&&g){const v=r.closest("[data-drag-handle]");v&&(this.dom===v||this.dom.contains(v))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||a||f||p||m||g&&d)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(Ic()||Hy())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const n=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:n})}}function wi(t){return new GO({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=mt(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:a}=e,s=r[r.length-1],l=r[0];let c=n.to;if(s){const u=l.search(/\S/),d=n.from+l.indexOf(s),f=d+s.length;if(Gy(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(v=>v===t.type&&v!==m.mark.type)).filter(m=>m.to>d).length)return null;f<n.to&&a.delete(f,n.to),d>n.from&&a.delete(n.from+u,d),c=n.from+u+s.length,a.addMark(n.from+u,c,t.type.create(i||{})),a.removeStoredMark(t.type)}}})}function NN(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wd={exports:{}},Au={};/**
|
|
90
|
-
* @license React
|
|
91
|
-
* use-sync-external-store-shim.production.min.js
|
|
92
|
-
*
|
|
93
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the MIT license found in the
|
|
96
|
-
* LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/var Zm;function RN(){if(Zm)return Au;Zm=1;var t=E;function e(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function s(d,f){var p=f(),m=r({inst:{value:p,getSnapshot:f}}),g=m[0].inst,v=m[1];return i(function(){g.value=p,g.getSnapshot=f,l(g)&&v({inst:g})},[d,p,f]),o(function(){return l(g)&&v({inst:g}),d(function(){l(g)&&v({inst:g})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Au.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,Au}var ku={};/**
|
|
98
|
-
* @license React
|
|
99
|
-
* use-sync-external-store-shim.development.js
|
|
100
|
-
*
|
|
101
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the MIT license found in the
|
|
104
|
-
* LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/var Qm;function IN(){return Qm||(Qm=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=E,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(C){{for(var S=arguments.length,x=new Array(S>1?S-1:0),w=1;w<S;w++)x[w-1]=arguments[w];r("error",C,x)}}function r(C,S,x){{var w=e.ReactDebugCurrentFrame,$=w.getStackAddendum();$!==""&&(S+="%s",x=x.concat([$]));var R=x.map(function(M){return String(M)});R.unshift("Warning: "+S),Function.prototype.apply.call(console[C],console,R)}}function o(C,S){return C===S&&(C!==0||1/C===1/S)||C!==C&&S!==S}var i=typeof Object.is=="function"?Object.is:o,a=t.useState,s=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,u=!1,d=!1;function f(C,S,x){u||t.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var w=S();if(!d){var $=S();i(w,$)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var R=a({inst:{value:w,getSnapshot:S}}),M=R[0].inst,O=R[1];return l(function(){M.value=w,M.getSnapshot=S,p(M)&&O({inst:M})},[C,w,S]),s(function(){p(M)&&O({inst:M});var N=function(){p(M)&&O({inst:M})};return C(N)},[C]),c(w),w}function p(C){var S=C.getSnapshot,x=C.value;try{var w=S();return!i(x,w)}catch{return!0}}function m(C,S,x){return S()}var g=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!g,b=v?m:f,y=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:b;ku.useSyncExternalStore=y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),ku}process.env.NODE_ENV==="production"?Wd.exports=RN():Wd.exports=IN();var Tc=Wd.exports;const PN=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},TN=({contentComponent:t})=>{const e=Tc.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return E.createElement(E.Fragment,null,Object.values(e))};function AN(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:Ar.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(o=>o())}}}class kN extends E.Component{constructor(e){var n;super(e),this.editorContentRef=E.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=e.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.options.element.childNodes),e.setOptions({element:n}),e.contentComponent=AN(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;const n=document.createElement("div");n.append(...e.options.element.childNodes),e.setOptions({element:n})}render(){const{editor:e,innerRef:n,...r}=this.props;return E.createElement(E.Fragment,null,E.createElement("div",{ref:PN(n,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&E.createElement(TN,{contentComponent:e.contentComponent}))}}const DN=E.forwardRef((t,e)=>{const n=E.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return E.createElement(kN,{key:n,innerRef:e,...t})}),_N=E.memo(DN);var jN=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;for(o of e.entries())if(!t(o[1],n.get(o[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(e[o]!==n[o])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!(a==="_owner"&&e.$$typeof)&&!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n},BN=NN(jN),qd={exports:{}},Du={};/**
|
|
106
|
-
* @license React
|
|
107
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
108
|
-
*
|
|
109
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the MIT license found in the
|
|
112
|
-
* LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/var eg;function zN(){if(eg)return Du;eg=1;var t=E,e=Tc;function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;return Du.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var m=i(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=s(function(){function b(w){if(!y){if(y=!0,C=w,w=f(w),p!==void 0&&g.hasValue){var $=g.value;if(p($,w))return S=$}return S=w}if($=S,r(C,w))return $;var R=f(w);return p!==void 0&&p($,R)?$:(C=w,S=R)}var y=!1,C,S,x=d===void 0?null:d;return[function(){return b(u())},x===null?void 0:function(){return b(x())}]},[u,d,f,p]);var v=o(c,m[0],m[1]);return a(function(){g.hasValue=!0,g.value=v},[v]),l(v),v},Du}var _u={};/**
|
|
114
|
-
* @license React
|
|
115
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
116
|
-
*
|
|
117
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the MIT license found in the
|
|
120
|
-
* LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/var tg;function LN(){return tg||(tg=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=E,e=Tc;function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;function c(u,d,f,p,m){var g=i(null),v;g.current===null?(v={hasValue:!1,value:null},g.current=v):v=g.current;var b=s(function(){var x=!1,w,$,R=function(I){if(!x){x=!0,w=I;var T=p(I);if(m!==void 0&&v.hasValue){var P=v.value;if(m(P,T))return $=P,P}return $=T,T}var A=w,k=$;if(r(A,I))return k;var B=p(I);return m!==void 0&&m(k,B)?k:(w=I,$=B,B)},M=f===void 0?null:f,O=function(){return R(d())},N=M===null?void 0:function(){return R(M())};return[O,N]},[d,f,p,m]),y=b[0],C=b[1],S=o(u,y,C);return a(function(){v.hasValue=!0,v.value=S},[S]),l(S),S}_u.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),_u}process.env.NODE_ENV==="production"?qd.exports=zN():qd.exports=LN();var FN=qd.exports;const HN=typeof window<"u"?E.useLayoutEffect:E.useEffect;class VN{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const n=()=>{this.transactionNumber+=1,this.subscribers.forEach(o=>o())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}}function WN(t){var e;const[n]=E.useState(()=>new VN(t.editor)),r=FN.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:BN);return HN(()=>n.watch(t.editor),[t.editor,n]),E.useDebugValue(r),r}const ng=process.env.NODE_ENV!=="production",Kd=typeof window>"u",qN=Kd||!!(typeof window<"u"&&window.next);class _h{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return Kd||qN?(ng&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&Kd&&ng)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)===null||i===void 0?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)===null||i===void 0?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)===null||i===void 0?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)===null||i===void 0?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)===null||i===void 0?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)===null||i===void 0?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)===null||i===void 0?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)===null||i===void 0?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)===null||i===void 0?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)===null||i===void 0?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)===null||i===void 0?void 0:i.call(o,...r)}};return new $N(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,i)=>{var a;return o===((a=n.extensions)===null||a===void 0?void 0:a[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?_h.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}}function KN(t={},e=[]){const n=E.useRef(t);n.current=t;const[r]=E.useState(()=>new _h(n)),o=Tc.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return E.useDebugValue(o),E.useEffect(r.onRender(e)),WN({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&i===0?0:i+1}),o}const GN=E.createContext({editor:null});GN.Consumer;const Uy=E.createContext({onDragStart:void 0}),Xy=()=>E.useContext(Uy),UN=t=>{const e=t.as||"div",{nodeViewContentRef:n}=Xy();return E.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},Yy=E.forwardRef((t,e)=>{const{onDragStart:n}=Xy(),r=t.as||"div";return E.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function XN(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function YN(t){var e;return typeof t=="object"&&((e=t.$$typeof)===null||e===void 0?void 0:e.toString())==="Symbol(react.forward_ref)"}class JN{constructor(e,{editor:n,props:r={},as:o="div",className:i=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=n,this.props=r,this.element=document.createElement(o),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?Ar.flushSync(()=>{this.render()}):this.render()}render(){var e;const n=this.component,r=this.props,o=this.editor;(XN(n)||YN(n))&&(r.ref=i=>{this.ref=i}),this.reactElement=E.createElement(n,{...r}),(e=o==null?void 0:o.contentComponent)===null||e===void 0||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;const n=this.editor;(e=n==null?void 0:n.contentComponent)===null||e===void 0||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(n=>{this.element.setAttribute(n,e[n])})}}class ZN extends MN{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const c=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=c(this.extension.name)}const o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&c.appendChild(this.contentDOMElement)}},i=this.component,a=E.memo(c=>E.createElement(Uy.Provider,{value:o},E.createElement(i,c)));a.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new JN(a,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!((e=this.renderer.element.firstElementChild)===null||e===void 0)&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:e,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n,r){const o=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,a=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:n,oldInnerDecorations:s,innerDecorations:r,updateProps:()=>o({node:e,decorations:n,innerDecorations:r})})}return e===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=e,this.decorations=n,this.innerDecorations=r,o({node:e,decorations:n,innerDecorations:r})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){const n=this.editor.extensionManager.attributes,r=Xl(this.node,n);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function Jy(t,e){return n=>n.editor.contentComponent?new ZN(t,n,e):{}}function ge(){return ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ge.apply(null,arguments)}function Ue(t){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(t)}var QN=Symbol.for("react.element"),eR=Symbol.for("react.transitional.element"),tR=Symbol.for("react.fragment");function Zy(t){return t&&Ue(t)==="object"&&(t.$$typeof===QN||t.$$typeof===eR)&&t.type===tR}function dr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return E.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(dr(r)):Zy(r)&&r.props?n=n.concat(dr(r.props.children,e)):n.push(r))}),n}var Gd={},jh=[],nR=function(e){jh.push(e)};function Xr(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=jh.reduce(function(r,o){return o(r??"","warning")},e);n&&console.error("Warning: ".concat(n))}}function rR(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=jh.reduce(function(r,o){return o(r??"","note")},e);n&&console.warn("Note: ".concat(n))}}function Qy(){Gd={}}function eC(t,e,n){!e&&!Gd[n]&&(t(!1,n),Gd[n]=!0)}function at(t,e){eC(Xr,t,e)}function Ud(t,e){eC(rR,t,e)}at.preMessage=nR;at.resetWarned=Qy;at.noteOnce=Ud;function oR(t,e){if(Ue(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ue(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function tC(t){var e=oR(t,"string");return Ue(e)=="symbol"?e:e+""}function D(t,e,n){return(e=tC(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rg(Object(n),!0).forEach(function(r){D(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ss(t){return t instanceof HTMLElement||t instanceof SVGElement}function iR(t){return t&&Ue(t)==="object"&&ss(t.nativeElement)?t.nativeElement:ss(t)?t:null}function Cl(t){var e=iR(t);if(e)return e;if(t instanceof E.Component){var n;return(n=Ar.findDOMNode)===null||n===void 0?void 0:n.call(Ar,t)}return null}var Qs={exports:{}},_t={};/**
|
|
122
|
-
* @license React
|
|
123
|
-
* react-is.production.min.js
|
|
124
|
-
*
|
|
125
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
126
|
-
*
|
|
127
|
-
* This source code is licensed under the MIT license found in the
|
|
128
|
-
* LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/var og;function aR(){if(og)return _t;og=1;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;m=Symbol.for("react.module.reference");function g(v){if(typeof v=="object"&&v!==null){var b=v.$$typeof;switch(b){case t:switch(v=v.type,v){case n:case o:case r:case c:case u:return v;default:switch(v=v&&v.$$typeof,v){case s:case a:case l:case f:case d:case i:return v;default:return b}}case e:return b}}}return _t.ContextConsumer=a,_t.ContextProvider=i,_t.Element=t,_t.ForwardRef=l,_t.Fragment=n,_t.Lazy=f,_t.Memo=d,_t.Portal=e,_t.Profiler=o,_t.StrictMode=r,_t.Suspense=c,_t.SuspenseList=u,_t.isAsyncMode=function(){return!1},_t.isConcurrentMode=function(){return!1},_t.isContextConsumer=function(v){return g(v)===a},_t.isContextProvider=function(v){return g(v)===i},_t.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},_t.isForwardRef=function(v){return g(v)===l},_t.isFragment=function(v){return g(v)===n},_t.isLazy=function(v){return g(v)===f},_t.isMemo=function(v){return g(v)===d},_t.isPortal=function(v){return g(v)===e},_t.isProfiler=function(v){return g(v)===o},_t.isStrictMode=function(v){return g(v)===r},_t.isSuspense=function(v){return g(v)===c},_t.isSuspenseList=function(v){return g(v)===u},_t.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===o||v===r||v===c||v===u||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===f||v.$$typeof===d||v.$$typeof===i||v.$$typeof===a||v.$$typeof===l||v.$$typeof===m||v.getModuleId!==void 0)},_t.typeOf=g,_t}var jt={};/**
|
|
130
|
-
* @license React
|
|
131
|
-
* react-is.development.js
|
|
132
|
-
*
|
|
133
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
134
|
-
*
|
|
135
|
-
* This source code is licensed under the MIT license found in the
|
|
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 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
|
-
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
|
-
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
|
-
`);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(`
|
|
141
|
-
`))):g="{".concat(g,"}"),[g,v]};function AC(t,e){return us("".concat(t.join("%")).concat(e))}function WI(){return null}var kC="style";function sf(t,e){var n=t.token,r=t.path,o=t.hashId,i=t.layer,a=t.nonce,s=t.clientOnly,l=t.order,c=l===void 0?0:l,u=h.useContext($s),d=u.autoClear,f=u.mock,p=u.defaultCache,m=u.hashPriority,g=u.container,v=u.ssrInline,b=u.transformers,y=u.linters,C=u.cache,S=u.layer,x=n._tokenKey,w=[x];S&&w.push("layer"),w.push.apply(w,he(r));var $=nf;process.env.NODE_ENV!=="production"&&f!==void 0&&($=f==="client");var R=Wh(kC,w,function(){var T=w.join("|");if(LI(T)){var P=FI(T),A=X(P,2),k=A[0],B=A[1];if(k)return[k,x,B,{},s,c]}var _=e(),F=VI(_,{hashId:o,hashPriority:m,layer:S?i:void 0,path:r.join("-"),transformers:b,linters:y}),H=X(F,2),K=H[0],V=H[1],W=$l(K),z=AC(w,W);return[W,x,z,V,s,c]},function(T,P){var A=X(T,3),k=A[2];(P||d)&&nf&&ds(k,{mark:Pr})},function(T){var P=X(T,4),A=P[0];P[1];var k=P[2],B=P[3];if($&&A!==RC){var _={mark:Pr,prepend:S?!1:"queue",attachTo:g,priority:c},F=typeof a=="function"?a():a;F&&(_.csp={nonce:F});var H=[],K=[];Object.keys(B).forEach(function(W){W.startsWith("@layer")?H.push(W):K.push(W)}),H.forEach(function(W){po($l(B[W]),"_layer-".concat(W),j(j({},_),{},{prepend:!0}))});var V=po(A,k,_);V[ko]=C.instanceId,V.setAttribute(fa,x),process.env.NODE_ENV!=="production"&&V.setAttribute(KR,w.join("|")),K.forEach(function(W){po($l(B[W]),"_effect-".concat(W),_)})}}),M=X(R,3),O=M[0],N=M[1],I=M[2];return function(T){var P;if(!v||$||!p)P=h.createElement(WI,null);else{var A;P=h.createElement("style",ge({},(A={},D(A,fa,N),D(A,Pr,I),A),{dangerouslySetInnerHTML:{__html:O}}))}return h.createElement(h.Fragment,null,P,T)}}var qI=function(e,n,r){var o=X(e,6),i=o[0],a=o[1],s=o[2],l=o[3],c=o[4],u=o[5],d=r||{},f=d.plain;if(c)return null;var p=i,m={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return p=ec(i,a,s,m,f),l&&Object.keys(l).forEach(function(g){if(!n[g]){n[g]=!0;var v=$l(l[g]),b=ec(v,a,"_effect-".concat(g),m,f);g.startsWith("@layer")?p=b+p:p+=b}}),[u,s,p]},DC="cssVar",KI=function(e,n){var r=e.key,o=e.prefix,i=e.unitless,a=e.ignore,s=e.token,l=e.scope,c=l===void 0?"":l,u=E.useContext($s),d=u.cache.instanceId,f=u.container,p=s._tokenKey,m=[].concat(he(e.path),[r,c,p]),g=Wh(DC,m,function(){var v=n(),b=CC(v,r,{prefix:o,unitless:i,ignore:a,scope:c}),y=X(b,2),C=y[0],S=y[1],x=AC(m,S);return[C,S,x,r]},function(v){var b=X(v,3),y=b[2];nf&&ds(y,{mark:Pr})},function(v){var b=X(v,3),y=b[1],C=b[2];if(y){var S=po(y,C,{mark:Pr,prepend:"queue",attachTo:f,priority:-999});S[ko]=d,S.setAttribute(fa,r)}});return g},GI=function(e,n,r){var o=X(e,4),i=o[1],a=o[2],s=o[3],l=r||{},c=l.plain;if(!i)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=ec(i,s,a,d,c);return[u,a,f]},Ia;Ia={},D(Ia,kC,qI),D(Ia,SC,bI),D(Ia,DC,GI);var kt=function(){function t(e,n){ln(this,t),D(this,"name",void 0),D(this,"style",void 0),D(this,"_keyframe",!0),this.name=e,this.style=n}return cn(t,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),t}();function ji(t){return t.notSplit=!0,t}ji(["borderTop","borderBottom"]),ji(["borderTop"]),ji(["borderBottom"]),ji(["borderLeft","borderRight"]),ji(["borderLeft"]),ji(["borderRight"]);var Gh=E.createContext({});function _C(t){return pC(t)||uC(t)||Fh(t)||mC()}function qr(t,e){for(var n=t,r=0;r<e.length;r+=1){if(n==null)return;n=n[e[r]]}return n}function jC(t,e,n,r){if(!e.length)return n;var o=_C(e),i=o[0],a=o.slice(1),s;return!t&&typeof i=="number"?s=[]:Array.isArray(t)?s=he(t):s=j({},t),r&&n===void 0&&a.length===1?delete s[i][a[0]]:s[i]=jC(s[i],a,n,r),s}function Nr(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!qr(t,e.slice(0,-1))?t:jC(t,e,n,r)}function UI(t){return Ue(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function Sg(t){return Array.isArray(t)?[]:{}}var XI=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Yi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Sg(e[0]);return e.forEach(function(o){function i(a,s){var l=new Set(s),c=qr(o,a),u=Array.isArray(c);if(u||UI(c)){if(!l.has(c)){l.add(c);var d=qr(r,a);u?r=Nr(r,a,[]):(!d||Ue(d)!=="object")&&(r=Nr(r,a,Sg(c))),XI(c).forEach(function(f){i([].concat(he(a),[f]),l)})}}else r=Nr(r,a,c)}i([])}),r}function BC(){}let oo=null;function YI(){oo=null,Qy()}let Uh=BC;process.env.NODE_ENV!=="production"&&(Uh=(t,e,n)=>{at(t,`[antd: ${e}] ${n}`),process.env.NODE_ENV==="test"&&YI()});const zC=h.createContext({}),Kt=process.env.NODE_ENV!=="production"?t=>{const{strict:e}=h.useContext(zC),n=(r,o,i)=>{if(!r)if(e===!1&&o==="deprecated"){const a=oo;oo||(oo={}),oo[t]=oo[t]||[],oo[t].includes(i||"")||oo[t].push(i||""),a||console.warn("[antd] There exists deprecated usage in your code:",oo)}else process.env.NODE_ENV!=="production"&&Uh(r,t,i)};return n.deprecated=(r,o,i,a)=>{n(r,"deprecated",`\`${o}\` is deprecated. Please use \`${i}\` instead.${a?` ${a}`:""}`)},n}:()=>{const t=()=>{};return t.deprecated=BC,t},Ri=Uh,JI=E.createContext(void 0);var ZI={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},QI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},eP=j(j({},QI),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const LC={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},xg={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},eP),timePickerLocale:Object.assign({},LC)},nr="${label} is not a valid ${type}",Ho={locale:"en",Pagination:ZI,DatePicker:xg,TimePicker:LC,Calendar:xg,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:nr,method:nr,array:nr,object:nr,number:nr,date:nr,boolean:nr,integer:nr,float:nr,regexp:nr,email:nr,url:nr,hex:nr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Ol=Object.assign({},Ho.Modal),Ml=[];const wg=()=>Ml.reduce((t,e)=>Object.assign(Object.assign({},t),e),Ho.Modal);function tP(t){if(t){const e=Object.assign({},t);return Ml.push(e),Ol=wg(),()=>{Ml=Ml.filter(n=>n!==e),Ol=wg()}}Ol=Object.assign({},Ho.Modal)}function FC(){return Ol}const Xh=E.createContext(void 0),Qr=(t,e)=>{const n=h.useContext(Xh),r=h.useMemo(()=>{var i;const a=e||Ho[t],s=(i=n==null?void 0:n[t])!==null&&i!==void 0?i:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[t,e,n]),o=h.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?Ho.locale:i},[n]);return[r,o]},HC="internalMark",VC=t=>{const{locale:e={},children:n,_ANT_MARK__:r}=t;if(process.env.NODE_ENV!=="production"){const i=Kt("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===HC,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}h.useEffect(()=>tP(e==null?void 0:e.Modal),[e]);const o=h.useMemo(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return h.createElement(Xh.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(VC.displayName="LocaleProvider");const WC={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},hs=Object.assign(Object.assign({},WC),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
142
|
-
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
143
|
-
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),wn=Math.round;function Fu(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=e(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const Eg=(t,e,n)=>n===0?t:t/100;function Pa(t,e){const n=e||255;return t>n?n:t<0?0:t}class Pt{constructor(e){D(this,"isValid",!0),D(this,"r",0),D(this,"g",0),D(this,"b",0),D(this,"a",1),D(this,"_h",void 0),D(this,"_s",void 0),D(this,"_l",void 0),D(this,"_v",void 0),D(this,"_max",void 0),D(this,"_min",void 0),D(this,"_brightness",void 0);function n(r){return r[0]in e&&r[1]in e&&r[2]in e}if(e)if(typeof e=="string"){let o=function(i){return r.startsWith(i)};const r=e.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):o("rgb")?this.fromRgbString(r):o("hsl")?this.fromHslString(r):(o("hsv")||o("hsb"))&&this.fromHsvString(r)}else if(e instanceof Pt)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=Pa(e.r),this.g=Pa(e.g),this.b=Pa(e.b),this.a=typeof e.a=="number"?Pa(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=e(this.r),r=e(this.g),o=e(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=wn(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-e/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(e=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+e/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(e,n=50){const r=this._c(e),o=n/100,i=s=>(r[s]-this[s])*o+this[s],a={r:wn(i("r")),g:wn(i("g")),b:wn(i("b")),a:wn(i("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),r=this.a+n.a*(1-this.a),o=i=>wn((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(e+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=wn(this.a*255).toString(16);e+=i.length===2?i:"0"+i}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=wn(this.getSaturation()*100),r=wn(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${r}%,${this.a})`:`hsl(${e},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,r){const o=this.clone();return o[e]=Pa(n,r),o}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:e,s:n,l:r,a:o}){if(this._h=e%360,this._s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const f=wn(r*255);this.r=f,this.g=f,this.b=f}let i=0,a=0,s=0;const l=e/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,a=u):l>=1&&l<2?(i=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(i=u,s=c):l>=5&&l<6&&(i=c,s=u);const d=r-c/2;this.r=wn((i+d)*255),this.g=wn((a+d)*255),this.b=wn((s+d)*255)}fromHsv({h:e,s:n,v:r,a:o}){this._h=e%360,this._s=n,this._v=r,this.a=typeof o=="number"?o:1;const i=wn(r*255);if(this.r=i,this.g=i,this.b=i,n<=0)return;const a=e/60,s=Math.floor(a),l=a-s,c=wn(r*(1-n)*255),u=wn(r*(1-n*l)*255),d=wn(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const n=Fu(e,Eg);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=Fu(e,Eg);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=Fu(e,(r,o)=>o.includes("%")?wn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var nl=2,$g=.16,nP=.05,rP=.05,oP=.15,qC=5,KC=4,iP=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function Og(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-nl*e:Math.round(t.h)+nl*e:r=n?Math.round(t.h)+nl*e:Math.round(t.h)-nl*e,r<0?r+=360:r>=360&&(r-=360),r}function Mg(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-$g*e:e===KC?r=t.s+$g:r=t.s+nP*e,r>1&&(r=1),n&&e===qC&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Ng(t,e,n){var r;return n?r=t.v+rP*e:r=t.v-oP*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function ps(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Pt(t),o=r.toHsv(),i=qC;i>0;i-=1){var a=new Pt({h:Og(o,i,!0),s:Mg(o,i,!0),v:Ng(o,i,!0)});n.push(a)}n.push(r);for(var s=1;s<=KC;s+=1){var l=new Pt({h:Og(o,s),s:Mg(o,s),v:Ng(o,s)});n.push(l)}return e.theme==="dark"?iP.map(function(c){var u=c.index,d=c.amount;return new Pt(e.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var Hu={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},lf=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];lf.primary=lf[5];var cf=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];cf.primary=cf[5];var uf=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];uf.primary=uf[5];var df=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];df.primary=df[5];var ff=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];ff.primary=ff[5];var hf=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];hf.primary=hf[5];var pf=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];pf.primary=pf[5];var mf=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];mf.primary=mf[5];var tc=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];tc.primary=tc[5];var gf=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];gf.primary=gf[5];var vf=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];vf.primary=vf[5];var bf=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];bf.primary=bf[5];var yf=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];yf.primary=yf[5];var Vu={red:lf,volcano:cf,orange:uf,gold:df,yellow:ff,lime:hf,green:pf,cyan:mf,blue:tc,geekblue:gf,purple:vf,magenta:bf,grey:yf};function aP(t,{generateColorPalettes:e,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=t,u=e(s),d=e(r),f=e(o),p=e(i),m=e(a),g=n(l,c),v=t.colorLink||t.colorInfo,b=e(v),y=new Pt(p[1]).mix(new Pt(p[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:y,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new Pt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const sP=t=>{let e=t,n=t,r=t,o=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?r=1:t>=6&&(r=2),t>4&&t<8?o=4:t>=8&&(o=6),{borderRadius:t,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:o}};function lP(t){const{motionUnit:e,motionBase:n,borderRadius:r,lineWidth:o}=t;return Object.assign({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:o+1},sP(r))}const cP=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function Nl(t){return(t+8)/t}function uP(t){const e=Array.from({length:10}).map((n,r)=>{const o=r-1,i=t*Math.pow(Math.E,o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:Nl(n)}))}const dP=t=>{const e=uP(t),n=e.map(u=>u.size),r=e.map(u=>u.lineHeight),o=n[1],i=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function fP(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const mr=(t,e)=>new Pt(t).setA(e).toRgbString(),Ta=(t,e)=>new Pt(t).darken(e).toHexString(),hP=t=>{const e=ps(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},pP=(t,e)=>{const n=t||"#fff",r=e||"#000";return{colorBgBase:n,colorTextBase:r,colorText:mr(r,.88),colorTextSecondary:mr(r,.65),colorTextTertiary:mr(r,.45),colorTextQuaternary:mr(r,.25),colorFill:mr(r,.15),colorFillSecondary:mr(r,.06),colorFillTertiary:mr(r,.04),colorFillQuaternary:mr(r,.02),colorBgSolid:mr(r,1),colorBgSolidHover:mr(r,.75),colorBgSolidActive:mr(r,.95),colorBgLayout:Ta(n,4),colorBgContainer:Ta(n,0),colorBgElevated:Ta(n,0),colorBgSpotlight:mr(r,.85),colorBgBlur:"transparent",colorBorder:Ta(n,15),colorBorderSecondary:Ta(n,6)}};function mP(t){Hu.pink=Hu.magenta,Vu.pink=Vu.magenta;const e=Object.keys(WC).map(n=>{const r=t[n]===Hu[n]?Vu[n]:ps(t[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),aP(t,{generateColorPalettes:hP,generateNeutralColorPalettes:pP})),dP(t.fontSize)),fP(t)),cP(t)),lP(t))}const GC=tf(mP),Cf={token:hs,override:{override:hs},hashed:!0},UC=E.createContext(Cf),ms="ant",Bc="anticon",gP=["outlined","borderless","filled","underlined"],vP=(t,e)=>e||(t?`${ms}-${t}`:ms),gt=h.createContext({getPrefixCls:vP,iconPrefixCls:Bc}),{Consumer:_6}=gt,Rg={};function hr(t){const e=h.useContext(gt),{getPrefixCls:n,direction:r,getPopupContainer:o}=e,i=e[t];return Object.assign(Object.assign({classNames:Rg,styles:Rg},i),{getPrefixCls:n,direction:r,getPopupContainer:o})}const bP=`-ant-${Date.now()}-${Math.random()}`;function yP(t,e){const n={},r=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(a,s)=>{const l=new Pt(a),c=ps(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){o(e.primaryColor,"primary");const a=new Pt(e.primaryColor),s=ps(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(a,c=>c.setA(c.a*.12));const l=new Pt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setA(c.a*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return e.successColor&&o(e.successColor,"success"),e.warningColor&&o(e.warningColor,"warning"),e.errorColor&&o(e.errorColor,"error"),e.infoColor&&o(e.infoColor,"info"),`
|
|
144
|
-
:root {
|
|
145
|
-
${Object.keys(n).map(a=>`--${t}-${a}: ${n[a]};`).join(`
|
|
146
|
-
`)}
|
|
147
|
-
}
|
|
148
|
-
`.trim()}function CP(t,e){const n=yP(t,e);zn()?po(n,`${bP}-dynamic-theme`):process.env.NODE_ENV!=="production"&&Ri(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Dr=h.createContext(!1),XC=({children:t,disabled:e})=>{const n=h.useContext(Dr);return h.createElement(Dr.Provider,{value:e??n},t)},ma=h.createContext(void 0),SP=({children:t,size:e})=>{const n=h.useContext(ma);return h.createElement(ma.Provider,{value:e||n},t)};function xP(){const t=E.useContext(Dr),e=E.useContext(ma);return{componentDisabled:t,componentSize:e}}var YC=cn(function t(){ln(this,t)}),JC="CALC_UNIT",wP=new RegExp(JC,"g");function Wu(t){return typeof t=="number"?"".concat(t).concat(JC):t}var EP=function(t){go(n,t);var e=vo(n);function n(r,o){var i;ln(this,n),i=e.call(this),D(yt(i),"result",""),D(yt(i),"unitlessCssVar",void 0),D(yt(i),"lowPriority",void 0);var a=Ue(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=Wu(r):a==="string"&&(i.result=r),i}return cn(n,[{key:"add",value:function(o){return o instanceof n?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(Wu(o))),this.lowPriority=!0,this}},{key:"sub",value:function(o){return o instanceof n?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(Wu(o))),this.lowPriority=!0,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," * ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=!1,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," / ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=!1,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,a=o||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(wP,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(YC),$P=function(t){go(n,t);var e=vo(n);function n(r){var o;return ln(this,n),o=e.call(this),D(yt(o),"result",0),r instanceof n?o.result=r.result:typeof r=="number"&&(o.result=r),o}return cn(n,[{key:"add",value:function(o){return o instanceof n?this.result+=o.result:typeof o=="number"&&(this.result+=o),this}},{key:"sub",value:function(o){return o instanceof n?this.result-=o.result:typeof o=="number"&&(this.result-=o),this}},{key:"mul",value:function(o){return o instanceof n?this.result*=o.result:typeof o=="number"&&(this.result*=o),this}},{key:"div",value:function(o){return o instanceof n?this.result/=o.result:typeof o=="number"&&(this.result/=o),this}},{key:"equal",value:function(){return this.result}}]),n}(YC),OP=function(e,n){var r=e==="css"?EP:$P;return function(o){return new r(o,n)}},Ig=function(e,n){return"".concat([n,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function At(t){var e=h.useRef();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 n}function ga(t){var e=h.useRef(!1),n=h.useState(t),r=X(n,2),o=r[0],i=r[1];h.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]);function a(s,l){l&&e.current||i(s)}return[o,a]}function qu(t){return t!==void 0}function en(t,e){var n=e||{},r=n.defaultValue,o=n.value,i=n.onChange,a=n.postState,s=ga(function(){return qu(o)?o:qu(r)?typeof r=="function"?r():r:typeof t=="function"?t():t}),l=X(s,2),c=l[0],u=l[1],d=o!==void 0?o:c,f=a?a(d):d,p=At(i),m=ga([d]),g=X(m,2),v=g[0],b=g[1];Ua(function(){var C=v[0];c!==C&&p(c,C)},[v]),Ua(function(){qu(o)||u(o)},[o]);var y=At(function(C,S){u(C,S),b([d],S)});return[f,y]}function Pg(t,e,n,r){var o=j({},e[t]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=X(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&at(!(o!=null&&o[c]),"Component Token `".concat(String(c),"` of ").concat(String(t)," is deprecated. Please use `").concat(String(u),"` instead.")),o!=null&&o[c]||o!=null&&o[u]){var d;(d=o[u])!==null&&d!==void 0||(o[u]=o==null?void 0:o[c])}})}var a=j(j({},n),o);return Object.keys(a).forEach(function(s){a[s]===e[s]&&delete a[s]}),a}var ZC=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Sf=!0;function Mt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!ZC)return Object.assign.apply(Object,[{}].concat(e));Sf=!1;var r={};return e.forEach(function(o){if(Ue(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),Sf=!0,r}var Tg={};function MP(){}var NP=function(e){var n,r=e,o=MP;return ZC&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(e,{get:function(a,s){if(Sf){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;Tg[a]={global:Array.from(n),component:j(j({},(l=Tg[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function Ag(t,e,n){if(typeof n=="function"){var r;return n(Mt(e,(r=e[t])!==null&&r!==void 0?r:{}))}return n??{}}function RP(t){return t==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"max(".concat(r.map(function(i){return U(i)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"min(".concat(r.map(function(i){return U(i)}).join(","),")")}}}var IP=1e3*60*10,PP=function(){function t(){ln(this,t),D(this,"map",new Map),D(this,"objectIDMap",new WeakMap),D(this,"nextID",0),D(this,"lastAccessBeat",new Map),D(this,"accessBeat",0)}return cn(t,[{key:"set",value:function(n,r){this.clear();var o=this.getCompositeKey(n);this.map.set(o,r),this.lastAccessBeat.set(o,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),o=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,o}},{key:"getCompositeKey",value:function(n){var r=this,o=n.map(function(i){return i&&Ue(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(Ue(i),"_").concat(i)});return o.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>IP&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),t}(),kg=new PP;function TP(t,e){return E.useMemo(function(){var n=kg.get(e);if(n)return n;var r=t();return kg.set(e,r),r},e)}var AP=function(){return{}};function kP(t){var e=t.useCSP,n=e===void 0?AP:e,r=t.useToken,o=t.usePrefix,i=t.getResetStyles,a=t.getCommonStyle,s=t.getCompUnitless;function l(f,p,m,g){var v=Array.isArray(f)?f[0]:f;function b(R){return"".concat(String(v)).concat(R.slice(0,1).toUpperCase()).concat(R.slice(1))}var y=(g==null?void 0:g.unitless)||{},C=typeof s=="function"?s(f):{},S=j(j({},C),{},D({},b("zIndexPopup"),!0));Object.keys(y).forEach(function(R){S[b(R)]=y[R]});var x=j(j({},g),{},{unitless:S,prefixToken:b}),w=u(f,p,m,x),$=c(v,m,x);return function(R){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,O=w(R,M),N=X(O,2),I=N[1],T=$(M),P=X(T,2),A=P[0],k=P[1];return[A,I,k]}}function c(f,p,m){var g=m.unitless,v=m.injectStyle,b=v===void 0?!0:v,y=m.prefixToken,C=m.ignore,S=function($){var R=$.rootCls,M=$.cssVar,O=M===void 0?{}:M,N=r(),I=N.realToken;return KI({path:[f],prefix:O.prefix,key:O.key,unitless:g,ignore:C,token:I,scope:R},function(){var T=Ag(f,I,p),P=Pg(f,I,T,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(T).forEach(function(A){P[y(A)]=P[A],delete P[A]}),P}),null},x=function($){var R=r(),M=R.cssVar;return[function(O){return b&&M?E.createElement(E.Fragment,null,E.createElement(S,{rootCls:$,cssVar:M,component:f}),O):O},M==null?void 0:M.key]};return x}function u(f,p,m){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},v=Array.isArray(f)?f:[f,f],b=X(v,1),y=b[0],C=v.join("-"),S=t.layer||{name:"antd"};return function(x){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x,$=r(),R=$.theme,M=$.realToken,O=$.hashId,N=$.token,I=$.cssVar,T=o(),P=T.rootPrefixCls,A=T.iconPrefixCls,k=n(),B=I?"css":"js",_=TP(function(){var z=new Set;return I&&Object.keys(g.unitless||{}).forEach(function(L){z.add(Sl(L,I.prefix)),z.add(Sl(L,Ig(y,I.prefix)))}),OP(B,z)},[B,y,I==null?void 0:I.prefix]),F=RP(B),H=F.max,K=F.min,V={theme:R,token:N,hashId:O,nonce:function(){return k.nonce},clientOnly:g.clientOnly,layer:S,order:g.order||-999};typeof i=="function"&&sf(j(j({},V),{},{clientOnly:!1,path:["Shared",P]}),function(){return i(N,{prefix:{rootPrefixCls:P,iconPrefixCls:A},csp:k})});var W=sf(j(j({},V),{},{path:[C,x,A]}),function(){if(g.injectStyle===!1)return[];var z=NP(N),L=z.token,J=z.flush,ne=Ag(y,M,m),q=".".concat(x),re=Pg(y,M,ne,{deprecatedTokens:g.deprecatedTokens});I&&ne&&Ue(ne)==="object"&&Object.keys(ne).forEach(function(te){ne[te]="var(".concat(Sl(te,Ig(y,I.prefix)),")")});var ae=Mt(L,{componentCls:q,prefixCls:x,iconCls:".".concat(A),antCls:".".concat(P),calc:_,max:H,min:K},I?ne:re),ee=p(ae,{hashId:O,prefixCls:x,rootPrefixCls:P,iconPrefixCls:A});J(y,re);var Y=typeof a=="function"?a(ae,x,w,g.resetFont):null;return[g.resetStyle===!1?null:Y,ee]});return[W,O]}}function d(f,p,m){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},v=u(f,p,m,j({resetStyle:!1,order:-998},g)),b=function(C){var S=C.prefixCls,x=C.rootCls,w=x===void 0?S:x;return v(S,w),null};return process.env.NODE_ENV!=="production"&&(b.displayName="SubStyle_".concat(String(Array.isArray(f)?f.join("."):f))),b}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const Vo=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],DP="5.25.2";function Ku(t){return t>=0&&t<=255}function La(t,e){const{r:n,g:r,b:o,a:i}=new Pt(t).toRgb();if(i<1)return t;const{r:a,g:s,b:l}=new Pt(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Ku(u)&&Ku(d)&&Ku(f))return new Pt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Pt({r:n,g:r,b:o,a:1}).toRgbString()}var _P=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 QC(t){const{override:e}=t,n=_P(t,["override"]),r=Object.assign({},e);Object.keys(hs).forEach(f=>{delete r[f]});const o=Object.assign(Object.assign({},n),r),i=480,a=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:La(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:La(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:La(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:La(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
|
|
149
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
150
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
151
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
152
|
-
`,boxShadowSecondary:`
|
|
153
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
154
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
155
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
156
|
-
`,boxShadowTertiary:`
|
|
157
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
158
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
159
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
160
|
-
`,screenXS:i,screenXSMin:i,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
|
|
161
|
-
0 1px 2px -2px ${new Pt("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
162
|
-
0 3px 6px 0 ${new Pt("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
163
|
-
0 5px 12px 4px ${new Pt("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
164
|
-
`,boxShadowDrawerRight:`
|
|
165
|
-
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
166
|
-
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
167
|
-
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
168
|
-
`,boxShadowDrawerLeft:`
|
|
169
|
-
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
170
|
-
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
171
|
-
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
172
|
-
`,boxShadowDrawerUp:`
|
|
173
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
174
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
175
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
176
|
-
`,boxShadowDrawerDown:`
|
|
177
|
-
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
178
|
-
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
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(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
|
-
.anticon {
|
|
182
|
-
display: inline-flex;
|
|
183
|
-
align-items: center;
|
|
184
|
-
color: inherit;
|
|
185
|
-
font-style: normal;
|
|
186
|
-
line-height: 0;
|
|
187
|
-
text-align: center;
|
|
188
|
-
text-transform: none;
|
|
189
|
-
vertical-align: -0.125em;
|
|
190
|
-
text-rendering: optimizeLegibility;
|
|
191
|
-
-webkit-font-smoothing: antialiased;
|
|
192
|
-
-moz-osx-font-smoothing: grayscale;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.anticon > * {
|
|
196
|
-
line-height: 1;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.anticon svg {
|
|
200
|
-
display: inline-block;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.anticon::before {
|
|
204
|
-
display: none;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.anticon .anticon-icon {
|
|
208
|
-
display: block;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.anticon[tabindex] {
|
|
212
|
-
cursor: pointer;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.anticon-spin::before,
|
|
216
|
-
.anticon-spin {
|
|
217
|
-
display: inline-block;
|
|
218
|
-
-webkit-animation: loadingCircle 1s infinite linear;
|
|
219
|
-
animation: loadingCircle 1s infinite linear;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
@-webkit-keyframes loadingCircle {
|
|
223
|
-
100% {
|
|
224
|
-
-webkit-transform: rotate(360deg);
|
|
225
|
-
transform: rotate(360deg);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
@keyframes loadingCircle {
|
|
230
|
-
100% {
|
|
231
|
-
-webkit-transform: rotate(360deg);
|
|
232
|
-
transform: rotate(360deg);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
`,IT=function(e){var n=E.useContext(Gh),r=n.csp,o=n.prefixCls,i=n.layer,a=RT;o&&(a=a.replace(/anticon/g,o)),i&&(a="@layer ".concat(i,` {
|
|
236
|
-
`).concat(a,`
|
|
237
|
-
}`)),E.useEffect(function(){var s=e.current,l=oc(s);po(a,"@ant-design-icons",{prepend:!i,csp:r,attachTo:l})},[])},PT=["icon","className","onClick","style","primaryColor","secondaryColor"],Xa={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function TT(t){var e=t.primaryColor,n=t.secondaryColor;Xa.primaryColor=e,Xa.secondaryColor=n||yS(e),Xa.calculated=!!n}function AT(){return j({},Xa)}var xa=function(e){var n=e.icon,r=e.className,o=e.onClick,i=e.style,a=e.primaryColor,s=e.secondaryColor,l=lt(e,PT),c=h.useRef(),u=Xa;if(a&&(u={primaryColor:a,secondaryColor:s||yS(a)}),IT(c),NT(Hg(n),"icon should be icon definiton, but got ".concat(n)),!Hg(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=j(j({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),Mf(d.icon,"svg-".concat(d.name),j(j({className:r,onClick:o,style:i,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};xa.displayName="IconReact";xa.getTwoToneColors=AT;xa.setTwoToneColors=TT;function SS(t){var e=CS(t),n=X(e,2),r=n[0],o=n[1];return xa.setTwoToneColors({primaryColor:r,secondaryColor:o})}function kT(){var t=xa.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var DT=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];SS(tc.primary);var yn=h.forwardRef(function(t,e){var n=t.className,r=t.icon,o=t.spin,i=t.rotate,a=t.tabIndex,s=t.onClick,l=t.twoToneColor,c=lt(t,DT),u=h.useContext(Gh),d=u.prefixCls,f=d===void 0?"anticon":d,p=u.rootClassName,m=G.cn(p,f,D(D({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!o||r.name==="loading"),n),g=a;g===void 0&&s&&(g=-1);var v=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,b=CS(l),y=X(b,2),C=y[0],S=y[1];return h.createElement("span",ge({role:"img","aria-label":r.name},c,{ref:e,tabIndex:g,onClick:s,className:m}),h.createElement(xa,{icon:r,primaryColor:C,secondaryColor:S,style:v}))});yn.displayName="AntdIcon";yn.getTwoToneColor=kT;yn.setTwoToneColor=SS;var _T=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:$T}))},xS=h.forwardRef(_T);process.env.NODE_ENV!=="production"&&(xS.displayName="CheckCircleFilled");var jT={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},BT=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:jT}))},zc=h.forwardRef(BT);process.env.NODE_ENV!=="production"&&(zc.displayName="CloseCircleFilled");var zT={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},LT=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:zT}))},Os=h.forwardRef(LT);process.env.NODE_ENV!=="production"&&(Os.displayName="CloseOutlined");var FT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},HT=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:FT}))},wS=h.forwardRef(HT);process.env.NODE_ENV!=="production"&&(wS.displayName="ExclamationCircleFilled");var VT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},WT=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:VT}))},ES=h.forwardRef(WT);process.env.NODE_ENV!=="production"&&(ES.displayName="InfoCircleFilled");var qT=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
238
|
-
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
239
|
-
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
240
|
-
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
241
|
-
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
242
|
-
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
243
|
-
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
244
|
-
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
245
|
-
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
246
|
-
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
247
|
-
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
248
|
-
summary tabIndex target title type useMap value width wmode wrap`,KT=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
249
|
-
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
250
|
-
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
251
|
-
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
252
|
-
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
253
|
-
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
254
|
-
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,GT="".concat(qT," ").concat(KT).split(/[\s\n]+/),UT="aria-",XT="data-";function Wg(t,e){return t.indexOf(e)===0}function Yr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=j({},e);var r={};return Object.keys(t).forEach(function(o){(n.aria&&(o==="role"||Wg(o,UT))||n.data&&Wg(o,XT)||n.attr&>.includes(o))&&(r[o]=t[o])}),r}function $S(t){return t&&E.isValidElement(t)&&t.type===E.Fragment}const YT=(t,e,n)=>E.isValidElement(t)?E.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function xr(t,e){return YT(t,t,e)}const yo=t=>{const[,,,,e]=er();return e?`${t}-css-var`:""};var Te={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},JT={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},ZT=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:JT}))},Zh=h.forwardRef(ZT);process.env.NODE_ENV!=="production"&&(Zh.displayName="LoadingOutlined");const Ms=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ms.displayName="zIndexContext");const so=100,QT=10,OS=so*QT,eA=OS+so,MS={Modal:so,Drawer:so,Popover:so,Popconfirm:so,Tooltip:so,Tour:so,FloatButton:so},tA={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function nA(t){return t in MS}const Ns=(t,e)=>{const[,n]=er(),r=E.useContext(Ms),o=nA(t);let i;if(e!==void 0)i=[e,e];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+MS[t]:a+=tA[t],i=[r===void 0?e:a,a]}if(process.env.NODE_ENV!=="production"){const a=Kt(t),s=n.zIndexPopupBase+eA,l=i[0]||0;process.env.NODE_ENV!=="production"&&a(e!==void 0||l<=s,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i};function rA(){const[t,e]=h.useState([]),n=h.useCallback(r=>(e(o=>[].concat(he(o),[r])),()=>{e(o=>o.filter(i=>i!==r))}),[]);return[t,n]}function Un(){Un=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(O,N,I,T){return Object.defineProperty(O,N,{value:I,enumerable:!T,configurable:!T,writable:!T})}try{l({},"")}catch{l=function(I,T,P){return I[T]=P}}function c(O,N,I,T){var P=N&&N.prototype instanceof f?N:f,A=Object.create(P.prototype);return l(A,"_invoke",function(k,B,_){var F=1;return function(H,K){if(F===3)throw Error("Generator is already running");if(F===4){if(H==="throw")throw K;return{value:t,done:!0}}for(_.method=H,_.arg=K;;){var V=_.delegate;if(V){var W=x(V,_);if(W){if(W===d)continue;return W}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(F===1)throw F=4,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);F=3;var z=u(k,B,_);if(z.type==="normal"){if(F=_.done?4:2,z.arg===d)continue;return{value:z.arg,done:_.done}}z.type==="throw"&&(F=4,_.method="throw",_.arg=z.arg)}}}(O,I,new R(T||[])),!0),A}function u(O,N,I){try{return{type:"normal",arg:O.call(N,I)}}catch(T){return{type:"throw",arg:T}}}e.wrap=c;var d={};function f(){}function p(){}function m(){}var g={};l(g,i,function(){return this});var v=Object.getPrototypeOf,b=v&&v(v(M([])));b&&b!==n&&r.call(b,i)&&(g=b);var y=m.prototype=f.prototype=Object.create(g);function C(O){["next","throw","return"].forEach(function(N){l(O,N,function(I){return this._invoke(N,I)})})}function S(O,N){function I(P,A,k,B){var _=u(O[P],O,A);if(_.type!=="throw"){var F=_.arg,H=F.value;return H&&Ue(H)=="object"&&r.call(H,"__await")?N.resolve(H.__await).then(function(K){I("next",K,k,B)},function(K){I("throw",K,k,B)}):N.resolve(H).then(function(K){F.value=K,k(F)},function(K){return I("throw",K,k,B)})}B(_.arg)}var T;l(this,"_invoke",function(P,A){function k(){return new N(function(B,_){I(P,A,B,_)})}return T=T?T.then(k,k):k()},!0)}function x(O,N){var I=N.method,T=O.i[I];if(T===t)return N.delegate=null,I==="throw"&&O.i.return&&(N.method="return",N.arg=t,x(O,N),N.method==="throw")||I!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+I+"' method")),d;var P=u(T,O.i,N.arg);if(P.type==="throw")return N.method="throw",N.arg=P.arg,N.delegate=null,d;var A=P.arg;return A?A.done?(N[O.r]=A.value,N.next=O.n,N.method!=="return"&&(N.method="next",N.arg=t),N.delegate=null,d):A:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,d)}function w(O){this.tryEntries.push(O)}function $(O){var N=O[4]||{};N.type="normal",N.arg=t,O[4]=N}function R(O){this.tryEntries=[[-1]],O.forEach(w,this),this.reset(!0)}function M(O){if(O!=null){var N=O[i];if(N)return N.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var I=-1,T=function P(){for(;++I<O.length;)if(r.call(O,I))return P.value=O[I],P.done=!1,P;return P.value=t,P.done=!0,P};return T.next=T}}throw new TypeError(Ue(O)+" is not iterable")}return p.prototype=m,l(y,"constructor",m),l(m,"constructor",p),p.displayName=l(m,s,"GeneratorFunction"),e.isGeneratorFunction=function(O){var N=typeof O=="function"&&O.constructor;return!!N&&(N===p||(N.displayName||N.name)==="GeneratorFunction")},e.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,m):(O.__proto__=m,l(O,s,"GeneratorFunction")),O.prototype=Object.create(y),O},e.awrap=function(O){return{__await:O}},C(S.prototype),l(S.prototype,a,function(){return this}),e.AsyncIterator=S,e.async=function(O,N,I,T,P){P===void 0&&(P=Promise);var A=new S(c(O,N,I,T),P);return e.isGeneratorFunction(N)?A:A.next().then(function(k){return k.done?k.value:A.next()})},C(y),l(y,s,"Generator"),l(y,i,function(){return this}),l(y,"toString",function(){return"[object Generator]"}),e.keys=function(O){var N=Object(O),I=[];for(var T in N)I.unshift(T);return function P(){for(;I.length;)if((T=I.pop())in N)return P.value=T,P.done=!1,P;return P.done=!0,P}},e.values=M,R.prototype={constructor:R,reset:function(N){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!N)for(var I in this)I.charAt(0)==="t"&&r.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=t)},stop:function(){this.done=!0;var N=this.tryEntries[0][4];if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(N){if(this.done)throw N;var I=this;function T(H){k.type="throw",k.arg=N,I.next=H}for(var P=I.tryEntries.length-1;P>=0;--P){var A=this.tryEntries[P],k=A[4],B=this.prev,_=A[1],F=A[2];if(A[0]===-1)return T("end"),!1;if(!_&&!F)throw Error("try statement without catch or finally");if(A[0]!=null&&A[0]<=B){if(B<_)return this.method="next",this.arg=t,T(_),!0;if(B<F)return T(F),!1}}},abrupt:function(N,I){for(var T=this.tryEntries.length-1;T>=0;--T){var P=this.tryEntries[T];if(P[0]>-1&&P[0]<=this.prev&&this.prev<P[2]){var A=P;break}}A&&(N==="break"||N==="continue")&&A[0]<=I&&I<=A[2]&&(A=null);var k=A?A[4]:{};return k.type=N,k.arg=I,A?(this.method="next",this.next=A[2],d):this.complete(k)},complete:function(N,I){if(N.type==="throw")throw N.arg;return N.type==="break"||N.type==="continue"?this.next=N.arg:N.type==="return"?(this.rval=this.arg=N.arg,this.method="return",this.next="end"):N.type==="normal"&&I&&(this.next=I),d},finish:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var T=this.tryEntries[I];if(T[2]===N)return this.complete(T[4],T[3]),$(T),d}},catch:function(N){for(var I=this.tryEntries.length-1;I>=0;--I){var T=this.tryEntries[I];if(T[0]===N){var P=T[4];if(P.type==="throw"){var A=P.arg;$(T)}return A}}throw Error("illegal catch attempt")},delegateYield:function(N,I,T){return this.delegate={i:M(N),r:I,n:T},this.method==="next"&&(this.arg=t),d}},e}function qg(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,o)}function Pi(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(l){qg(i,r,o,a,s,"next",l)}function s(l){qg(i,r,o,a,s,"throw",l)}a(void 0)})}}var Rs=j({},lb),oA=Rs.version,Uu=Rs.render,iA=Rs.unmountComponentAtNode,Lc;try{var aA=Number((oA||"").split(".")[0]);aA>=18&&(Lc=Rs.createRoot)}catch{}function Kg(t){var e=Rs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&Ue(e)==="object"&&(e.usingClientEntryPoint=t)}var ic="__rc_react_root__";function sA(t,e){Kg(!0);var n=e[ic]||Lc(e);Kg(!1),n.render(t),e[ic]=n}function lA(t,e){Uu==null||Uu(t,e)}function cA(t,e){if(Lc){sA(t,e);return}lA(t,e)}function uA(t){return Nf.apply(this,arguments)}function Nf(){return Nf=Pi(Un().mark(function t(e){return Un().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var o;(o=e[ic])===null||o===void 0||o.unmount(),delete e[ic]}));case 1:case"end":return r.stop()}},t)})),Nf.apply(this,arguments)}function dA(t){iA(t)}function fA(t){return Rf.apply(this,arguments)}function Rf(){return Rf=Pi(Un().mark(function t(e){return Un().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Lc===void 0){r.next=2;break}return r.abrupt("return",uA(e));case 2:dA(e);case 3:case"end":return r.stop()}},t)})),Rf.apply(this,arguments)}const hA=(t,e)=>{if(process.env.NODE_ENV!=="production"){const n=parseInt(h.version.split(".")[0],10),r=Object.keys(lb);process.env.NODE_ENV!=="production"&&Ri(n<19||r.includes("createRoot"),"compatible","antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.")}return cA(t,e),()=>fA(e)};let pA=hA;function NS(t){return pA}const Xu=()=>({height:0,opacity:0}),Gg=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},mA=t=>({height:t?t.offsetHeight:0}),Yu=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",RS=(t=ms)=>({motionName:`${t}-motion-collapse`,onAppearStart:Xu,onEnterStart:Xu,onAppearActive:Gg,onEnterActive:Gg,onLeaveStart:mA,onLeaveActive:Xu,onAppearEnd:Yu,onEnterEnd:Yu,onLeaveEnd:Yu,motionDeadline:500}),Ei=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function vn(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const Qh=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var o=t.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1},gA=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},vA=FP("Wave",t=>[gA(t)]),IS=`${ms}-wave-target`;function Ju(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"}function bA(t){const{borderTopColor:e,borderColor:n,backgroundColor:r}=getComputedStyle(t);return Ju(e)?e:Ju(n)?n:Ju(r)?r:null}function Zu(t){return Number.isNaN(t)?0:t}const yA=t=>{const{className:e,target:n,component:r,registerUnmount:o}=t,i=h.useRef(null),a=h.useRef(null);h.useEffect(()=>{a.current=o()},[]);const[s,l]=h.useState(null),[c,u]=h.useState([]),[d,f]=h.useState(0),[p,m]=h.useState(0),[g,v]=h.useState(0),[b,y]=h.useState(0),[C,S]=h.useState(!1),x={left:d,top:p,width:g,height:b,borderRadius:c.map(R=>`${R}px`).join(" ")};s&&(x["--wave-color"]=s);function w(){const R=getComputedStyle(n);l(bA(n));const M=R.position==="static",{borderLeftWidth:O,borderTopWidth:N}=R;f(M?n.offsetLeft:Zu(-parseFloat(O))),m(M?n.offsetTop:Zu(-parseFloat(N))),v(n.offsetWidth),y(n.offsetHeight);const{borderTopLeftRadius:I,borderTopRightRadius:T,borderBottomLeftRadius:P,borderBottomRightRadius:A}=R;u([I,T,A,P].map(k=>Zu(parseFloat(k))))}if(h.useEffect(()=>{if(n){const R=wt(()=>{w(),S(!0)});let M;return typeof ResizeObserver<"u"&&(M=new ResizeObserver(w),M.observe(n)),()=>{wt.cancel(R),M==null||M.disconnect()}}},[]),!C)return null;const $=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(IS));return h.createElement(eo,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(R,M)=>{var O,N;if(M.deadline||M.propertyName==="opacity"){const I=(O=i.current)===null||O===void 0?void 0:O.parentElement;(N=a.current)===null||N===void 0||N.call(a).then(()=>{I==null||I.remove()})}return!1}},({className:R},M)=>h.createElement("div",{ref:Qn(i,M),className:G.cn(e,R,{"wave-quick":$}),style:x}))},CA=(t,e)=>{var n;const{component:r}=e;if(r==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const o=document.createElement("div");o.style.position="absolute",o.style.left="0px",o.style.top="0px",t==null||t.insertBefore(o,t==null?void 0:t.firstChild);const i=NS();let a=null;function s(){return a}a=i(h.createElement(yA,Object.assign({},e,{target:t,registerUnmount:s})),o)},SA=(t,e,n)=>{const{wave:r}=h.useContext(gt),[,o,i]=er(),a=At(c=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${IS}`)||u,{showEffect:f}=r||{};(f||CA)(d,{className:e,token:o,component:n,event:c,hashId:i})}),s=h.useRef(null);return c=>{wt.cancel(s.current),s.current=wt(()=>{a(c)})}},PS=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:o}=E.useContext(gt),i=E.useRef(null),a=o("wave"),[,s]=vA(a),l=SA(i,G.cn(a,s),r);if(E.useEffect(()=>{const u=i.current;if(!u||u.nodeType!==1||n)return;const d=f=>{!Qh(f.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l(f)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!E.isValidElement(e))return e??null;const c=Jo(e)?Qn(Ni(e),i):i;return xr(e,{ref:c})};process.env.NODE_ENV!=="production"&&(PS.displayName="Wave");const Er=t=>{const e=E.useContext(ma);return E.useMemo(()=>t?typeof t=="string"?t??e:typeof t=="function"?t(e):e:e,[t,e])},xA=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},wA=t=>{const{componentCls:e,antCls:n}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},EA=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},TS=Yt("Space",t=>{const e=Mt(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[wA(e),EA(e),xA(e)]},()=>({}),{resetStyle:!1});var AS=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 Fc=h.createContext(null),Zo=(t,e)=>{const n=h.useContext(Fc),r=h.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return G.cn(`${t}-compact${s}item`,{[`${t}-compact${s}first-item`]:i,[`${t}-compact${s}last-item`]:a,[`${t}-compact${s}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},$A=t=>{const{children:e}=t;return h.createElement(Fc.Provider,{value:null},e)},OA=t=>{const{children:e}=t,n=AS(t,["children"]);return h.createElement(Fc.Provider,{value:h.useMemo(()=>n,[n])},e)},MA=t=>{const{getPrefixCls:e,direction:n}=h.useContext(gt),{size:r,direction:o,block:i,prefixCls:a,className:s,rootClassName:l,children:c}=t,u=AS(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=Er(C=>r??C),f=e("space-compact",a),[p,m]=TS(f),g=G.cn(f,m,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:i,[`${f}-vertical`]:o==="vertical"},s,l),v=h.useContext(Fc),b=dr(c),y=h.useMemo(()=>b.map((C,S)=>{const x=(C==null?void 0:C.key)||`${f}-item-${S}`;return h.createElement(OA,{key:x,compactSize:d,compactDirection:o,isFirstItem:S===0&&(!v||(v==null?void 0:v.isFirstItem)),isLastItem:S===b.length-1&&(!v||(v==null?void 0:v.isLastItem))},C)}),[r,b,v]);return b.length===0?null:p(h.createElement("div",Object.assign({className:g},u),y))};var NA=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 kS=h.createContext(void 0),RA=t=>{const{getPrefixCls:e,direction:n}=h.useContext(gt),{prefixCls:r,size:o,className:i}=t,a=NA(t,["prefixCls","size","className"]),s=e("btn-group",r),[,,l]=er(),c=h.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=Kt("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!o||["large","small","middle"].includes(o),"usage","Invalid prop `size`.")}const u=G.cn(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return h.createElement(kS.Provider,{value:o},h.createElement("div",Object.assign({},a,{className:u})))},Ug=/^[\u4E00-\u9FA5]{2}$/,If=Ug.test.bind(Ug);function DS(t){return t==="danger"?{danger:!0}:{type:t}}function Xg(t){return typeof t=="string"}function sl(t){return t==="text"||t==="link"}function IA(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&Xg(t.type)&&If(t.props.children)?xr(t,{children:t.props.children.split("").join(n)}):Xg(t)?If(t)?E.createElement("span",null,t.split("").join(n)):E.createElement("span",null,t):$S(t)?E.createElement("span",null,t):t}function PA(t,e){let n=!1;const r=[];return E.Children.forEach(t,o=>{const i=typeof o,a=i==="string"||i==="number";if(n&&a){const s=r.length-1,l=r[s];r[s]=`${l}${o}`}else r.push(o);n=a}),E.Children.map(r,o=>IA(o,e))}["default","primary","danger"].concat(he(Vo));const Pf=E.forwardRef((t,e)=>{const{className:n,style:r,children:o,prefixCls:i}=t,a=G.cn(`${i}-icon`,n);return E.createElement("span",{ref:e,className:a,style:r},o)}),Yg=E.forwardRef((t,e)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=t,a=G.cn(`${n}-loading-icon`,r);return E.createElement(Pf,{prefixCls:n,className:a,style:o,ref:e},E.createElement(Zh,{className:i}))}),Qu=()=>({width:0,opacity:0,transform:"scale(0)"}),ed=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),TA=t=>{const{prefixCls:e,loading:n,existIcon:r,className:o,style:i,mount:a}=t,s=!!n;return r?E.createElement(Yg,{prefixCls:e,className:o,style:i}):E.createElement(eo,{visible:s,motionName:`${e}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Qu,onAppearActive:ed,onEnterStart:Qu,onEnterActive:ed,onLeaveStart:ed,onLeaveActive:Qu},({className:l,style:c},u)=>{const d=Object.assign(Object.assign({},i),c);return E.createElement(Yg,{prefixCls:e,className:G.cn(o,l),style:d,ref:u})})},Jg=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),AA=t=>{const{componentCls:e,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(r).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},Jg(`${e}-primary`,o),Jg(`${e}-danger`,i)]}};var kA=["b"],DA=["v"],td=function(e){return Math.round(Number(e||0))},_A=function(e){if(e instanceof Pt)return e;if(e&&Ue(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,o=lt(n,kA);return j(j({},o),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},_r=function(t){go(n,t);var e=vo(n);function n(r){return ln(this,n),e.call(this,_A(r))}return cn(n,[{key:"toHsbString",value:function(){var o=this.toHsb(),i=td(o.s*100),a=td(o.b*100),s=td(o.h),l=o.a,c="hsb(".concat(s,", ").concat(i,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(i,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var o=this.toHsv(),i=o.v,a=lt(o,DA);return j(j({},a),{},{b:i,a:this.a})}}]),n}(Pt),jA="rc-color-picker",na=function(e){return e instanceof _r?e:new _r(e)},BA=na("#1677ff"),_S=function(e){var n=e.offset,r=e.targetRef,o=e.containerRef,i=e.color,a=e.type,s=o.current.getBoundingClientRect(),l=s.width,c=s.height,u=r.current.getBoundingClientRect(),d=u.width,f=u.height,p=d/2,m=f/2,g=(n.x+p)/l,v=1-(n.y+m)/c,b=i.toHsb(),y=g,C=(n.x+p)/l*360;if(a)switch(a){case"hue":return na(j(j({},b),{},{h:C<=0?0:C}));case"alpha":return na(j(j({},b),{},{a:y<=0?0:y}))}return na({h:b.h,s:g<=0?0:g,b:v>=1?1:v,a:b.a})},jS=function(e,n){var r=e.toHsb();switch(n){case"hue":return{x:r.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:r.s*100,y:(1-r.b)*100}}},ep=function(e){var n=e.color,r=e.prefixCls,o=e.className,i=e.style,a=e.onClick,s="".concat(r,"-color-block");return E.createElement("div",{className:G.cn(s,o),style:i,onClick:a},E.createElement("div",{className:"".concat(s,"-inner"),style:{background:n}}))};function zA(t){var e="touches"in t?t.touches[0]:t,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:e.pageX-n,pageY:e.pageY-r}}function BS(t){var e=t.targetRef,n=t.containerRef,r=t.direction,o=t.onDragChange,i=t.onDragChangeComplete,a=t.calculate,s=t.color,l=t.disabledDrag,c=E.useState({x:0,y:0}),u=X(c,2),d=u[0],f=u[1],p=E.useRef(null),m=E.useRef(null);E.useEffect(function(){f(a())},[s]),E.useEffect(function(){return function(){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",m.current),p.current=null,m.current=null}},[]);var g=function(S){var x=zA(S),w=x.pageX,$=x.pageY,R=n.current.getBoundingClientRect(),M=R.x,O=R.y,N=R.width,I=R.height,T=e.current.getBoundingClientRect(),P=T.width,A=T.height,k=P/2,B=A/2,_=Math.max(0,Math.min(w-M,N))-k,F=Math.max(0,Math.min($-O,I))-B,H={x:_,y:r==="x"?d.y:F};if(P===0&&A===0||P!==A)return!1;o==null||o(H)},v=function(S){S.preventDefault(),g(S)},b=function(S){S.preventDefault(),document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",p.current),document.removeEventListener("touchend",m.current),p.current=null,m.current=null,i==null||i()},y=function(S){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",m.current),!l&&(g(S),document.addEventListener("mousemove",v),document.addEventListener("mouseup",b),document.addEventListener("touchmove",v),document.addEventListener("touchend",b),p.current=v,m.current=b)};return[d,y]}var zS=function(e){var n=e.size,r=n===void 0?"default":n,o=e.color,i=e.prefixCls;return E.createElement("div",{className:G.cn("".concat(i,"-handler"),D({},"".concat(i,"-handler-sm"),r==="small")),style:{backgroundColor:o}})},LS=function(e){var n=e.children,r=e.style,o=e.prefixCls;return E.createElement("div",{className:"".concat(o,"-palette"),style:j({position:"relative"},r)},n)},FS=E.forwardRef(function(t,e){var n=t.children,r=t.x,o=t.y;return E.createElement("div",{ref:e,style:{position:"absolute",left:"".concat(r,"%"),top:"".concat(o,"%"),zIndex:1,transform:"translate(-50%, -50%)"}},n)}),LA=function(e){var n=e.color,r=e.onChange,o=e.prefixCls,i=e.onChangeComplete,a=e.disabled,s=E.useRef(),l=E.useRef(),c=E.useRef(n),u=At(function(g){var v=_S({offset:g,targetRef:l,containerRef:s,color:n});c.current=v,r(v)}),d=BS({color:n,containerRef:s,targetRef:l,calculate:function(){return jS(n)},onDragChange:u,onDragChangeComplete:function(){return i==null?void 0:i(c.current)},disabledDrag:a}),f=X(d,2),p=f[0],m=f[1];return E.createElement("div",{ref:s,className:"".concat(o,"-select"),onMouseDown:m,onTouchStart:m},E.createElement(LS,{prefixCls:o},E.createElement(FS,{x:p.x,y:p.y,ref:l},E.createElement(zS,{color:n.toRgbString(),prefixCls:o})),E.createElement("div",{className:"".concat(o,"-saturation"),style:{backgroundColor:"hsl(".concat(n.toHsb().h,",100%, 50%)"),backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},FA=function(e,n){var r=en(e,{value:n}),o=X(r,2),i=o[0],a=o[1],s=E.useMemo(function(){return na(i)},[i]);return[s,a]},HA=function(e){var n=e.colors,r=e.children,o=e.direction,i=o===void 0?"to right":o,a=e.type,s=e.prefixCls,l=E.useMemo(function(){return n.map(function(c,u){var d=na(c);return a==="alpha"&&u===n.length-1&&(d=new _r(d.setA(1))),d.toRgbString()}).join(",")},[n,a]);return E.createElement("div",{className:"".concat(s,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(i,", ").concat(l,")")}},r)},VA=function(e){var n=e.prefixCls,r=e.colors,o=e.disabled,i=e.onChange,a=e.onChangeComplete,s=e.color,l=e.type,c=E.useRef(),u=E.useRef(),d=E.useRef(s),f=function(x){return l==="hue"?x.getHue():x.a*100},p=At(function(S){var x=_S({offset:S,targetRef:u,containerRef:c,color:s,type:l});d.current=x,i(f(x))}),m=BS({color:s,targetRef:u,containerRef:c,calculate:function(){return jS(s,l)},onDragChange:p,onDragChangeComplete:function(){a(f(d.current))},direction:"x",disabledDrag:o}),g=X(m,2),v=g[0],b=g[1],y=E.useMemo(function(){if(l==="hue"){var S=s.toHsb();S.s=1,S.b=1,S.a=1;var x=new _r(S);return x}return s},[s,l]),C=E.useMemo(function(){return r.map(function(S){return"".concat(S.color," ").concat(S.percent,"%")})},[r]);return E.createElement("div",{ref:c,className:G.cn("".concat(n,"-slider"),"".concat(n,"-slider-").concat(l)),onMouseDown:b,onTouchStart:b},E.createElement(LS,{prefixCls:n},E.createElement(FS,{x:v.x,y:v.y,ref:u},E.createElement(zS,{size:"small",color:y.toHexString(),prefixCls:n})),E.createElement(HA,{colors:C,type:l,prefixCls:n})))};function WA(t){return h.useMemo(function(){var e=t||{},n=e.slider;return[n||VA]},[t])}var qA=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],HS=E.forwardRef(function(t,e){var n=t.value,r=t.defaultValue,o=t.prefixCls,i=o===void 0?jA:o,a=t.onChange,s=t.onChangeComplete,l=t.className,c=t.style,u=t.panelRender,d=t.disabledAlpha,f=d===void 0?!1:d,p=t.disabled,m=p===void 0?!1:p,g=t.components,v=WA(g),b=X(v,1),y=b[0],C=FA(r||BA,n),S=X(C,2),x=S[0],w=S[1],$=E.useMemo(function(){return x.setA(1).toRgbString()},[x]),R=function(F,H){n||w(F),a==null||a(F,H)},M=function(F){return new _r(x.setHue(F))},O=function(F){return new _r(x.setA(F/100))},N=function(F){R(M(F),{type:"hue",value:F})},I=function(F){R(O(F),{type:"alpha",value:F})},T=function(F){s&&s(M(F))},P=function(F){s&&s(O(F))},A=G.cn("".concat(i,"-panel"),l,D({},"".concat(i,"-panel-disabled"),m)),k={prefixCls:i,disabled:m,color:x},B=E.createElement(E.Fragment,null,E.createElement(LA,ge({onChange:R},k,{onChangeComplete:s})),E.createElement("div",{className:"".concat(i,"-slider-container")},E.createElement("div",{className:G.cn("".concat(i,"-slider-group"),D({},"".concat(i,"-slider-group-disabled-alpha"),f))},E.createElement(y,ge({},k,{type:"hue",colors:qA,min:0,max:359,value:x.getHue(),onChange:N,onChangeComplete:T})),!f&&E.createElement(y,ge({},k,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:$}],min:0,max:100,value:x.a*100,onChange:I,onChangeComplete:P}))),E.createElement(ep,{color:x.toRgbString(),prefixCls:i})));return E.createElement("div",{className:A,style:c,ref:e},typeof u=="function"?u(B):B)});process.env.NODE_ENV!=="production"&&(HS.displayName="ColorPicker");const Fa=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",KA=(t,e)=>t?Fa(t,e):"";let lr=function(){function t(e){ln(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(o=>({color:new t(o.color),percent:o.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(({color:o,percent:i})=>({color:new t(o),percent:i})),this.metaColor=new _r(this.colors[0].color.metaColor)):this.metaColor=new _r(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return cn(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return KA(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])}();var GA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},UA=function(e,n){return h.createElement(yn,ge({},e,{ref:n,icon:GA}))},vs=h.forwardRef(UA);process.env.NODE_ENV!=="production"&&(vs.displayName="RightOutlined");var VS=E.forwardRef(function(t,e){var n=t.prefixCls,r=t.forceRender,o=t.className,i=t.style,a=t.children,s=t.isActive,l=t.role,c=t.classNames,u=t.styles,d=E.useState(s||r),f=X(d,2),p=f[0],m=f[1];return E.useEffect(function(){(r||s)&&m(!0)},[r,s]),p?E.createElement("div",{ref:e,className:G.cn("".concat(n,"-content"),D(D({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),o),style:i,role:l},E.createElement("div",{className:G.cn("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});VS.displayName="PanelContent";var XA=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],WS=E.forwardRef(function(t,e){var n=t.showArrow,r=n===void 0?!0:n,o=t.headerClass,i=t.isActive,a=t.onItemClick,s=t.forceRender,l=t.className,c=t.classNames,u=c===void 0?{}:c,d=t.styles,f=d===void 0?{}:d,p=t.prefixCls,m=t.collapsible,g=t.accordion,v=t.panelKey,b=t.extra,y=t.header,C=t.expandIcon,S=t.openMotion,x=t.destroyInactivePanel,w=t.children,$=lt(t,XA),R=m==="disabled",M=b!=null&&typeof b!="boolean",O=D(D(D({onClick:function(){a==null||a(v)},onKeyDown:function(B){(B.key==="Enter"||B.keyCode===Te.ENTER||B.which===Te.ENTER)&&(a==null||a(v))},role:g?"tab":"button"},"aria-expanded",i),"aria-disabled",R),"tabIndex",R?-1:0),N=typeof C=="function"?C(t):E.createElement("i",{className:"arrow"}),I=N&&E.createElement("div",ge({className:"".concat(p,"-expand-icon")},["header","icon"].includes(m)?O:{}),N),T=G.cn("".concat(p,"-item"),D(D({},"".concat(p,"-item-active"),i),"".concat(p,"-item-disabled"),R),l),P=G.cn(o,"".concat(p,"-header"),D({},"".concat(p,"-collapsible-").concat(m),!!m),u.header),A=j({className:P,style:f.header},["header","icon"].includes(m)?{}:O);return E.createElement("div",ge({},$,{ref:e,className:T}),E.createElement("div",A,r&&I,E.createElement("span",ge({className:"".concat(p,"-header-text")},m==="header"?O:{}),y),M&&E.createElement("div",{className:"".concat(p,"-extra")},b)),E.createElement(eo,ge({visible:i,leavedClassName:"".concat(p,"-content-hidden")},S,{forceRender:s,removeOnLeave:x}),function(k,B){var _=k.className,F=k.style;return E.createElement(VS,{ref:B,prefixCls:p,className:_,classNames:u,style:F,styles:f,isActive:i,forceRender:s,role:g?"tabpanel":void 0},w)}))}),YA=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],JA=function(e,n){var r=n.prefixCls,o=n.accordion,i=n.collapsible,a=n.destroyInactivePanel,s=n.onItemClick,l=n.activeKey,c=n.openMotion,u=n.expandIcon;return e.map(function(d,f){var p=d.children,m=d.label,g=d.key,v=d.collapsible,b=d.onItemClick,y=d.destroyInactivePanel,C=lt(d,YA),S=String(g??f),x=v??i,w=y??a,$=function(O){x!=="disabled"&&(s(O),b==null||b(O))},R=!1;return o?R=l[0]===S:R=l.indexOf(S)>-1,E.createElement(WS,ge({},C,{prefixCls:r,key:S,panelKey:S,isActive:R,accordion:o,openMotion:c,expandIcon:u,header:m,collapsible:x,onItemClick:$,destroyInactivePanel:w}),p)})},ZA=function(e,n,r){if(!e)return null;var o=r.prefixCls,i=r.accordion,a=r.collapsible,s=r.destroyInactivePanel,l=r.onItemClick,c=r.activeKey,u=r.openMotion,d=r.expandIcon,f=e.key||String(n),p=e.props,m=p.header,g=p.headerClass,v=p.destroyInactivePanel,b=p.collapsible,y=p.onItemClick,C=!1;i?C=c[0]===f:C=c.indexOf(f)>-1;var S=b??a,x=function(R){S!=="disabled"&&(l(R),y==null||y(R))},w={key:f,panelKey:f,header:m,headerClass:g,isActive:C,prefixCls:o,destroyInactivePanel:v??s,openMotion:u,accordion:i,children:e.props.children,onItemClick:x,expandIcon:d,collapsible:S};return typeof e.type=="string"?e:(Object.keys(w).forEach(function($){typeof w[$]>"u"&&delete w[$]}),E.cloneElement(e,w))};function QA(t,e,n){return Array.isArray(t)?JA(t,n):dr(e).map(function(r,o){return ZA(r,o,n)})}function ek(t){var e=t;if(!Array.isArray(e)){var n=Ue(e);e=n==="number"||n==="string"?[e]:[]}return e.map(function(r){return String(r)})}var tk=E.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-collapse":n,o=t.destroyInactivePanel,i=o===void 0?!1:o,a=t.style,s=t.accordion,l=t.className,c=t.children,u=t.collapsible,d=t.openMotion,f=t.expandIcon,p=t.activeKey,m=t.defaultActiveKey,g=t.onChange,v=t.items,b=G.cn(r,l),y=en([],{value:p,onChange:function(M){return g==null?void 0:g(M)},defaultValue:m,postState:ek}),C=X(y,2),S=C[0],x=C[1],w=function(M){return x(function(){if(s)return S[0]===M?[]:[M];var O=S.indexOf(M),N=O>-1;return N?S.filter(function(I){return I!==M}):[].concat(he(S),[M])})};at(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var $=QA(v,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:i,onItemClick:w,activeKey:S});return E.createElement("div",ge({ref:e,className:b,style:a,role:s?"tablist":void 0},Yr(t,{aria:!0,data:!0})),$)});const tp=Object.assign(tk,{Panel:WS});tp.Panel;const nk=h.forwardRef((t,e)=>{process.env.NODE_ENV!=="production"&&Kt("Collapse.Panel").deprecated(!("disabled"in t),"disabled",'collapsible="disabled"');const{getPrefixCls:n}=h.useContext(gt),{prefixCls:r,className:o,showArrow:i=!0}=t,a=n("collapse",r),s=G.cn({[`${a}-no-arrow`]:!i},o);return h.createElement(tp.Panel,Object.assign({ref:e},t,{prefixCls:a,className:s}))}),qS=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
|
|
255
|
-
opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}},[`${t.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
|
|
256
|
-
opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),rk=t=>({animationDuration:t,animationFillMode:"both"}),ok=t=>({animationDuration:t,animationFillMode:"both"}),Hc=(t,e,n,r,o=!1)=>{const i=o?"&":"";return{[`
|
|
257
|
-
${i}${t}-enter,
|
|
258
|
-
${i}${t}-appear
|
|
259
|
-
`]:Object.assign(Object.assign({},rk(r)),{animationPlayState:"paused"}),[`${i}${t}-leave`]:Object.assign(Object.assign({},ok(r)),{animationPlayState:"paused"}),[`
|
|
260
|
-
${i}${t}-enter${t}-enter-active,
|
|
261
|
-
${i}${t}-appear${t}-appear-active
|
|
262
|
-
`]:{animationName:e,animationPlayState:"running"},[`${i}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},ik=new kt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),ak=new kt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),sk=(t,e=!1)=>{const{antCls:n}=t,r=`${n}-fade`,o=e?"&":"";return[Hc(r,ik,ak,t.motionDurationMid,e),{[`
|
|
263
|
-
${o}${r}-enter,
|
|
264
|
-
${o}${r}-appear
|
|
265
|
-
`]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},lk=new kt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ck=new kt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),uk=new kt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),dk=new kt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),fk=new kt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),hk=new kt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),pk=new kt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),mk=new kt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),gk={"move-up":{inKeyframes:pk,outKeyframes:mk},"move-down":{inKeyframes:lk,outKeyframes:ck},"move-left":{inKeyframes:uk,outKeyframes:dk},"move-right":{inKeyframes:fk,outKeyframes:hk}},ac=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=gk[e];return[Hc(r,o,i,t.motionDurationMid),{[`
|
|
266
|
-
${r}-enter,
|
|
267
|
-
${r}-appear
|
|
268
|
-
`]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},np=new kt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),rp=new kt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),op=new kt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),ip=new kt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),vk=new kt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),bk=new kt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),yk=new kt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Ck=new kt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Sk={"slide-up":{inKeyframes:np,outKeyframes:rp},"slide-down":{inKeyframes:op,outKeyframes:ip},"slide-left":{inKeyframes:vk,outKeyframes:bk},"slide-right":{inKeyframes:yk,outKeyframes:Ck}},ba=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=Sk[e];return[Hc(r,o,i,t.motionDurationMid),{[`
|
|
269
|
-
${r}-enter,
|
|
270
|
-
${r}-appear
|
|
271
|
-
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},xk=new kt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),wk=new kt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Zg=new kt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Qg=new kt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),Ek=new kt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),$k=new kt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Ok=new kt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Mk=new kt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),Nk=new kt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Rk=new kt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),Ik=new kt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),Pk=new kt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Tk={zoom:{inKeyframes:xk,outKeyframes:wk},"zoom-big":{inKeyframes:Zg,outKeyframes:Qg},"zoom-big-fast":{inKeyframes:Zg,outKeyframes:Qg},"zoom-left":{inKeyframes:Ok,outKeyframes:Mk},"zoom-right":{inKeyframes:Nk,outKeyframes:Rk},"zoom-up":{inKeyframes:Ek,outKeyframes:$k},"zoom-down":{inKeyframes:Ik,outKeyframes:Pk}},Is=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=Tk[e];return[Hc(r,o,i,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[`
|
|
272
|
-
${r}-enter,
|
|
273
|
-
${r}-appear
|
|
274
|
-
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Ak=t=>{const{componentCls:e,contentBg:n,padding:r,headerBg:o,headerPadding:i,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:p,colorTextDisabled:m,fontSizeLG:g,lineHeight:v,lineHeightLG:b,marginSM:y,paddingSM:C,paddingLG:S,paddingXS:x,motionDurationSlow:w,fontSizeIcon:$,contentPadding:R,fontHeight:M,fontHeightLG:O}=t,N=`${U(c)} ${u} ${d}`;return{[e]:Object.assign(Object.assign({},An(t)),{backgroundColor:o,border:N,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:N,"&:first-child":{[`
|
|
275
|
-
&,
|
|
276
|
-
& > ${e}-header`]:{borderRadius:`${U(l)} ${U(l)} 0 0`}},"&:last-child":{[`
|
|
277
|
-
&,
|
|
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
|
-
> ${e}-item:last-child,
|
|
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,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
|
-
#`.concat(e,`::-webkit-scrollbar {
|
|
283
|
-
`).concat(u,`
|
|
284
|
-
`).concat(d,`
|
|
285
|
-
}`),e)}catch(m){console.error(m),o=l,i=c}}document.body.appendChild(n);var f=t&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,p=t&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),ds(e),{width:f,height:p}}function bD(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:vD(t)}function yD(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var CD="rc-util-locker-".concat(Date.now()),ov=0;function SD(t){var e=!!t,n=h.useState(function(){return ov+=1,"".concat(CD,"_").concat(ov)}),r=X(n,1),o=r[0];zt(function(){if(e){var i=bD(document.body).width,a=yD();po(`
|
|
286
|
-
html body {
|
|
287
|
-
overflow-y: hidden;
|
|
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(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
|
-
${r},
|
|
291
|
-
${o} > li,
|
|
292
|
-
${n},
|
|
293
|
-
${i},
|
|
294
|
-
${a},
|
|
295
|
-
${s}
|
|
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
|
-
${e}-body,
|
|
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),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
|
-
`,`\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))}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
|
-
${o}${s}bottomLeft,
|
|
303
|
-
${i}${s}bottomLeft
|
|
304
|
-
`]:{animationName:np},[`
|
|
305
|
-
${o}${s}topLeft,
|
|
306
|
-
${i}${s}topLeft,
|
|
307
|
-
${o}${s}topRight,
|
|
308
|
-
${i}${s}topRight
|
|
309
|
-
`]:{animationName:op},[`${a}${s}bottomLeft`]:{animationName:rp},[`
|
|
310
|
-
${a}${s}topLeft,
|
|
311
|
-
${a}${s}topRight
|
|
312
|
-
`]:{animationName:ip},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},Uv(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},gs),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${r}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Uv(t)),{color:t.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},ba(t,"slide-up"),ba(t,"slide-down"),ac(t,"move-up"),ac(t,"move-down")]},Zj=t=>{const{multipleSelectItemHeight:e,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:o}=t,i=t.max(t.calc(n).sub(r).equal(),0),a=t.max(t.calc(i).sub(o).equal(),0);return{basePadding:i,containerPadding:a,itemHeight:U(e),itemLineHeight:U(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},Qj=t=>{const{multipleSelectItemHeight:e,selectHeight:n,lineWidth:r}=t;return t.calc(n).sub(e).div(2).sub(r).equal()},eB=t=>{const{componentCls:e,iconCls:n,borderRadiusSM:r,motionDurationSlow:o,paddingXS:i,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=t;return{[`${e}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${e}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:r,cursor:"default",transition:`font-size ${o}, line-height ${o}, height ${o}`,marginInlineEnd:t.calc(u).mul(2).equal(),paddingInlineStart:i,paddingInlineEnd:t.calc(i).div(2).equal(),[`${e}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.calc(i).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},Ii()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},tB=(t,e)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=t,o=`${n}-selection-overflow`,i=t.multipleSelectItemHeight,a=Qj(t),s=e?`${n}-${e}`:"",l=Zj(t);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},eB(t)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:t.borderRadius,[`${n}-disabled&`]:{background:t.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${U(r)} 0`,lineHeight:U(i),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:U(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:U(i),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${o}-item + ${o}-item,
|
|
313
|
-
${n}-prefix + ${n}-selection-wrap
|
|
314
|
-
`]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${o}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:t.fontFamily,lineHeight:U(i),transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}})}};function fd(t,e){const{componentCls:n}=t,r=e?`${n}-${e}`:"",o={[`${n}-multiple${r}`]:{fontSize:t.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
|
|
315
|
-
&${n}-show-arrow ${n}-selector,
|
|
316
|
-
&${n}-allow-clear ${n}-selector
|
|
317
|
-
`]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[tB(t,e),o]}const nB=t=>{const{componentCls:e}=t,n=Mt(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),r=Mt(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[fd(t),fd(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},fd(r,"lg")]};function hd(t,e){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=t,i=t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),a=e?`${n}-${e}`:"";return{[`${n}-single${a}`]:{fontSize:t.fontSize,height:t.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},An(t,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:U(i)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
318
|
-
${n}-selection-item,
|
|
319
|
-
${n}-selection-placeholder
|
|
320
|
-
`]:{display:"block",padding:0,lineHeight:U(i),transition:`all ${t.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
321
|
-
&${n}-show-arrow ${n}-selection-item,
|
|
322
|
-
&${n}-show-arrow ${n}-selection-search,
|
|
323
|
-
&${n}-show-arrow ${n}-selection-placeholder
|
|
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
|
-
&${e}-show-arrow ${e}-selection-item,
|
|
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"),[,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
|
-
> ${e}-item-active,
|
|
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
|
-
${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,
|
|
331
|
-
> ${e}-submenu > ${e}-submenu-title`]:{height:n,lineHeight:U(n)},[`${e}-item-group-list ${e}-submenu-title,
|
|
332
|
-
${e}-submenu-title`]:{paddingInlineEnd:u}}},iL=t=>{const{componentCls:e,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:m,collapsedWidth:g,collapsedIconSize:v}=t,b={height:r,lineHeight:U(r),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},l0(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},l0(t)),{boxShadow:m})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${U(t.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${e}-inline`]:{width:"100%",[`&${e}-root`]:{[`${e}-item, ${e}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${d} ${s}`].join(","),[`> ${e}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${e}-sub${e}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${e}-submenu > ${e}-submenu-title`]:b,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:b}},{[`${e}-inline-collapsed`]:{width:g,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item,
|
|
333
|
-
> ${e}-item-group > ${e}-item-group-list > ${e}-item,
|
|
334
|
-
> ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
|
|
335
|
-
> ${e}-submenu > ${e}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${U(t.calc(v).div(2).equal())} - ${U(c)})`,textOverflow:"clip",[`
|
|
336
|
-
${e}-submenu-arrow,
|
|
337
|
-
${e}-submenu-expand-icon
|
|
338
|
-
`]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:v,lineHeight:U(r),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${e}-item-group-title`]:Object.assign(Object.assign({},gs),{paddingInline:p})}}]},c0=t=>{const{componentCls:e,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${o}`].join(","),[`${e}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${e}-item-icon`]:Object.assign({},Ii()),[`&${e}-item-only-child`]:{[`> ${a}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},u0=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(i).mul(.6).equal(),height:t.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${U(t.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${U(a)})`}}}}},aL=t=>{const{antCls:e,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:g,lineType:v,groupTitleLineHeight:b,groupTitleFontSize:y}=t;return[{"":{[n]:Object.assign(Object.assign({},nc()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},An(t)),nc()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${U(s)} ${U(l)}`,fontSize:y,lineHeight:b,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${o} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:v,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),c0(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${U(t.calc(r).mul(2).equal())} ${U(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:f},c0(t)),u0(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:t.paddingXS}}}),u0(t)),{[`&-inline-collapsed ${n}-submenu-arrow,
|
|
339
|
-
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${U(g)})`},"&::after":{transform:`rotate(45deg) translateX(${U(t.calc(g).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${U(t.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${U(t.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${U(g)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},sL=t=>{var e,n,r;const{colorPrimary:o,colorError:i,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:p,lineWidthBold:m,controlItemBgActive:g,colorBgTextHover:v,controlHeightLG:b,lineHeight:y,colorBgElevated:C,marginXXS:S,padding:x,fontSize:w,controlHeightSM:$,fontSizeLG:R,colorTextLightSolid:M,colorErrorHover:O}=t,N=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,I=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:p,T=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,P=new Pt(M).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:u,itemBg:u,colorItemBgHover:v,itemHoverBg:v,colorItemBgActive:f,itemActiveBg:g,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:m,activeBarHeight:m,colorActiveBarBorderSize:p,activeBarBorderWidth:I,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:i,dangerItemColor:i,colorDangerItemTextHover:i,dangerItemHoverColor:i,colorDangerItemTextSelected:i,dangerItemSelectedColor:i,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:T,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:y,collapsedWidth:b*2,popupBg:C,itemMarginBlock:S,itemPaddingInline:x,horizontalLineHeight:`${b*1.15}px`,iconSize:w,iconMarginInlineEnd:$-w,collapsedIconSize:R,groupTitleFontSize:w,darkItemDisabledColor:new Pt(M).setA(.25).toRgbString(),darkItemColor:P,darkDangerItemColor:i,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:M,darkItemSelectedBg:o,darkDangerItemSelectedBg:i,darkItemHoverBg:"transparent",darkGroupTitleColor:P,darkItemHoverColor:M,darkDangerItemHoverColor:O,darkDangerItemSelectedColor:M,darkDangerItemActiveBg:i,itemWidth:N?`calc(100% + ${I}px)`:`calc(100% - ${T*2}px)`}},lL=(t,e=t,n=!0)=>Yt("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:m,darkItemHoverBg:g,darkGroupTitleColor:v,darkItemHoverColor:b,darkItemDisabledColor:y,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:x,popupBg:w,darkPopupBg:$}=o,R=o.calc(s).div(7).mul(5).equal(),M=Mt(o,{menuArrowSize:R,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(R).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:w}),O=Mt(M,{itemColor:l,itemHoverColor:b,groupTitleColor:v,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:$,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:g,itemDisabledColor:y,dangerItemColor:c,dangerItemHoverColor:C,dangerItemSelectedColor:S,dangerItemActiveBg:x,dangerItemSelectedBg:m,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[aL(M),rL(M),iL(M),s0(M,"light"),s0(O,"dark"),oL(M),qS(M),ba(M,"slide-up"),ba(M,"slide-down"),Is(M,"zoom-big")]},sL,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e),E1=t=>{var e;const{popupClassName:n,icon:r,title:o,theme:i}=t,a=h.useContext(hc),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=Ea();let d;if(!r)d=l&&!u.length&&o&&typeof o=="string"?h.createElement("div",{className:`${s}-inline-collapsed-noicon`},o.charAt(0)):h.createElement("span",{className:`${s}-title-content`},o);else{const m=h.isValidElement(o)&&o.type==="span";d=h.createElement(h.Fragment,null,xr(r,{className:G.cn(h.isValidElement(r)?(e=r.props)===null||e===void 0?void 0:e.className:"",`${s}-item-icon`)}),m?o:h.createElement("span",{className:`${s}-title-content`},o))}const f=h.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[p]=Ns("Menu");return h.createElement(hc.Provider,{value:f},h.createElement(Bs,Object.assign({},vn(t,["icon"]),{title:d,popupClassName:G.cn(s,n,`${s}-${i||c}`),popupStyle:Object.assign({zIndex:p},t.popupStyle)})))};var cL=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 pd(t){return t===null||t===!1}const uL={item:w1,submenu:E1,divider:x1},dL=E.forwardRef((t,e)=>{var n;const r=h.useContext(pc),o=r||{},{getPrefixCls:i,getPopupContainer:a,direction:s,menu:l}=h.useContext(gt),c=i(),{prefixCls:u,className:d,style:f,theme:p="light",expandIcon:m,_internalDisableMenuItemTitleTooltip:g,inlineCollapsed:v,siderCollapsed:b,rootClassName:y,mode:C,selectable:S,onClick:x,overflowedIndicatorPopupClassName:w}=t,$=cL(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),R=vn($,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const V=Kt("Menu");process.env.NODE_ENV!=="production"&&V(!("inlineCollapsed"in t&&C!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),V.deprecated("items"in t&&!t.children,"children","items")}(n=o.validator)===null||n===void 0||n.call(o,{mode:C});const M=At((...V)=>{var W;x==null||x.apply(void 0,V),(W=o.onClick)===null||W===void 0||W.call(o)}),O=o.mode||C,N=S??o.selectable,I=v??b,T={horizontal:{motionName:`${c}-slide-up`},inline:RS(c),other:{motionName:`${c}-zoom-big`}},P=i("menu",u||o.prefixCls),A=yo(P),[k,B,_]=lL(P,A,!r),F=G.cn(`${P}-${p}`,l==null?void 0:l.className,d),H=h.useMemo(()=>{var V,W;if(typeof m=="function"||pd(m))return m||null;if(typeof o.expandIcon=="function"||pd(o.expandIcon))return o.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||pd(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const z=(V=m??(o==null?void 0:o.expandIcon))!==null&&V!==void 0?V:l==null?void 0:l.expandIcon;return xr(z,{className:G.cn(`${P}-submenu-expand-icon`,h.isValidElement(z)?(W=z.props)===null||W===void 0?void 0:W.className:void 0)})},[m,o==null?void 0:o.expandIcon,l==null?void 0:l.expandIcon,P]),K=h.useMemo(()=>({prefixCls:P,inlineCollapsed:I||!1,direction:s,firstLevel:!0,theme:p,mode:O,disableMenuItemTitleTooltip:g}),[P,I,s,g,p]);return k(h.createElement(pc.Provider,{value:null},h.createElement(hc.Provider,{value:K},h.createElement(zs,Object.assign({getPopupContainer:a,overflowedIndicator:h.createElement(Ap,null),overflowedIndicatorPopupClassName:G.cn(P,`${P}-${p}`,w),mode:O,selectable:N,onClick:M},R,{inlineCollapsed:I,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:F,prefixCls:P,direction:s,defaultMotions:T,expandIcon:H,ref:e,rootClassName:G.cn(y,B,o.rootClassName,_,A),_internalComponents:uL})))))}),Ko=E.forwardRef((t,e)=>{const n=E.useRef(null),r=h.useContext(Tp);return E.useImperativeHandle(e,()=>({menu:n.current,focus:o=>{var i;(i=n.current)===null||i===void 0||i.focus(o)}})),h.createElement(dL,Object.assign({ref:n},t,r))});Ko.Item=w1;Ko.SubMenu=E1;Ko.Divider=x1;Ko.ItemGroup=iu;process.env.NODE_ENV!=="production"&&(Ko.displayName="Menu");const fL=t=>{const{componentCls:e,menuCls:n,colorError:r,colorTextLightSolid:o}=t,i=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},hL=t=>{const{componentCls:e,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:g}=t;return[{[e]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:t.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:p}},[`${e}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${e}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomLeft,
|
|
340
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomLeft,
|
|
341
|
-
&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottom,
|
|
342
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottom,
|
|
343
|
-
&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomRight,
|
|
344
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:np},[`&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topLeft,
|
|
345
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topLeft,
|
|
346
|
-
&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-top,
|
|
347
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-top,
|
|
348
|
-
&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topRight,
|
|
349
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topRight`]:{animationName:op},[`&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomLeft,
|
|
350
|
-
&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottom,
|
|
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
|
-
&${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,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
|
-
& > ${e}-affix-wrapper,
|
|
355
|
-
& > ${e}-number-affix-wrapper,
|
|
356
|
-
& > ${n}-picker-range
|
|
357
|
-
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderInlineEndWidth:t.lineWidth},[e]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
|
|
358
|
-
& > ${n}-select-auto-complete ${e},
|
|
359
|
-
& > ${n}-cascader-picker ${e},
|
|
360
|
-
& > ${e}-group-wrapper ${e}`]:{borderInlineEndWidth:t.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
361
|
-
& > ${n}-select:first-child > ${n}-select-selector,
|
|
362
|
-
& > ${n}-select-auto-complete:first-child ${e},
|
|
363
|
-
& > ${n}-cascader-picker:first-child ${e}`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius},[`& > *:last-child,
|
|
364
|
-
& > ${n}-select:last-child > ${n}-select-selector,
|
|
365
|
-
& > ${n}-cascader-picker:last-child ${e},
|
|
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
|
-
> ${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,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
|
-
${e}-handler-up-inner,
|
|
370
|
-
${e}-handler-down-inner
|
|
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%",[`
|
|
372
|
-
${e}-handler-up-inner,
|
|
373
|
-
${e}-handler-down-inner
|
|
374
|
-
`]:{color:v}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},Ii()),{color:m,transition:`all ${g} linear`,userSelect:"none"})},[`${e}-handler-up`]:{borderStartEndRadius:o},[`${e}-handler-down`]:{borderEndEndRadius:o}},E0(t,"lg")),E0(t,"sm")),{"&-disabled, &-readonly":{[`${e}-handler-wrap`]:{display:"none"},[`${e}-input`]:{color:"inherit"}},[`
|
|
375
|
-
${e}-handler-up-disabled,
|
|
376
|
-
${e}-handler-down-disabled
|
|
377
|
-
`]:{cursor:"not-allowed"},[`
|
|
378
|
-
${e}-handler-up-disabled:hover &-handler-up-inner,
|
|
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),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
|
-
inset-inline-start ${v},
|
|
382
|
-
inset-block-start ${v},
|
|
383
|
-
width ${v},
|
|
384
|
-
height ${v},
|
|
385
|
-
box-shadow ${v},
|
|
386
|
-
outline ${v}
|
|
387
|
-
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(d).sub(u).div(2).add(g).mul(-1).equal(),insetBlockStart:c(d).sub(u).div(2).add(g).mul(-1).equal(),width:c(d).add(c(g).mul(2)).equal(),height:c(d).add(c(g).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${U(g)} ${f}`,outline:`6px solid ${p}`,width:d,height:d,insetInlineStart:t.calc(u).sub(d).div(2).equal(),insetBlockStart:t.calc(u).sub(d).div(2).equal()}}},[`&-lock ${e}-handle`]:{"&::before, &::after":{transition:"none"}},[`${e}-mark`]:{position:"absolute",fontSize:t.fontSize},[`${e}-mark-text`]:{position:"absolute",display:"inline-block",color:t.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:t.colorText}},[`${e}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${e}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:t.colorBgElevated,border:`${U(m)} solid ${t.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:t.dotActiveBorderColor}},[`&${e}-disabled`]:{cursor:"not-allowed",[`${e}-rail`]:{backgroundColor:`${t.railBg} !important`},[`${e}-track`]:{backgroundColor:`${t.trackBgDisabled} !important`},[`
|
|
388
|
-
${e}-dot
|
|
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
|
-
${e}-mark-text,
|
|
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,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
|
-
min-height:0 !important;
|
|
394
|
-
max-height:none !important;
|
|
395
|
-
height:0 !important;
|
|
396
|
-
visibility:hidden !important;
|
|
397
|
-
overflow:hidden !important;
|
|
398
|
-
position:absolute !important;
|
|
399
|
-
z-index:-1000 !important;
|
|
400
|
-
top:0 !important;
|
|
401
|
-
right:0 !important;
|
|
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 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
|
-
&-allow-clear > ${e},
|
|
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: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
|
-
* @license lucide-react v0.511.0 - ISC
|
|
408
|
-
*
|
|
409
|
-
* This source code is licensed under the ISC license.
|
|
410
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
411
|
-
*/const WH=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qH=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),k0=t=>{const e=qH(t);return e.charAt(0).toUpperCase()+e.slice(1)},bw=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),KH=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
|
|
412
|
-
* @license lucide-react v0.511.0 - ISC
|
|
413
|
-
*
|
|
414
|
-
* This source code is licensed under the ISC license.
|
|
415
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
416
|
-
*/var GH={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
417
|
-
* @license lucide-react v0.511.0 - ISC
|
|
418
|
-
*
|
|
419
|
-
* This source code is licensed under the ISC license.
|
|
420
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
421
|
-
*/const UH=E.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>E.createElement("svg",{ref:l,...GH,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:bw("lucide",o),...!i&&!KH(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
422
|
-
* @license lucide-react v0.511.0 - ISC
|
|
423
|
-
*
|
|
424
|
-
* This source code is licensed under the ISC license.
|
|
425
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
426
|
-
*/const Rt=(t,e)=>{const n=E.forwardRef(({className:r,...o},i)=>E.createElement(UH,{ref:i,iconNode:e,className:bw(`lucide-${WH(k0(t))}`,`lucide-${t}`,r),...o}));return n.displayName=k0(t),n};/**
|
|
427
|
-
* @license lucide-react v0.511.0 - ISC
|
|
428
|
-
*
|
|
429
|
-
* This source code is licensed under the ISC license.
|
|
430
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
431
|
-
*/const XH=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],YH=Rt("align-center",XH);/**
|
|
432
|
-
* @license lucide-react v0.511.0 - ISC
|
|
433
|
-
*
|
|
434
|
-
* This source code is licensed under the ISC license.
|
|
435
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
436
|
-
*/const JH=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],ZH=Rt("align-justify",JH);/**
|
|
437
|
-
* @license lucide-react v0.511.0 - ISC
|
|
438
|
-
*
|
|
439
|
-
* This source code is licensed under the ISC license.
|
|
440
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
441
|
-
*/const QH=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],eV=Rt("align-left",QH);/**
|
|
442
|
-
* @license lucide-react v0.511.0 - ISC
|
|
443
|
-
*
|
|
444
|
-
* This source code is licensed under the ISC license.
|
|
445
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
446
|
-
*/const tV=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],nV=Rt("align-right",tV);/**
|
|
447
|
-
* @license lucide-react v0.511.0 - ISC
|
|
448
|
-
*
|
|
449
|
-
* This source code is licensed under the ISC license.
|
|
450
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
451
|
-
*/const rV=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],oV=Rt("bold",rV);/**
|
|
452
|
-
* @license lucide-react v0.511.0 - ISC
|
|
453
|
-
*
|
|
454
|
-
* This source code is licensed under the ISC license.
|
|
455
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
456
|
-
*/const iV=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],aV=Rt("chevron-down",iV);/**
|
|
457
|
-
* @license lucide-react v0.511.0 - ISC
|
|
458
|
-
*
|
|
459
|
-
* This source code is licensed under the ISC license.
|
|
460
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
461
|
-
*/const sV=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],lV=Rt("code",sV);/**
|
|
462
|
-
* @license lucide-react v0.511.0 - ISC
|
|
463
|
-
*
|
|
464
|
-
* This source code is licensed under the ISC license.
|
|
465
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
466
|
-
*/const cV=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],uV=Rt("corner-down-right",cV);/**
|
|
467
|
-
* @license lucide-react v0.511.0 - ISC
|
|
468
|
-
*
|
|
469
|
-
* This source code is licensed under the ISC license.
|
|
470
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
471
|
-
*/const dV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],Cd=Rt("heading-1",dV);/**
|
|
472
|
-
* @license lucide-react v0.511.0 - ISC
|
|
473
|
-
*
|
|
474
|
-
* This source code is licensed under the ISC license.
|
|
475
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
476
|
-
*/const fV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]],D0=Rt("heading-2",fV);/**
|
|
477
|
-
* @license lucide-react v0.511.0 - ISC
|
|
478
|
-
*
|
|
479
|
-
* This source code is licensed under the ISC license.
|
|
480
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
481
|
-
*/const hV=[["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17 10v3a1 1 0 0 0 1 1h3",key:"tj5zdr"}],["path",{d:"M21 10v8",key:"1kdml4"}],["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}]],_0=Rt("heading-4",hV);/**
|
|
482
|
-
* @license lucide-react v0.511.0 - ISC
|
|
483
|
-
*
|
|
484
|
-
* This source code is licensed under the ISC license.
|
|
485
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
486
|
-
*/const pV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],j0=Rt("heading-3",pV);/**
|
|
487
|
-
* @license lucide-react v0.511.0 - ISC
|
|
488
|
-
*
|
|
489
|
-
* This source code is licensed under the ISC license.
|
|
490
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
491
|
-
*/const mV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17 13v-3h4",key:"1nvgqp"}],["path",{d:"M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17",key:"2nebdn"}]],B0=Rt("heading-5",mV);/**
|
|
492
|
-
* @license lucide-react v0.511.0 - ISC
|
|
493
|
-
*
|
|
494
|
-
* This source code is licensed under the ISC license.
|
|
495
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
496
|
-
*/const gV=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["circle",{cx:"19",cy:"16",r:"2",key:"15mx69"}],["path",{d:"M20 10c-2 2-3 3.5-3 6",key:"f35dl0"}]],z0=Rt("heading-6",gV);/**
|
|
497
|
-
* @license lucide-react v0.511.0 - ISC
|
|
498
|
-
*
|
|
499
|
-
* This source code is licensed under the ISC license.
|
|
500
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
501
|
-
*/const vV=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],bV=Rt("image",vV);/**
|
|
502
|
-
* @license lucide-react v0.511.0 - ISC
|
|
503
|
-
*
|
|
504
|
-
* This source code is licensed under the ISC license.
|
|
505
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
506
|
-
*/const yV=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],CV=Rt("italic",yV);/**
|
|
507
|
-
* @license lucide-react v0.511.0 - ISC
|
|
508
|
-
*
|
|
509
|
-
* This source code is licensed under the ISC license.
|
|
510
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
511
|
-
*/const SV=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],xV=Rt("layers",SV);/**
|
|
512
|
-
* @license lucide-react v0.511.0 - ISC
|
|
513
|
-
*
|
|
514
|
-
* This source code is licensed under the ISC license.
|
|
515
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
516
|
-
*/const wV=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],EV=Rt("list-ordered",wV);/**
|
|
517
|
-
* @license lucide-react v0.511.0 - ISC
|
|
518
|
-
*
|
|
519
|
-
* This source code is licensed under the ISC license.
|
|
520
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
521
|
-
*/const $V=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],OV=Rt("list",$V);/**
|
|
522
|
-
* @license lucide-react v0.511.0 - ISC
|
|
523
|
-
*
|
|
524
|
-
* This source code is licensed under the ISC license.
|
|
525
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
526
|
-
*/const MV=[["path",{d:"M5 12h14",key:"1ays0h"}]],NV=Rt("minus",MV);/**
|
|
527
|
-
* @license lucide-react v0.511.0 - ISC
|
|
528
|
-
*
|
|
529
|
-
* This source code is licensed under the ISC license.
|
|
530
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
531
|
-
*/const RV=[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]],IV=Rt("paint-bucket",RV);/**
|
|
532
|
-
* @license lucide-react v0.511.0 - ISC
|
|
533
|
-
*
|
|
534
|
-
* This source code is licensed under the ISC license.
|
|
535
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
536
|
-
*/const PV=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],TV=Rt("plus",PV);/**
|
|
537
|
-
* @license lucide-react v0.511.0 - ISC
|
|
538
|
-
*
|
|
539
|
-
* This source code is licensed under the ISC license.
|
|
540
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
541
|
-
*/const AV=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],kV=Rt("quote",AV);/**
|
|
542
|
-
* @license lucide-react v0.511.0 - ISC
|
|
543
|
-
*
|
|
544
|
-
* This source code is licensed under the ISC license.
|
|
545
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
546
|
-
*/const DV=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],_V=Rt("redo",DV);/**
|
|
547
|
-
* @license lucide-react v0.511.0 - ISC
|
|
548
|
-
*
|
|
549
|
-
* This source code is licensed under the ISC license.
|
|
550
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
551
|
-
*/const jV=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],BV=Rt("square-check-big",jV);/**
|
|
552
|
-
* @license lucide-react v0.511.0 - ISC
|
|
553
|
-
*
|
|
554
|
-
* This source code is licensed under the ISC license.
|
|
555
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
556
|
-
*/const zV=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],LV=Rt("strikethrough",zV);/**
|
|
557
|
-
* @license lucide-react v0.511.0 - ISC
|
|
558
|
-
*
|
|
559
|
-
* This source code is licensed under the ISC license.
|
|
560
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
561
|
-
*/const FV=[["path",{d:"m4 5 8 8",key:"1eunvl"}],["path",{d:"m12 5-8 8",key:"1ah0jp"}],["path",{d:"M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",key:"e8ta8j"}]],HV=Rt("subscript",FV);/**
|
|
562
|
-
* @license lucide-react v0.511.0 - ISC
|
|
563
|
-
*
|
|
564
|
-
* This source code is licensed under the ISC license.
|
|
565
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
566
|
-
*/const VV=[["path",{d:"m4 19 8-8",key:"hr47gm"}],["path",{d:"m12 19-8-8",key:"1dhhmo"}],["path",{d:"M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",key:"1dfcux"}]],WV=Rt("superscript",VV);/**
|
|
567
|
-
* @license lucide-react v0.511.0 - ISC
|
|
568
|
-
*
|
|
569
|
-
* This source code is licensed under the ISC license.
|
|
570
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
571
|
-
*/const qV=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],KV=Rt("table",qV);/**
|
|
572
|
-
* @license lucide-react v0.511.0 - ISC
|
|
573
|
-
*
|
|
574
|
-
* This source code is licensed under the ISC license.
|
|
575
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
576
|
-
*/const GV=[["path",{d:"M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1",key:"uvaxm9"}],["path",{d:"M7 22h1a4 4 0 0 0 4-4v-1",key:"11xy8d"}],["path",{d:"M7 2h1a4 4 0 0 1 4 4v1",key:"1uw06m"}]],UV=Rt("text-cursor",GV);/**
|
|
577
|
-
* @license lucide-react v0.511.0 - ISC
|
|
578
|
-
*
|
|
579
|
-
* This source code is licensed under the ISC license.
|
|
580
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
581
|
-
*/const XV=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],YV=Rt("underline",XV);/**
|
|
582
|
-
* @license lucide-react v0.511.0 - ISC
|
|
583
|
-
*
|
|
584
|
-
* This source code is licensed under the ISC license.
|
|
585
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
586
|
-
*/const JV=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],ZV=Rt("undo",JV);/**
|
|
587
|
-
* @license lucide-react v0.511.0 - ISC
|
|
588
|
-
*
|
|
589
|
-
* This source code is licensed under the ISC license.
|
|
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 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
|
-
${e}
|
|
593
|
-
${a?n:""}
|
|
594
|
-
${s?"ce:opacity-50 ce:cursor-not-allowed":""}
|
|
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
|
-
|
|
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
|
-
`));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?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
|
-
<h1>Welcome to the Editor</h1>
|
|
601
|
-
<img src="https://d1hjkbq40fs2x4.cloudfront.net/2017-08-21/files/landscape-photography_1645.jpg" width="300" height="300" marginleft="0" marginright="0">
|
|
602
|
-
<p>This is a paragraph.</p>
|
|
603
|
-
<accordion title="Accordion Title" bgcolor="#f3f4f6" titlecolor="#000000"></accordion>
|
|
604
|
-
`),n=r=>{e(r)};return oe.jsxRuntimeExports.jsx(P6,{content:t,onChange:n,slotBefore:!0})}const A6=kw.withComponentProps(T6);module.exports=A6;
|