@cyberskill/cyber-editor 3.8.6 → 3.8.8
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/README.md +3 -231
- package/dist/client/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/client/_commonjsHelpers-DwGv2jUC.cjs +1 -0
- package/dist/client/assets/manifest-e1ae6e39.js +1 -0
- package/dist/client/chunk-D4RADZKF-CqCYZIAv.js +6257 -0
- package/dist/client/chunk-D4RADZKF-sLhgGPy5.cjs +56 -0
- package/dist/client/cyber-editor.cjs.js +259 -0
- package/dist/client/cyber-editor.cjs2.js +1 -0
- package/dist/client/cyber-editor.cjs3.js +1 -0
- package/dist/client/cyber-editor.cjs4.js +604 -0
- package/dist/client/cyber-editor.cjs5.js +1 -0
- package/dist/client/cyber-editor.css +1 -0
- package/dist/client/cyber-editor.es.js +25364 -0
- package/dist/client/cyber-editor.es2.js +55 -0
- package/dist/client/cyber-editor.es3.js +11 -0
- package/dist/{cyber-editor.es.js → client/cyber-editor.es4.js} +13943 -17051
- package/dist/client/cyber-editor.es5.js +11 -0
- package/dist/client/index-HJNgKdvE.cjs +5 -0
- package/dist/client/index-rkLJDvut.js +156 -0
- package/dist/client/index.html +6 -0
- package/dist/client/with-props-Ba4118z_.js +27 -0
- package/dist/client/with-props-CuGIah2q.cjs +1 -0
- package/package.json +56 -41
- package/dist/cyber-editor.cjs.js +0 -668
- package/dist/cyber-editor.css +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/modules/accordion/accordion-extension.d.ts +0 -2
- package/dist/modules/accordion/accordion-extension.type.d.ts +0 -11
- package/dist/modules/accordion/accordion-view.component.d.ts +0 -2
- package/dist/modules/accordion/accordion-view.type.d.ts +0 -5
- package/dist/modules/accordion/index.d.ts +0 -4
- package/dist/modules/color-picker/color-picker.component.d.ts +0 -2
- package/dist/modules/color-picker/color-picker.type.d.ts +0 -4
- package/dist/modules/color-picker/index.d.ts +0 -2
- package/dist/modules/heading/heading.component.d.ts +0 -2
- package/dist/modules/heading/heading.type.d.ts +0 -4
- package/dist/modules/heading/index.d.ts +0 -2
- package/dist/modules/image/image-view.component.d.ts +0 -2
- package/dist/modules/image/image-view.type.d.ts +0 -4
- package/dist/modules/image/image.d.ts +0 -2
- package/dist/modules/image/image.type.d.ts +0 -12
- package/dist/modules/image/index.d.ts +0 -4
- package/dist/modules/index.d.ts +0 -6
- package/dist/modules/table/index.d.ts +0 -2
- package/dist/modules/table/table.component.d.ts +0 -2
- package/dist/modules/table/table.type.d.ts +0 -6
- package/dist/modules/toolbar/custom.d.ts +0 -1
- package/dist/modules/toolbar/index.d.ts +0 -1
- package/dist/root.d.ts +0 -1
- package/dist/shared/components/color-picker/color-picker.component.d.ts +0 -2
- package/dist/shared/components/color-picker/color-picker.type.d.ts +0 -5
- package/dist/shared/components/color-picker/index.d.ts +0 -2
- package/dist/shared/components/index.d.ts +0 -2
- package/dist/shared/components/modal-edit/index.d.ts +0 -2
- package/dist/shared/components/modal-edit/modal-edit.component.d.ts +0 -2
- package/dist/shared/components/modal-edit/modal-edit.type.d.ts +0 -6
- package/dist/shared/configs/env.d.ts +0 -2
- package/dist/shared/constants/alias.d.ts +0 -4
- package/dist/shared/constants/index.d.ts +0 -1
- package/dist/shared/providers/editor.d.ts +0 -3
- package/dist/shared/providers/index.d.ts +0 -1
- package/dist/shared/typescript/index.d.ts +0 -8
- package/dist/shared/utils/extensions.d.ts +0 -1
- package/dist/shared/utils/index.d.ts +0 -1
- /package/dist/{assets → client/assets}/icons/index.ts +0 -0
- /package/dist/{favicon.svg → client/favicon.svg} +0 -0
package/dist/cyber-editor.cjs.js
DELETED
|
@@ -1,668 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),_r=require("react-dom");function $0(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=$0(N),M0=$0(_r),eE={"cyber-editor":"_cyber-editor_1liko_1"};var Js=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tE(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qs={exports:{}},Zs={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-dev-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var rm;function nE(){if(rm)return Zs;rm=1;var t=Symbol.for("react.fragment");return Zs.Fragment=t,Zs.jsxDEV=void 0,Zs}var el={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-dev-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var om;function rE(){return om||(om=1,process.env.NODE_ENV!=="production"&&function(){function t(O){if(O==null)return null;if(typeof O=="function")return O.$$typeof===B?null:O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case w:return"Fragment";case S:return"Portal";case M:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case _:return"SuspenseList"}if(typeof O=="object")switch(typeof O.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),O.$$typeof){case R:return(O.displayName||"Context")+".Provider";case $:return(O._context.displayName||"Context")+".Consumer";case I:var ee=O.render;return O=O.displayName,O||(O=ee.displayName||ee.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case A:return ee=O.displayName||null,ee!==null?ee:t(O.type)||"Memo";case z:ee=O._payload,O=O._init;try{return t(O(ee))}catch{}}return null}function e(O){return""+O}function n(O){try{e(O);var ee=!1}catch{ee=!0}if(ee){ee=console;var K=ee.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&O[Symbol.toStringTag]||O.constructor.name||"Object";return K.call(ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),e(O)}}function r(){}function o(){if(V===0){X=console.log,Q=console.info,ue=console.warn,Y=console.error,fe=console.group,be=console.groupCollapsed,de=console.groupEnd;var O={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}V++}function i(){if(V--,V===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},O,{value:X}),info:L({},O,{value:Q}),warn:L({},O,{value:ue}),error:L({},O,{value:Y}),group:L({},O,{value:fe}),groupCollapsed:L({},O,{value:be}),groupEnd:L({},O,{value:de})})}0>V&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a(O){if(oe===void 0)try{throw Error()}catch(K){var ee=K.stack.trim().match(/\n( *(at )?)/);oe=ee&&ee[1]||"",ge=-1<K.stack.indexOf(`
|
|
18
|
-
at`)?" (<anonymous>)":-1<K.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+oe+O+ge}function s(O,ee){if(!O||ne)return"";var K=ce.get(O);if(K!==void 0)return K;ne=!0,K=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ie=null;ie=F.H,F.H=null,o();try{var Ee={DetermineComponentFrameRoot:function(){try{if(ee){var Ie=function(){throw Error()};if(Object.defineProperty(Ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ie,[])}catch(Te){var Be=Te}Reflect.construct(O,[],Ie)}else{try{Ie.call()}catch(Te){Be=Te}O.call(Ie.prototype)}}else{try{throw Error()}catch(Te){Be=Te}(Ie=O())&&typeof Ie.catch=="function"&&Ie.catch(function(){})}}catch(Te){if(Te&&Be&&typeof Te.stack=="string")return[Te.stack,Be.stack]}return[null,null]}};Ee.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Se=Object.getOwnPropertyDescriptor(Ee.DetermineComponentFrameRoot,"name");Se&&Se.configurable&&Object.defineProperty(Ee.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var he=Ee.DetermineComponentFrameRoot(),Ae=he[0],_e=he[1];if(Ae&&_e){var $e=Ae.split(`
|
|
20
|
-
`),ze=_e.split(`
|
|
21
|
-
`);for(he=Se=0;Se<$e.length&&!$e[Se].includes("DetermineComponentFrameRoot");)Se++;for(;he<ze.length&&!ze[he].includes("DetermineComponentFrameRoot");)he++;if(Se===$e.length||he===ze.length)for(Se=$e.length-1,he=ze.length-1;1<=Se&&0<=he&&$e[Se]!==ze[he];)he--;for(;1<=Se&&0<=he;Se--,he--)if($e[Se]!==ze[he]){if(Se!==1||he!==1)do if(Se--,he--,0>he||$e[Se]!==ze[he]){var Fe=`
|
|
22
|
-
`+$e[Se].replace(" at new "," at ");return O.displayName&&Fe.includes("<anonymous>")&&(Fe=Fe.replace("<anonymous>",O.displayName)),typeof O=="function"&&ce.set(O,Fe),Fe}while(1<=Se&&0<=he);break}}}finally{ne=!1,F.H=ie,i(),Error.prepareStackTrace=K}return $e=($e=O?O.displayName||O.name:"")?a($e):"",typeof O=="function"&&ce.set(O,$e),$e}function l(O){if(O==null)return"";if(typeof O=="function"){var ee=O.prototype;return s(O,!(!ee||!ee.isReactComponent))}if(typeof O=="string")return a(O);switch(O){case D:return a("Suspense");case _:return a("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case I:return O=s(O.render,!1),O;case A:return l(O.type);case z:ee=O._payload,O=O._init;try{return l(O(ee))}catch{}}return""}function c(){var O=F.A;return O===null?null:O.getOwner()}function u(O){if(H.call(O,"key")){var ee=Object.getOwnPropertyDescriptor(O,"key").get;if(ee&&ee.isReactWarning)return!1}return O.key!==void 0}function d(O,ee){function K(){Oe||(Oe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ee))}K.isReactWarning=!0,Object.defineProperty(O,"key",{get:K,configurable:!0})}function f(){var O=t(this.type);return Me[O]||(Me[O]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),O=this.props.ref,O!==void 0?O:null}function p(O,ee,K,ie,Ee,Se){return K=Se.ref,O={$$typeof:x,type:O,key:ee,props:Se,_owner:Ee},(K!==void 0?K:null)!==null?Object.defineProperty(O,"ref",{enumerable:!1,get:f}):Object.defineProperty(O,"ref",{enumerable:!1,value:null}),O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(O,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O}function m(O,ee,K,ie,Ee,Se){if(typeof O=="string"||typeof O=="function"||O===w||O===M||O===E||O===D||O===_||O===k||typeof O=="object"&&O!==null&&(O.$$typeof===z||O.$$typeof===A||O.$$typeof===R||O.$$typeof===$||O.$$typeof===I||O.$$typeof===G||O.getModuleId!==void 0)){var he=ee.children;if(he!==void 0)if(ie)if(J(he)){for(ie=0;ie<he.length;ie++)v(he[ie],O);Object.freeze&&Object.freeze(he)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(he,O)}else he="",(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(he+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),O===null?ie="null":J(O)?ie="array":O!==void 0&&O.$$typeof===x?(ie="<"+(t(O.type)||"Unknown")+" />",he=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof O,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,he);if(H.call(ee,"key")){he=t(O);var Ae=Object.keys(ee).filter(function($e){return $e!=="key"});ie=0<Ae.length?"{key: someKey, "+Ae.join(": ..., ")+": ...}":"{key: someKey}",Ne[he+ie]||(Ae=0<Ae.length?"{"+Ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
|
-
let props = %s;
|
|
24
|
-
<%s {...props} />
|
|
25
|
-
React keys must be passed directly to JSX without using spread:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,ie,he,Ae,he),Ne[he+ie]=!0)}if(he=null,K!==void 0&&(n(K),he=""+K),u(ee)&&(n(ee.key),he=""+ee.key),"key"in ee){K={};for(var _e in ee)_e!=="key"&&(K[_e]=ee[_e])}else K=ee;return he&&d(K,typeof O=="function"?O.displayName||O.name||"Unknown":O),p(O,he,Se,Ee,c(),K)}function v(O,ee){if(typeof O=="object"&&O&&O.$$typeof!==me){if(J(O))for(var K=0;K<O.length;K++){var ie=O[K];g(ie)&&y(ie,ee)}else if(g(O))O._store&&(O._store.validated=1);else if(O===null||typeof O!="object"?K=null:(K=P&&O[P]||O["@@iterator"],K=typeof K=="function"?K:null),typeof K=="function"&&K!==O.entries&&(K=K.call(O),K!==O))for(;!(O=K.next()).done;)g(O.value)&&y(O.value,ee)}}function g(O){return typeof O=="object"&&O!==null&&O.$$typeof===x}function y(O,ee){if(O._store&&!O._store.validated&&O.key==null&&(O._store.validated=1,ee=b(ee),!je[ee])){je[ee]=!0;var K="";O&&O._owner!=null&&O._owner!==c()&&(K=null,typeof O._owner.tag=="number"?K=t(O._owner.type):typeof O._owner.name=="string"&&(K=O._owner.name),K=" It was passed a child from "+K+".");var ie=F.getCurrentStack;F.getCurrentStack=function(){var Ee=l(O.type);return ie&&(Ee+=ie()||""),Ee},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',ee,K),F.getCurrentStack=ie}}function b(O){var ee="",K=c();return K&&(K=t(K.type))&&(ee=`
|
|
28
|
-
|
|
29
|
-
Check the render method of \``+K+"`."),ee||(O=t(O))&&(ee=`
|
|
30
|
-
|
|
31
|
-
Check the top-level render call using <`+O+">."),ee}var C=N,x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),R=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),P=Symbol.iterator,B=Symbol.for("react.client.reference"),F=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,L=Object.assign,G=Symbol.for("react.client.reference"),J=Array.isArray,V=0,X,Q,ue,Y,fe,be,de;r.__reactDisabledLog=!0;var oe,ge,ne=!1,ce=new(typeof WeakMap=="function"?WeakMap:Map),me=Symbol.for("react.client.reference"),Oe,Me={},Ne={},je={};el.Fragment=w,el.jsxDEV=function(O,ee,K,ie,Ee,Se){return m(O,ee,K,ie,Ee,Se)}}()),el}var im;function oE(){return im||(im=1,process.env.NODE_ENV==="production"?Qs.exports=nE():Qs.exports=rE()),Qs.exports}var ve=oE(),tl={exports:{}},Pa={};/**
|
|
32
|
-
* @license React
|
|
33
|
-
* react-jsx-runtime.production.js
|
|
34
|
-
*
|
|
35
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
36
|
-
*
|
|
37
|
-
* This source code is licensed under the MIT license found in the
|
|
38
|
-
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/var am;function iE(){if(am)return Pa;am=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var s in o)s!=="key"&&(i[s]=o[s])}else i=o;return o=i.ref,{$$typeof:t,type:r,key:a,ref:o!==void 0?o:null,props:i}}return Pa.Fragment=e,Pa.jsx=n,Pa.jsxs=n,Pa}var Aa={};/**
|
|
40
|
-
* @license React
|
|
41
|
-
* react-jsx-runtime.development.js
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/var sm;function aE(){return sm||(sm=1,process.env.NODE_ENV!=="production"&&function(){function t(O){if(O==null)return null;if(typeof O=="function")return O.$$typeof===B?null:O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case w:return"Fragment";case S:return"Portal";case M:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case _:return"SuspenseList"}if(typeof O=="object")switch(typeof O.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),O.$$typeof){case R:return(O.displayName||"Context")+".Provider";case $:return(O._context.displayName||"Context")+".Consumer";case I:var ee=O.render;return O=O.displayName,O||(O=ee.displayName||ee.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case A:return ee=O.displayName||null,ee!==null?ee:t(O.type)||"Memo";case z:ee=O._payload,O=O._init;try{return t(O(ee))}catch{}}return null}function e(O){return""+O}function n(O){try{e(O);var ee=!1}catch{ee=!0}if(ee){ee=console;var K=ee.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&O[Symbol.toStringTag]||O.constructor.name||"Object";return K.call(ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),e(O)}}function r(){}function o(){if(V===0){X=console.log,Q=console.info,ue=console.warn,Y=console.error,fe=console.group,be=console.groupCollapsed,de=console.groupEnd;var O={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}V++}function i(){if(V--,V===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},O,{value:X}),info:L({},O,{value:Q}),warn:L({},O,{value:ue}),error:L({},O,{value:Y}),group:L({},O,{value:fe}),groupCollapsed:L({},O,{value:be}),groupEnd:L({},O,{value:de})})}0>V&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a(O){if(oe===void 0)try{throw Error()}catch(K){var ee=K.stack.trim().match(/\n( *(at )?)/);oe=ee&&ee[1]||"",ge=-1<K.stack.indexOf(`
|
|
48
|
-
at`)?" (<anonymous>)":-1<K.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
49
|
-
`+oe+O+ge}function s(O,ee){if(!O||ne)return"";var K=ce.get(O);if(K!==void 0)return K;ne=!0,K=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ie=null;ie=F.H,F.H=null,o();try{var Ee={DetermineComponentFrameRoot:function(){try{if(ee){var Ie=function(){throw Error()};if(Object.defineProperty(Ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ie,[])}catch(Te){var Be=Te}Reflect.construct(O,[],Ie)}else{try{Ie.call()}catch(Te){Be=Te}O.call(Ie.prototype)}}else{try{throw Error()}catch(Te){Be=Te}(Ie=O())&&typeof Ie.catch=="function"&&Ie.catch(function(){})}}catch(Te){if(Te&&Be&&typeof Te.stack=="string")return[Te.stack,Be.stack]}return[null,null]}};Ee.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Se=Object.getOwnPropertyDescriptor(Ee.DetermineComponentFrameRoot,"name");Se&&Se.configurable&&Object.defineProperty(Ee.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var he=Ee.DetermineComponentFrameRoot(),Ae=he[0],_e=he[1];if(Ae&&_e){var $e=Ae.split(`
|
|
50
|
-
`),ze=_e.split(`
|
|
51
|
-
`);for(he=Se=0;Se<$e.length&&!$e[Se].includes("DetermineComponentFrameRoot");)Se++;for(;he<ze.length&&!ze[he].includes("DetermineComponentFrameRoot");)he++;if(Se===$e.length||he===ze.length)for(Se=$e.length-1,he=ze.length-1;1<=Se&&0<=he&&$e[Se]!==ze[he];)he--;for(;1<=Se&&0<=he;Se--,he--)if($e[Se]!==ze[he]){if(Se!==1||he!==1)do if(Se--,he--,0>he||$e[Se]!==ze[he]){var Fe=`
|
|
52
|
-
`+$e[Se].replace(" at new "," at ");return O.displayName&&Fe.includes("<anonymous>")&&(Fe=Fe.replace("<anonymous>",O.displayName)),typeof O=="function"&&ce.set(O,Fe),Fe}while(1<=Se&&0<=he);break}}}finally{ne=!1,F.H=ie,i(),Error.prepareStackTrace=K}return $e=($e=O?O.displayName||O.name:"")?a($e):"",typeof O=="function"&&ce.set(O,$e),$e}function l(O){if(O==null)return"";if(typeof O=="function"){var ee=O.prototype;return s(O,!(!ee||!ee.isReactComponent))}if(typeof O=="string")return a(O);switch(O){case D:return a("Suspense");case _:return a("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case I:return O=s(O.render,!1),O;case A:return l(O.type);case z:ee=O._payload,O=O._init;try{return l(O(ee))}catch{}}return""}function c(){var O=F.A;return O===null?null:O.getOwner()}function u(O){if(H.call(O,"key")){var ee=Object.getOwnPropertyDescriptor(O,"key").get;if(ee&&ee.isReactWarning)return!1}return O.key!==void 0}function d(O,ee){function K(){Oe||(Oe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ee))}K.isReactWarning=!0,Object.defineProperty(O,"key",{get:K,configurable:!0})}function f(){var O=t(this.type);return Me[O]||(Me[O]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),O=this.props.ref,O!==void 0?O:null}function p(O,ee,K,ie,Ee,Se){return K=Se.ref,O={$$typeof:x,type:O,key:ee,props:Se,_owner:Ee},(K!==void 0?K:null)!==null?Object.defineProperty(O,"ref",{enumerable:!1,get:f}):Object.defineProperty(O,"ref",{enumerable:!1,value:null}),O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(O,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O}function m(O,ee,K,ie,Ee,Se){if(typeof O=="string"||typeof O=="function"||O===w||O===M||O===E||O===D||O===_||O===k||typeof O=="object"&&O!==null&&(O.$$typeof===z||O.$$typeof===A||O.$$typeof===R||O.$$typeof===$||O.$$typeof===I||O.$$typeof===G||O.getModuleId!==void 0)){var he=ee.children;if(he!==void 0)if(ie)if(J(he)){for(ie=0;ie<he.length;ie++)v(he[ie],O);Object.freeze&&Object.freeze(he)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(he,O)}else he="",(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(he+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),O===null?ie="null":J(O)?ie="array":O!==void 0&&O.$$typeof===x?(ie="<"+(t(O.type)||"Unknown")+" />",he=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof O,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,he);if(H.call(ee,"key")){he=t(O);var Ae=Object.keys(ee).filter(function($e){return $e!=="key"});ie=0<Ae.length?"{key: someKey, "+Ae.join(": ..., ")+": ...}":"{key: someKey}",Ne[he+ie]||(Ae=0<Ae.length?"{"+Ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
53
|
-
let props = %s;
|
|
54
|
-
<%s {...props} />
|
|
55
|
-
React keys must be passed directly to JSX without using spread:
|
|
56
|
-
let props = %s;
|
|
57
|
-
<%s key={someKey} {...props} />`,ie,he,Ae,he),Ne[he+ie]=!0)}if(he=null,K!==void 0&&(n(K),he=""+K),u(ee)&&(n(ee.key),he=""+ee.key),"key"in ee){K={};for(var _e in ee)_e!=="key"&&(K[_e]=ee[_e])}else K=ee;return he&&d(K,typeof O=="function"?O.displayName||O.name||"Unknown":O),p(O,he,Se,Ee,c(),K)}function v(O,ee){if(typeof O=="object"&&O&&O.$$typeof!==me){if(J(O))for(var K=0;K<O.length;K++){var ie=O[K];g(ie)&&y(ie,ee)}else if(g(O))O._store&&(O._store.validated=1);else if(O===null||typeof O!="object"?K=null:(K=P&&O[P]||O["@@iterator"],K=typeof K=="function"?K:null),typeof K=="function"&&K!==O.entries&&(K=K.call(O),K!==O))for(;!(O=K.next()).done;)g(O.value)&&y(O.value,ee)}}function g(O){return typeof O=="object"&&O!==null&&O.$$typeof===x}function y(O,ee){if(O._store&&!O._store.validated&&O.key==null&&(O._store.validated=1,ee=b(ee),!je[ee])){je[ee]=!0;var K="";O&&O._owner!=null&&O._owner!==c()&&(K=null,typeof O._owner.tag=="number"?K=t(O._owner.type):typeof O._owner.name=="string"&&(K=O._owner.name),K=" It was passed a child from "+K+".");var ie=F.getCurrentStack;F.getCurrentStack=function(){var Ee=l(O.type);return ie&&(Ee+=ie()||""),Ee},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',ee,K),F.getCurrentStack=ie}}function b(O){var ee="",K=c();return K&&(K=t(K.type))&&(ee=`
|
|
58
|
-
|
|
59
|
-
Check the render method of \``+K+"`."),ee||(O=t(O))&&(ee=`
|
|
60
|
-
|
|
61
|
-
Check the top-level render call using <`+O+">."),ee}var C=N,x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),R=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),P=Symbol.iterator,B=Symbol.for("react.client.reference"),F=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,L=Object.assign,G=Symbol.for("react.client.reference"),J=Array.isArray,V=0,X,Q,ue,Y,fe,be,de;r.__reactDisabledLog=!0;var oe,ge,ne=!1,ce=new(typeof WeakMap=="function"?WeakMap:Map),me=Symbol.for("react.client.reference"),Oe,Me={},Ne={},je={};Aa.Fragment=w,Aa.jsx=function(O,ee,K,ie,Ee){return m(O,ee,K,!1,ie,Ee)},Aa.jsxs=function(O,ee,K,ie,Ee){return m(O,ee,K,!0,ie,Ee)}}()),Aa}var lm;function sE(){return lm||(lm=1,process.env.NODE_ENV==="production"?tl.exports=iE():tl.exports=aE()),tl.exports}var Eo=sE(),Nu={exports:{}};/*!
|
|
62
|
-
Copyright (c) 2018 Jed Watson.
|
|
63
|
-
Licensed under the MIT License (MIT), see
|
|
64
|
-
http://jedwatson.github.io/classnames
|
|
65
|
-
*/var cm;function lE(){return cm||(cm=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)e.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(Nu)),Nu.exports}var cE=lE();const re=tE(cE),uE="_fullscreen_giq1a_2",dE="_block_giq1a_3",fE="_container_giq1a_31",hE="_ring_giq1a_39",pE="_message_giq1a_70",No={fullscreen:uE,block:dE,container:fE,ring:hE,message:pE};function nl(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ou={exports:{}};/*!
|
|
66
|
-
localForage -- Offline Storage, Improved
|
|
67
|
-
Version 1.10.0
|
|
68
|
-
https://localforage.github.io/localForage
|
|
69
|
-
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
70
|
-
*/var um;function mE(){return um||(um=1,function(t,e){(function(n){t.exports=n()})(function(){return function n(r,o,i){function a(c,u){if(!o[c]){if(!r[c]){var d=typeof nl=="function"&&nl;if(!u&&d)return d(c,!0);if(s)return s(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var p=o[c]={exports:{}};r[c][0].call(p.exports,function(m){var v=r[c][1][m];return a(v||m)},p,p.exports,n,r,o,i)}return o[c].exports}for(var s=typeof nl=="function"&&nl,l=0;l<i.length;l++)a(i[l]);return a}({1:[function(n,r,o){(function(i){var a=i.MutationObserver||i.WebKitMutationObserver,s;if(a){var l=0,c=new a(m),u=i.document.createTextNode("");c.observe(u,{characterData:!0}),s=function(){u.data=l=++l%2}}else if(!i.setImmediate&&typeof i.MessageChannel<"u"){var d=new i.MessageChannel;d.port1.onmessage=m,s=function(){d.port2.postMessage(0)}}else"document"in i&&"onreadystatechange"in i.document.createElement("script")?s=function(){var g=i.document.createElement("script");g.onreadystatechange=function(){m(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},i.document.documentElement.appendChild(g)}:s=function(){setTimeout(m,0)};var f,p=[];function m(){f=!0;for(var g,y,b=p.length;b;){for(y=p,p=[],g=-1;++g<b;)y[g]();b=p.length}f=!1}r.exports=v;function v(g){p.push(g)===1&&!f&&s()}}).call(this,typeof Js<"u"?Js:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(n,r,o){var i=n(1);function a(){}var s={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];r.exports=d;function d(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,S!==a&&v(this,S)}d.prototype.catch=function(S){return this.then(null,S)},d.prototype.then=function(S,w){if(typeof S!="function"&&this.state===c||typeof w!="function"&&this.state===l)return this;var E=new this.constructor(a);if(this.state!==u){var M=this.state===c?S:w;p(E,M,this.outcome)}else this.queue.push(new f(E,S,w));return E};function f(S,w,E){this.promise=S,typeof w=="function"&&(this.onFulfilled=w,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}f.prototype.callFulfilled=function(S){s.resolve(this.promise,S)},f.prototype.otherCallFulfilled=function(S){p(this.promise,this.onFulfilled,S)},f.prototype.callRejected=function(S){s.reject(this.promise,S)},f.prototype.otherCallRejected=function(S){p(this.promise,this.onRejected,S)};function p(S,w,E){i(function(){var M;try{M=w(E)}catch($){return s.reject(S,$)}M===S?s.reject(S,new TypeError("Cannot resolve promise with itself")):s.resolve(S,M)})}s.resolve=function(S,w){var E=g(m,w);if(E.status==="error")return s.reject(S,E.value);var M=E.value;if(M)v(S,M);else{S.state=c,S.outcome=w;for(var $=-1,R=S.queue.length;++$<R;)S.queue[$].callFulfilled(w)}return S},s.reject=function(S,w){S.state=l,S.outcome=w;for(var E=-1,M=S.queue.length;++E<M;)S.queue[E].callRejected(w);return S};function m(S){var w=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof w=="function")return function(){w.apply(S,arguments)}}function v(S,w){var E=!1;function M(D){E||(E=!0,s.reject(S,D))}function $(D){E||(E=!0,s.resolve(S,D))}function R(){w($,M)}var I=g(R);I.status==="error"&&M(I.value)}function g(S,w){var E={};try{E.value=S(w),E.status="success"}catch(M){E.status="error",E.value=M}return E}d.resolve=y;function y(S){return S instanceof this?S:s.resolve(new this(a),S)}d.reject=b;function b(S){var w=new this(a);return s.reject(w,S)}d.all=C;function C(S){var w=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=S.length,M=!1;if(!E)return this.resolve([]);for(var $=new Array(E),R=0,I=-1,D=new this(a);++I<E;)_(S[I],I);return D;function _(A,z){w.resolve(A).then(k,function(P){M||(M=!0,s.reject(D,P))});function k(P){$[z]=P,++R===E&&!M&&(M=!0,s.resolve(D,$))}}}d.race=x;function x(S){var w=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=S.length,M=!1;if(!E)return this.resolve([]);for(var $=-1,R=new this(a);++$<E;)I(S[$]);return R;function I(D){w.resolve(D).then(function(_){M||(M=!0,s.resolve(R,_))},function(_){M||(M=!0,s.reject(R,_))})}}},{1:1}],3:[function(n,r,o){(function(i){typeof i.Promise!="function"&&(i.Promise=n(2))}).call(this,typeof Js<"u"?Js:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(n,r,o){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T};function a(T,U){if(!(T instanceof U))throw new TypeError("Cannot call a class as a function")}function s(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var l=s();function c(){try{if(!l||!l.open)return!1;var T=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),U=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!T||U)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function u(T,U){T=T||[],U=U||{};try{return new Blob(T,U)}catch(Z){if(Z.name!=="TypeError")throw Z;for(var j=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,te=new j,ae=0;ae<T.length;ae+=1)te.append(T[ae]);return te.getBlob(U.type)}}typeof Promise>"u"&&n(3);var d=Promise;function f(T,U){U&&T.then(function(j){U(null,j)},function(j){U(j)})}function p(T,U,j){typeof U=="function"&&T.then(U),typeof j=="function"&&T.catch(j)}function m(T){return typeof T!="string"&&(console.warn(T+" used as a key, but it is not a string."),T=String(T)),T}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",y=void 0,b={},C=Object.prototype.toString,x="readonly",S="readwrite";function w(T){for(var U=T.length,j=new ArrayBuffer(U),te=new Uint8Array(j),ae=0;ae<U;ae++)te[ae]=T.charCodeAt(ae);return j}function E(T){return new d(function(U){var j=T.transaction(g,S),te=u([""]);j.objectStore(g).put(te,"key"),j.onabort=function(ae){ae.preventDefault(),ae.stopPropagation(),U(!1)},j.oncomplete=function(){var ae=navigator.userAgent.match(/Chrome\/(\d+)/),Z=navigator.userAgent.match(/Edge\//);U(Z||!ae||parseInt(ae[1],10)>=43)}}).catch(function(){return!1})}function M(T){return typeof y=="boolean"?d.resolve(y):E(T).then(function(U){return y=U,y})}function $(T){var U=b[T.name],j={};j.promise=new d(function(te,ae){j.resolve=te,j.reject=ae}),U.deferredOperations.push(j),U.dbReady?U.dbReady=U.dbReady.then(function(){return j.promise}):U.dbReady=j.promise}function R(T){var U=b[T.name],j=U.deferredOperations.pop();if(j)return j.resolve(),j.promise}function I(T,U){var j=b[T.name],te=j.deferredOperations.pop();if(te)return te.reject(U),te.promise}function D(T,U){return new d(function(j,te){if(b[T.name]=b[T.name]||G(),T.db)if(U)$(T),T.db.close();else return j(T.db);var ae=[T.name];U&&ae.push(T.version);var Z=l.open.apply(l,ae);U&&(Z.onupgradeneeded=function(xe){var ye=Z.result;try{ye.createObjectStore(T.storeName),xe.oldVersion<=1&&ye.createObjectStore(g)}catch(pe){if(pe.name==="ConstraintError")console.warn('The database "'+T.name+'" has been upgraded from version '+xe.oldVersion+" to version "+xe.newVersion+', but the storage "'+T.storeName+'" already exists.');else throw pe}}),Z.onerror=function(xe){xe.preventDefault(),te(Z.error)},Z.onsuccess=function(){var xe=Z.result;xe.onversionchange=function(ye){ye.target.close()},j(xe),R(T)}})}function _(T){return D(T,!1)}function A(T){return D(T,!0)}function z(T,U){if(!T.db)return!0;var j=!T.db.objectStoreNames.contains(T.storeName),te=T.version<T.db.version,ae=T.version>T.db.version;if(te&&(T.version!==U&&console.warn('The database "'+T.name+`" can't be downgraded from version `+T.db.version+" to version "+T.version+"."),T.version=T.db.version),ae||j){if(j){var Z=T.db.version+1;Z>T.version&&(T.version=Z)}return!0}return!1}function k(T){return new d(function(U,j){var te=new FileReader;te.onerror=j,te.onloadend=function(ae){var Z=btoa(ae.target.result||"");U({__local_forage_encoded_blob:!0,data:Z,type:T.type})},te.readAsBinaryString(T)})}function P(T){var U=w(atob(T.data));return u([U],{type:T.type})}function B(T){return T&&T.__local_forage_encoded_blob}function F(T){var U=this,j=U._initReady().then(function(){var te=b[U._dbInfo.name];if(te&&te.dbReady)return te.dbReady});return p(j,T,T),j}function H(T){$(T);for(var U=b[T.name],j=U.forages,te=0;te<j.length;te++){var ae=j[te];ae._dbInfo.db&&(ae._dbInfo.db.close(),ae._dbInfo.db=null)}return T.db=null,_(T).then(function(Z){return T.db=Z,z(T)?A(T):Z}).then(function(Z){T.db=U.db=Z;for(var xe=0;xe<j.length;xe++)j[xe]._dbInfo.db=Z}).catch(function(Z){throw I(T,Z),Z})}function L(T,U,j,te){te===void 0&&(te=1);try{var ae=T.db.transaction(T.storeName,U);j(null,ae)}catch(Z){if(te>0&&(!T.db||Z.name==="InvalidStateError"||Z.name==="NotFoundError"))return d.resolve().then(function(){if(!T.db||Z.name==="NotFoundError"&&!T.db.objectStoreNames.contains(T.storeName)&&T.version<=T.db.version)return T.db&&(T.version=T.db.version+1),A(T)}).then(function(){return H(T).then(function(){L(T,U,j,te-1)})}).catch(j);j(Z)}}function G(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function J(T){var U=this,j={db:null};if(T)for(var te in T)j[te]=T[te];var ae=b[j.name];ae||(ae=G(),b[j.name]=ae),ae.forages.push(U),U._initReady||(U._initReady=U.ready,U.ready=F);var Z=[];function xe(){return d.resolve()}for(var ye=0;ye<ae.forages.length;ye++){var pe=ae.forages[ye];pe!==U&&Z.push(pe._initReady().catch(xe))}var Ce=ae.forages.slice(0);return d.all(Z).then(function(){return j.db=ae.db,_(j)}).then(function(we){return j.db=we,z(j,U._defaultConfig.version)?A(j):we}).then(function(we){j.db=ae.db=we,U._dbInfo=j;for(var ke=0;ke<Ce.length;ke++){var tt=Ce[ke];tt!==U&&(tt._dbInfo.db=j.db,tt._dbInfo.version=j.version)}})}function V(T,U){var j=this;T=m(T);var te=new d(function(ae,Z){j.ready().then(function(){L(j._dbInfo,x,function(xe,ye){if(xe)return Z(xe);try{var pe=ye.objectStore(j._dbInfo.storeName),Ce=pe.get(T);Ce.onsuccess=function(){var we=Ce.result;we===void 0&&(we=null),B(we)&&(we=P(we)),ae(we)},Ce.onerror=function(){Z(Ce.error)}}catch(we){Z(we)}})}).catch(Z)});return f(te,U),te}function X(T,U){var j=this,te=new d(function(ae,Z){j.ready().then(function(){L(j._dbInfo,x,function(xe,ye){if(xe)return Z(xe);try{var pe=ye.objectStore(j._dbInfo.storeName),Ce=pe.openCursor(),we=1;Ce.onsuccess=function(){var ke=Ce.result;if(ke){var tt=ke.value;B(tt)&&(tt=P(tt));var bt=T(tt,ke.key,we++);bt!==void 0?ae(bt):ke.continue()}else ae()},Ce.onerror=function(){Z(Ce.error)}}catch(ke){Z(ke)}})}).catch(Z)});return f(te,U),te}function Q(T,U,j){var te=this;T=m(T);var ae=new d(function(Z,xe){var ye;te.ready().then(function(){return ye=te._dbInfo,C.call(U)==="[object Blob]"?M(ye.db).then(function(pe){return pe?U:k(U)}):U}).then(function(pe){L(te._dbInfo,S,function(Ce,we){if(Ce)return xe(Ce);try{var ke=we.objectStore(te._dbInfo.storeName);pe===null&&(pe=void 0);var tt=ke.put(pe,T);we.oncomplete=function(){pe===void 0&&(pe=null),Z(pe)},we.onabort=we.onerror=function(){var bt=tt.error?tt.error:tt.transaction.error;xe(bt)}}catch(bt){xe(bt)}})}).catch(xe)});return f(ae,j),ae}function ue(T,U){var j=this;T=m(T);var te=new d(function(ae,Z){j.ready().then(function(){L(j._dbInfo,S,function(xe,ye){if(xe)return Z(xe);try{var pe=ye.objectStore(j._dbInfo.storeName),Ce=pe.delete(T);ye.oncomplete=function(){ae()},ye.onerror=function(){Z(Ce.error)},ye.onabort=function(){var we=Ce.error?Ce.error:Ce.transaction.error;Z(we)}}catch(we){Z(we)}})}).catch(Z)});return f(te,U),te}function Y(T){var U=this,j=new d(function(te,ae){U.ready().then(function(){L(U._dbInfo,S,function(Z,xe){if(Z)return ae(Z);try{var ye=xe.objectStore(U._dbInfo.storeName),pe=ye.clear();xe.oncomplete=function(){te()},xe.onabort=xe.onerror=function(){var Ce=pe.error?pe.error:pe.transaction.error;ae(Ce)}}catch(Ce){ae(Ce)}})}).catch(ae)});return f(j,T),j}function fe(T){var U=this,j=new d(function(te,ae){U.ready().then(function(){L(U._dbInfo,x,function(Z,xe){if(Z)return ae(Z);try{var ye=xe.objectStore(U._dbInfo.storeName),pe=ye.count();pe.onsuccess=function(){te(pe.result)},pe.onerror=function(){ae(pe.error)}}catch(Ce){ae(Ce)}})}).catch(ae)});return f(j,T),j}function be(T,U){var j=this,te=new d(function(ae,Z){if(T<0){ae(null);return}j.ready().then(function(){L(j._dbInfo,x,function(xe,ye){if(xe)return Z(xe);try{var pe=ye.objectStore(j._dbInfo.storeName),Ce=!1,we=pe.openKeyCursor();we.onsuccess=function(){var ke=we.result;if(!ke){ae(null);return}T===0||Ce?ae(ke.key):(Ce=!0,ke.advance(T))},we.onerror=function(){Z(we.error)}}catch(ke){Z(ke)}})}).catch(Z)});return f(te,U),te}function de(T){var U=this,j=new d(function(te,ae){U.ready().then(function(){L(U._dbInfo,x,function(Z,xe){if(Z)return ae(Z);try{var ye=xe.objectStore(U._dbInfo.storeName),pe=ye.openKeyCursor(),Ce=[];pe.onsuccess=function(){var we=pe.result;if(!we){te(Ce);return}Ce.push(we.key),we.continue()},pe.onerror=function(){ae(pe.error)}}catch(we){ae(we)}})}).catch(ae)});return f(j,T),j}function oe(T,U){U=v.apply(this,arguments);var j=this.config();T=typeof T!="function"&&T||{},T.name||(T.name=T.name||j.name,T.storeName=T.storeName||j.storeName);var te=this,ae;if(!T.name)ae=d.reject("Invalid arguments");else{var Z=T.name===j.name&&te._dbInfo.db,xe=Z?d.resolve(te._dbInfo.db):_(T).then(function(ye){var pe=b[T.name],Ce=pe.forages;pe.db=ye;for(var we=0;we<Ce.length;we++)Ce[we]._dbInfo.db=ye;return ye});T.storeName?ae=xe.then(function(ye){if(ye.objectStoreNames.contains(T.storeName)){var pe=ye.version+1;$(T);var Ce=b[T.name],we=Ce.forages;ye.close();for(var ke=0;ke<we.length;ke++){var tt=we[ke];tt._dbInfo.db=null,tt._dbInfo.version=pe}var bt=new d(function(Ct,jt){var zt=l.open(T.name,pe);zt.onerror=function(nn){var gn=zt.result;gn.close(),jt(nn)},zt.onupgradeneeded=function(){var nn=zt.result;nn.deleteObjectStore(T.storeName)},zt.onsuccess=function(){var nn=zt.result;nn.close(),Ct(nn)}});return bt.then(function(Ct){Ce.db=Ct;for(var jt=0;jt<we.length;jt++){var zt=we[jt];zt._dbInfo.db=Ct,R(zt._dbInfo)}}).catch(function(Ct){throw(I(T,Ct)||d.resolve()).catch(function(){}),Ct})}}):ae=xe.then(function(ye){$(T);var pe=b[T.name],Ce=pe.forages;ye.close();for(var we=0;we<Ce.length;we++){var ke=Ce[we];ke._dbInfo.db=null}var tt=new d(function(bt,Ct){var jt=l.deleteDatabase(T.name);jt.onerror=function(){var zt=jt.result;zt&&zt.close(),Ct(jt.error)},jt.onblocked=function(){console.warn('dropInstance blocked for database "'+T.name+'" until all open connections are closed')},jt.onsuccess=function(){var zt=jt.result;zt&&zt.close(),bt(zt)}});return tt.then(function(bt){pe.db=bt;for(var Ct=0;Ct<Ce.length;Ct++){var jt=Ce[Ct];R(jt._dbInfo)}}).catch(function(bt){throw(I(T,bt)||d.resolve()).catch(function(){}),bt})})}return f(ae,U),ae}var ge={_driver:"asyncStorage",_initStorage:J,_support:c(),iterate:X,getItem:V,setItem:Q,removeItem:ue,clear:Y,length:fe,key:be,keys:de,dropInstance:oe};function ne(){return typeof openDatabase=="function"}var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",me="~~local_forage_type~",Oe=/^~~local_forage_type~([^~]+)~/,Me="__lfsc__:",Ne=Me.length,je="arbf",O="blob",ee="si08",K="ui08",ie="uic8",Ee="si16",Se="si32",he="ur16",Ae="ui32",_e="fl32",$e="fl64",ze=Ne+je.length,Fe=Object.prototype.toString;function Ie(T){var U=T.length*.75,j=T.length,te,ae=0,Z,xe,ye,pe;T[T.length-1]==="="&&(U--,T[T.length-2]==="="&&U--);var Ce=new ArrayBuffer(U),we=new Uint8Array(Ce);for(te=0;te<j;te+=4)Z=ce.indexOf(T[te]),xe=ce.indexOf(T[te+1]),ye=ce.indexOf(T[te+2]),pe=ce.indexOf(T[te+3]),we[ae++]=Z<<2|xe>>4,we[ae++]=(xe&15)<<4|ye>>2,we[ae++]=(ye&3)<<6|pe&63;return Ce}function Be(T){var U=new Uint8Array(T),j="",te;for(te=0;te<U.length;te+=3)j+=ce[U[te]>>2],j+=ce[(U[te]&3)<<4|U[te+1]>>4],j+=ce[(U[te+1]&15)<<2|U[te+2]>>6],j+=ce[U[te+2]&63];return U.length%3===2?j=j.substring(0,j.length-1)+"=":U.length%3===1&&(j=j.substring(0,j.length-2)+"=="),j}function Te(T,U){var j="";if(T&&(j=Fe.call(T)),T&&(j==="[object ArrayBuffer]"||T.buffer&&Fe.call(T.buffer)==="[object ArrayBuffer]")){var te,ae=Me;T instanceof ArrayBuffer?(te=T,ae+=je):(te=T.buffer,j==="[object Int8Array]"?ae+=ee:j==="[object Uint8Array]"?ae+=K:j==="[object Uint8ClampedArray]"?ae+=ie:j==="[object Int16Array]"?ae+=Ee:j==="[object Uint16Array]"?ae+=he:j==="[object Int32Array]"?ae+=Se:j==="[object Uint32Array]"?ae+=Ae:j==="[object Float32Array]"?ae+=_e:j==="[object Float64Array]"?ae+=$e:U(new Error("Failed to get type for BinaryArray"))),U(ae+Be(te))}else if(j==="[object Blob]"){var Z=new FileReader;Z.onload=function(){var xe=me+T.type+"~"+Be(this.result);U(Me+O+xe)},Z.readAsArrayBuffer(T)}else try{U(JSON.stringify(T))}catch(xe){console.error("Couldn't convert value into a JSON string: ",T),U(null,xe)}}function He(T){if(T.substring(0,Ne)!==Me)return JSON.parse(T);var U=T.substring(ze),j=T.substring(Ne,ze),te;if(j===O&&Oe.test(U)){var ae=U.match(Oe);te=ae[1],U=U.substring(ae[0].length)}var Z=Ie(U);switch(j){case je:return Z;case O:return u([Z],{type:te});case ee:return new Int8Array(Z);case K:return new Uint8Array(Z);case ie:return new Uint8ClampedArray(Z);case Ee:return new Int16Array(Z);case he:return new Uint16Array(Z);case Se:return new Int32Array(Z);case Ae:return new Uint32Array(Z);case _e:return new Float32Array(Z);case $e:return new Float64Array(Z);default:throw new Error("Unkown type: "+j)}}var Ze={serialize:Te,deserialize:He,stringToBuffer:Ie,bufferToString:Be};function ht(T,U,j,te){T.executeSql("CREATE TABLE IF NOT EXISTS "+U.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],j,te)}function Tt(T){var U=this,j={db:null};if(T)for(var te in T)j[te]=typeof T[te]!="string"?T[te].toString():T[te];var ae=new d(function(Z,xe){try{j.db=openDatabase(j.name,String(j.version),j.description,j.size)}catch(ye){return xe(ye)}j.db.transaction(function(ye){ht(ye,j,function(){U._dbInfo=j,Z()},function(pe,Ce){xe(Ce)})},xe)});return j.serializer=Ze,ae}function Pt(T,U,j,te,ae,Z){T.executeSql(j,te,ae,function(xe,ye){ye.code===ye.SYNTAX_ERR?xe.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[U.storeName],function(pe,Ce){Ce.rows.length?Z(pe,ye):ht(pe,U,function(){pe.executeSql(j,te,ae,Z)},Z)},Z):Z(xe,ye)},Z)}function an(T,U){var j=this;T=m(T);var te=new d(function(ae,Z){j.ready().then(function(){var xe=j._dbInfo;xe.db.transaction(function(ye){Pt(ye,xe,"SELECT * FROM "+xe.storeName+" WHERE key = ? LIMIT 1",[T],function(pe,Ce){var we=Ce.rows.length?Ce.rows.item(0).value:null;we&&(we=xe.serializer.deserialize(we)),ae(we)},function(pe,Ce){Z(Ce)})})}).catch(Z)});return f(te,U),te}function Ye(T,U){var j=this,te=new d(function(ae,Z){j.ready().then(function(){var xe=j._dbInfo;xe.db.transaction(function(ye){Pt(ye,xe,"SELECT * FROM "+xe.storeName,[],function(pe,Ce){for(var we=Ce.rows,ke=we.length,tt=0;tt<ke;tt++){var bt=we.item(tt),Ct=bt.value;if(Ct&&(Ct=xe.serializer.deserialize(Ct)),Ct=T(Ct,bt.key,tt+1),Ct!==void 0){ae(Ct);return}}ae()},function(pe,Ce){Z(Ce)})})}).catch(Z)});return f(te,U),te}function We(T,U,j,te){var ae=this;T=m(T);var Z=new d(function(xe,ye){ae.ready().then(function(){U===void 0&&(U=null);var pe=U,Ce=ae._dbInfo;Ce.serializer.serialize(U,function(we,ke){ke?ye(ke):Ce.db.transaction(function(tt){Pt(tt,Ce,"INSERT OR REPLACE INTO "+Ce.storeName+" (key, value) VALUES (?, ?)",[T,we],function(){xe(pe)},function(bt,Ct){ye(Ct)})},function(tt){if(tt.code===tt.QUOTA_ERR){if(te>0){xe(We.apply(ae,[T,pe,j,te-1]));return}ye(tt)}})})}).catch(ye)});return f(Z,j),Z}function lt(T,U,j){return We.apply(this,[T,U,j,1])}function it(T,U){var j=this;T=m(T);var te=new d(function(ae,Z){j.ready().then(function(){var xe=j._dbInfo;xe.db.transaction(function(ye){Pt(ye,xe,"DELETE FROM "+xe.storeName+" WHERE key = ?",[T],function(){ae()},function(pe,Ce){Z(Ce)})})}).catch(Z)});return f(te,U),te}function pt(T){var U=this,j=new d(function(te,ae){U.ready().then(function(){var Z=U._dbInfo;Z.db.transaction(function(xe){Pt(xe,Z,"DELETE FROM "+Z.storeName,[],function(){te()},function(ye,pe){ae(pe)})})}).catch(ae)});return f(j,T),j}function Qe(T){var U=this,j=new d(function(te,ae){U.ready().then(function(){var Z=U._dbInfo;Z.db.transaction(function(xe){Pt(xe,Z,"SELECT COUNT(key) as c FROM "+Z.storeName,[],function(ye,pe){var Ce=pe.rows.item(0).c;te(Ce)},function(ye,pe){ae(pe)})})}).catch(ae)});return f(j,T),j}function Ke(T,U){var j=this,te=new d(function(ae,Z){j.ready().then(function(){var xe=j._dbInfo;xe.db.transaction(function(ye){Pt(ye,xe,"SELECT key FROM "+xe.storeName+" WHERE id = ? LIMIT 1",[T+1],function(pe,Ce){var we=Ce.rows.length?Ce.rows.item(0).key:null;ae(we)},function(pe,Ce){Z(Ce)})})}).catch(Z)});return f(te,U),te}function Ue(T){var U=this,j=new d(function(te,ae){U.ready().then(function(){var Z=U._dbInfo;Z.db.transaction(function(xe){Pt(xe,Z,"SELECT key FROM "+Z.storeName,[],function(ye,pe){for(var Ce=[],we=0;we<pe.rows.length;we++)Ce.push(pe.rows.item(we).key);te(Ce)},function(ye,pe){ae(pe)})})}).catch(ae)});return f(j,T),j}function wt(T){return new d(function(U,j){T.transaction(function(te){te.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(ae,Z){for(var xe=[],ye=0;ye<Z.rows.length;ye++)xe.push(Z.rows.item(ye).name);U({db:T,storeNames:xe})},function(ae,Z){j(Z)})},function(te){j(te)})})}function $t(T,U){U=v.apply(this,arguments);var j=this.config();T=typeof T!="function"&&T||{},T.name||(T.name=T.name||j.name,T.storeName=T.storeName||j.storeName);var te=this,ae;return T.name?ae=new d(function(Z){var xe;T.name===j.name?xe=te._dbInfo.db:xe=openDatabase(T.name,"","",0),T.storeName?Z({db:xe,storeNames:[T.storeName]}):Z(wt(xe))}).then(function(Z){return new d(function(xe,ye){Z.db.transaction(function(pe){function Ce(bt){return new d(function(Ct,jt){pe.executeSql("DROP TABLE IF EXISTS "+bt,[],function(){Ct()},function(zt,nn){jt(nn)})})}for(var we=[],ke=0,tt=Z.storeNames.length;ke<tt;ke++)we.push(Ce(Z.storeNames[ke]));d.all(we).then(function(){xe()}).catch(function(bt){ye(bt)})},function(pe){ye(pe)})})}):ae=d.reject("Invalid arguments"),f(ae,U),ae}var et={_driver:"webSQLStorage",_initStorage:Tt,_support:ne(),iterate:Ye,getItem:an,setItem:lt,removeItem:it,clear:pt,length:Qe,key:Ke,keys:Ue,dropInstance:$t};function qe(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function ot(T,U){var j=T.name+"/";return T.storeName!==U.storeName&&(j+=T.storeName+"/"),j}function at(){var T="_localforage_support_test";try{return localStorage.setItem(T,!0),localStorage.removeItem(T),!1}catch{return!0}}function nt(){return!at()||localStorage.length>0}function dt(T){var U=this,j={};if(T)for(var te in T)j[te]=T[te];return j.keyPrefix=ot(T,U._defaultConfig),nt()?(U._dbInfo=j,j.serializer=Ze,d.resolve()):d.reject()}function Dt(T){var U=this,j=U.ready().then(function(){for(var te=U._dbInfo.keyPrefix,ae=localStorage.length-1;ae>=0;ae--){var Z=localStorage.key(ae);Z.indexOf(te)===0&&localStorage.removeItem(Z)}});return f(j,T),j}function Nt(T,U){var j=this;T=m(T);var te=j.ready().then(function(){var ae=j._dbInfo,Z=localStorage.getItem(ae.keyPrefix+T);return Z&&(Z=ae.serializer.deserialize(Z)),Z});return f(te,U),te}function Gt(T,U){var j=this,te=j.ready().then(function(){for(var ae=j._dbInfo,Z=ae.keyPrefix,xe=Z.length,ye=localStorage.length,pe=1,Ce=0;Ce<ye;Ce++){var we=localStorage.key(Ce);if(we.indexOf(Z)===0){var ke=localStorage.getItem(we);if(ke&&(ke=ae.serializer.deserialize(ke)),ke=T(ke,we.substring(xe),pe++),ke!==void 0)return ke}}});return f(te,U),te}function Rt(T,U){var j=this,te=j.ready().then(function(){var ae=j._dbInfo,Z;try{Z=localStorage.key(T)}catch{Z=null}return Z&&(Z=Z.substring(ae.keyPrefix.length)),Z});return f(te,U),te}function Bt(T){var U=this,j=U.ready().then(function(){for(var te=U._dbInfo,ae=localStorage.length,Z=[],xe=0;xe<ae;xe++){var ye=localStorage.key(xe);ye.indexOf(te.keyPrefix)===0&&Z.push(ye.substring(te.keyPrefix.length))}return Z});return f(j,T),j}function Ft(T){var U=this,j=U.keys().then(function(te){return te.length});return f(j,T),j}function Xt(T,U){var j=this;T=m(T);var te=j.ready().then(function(){var ae=j._dbInfo;localStorage.removeItem(ae.keyPrefix+T)});return f(te,U),te}function Mn(T,U,j){var te=this;T=m(T);var ae=te.ready().then(function(){U===void 0&&(U=null);var Z=U;return new d(function(xe,ye){var pe=te._dbInfo;pe.serializer.serialize(U,function(Ce,we){if(we)ye(we);else try{localStorage.setItem(pe.keyPrefix+T,Ce),xe(Z)}catch(ke){(ke.name==="QuotaExceededError"||ke.name==="NS_ERROR_DOM_QUOTA_REACHED")&&ye(ke),ye(ke)}})})});return f(ae,j),ae}function Yt(T,U){if(U=v.apply(this,arguments),T=typeof T!="function"&&T||{},!T.name){var j=this.config();T.name=T.name||j.name,T.storeName=T.storeName||j.storeName}var te=this,ae;return T.name?ae=new d(function(Z){T.storeName?Z(ot(T,te._defaultConfig)):Z(T.name+"/")}).then(function(Z){for(var xe=localStorage.length-1;xe>=0;xe--){var ye=localStorage.key(xe);ye.indexOf(Z)===0&&localStorage.removeItem(ye)}}):ae=d.reject("Invalid arguments"),f(ae,U),ae}var sn={_driver:"localStorageWrapper",_initStorage:dt,_support:qe(),iterate:Gt,getItem:Nt,setItem:Mn,removeItem:Xt,clear:Dt,length:Ft,key:Rt,keys:Bt,dropInstance:Yt},Ve=function(U,j){return U===j||typeof U=="number"&&typeof j=="number"&&isNaN(U)&&isNaN(j)},rt=function(U,j){for(var te=U.length,ae=0;ae<te;){if(Ve(U[ae],j))return!0;ae++}return!1},Xe=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"},De={},ft={},Et={INDEXEDDB:ge,WEBSQL:et,LOCALSTORAGE:sn},Ot=[Et.INDEXEDDB._driver,Et.WEBSQL._driver,Et.LOCALSTORAGE._driver],ln=["dropInstance"],en=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ln),dn={description:"",driver:Ot.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function cn(T,U){T[U]=function(){var j=arguments;return T.ready().then(function(){return T[U].apply(T,j)})}}function tn(){for(var T=1;T<arguments.length;T++){var U=arguments[T];if(U)for(var j in U)U.hasOwnProperty(j)&&(Xe(U[j])?arguments[0][j]=U[j].slice():arguments[0][j]=U[j])}return arguments[0]}var En=function(){function T(U){a(this,T);for(var j in Et)if(Et.hasOwnProperty(j)){var te=Et[j],ae=te._driver;this[j]=ae,De[ae]||this.defineDriver(te)}this._defaultConfig=tn({},dn),this._config=tn({},this._defaultConfig,U),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return T.prototype.config=function(j){if((typeof j>"u"?"undefined":i(j))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var te in j){if(te==="storeName"&&(j[te]=j[te].replace(/\W/g,"_")),te==="version"&&typeof j[te]!="number")return new Error("Database version must be a number.");this._config[te]=j[te]}return"driver"in j&&j.driver?this.setDriver(this._config.driver):!0}else return typeof j=="string"?this._config[j]:this._config},T.prototype.defineDriver=function(j,te,ae){var Z=new d(function(xe,ye){try{var pe=j._driver,Ce=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!j._driver){ye(Ce);return}for(var we=en.concat("_initStorage"),ke=0,tt=we.length;ke<tt;ke++){var bt=we[ke],Ct=!rt(ln,bt);if((Ct||j[bt])&&typeof j[bt]!="function"){ye(Ce);return}}var jt=function(){for(var gn=function(wo){return function(){var Hr=new Error("Method "+wo+" is not implemented by the current driver"),Rr=d.reject(Hr);return f(Rr,arguments[arguments.length-1]),Rr}},pn=0,ti=ln.length;pn<ti;pn++){var Wn=ln[pn];j[Wn]||(j[Wn]=gn(Wn))}};jt();var zt=function(gn){De[pe]&&console.info("Redefining LocalForage driver: "+pe),De[pe]=j,ft[pe]=gn,xe()};"_support"in j?j._support&&typeof j._support=="function"?j._support().then(zt,ye):zt(!!j._support):zt(!0)}catch(nn){ye(nn)}});return p(Z,te,ae),Z},T.prototype.driver=function(){return this._driver||null},T.prototype.getDriver=function(j,te,ae){var Z=De[j]?d.resolve(De[j]):d.reject(new Error("Driver not found."));return p(Z,te,ae),Z},T.prototype.getSerializer=function(j){var te=d.resolve(Ze);return p(te,j),te},T.prototype.ready=function(j){var te=this,ae=te._driverSet.then(function(){return te._ready===null&&(te._ready=te._initDriver()),te._ready});return p(ae,j,j),ae},T.prototype.setDriver=function(j,te,ae){var Z=this;Xe(j)||(j=[j]);var xe=this._getSupportedDrivers(j);function ye(){Z._config.driver=Z.driver()}function pe(ke){return Z._extend(ke),ye(),Z._ready=Z._initStorage(Z._config),Z._ready}function Ce(ke){return function(){var tt=0;function bt(){for(;tt<ke.length;){var Ct=ke[tt];return tt++,Z._dbInfo=null,Z._ready=null,Z.getDriver(Ct).then(pe).catch(bt)}ye();var jt=new Error("No available storage method found.");return Z._driverSet=d.reject(jt),Z._driverSet}return bt()}}var we=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=we.then(function(){var ke=xe[0];return Z._dbInfo=null,Z._ready=null,Z.getDriver(ke).then(function(tt){Z._driver=tt._driver,ye(),Z._wrapLibraryMethodsWithReady(),Z._initDriver=Ce(xe)})}).catch(function(){ye();var ke=new Error("No available storage method found.");return Z._driverSet=d.reject(ke),Z._driverSet}),p(this._driverSet,te,ae),this._driverSet},T.prototype.supports=function(j){return!!ft[j]},T.prototype._extend=function(j){tn(this,j)},T.prototype._getSupportedDrivers=function(j){for(var te=[],ae=0,Z=j.length;ae<Z;ae++){var xe=j[ae];this.supports(xe)&&te.push(xe)}return te},T.prototype._wrapLibraryMethodsWithReady=function(){for(var j=0,te=en.length;j<te;j++)cn(this,en[j])},T.prototype.createInstance=function(j){return new T(j)},T}(),Rn=new En;r.exports=Rn},{3:3}]},{},[4])(4)})}(Ou)),Ou.exports}mE();function gE(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vE(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){gE(t,o,n[o])})}return t}function bE(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n}function yE(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):bE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function CE(t,e){if(t==null)return{};var n=SE(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function SE(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}N.createContext(void 0);function xE(t){var e=t.full,n=e===void 0?!1:e,r=t.block,o=r===void 0?!1:r,i=t.className,a=i===void 0?"":i,s=t.message,l=s===void 0?"Loading":s,c=CE(t,["full","block","className","message"]);function u(){return Eo.jsxs("div",yE(vE({className:No.container},c),{children:[Eo.jsx("div",{className:No.ring}),Eo.jsx("div",{className:No.ring}),Eo.jsx("div",{className:No.ring}),Eo.jsx("div",{className:No.ring}),l&&Eo.jsx("div",{className:No.message,children:l})]}))}return n?Eo.jsx("div",{className:re(No.fullscreen,a),children:u()}):o?Eo.jsx("div",{className:re(No.block,a),children:u()}):u()}N.createContext(void 0);function zn(t){this.content=t}zn.prototype={constructor:zn,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 zn(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 zn(n)},addToStart:function(t,e){return new zn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new zn(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 zn(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=zn.from(t),t.size?new zn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=zn.from(t),t.size?new zn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=zn.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}};zn.from=function(t){if(t instanceof zn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new zn(e)};function R0(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=R0(o.content,i.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function I0(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=I0(a.content,s.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class Re{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 Re(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 Re(r,o)}cutByIndex(e,n){return e==n?Re.empty:e==0&&n==this.content.length?this:new Re(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 Re(o,i)}addToStart(e){return new Re([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Re(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 R0(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return I0(this,e,n,r)}findIndex(e,n=-1){if(e==0)return rl(0,e);if(e==this.size)return rl(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?rl(r+1,a):rl(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 Re.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Re(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Re.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 Re(n||e,r)}static from(e){if(!e)return Re.empty;if(e instanceof Re)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Re([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Re.empty=new Re([],0);const $u={index:0,offset:0};function rl(t,e){return $u.index=t,$u.offset=e,$u}function Gl(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(!Gl(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Gl(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let rn=class _d{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&&Gl(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 _d.none;if(e instanceof _d)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};rn.none=[];class Xl extends Error{}class Ge{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=P0(this.content,e+this.openStart,n);return r&&new Ge(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ge(T0(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 Ge.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 Ge(Re.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 Ge(e,r,o)}}Ge.empty=new Ge(Re.empty,0,0);function T0(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(T0(i.content,e-o-1,n-o-1)))}function P0(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=P0(a.content,e-i-1,n);return s&&t.replaceChild(o,a.copy(s))}function wE(t,e,n){if(n.openStart>t.depth)throw new Xl("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Xl("Inconsistent open depths");return A0(t,e,n,0)}function A0(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=A0(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 pi(a,s.cut(0,t.parentOffset).append(n.content).append(s.cut(e.parentOffset)))}else{let{start:a,end:s}=EE(n,t);return pi(i,D0(t,a,s,e,r))}else return pi(i,Yl(t,e,r))}function k0(t,e){if(!e.type.compatibleContent(t.type))throw new Xl("Cannot join "+e.type.name+" onto "+t.type.name)}function Bd(t,e,n){let r=t.node(n);return k0(r,e.node(n)),r}function hi(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 Xa(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&&(hi(t.nodeAfter,r),i++));for(let s=i;s<a;s++)hi(o.child(s),r);e&&e.depth==n&&e.textOffset&&hi(e.nodeBefore,r)}function pi(t,e){return t.type.checkContent(e),t.copy(e)}function D0(t,e,n,r,o){let i=t.depth>o&&Bd(t,e,o+1),a=r.depth>o&&Bd(n,r,o+1),s=[];return Xa(null,t,o,s),i&&a&&e.index(o)==n.index(o)?(k0(i,a),hi(pi(i,D0(t,e,n,r,o+1)),s)):(i&&hi(pi(i,Yl(t,e,o+1)),s),Xa(e,n,o,s),a&&hi(pi(a,Yl(n,r,o+1)),s)),Xa(r,null,o,s),new Re(s)}function Yl(t,e,n){let r=[];if(Xa(null,t,n,r),t.depth>n){let o=Bd(t,e,n+1);hi(pi(o,Yl(t,e,n+1)),r)}return Xa(e,null,n,r),new Re(r)}function EE(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(Re.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class rs{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 rn.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 Jl(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 rs(n,r,i)}static resolveCached(e,n){let r=dm.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 dm.set(e,r=new NE);let o=r.elts[r.i]=rs.resolve(e,n);return r.i=(r.i+1)%OE,o}}class NE{constructor(){this.elts=[],this.i=0}}const OE=12,dm=new WeakMap;class Jl{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 $E=Object.create(null);let zo=class jd{constructor(e,n,r,o=rn.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||Re.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&&Gl(this.attrs,n||e.defaultAttrs||$E)&&rn.sameSet(this.marks,r||rn.none)}copy(e=null){return e==this.content?this:new jd(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new jd(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 Ge.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 Ge(c,o.depth-a,i.depth-a)}replace(e,n,r){return wE(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 rs.resolveCached(this,e)}resolveNoCache(e){return rs.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()+")"),_0(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=Re.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=rn.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(!rn.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=Re.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};zo.prototype.text=void 0;class Ql extends zo{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):_0(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 Ql(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ql(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 _0(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Si{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new ME(e,n);if(r.next==null)return Si.empty;let o=B0(r);r.next&&r.err("Unexpected trailing text");let i=DE(kE(o));return _E(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 Re.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(`
|
|
71
|
-
`)}}Si.empty=new Si(!0);class ME{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 B0(t){let e=[];do e.push(RE(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function RE(t){let e=[];do e.push(IE(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function IE(t){let e=AE(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=TE(t,e);else break;return e}function fm(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function TE(t,e){let n=fm(t),r=n;return t.eat(",")&&(t.next!="}"?r=fm(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function PE(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 AE(t){if(t.eat("(")){let e=B0(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=PE(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 kE(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 j0(t,e){return e-t}function hm(t,e){let n=[];return r(e),n.sort(j0);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 DE(t){let e=Object.create(null);return n(hm(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]);hm(t,l).forEach(u=>{c||o.push([s,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Si(r.indexOf(t.length-1)>-1);for(let a=0;a<o.length;a++){let s=o[a][1].sort(j0);i.next.push({type:o[a][0],next:e[s.join(",")]||n(s)})}return i}}function _E(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 z0(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 L0(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 V0(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 F0(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new jE(t,r,e[r]);return n}let pm=class H0{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=F0(e,r.attrs),this.defaultAttrs=z0(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==Si.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:L0(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new zo(this,this.computeAttrs(e),Re.from(n),rn.setFrom(r))}createChecked(e=null,n,r){return n=Re.from(n),this.checkContent(n),new zo(this,this.computeAttrs(e),n,rn.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Re.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(Re.empty,!0);return i?new zo(this,e,n.append(i),rn.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){V0(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:rn.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,a)=>r[i]=new H0(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 BE(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 jE{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?BE(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Mc{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=F0(e,o.attrs),this.excluded=null;let i=z0(this.attrs);this.instance=i?new rn(this,i):null}create(e=null){return!e&&this.instance?this.instance:new rn(this,L0(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,a)=>r[i]=new Mc(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){V0(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let W0=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=zn.from(e.nodes),n.marks=zn.from(e.marks||{}),this.nodes=pm.compile(this.spec.nodes,this),this.marks=Mc.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]=Si.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?mm(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==""?[]:mm(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 pm){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 Ql(r,r.defaultAttrs,e,rn.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return zo.fromJSON(this,e)}markFromJSON(e){return rn.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function mm(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 zE(t){return t.tag!=null}function LE(t){return t.style!=null}class Lo{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(zE(o))this.tags.push(o);else if(LE(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 vm(this,n,!1);return r.addAll(e,rn.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new vm(this,n,!0);return r.addAll(e,rn.none,n.from,n.to),Ge.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(HE(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=bm(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=bm(a)),a.node||a.ignore||a.mark||(a.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Lo(e,Lo.schemaRules(e)))}}const q0={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},VE={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},K0={ol:!0,ul:!0},is=1,zd=2,Ol=4;function gm(t,e,n){return e!=null?(e?is:0)|(e==="full"?zd:0):t&&t.whitespace=="pre"?is|zd:n&-5}class ol{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=rn.none,this.match=i||(a&Ol?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Re.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&is)){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=Re.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Re.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&&!q0.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class vm{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=gm(null,n.preserveWhitespace,0)|(r?Ol:0);o?i=new ol(o.type,o.attrs,rn.none,!0,n.topMatch||o.type.contentMatch,a):r?i=new ol(null,null,rn.none,!0,null,a):i=new ol(e.schema.topNodeType,null,rn.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&zd?"full":this.localPreserveWS||(o.options&is)>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,`
|
|
72
|
-
`);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),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;K0.hasOwnProperty(a)&&this.parser.normalizeLists&&FE(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:VE.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(q0.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(`
|
|
73
|
-
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}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)||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));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){let r,o;for(let i=this.open;i>=0;i--){let a=this.nodes[i],s=a.findWrapping(e);if(s&&(!r||r.length>s.length)&&(r=s,o=a,!s.length)||a.solid)break}if(!r)return null;this.sync(o);for(let i=0;i<r.length;i++)n=this.enterInner(r[i],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(e,n);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let i=rn.none;for(let a of r.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):ym(a.type,e.type))&&(i=a.addToSet(i));return o.content.push(e.mark(i)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r);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=gm(e,i,a.options);a.options&Ol&&a.content.length==0&&(s|=Ol);let l=rn.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):ym(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new ol(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|=is)}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 FE(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&K0.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function HE(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function bm(t){let e={};for(let n in t)e[n]=t[n];return e}function ym(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 Ii{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Mu(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}=$l(Mu(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&&$l(Mu(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return $l(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ii(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Cm(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Cm(e.marks)}}function Cm(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Mu(t){return t.document||window.document}const Sm=new WeakMap;function WE(t){let e=Sm.get(t);return e===void 0&&Sm.set(t,e=qE(t)),e}function qE(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 $l(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=WE(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}=$l(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 U0=65535,G0=Math.pow(2,16);function KE(t,e){return t+e*G0}function xm(t){return t&U0}function UE(t){return(t-(t&U0))/G0}const X0=1,Y0=2,Ml=4,J0=8;class Ld{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&J0)>0}get deletedBefore(){return(this.delInfo&(X0|Ml))>0}get deletedAfter(){return(this.delInfo&(Y0|Ml))>0}get deletedAcross(){return(this.delInfo&Ml)>0}}class dr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&dr.empty)return dr.empty}recover(e){let n=0,r=xm(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+UE(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:KE(s/3,e-l),v=e==l?Y0:e==d?X0:Ml;return(n<0?e!=l:e!=d)&&(v|=J0),new Ld(p,v,m)}o+=u-c}return r?e+o:new Ld(e+o,0,null)}touches(e,n){let r=0,o=xm(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 dr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?dr.empty:new dr(e<0?[0,-e,0]:[0,0,e])}}dr.empty=new dr([]);class as{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 as(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 as;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 Ld(e,o,null)}}const Ru=Object.create(null);class Jn{getMap(){return dr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ru[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 Ru)throw new RangeError("Duplicate use of step JSON ID "+e);return Ru[e]=n,n.prototype.jsonID=e,n}}class $n{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new $n(e,null)}static fail(e){return new $n(null,e)}static fromReplace(e,n,r,o){try{return $n.ok(e.replace(n,r,o))}catch(i){if(i instanceof Xl)return $n.fail(i.message);throw i}}}function Eh(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(Eh(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return Re.fromArray(r)}class ko extends Jn{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 Ge(Eh(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 $n.fromReplace(e,this.from,this.to,i)}invert(){return new Ur(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 ko(n.pos,r.pos,this.mark)}merge(e){return e instanceof ko&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ko(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 ko(n.from,n.to,e.markFromJSON(n.mark))}}Jn.jsonID("addMark",ko);class Ur extends Jn{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 Ge(Eh(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return $n.fromReplace(e,this.from,this.to,r)}invert(){return new ko(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 Ur(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ur&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ur(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 Ur(n.from,n.to,e.markFromJSON(n.mark))}}Jn.jsonID("removeMark",Ur);class Do extends Jn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return $n.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return $n.fromReplace(e,this.pos,this.pos+1,new Ge(Re.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 Do(this.pos,n.marks[o]);return new Do(this.pos,this.mark)}}return new sa(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Do(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 Do(n.pos,e.markFromJSON(n.mark))}}Jn.jsonID("addNodeMark",Do);class sa extends Jn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return $n.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return $n.fromReplace(e,this.pos,this.pos+1,new Ge(Re.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Do(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new sa(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 sa(n.pos,e.markFromJSON(n.mark))}}Jn.jsonID("removeNodeMark",sa);class Dn extends Jn{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Vd(e,this.from,this.to)?$n.fail("Structure replace would overwrite content"):$n.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new dr([this.from,this.to-this.from,this.slice.size])}invert(e){return new Dn(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 Dn(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Dn)||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?Ge.empty:new Ge(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Dn(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?Ge.empty:new Ge(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Dn(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 Dn(n.from,n.to,Ge.fromJSON(e,n.slice),!!n.structure)}}Jn.jsonID("replace",Dn);class _n extends Jn{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&&(Vd(e,this.from,this.gapFrom)||Vd(e,this.gapTo,this.to)))return $n.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return $n.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?$n.fromReplace(e,this.from,this.to,r):$n.fail("Content does not fit in gap")}getMap(){return new dr([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,Ge.fromJSON(e,n.slice),n.insert,!!n.structure)}}Jn.jsonID("replaceAround",_n);function Vd(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 GE(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 v=0;v<d.length;v++)d[v].isInSet(m)||(a&&a.to==f&&a.mark.eq(d[v])?a.to=p:o.push(a=new Ur(f,p,d[v])));s&&s.to==f?s.to=p:i.push(s=new ko(f,p,r))}}),o.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function XE(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 Mc){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 Ur(a.from,a.to,a.style)))}function Nh(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 Dn(s,u,Ge.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new Ur(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 Ge(Re.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new Dn(s+f.index,s+f.index+f[0].length,m))}}s=u}if(!r.validEnd){let l=r.fillBefore(Re.empty,!0);t.replace(s,s,new Ge(l,0,0))}for(let l=a.length-1;l>=0;l--)t.step(a[l])}function YE(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function wa(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||!YE(o,i,a))break}return null}function JE(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=Re.empty,d=0;for(let m=i,v=!1;m>n;m--)v||r.index(m)>0?(v=!0,u=Re.from(r.node(m).copy(u)),d++):l--;let f=Re.empty,p=0;for(let m=i,v=!1;m>n;m--)v||o.after(m+1)<o.end(m)?(v=!0,f=Re.from(o.node(m).copy(f)),p++):c++;t.step(new _n(l,c,a,s,new Ge(u.append(f),d,p),u.size-d,!0))}function Oh(t,e,n=null,r=t){let o=QE(t,e),i=o&&ZE(r,e);return i?o.map(wm).concat({type:e,attrs:n}).concat(i.map(wm)):null}function wm(t){return{type:t,attrs:null}}function QE(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 ZE(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 eN(t,e,n){let r=Re.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=Re.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 Ge(r,0,0),n.length,!0))}function tN(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)&&nN(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&&Z0(t,a,s,i),Nh(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 Ge(Re.from(r.create(l,null,a.marks)),0,0),1,!0)),c===!0&&Q0(t,a,s,i),!1}})}function Q0(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 Z0(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(`
|
|
74
|
-
`))}})}function nN(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function rN(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 Ge(Re.from(a),0,0),1,!0))}function po(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 v=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!v.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 oN(t,e,n=1,r){let o=t.doc.resolve(e),i=Re.empty,a=Re.empty;for(let s=o.depth,l=o.depth-n,c=n-1;s>l;s--,c--){i=Re.from(o.node(s).copy(i));let u=r&&r[c];a=Re.from(u?u.type.create(u.attrs,a):o.node(s).copy(a))}t.step(new Dn(e,e,new Ge(i.append(a),n,n),!0))}function Xo(t,e){let n=t.resolve(e),r=n.index();return ey(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function iN(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 ey(t,e){return!!(t&&e&&!t.isLeaf&&iN(t,e))}function Rc(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&&ey(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 aN(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);Z0(t,u.node(),u.before(),s)}a.inlineContent&&Nh(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 Dn(c,l.map(e+n,-1),Ge.empty,!0)),r===!0){let u=t.doc.resolve(c);Q0(t,u.node(),u.before(),t.steps.length)}return t}function sN(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 ty(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 Ic(t,e,n=e,r=Ge.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return ny(o,i,r)?new Dn(e,n,r):new lN(o,i,r).fit()}function ny(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class lN{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Re.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=Re.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 Ge(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 Dn(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=Iu(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(Re.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=Iu(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Ge(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=Iu(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new Ge(Fa(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Ge(Fa(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 v=0;v<i.length;v++)this.openFrontierNode(i[v]);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 v=0;v<o.childCount;v++)u.push(o.child(v));d=d.matchFragment(o)}let p=s.size+e-(a.content.size-a.openEnd);for(;c<s.childCount;){let v=s.child(c),g=d.matchType(v.type);if(!g)break;c++,(c>1||l==0||v.content.size)&&(d=g,u.push(ry(v.mark(f.allowedMarks(v.marks)),c==1?l:0,c==s.childCount?p:-1)))}let m=c==s.childCount;m||(p=-1),this.placed=Ha(this.placed,n,Re.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 v=0,g=s;v<p;v++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=m?e==0?Ge.empty:new Ge(Fa(a.content,e-1,1),e-1,p<0?a.openEnd:e-1):new Ge(Fa(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||!Tu(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=Tu(e,n,o,r,i);if(a){for(let s=n-1;s>=0;s--){let{match:l,type:c}=this.frontier[s],u=Tu(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=Ha(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=Ha(this.placed,this.depth,Re.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Re.empty,!0);n.childCount&&(this.placed=Ha(this.placed,this.frontier.length,n))}}function Fa(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Fa(t.firstChild.content,e-1,n)))}function Ha(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Ha(t.lastChild.content,e-1,n)))}function Iu(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function ry(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,ry(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(Re.empty,!0)))),t.copy(r)}function Tu(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&&!cN(n,i.content,a)?s:null}function cN(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function uN(t){return t.spec.defining||t.spec.definingForContent}function dN(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(ny(o,i,r))return t.step(new Dn(e,n,r));let a=iy(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=uN(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 v=0;v<a.length;v++){let g=a[(v+l)%a.length],y=!0;g<0&&(y=!1,g=-g);let b=o.node(g-1),C=o.index(g-1);if(b.canReplaceWith(C,C,m.type,m.marks))return t.replace(o.before(g),y?i.after(g):n,new Ge(oy(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 oy(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(oy(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(Re.empty,!0))}return t}function fN(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=sN(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Ge(Re.from(r),0,0))}function hN(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=iy(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 iy(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 ta extends Jn{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 $n.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 $n.fromReplace(e,this.pos,this.pos+1,new Ge(Re.from(o),0,n.isLeaf?0:1))}getMap(){return dr.empty}invert(e){return new ta(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 ta(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 ta(n.pos,n.attr,n.value)}}Jn.jsonID("attr",ta);class ss extends Jn{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 $n.ok(r)}getMap(){return dr.empty}invert(e){return new ss(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 ss(n.attr,n.value)}}Jn.jsonID("docAttr",ss);let la=class extends Error{};la=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};la.prototype=Object.create(Error.prototype);la.prototype.constructor=la;la.prototype.name="TransformError";let ay=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new as}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new la(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=Ge.empty){let o=Ic(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Ge(Re.from(r),0,0))}delete(e,n){return this.replace(e,n,Ge.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return dN(this,e,n,r),this}replaceRangeWith(e,n,r){return fN(this,e,n,r),this}deleteRange(e,n){return hN(this,e,n),this}lift(e,n){return JE(this,e,n),this}join(e,n=1){return aN(this,e,n),this}wrap(e,n){return eN(this,e,n),this}setBlockType(e,n=e,r,o=null){return tN(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return rN(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new ta(e,n,r)),this}setDocAttribute(e,n){return this.step(new ss(e,n)),this}addNodeMark(e,n){return this.step(new Do(e,n)),this}removeNodeMark(e,n){if(!(n instanceof rn)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new sa(e,n)),this}split(e,n=1,r){return oN(this,e,n,r),this}addMark(e,n,r){return GE(this,e,n,r),this}removeMark(e,n,r){return XE(this,e,n,r),this}clearIncompatible(e,n,r){return Nh(this,e,n,r),this}};const Pu=Object.create(null);class vt{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new sy(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=Ge.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?Ge.empty:n),s==0&&Om(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),Om(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new gt(e):Gi(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?Gi(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Gi(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 mr(e.node(0))}static atStart(e){return Gi(e,e,0,0,1)||new mr(e)}static atEnd(e){return Gi(e,e,e.content.size,e.childCount,-1)||new mr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Pu[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 Pu)throw new RangeError("Duplicate use of selection JSON ID "+e);return Pu[e]=n,n.prototype.jsonID=e,n}getBookmark(){return gt.between(this.$anchor,this.$head).getBookmark()}}vt.prototype.visible=!0;class sy{constructor(e,n){this.$from=e,this.$to=n}}let Em=!1;function Nm(t){!Em&&!t.parent.inlineContent&&(Em=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class gt extends vt{constructor(e,n=e){Nm(e),Nm(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 vt.near(r);let o=e.resolve(n.map(this.anchor));return new gt(o.parent.inlineContent?o:r,r)}replace(e,n=Ge.empty){if(super.replace(e,n),n==Ge.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof gt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Tc(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 gt(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=vt.findFrom(n,r,!0)||vt.findFrom(n,-r,!0);if(i)n=i.$head;else return vt.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(vt.findFrom(e,-r,!0)||vt.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new gt(e,n)}}vt.jsonID("text",gt);class Tc{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Tc(e.map(this.anchor),e.map(this.head))}resolve(e){return gt.between(e.resolve(this.anchor),e.resolve(this.head))}}class mt extends vt{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?vt.near(i):new mt(i)}content(){return new Ge(Re.from(this.node),0,0)}eq(e){return e instanceof mt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new $h(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new mt(e.resolve(n.anchor))}static create(e,n){return new mt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}mt.prototype.visible=!1;vt.jsonID("node",mt);class $h{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Tc(r,r):new $h(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&mt.isSelectable(r)?new mt(n):vt.near(n)}}class mr extends vt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Ge.empty){if(n==Ge.empty){e.delete(0,e.doc.content.size);let r=vt.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new mr(e)}map(e){return new mr(e)}eq(e){return e instanceof mr}getBookmark(){return pN}}vt.jsonID("all",mr);const pN={map(){return this},resolve(t){return new mr(t)}};function Gi(t,e,n,r,o,i=!1){if(e.inlineContent)return gt.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&&mt.isSelectable(s))return mt.create(t,n-(o<0?s.nodeSize:0))}else{let l=Gi(t,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}return null}function Om(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof Dn||o instanceof _n))return;let i=t.mapping.maps[r],a;i.forEach((s,l,c,u)=>{a==null&&(a=u)}),t.setSelection(vt.near(t.doc.resolve(a),n))}const $m=1,Mm=2,Rm=4;class mN extends ay{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|$m)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&$m)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Mm,this}ensureMarks(e){return rn.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&Mm)>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)||rn.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(vt.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|=Rm,this}get scrolledIntoView(){return(this.updated&Rm)>0}}function Im(t,e){return!e||!t?t:t.bind(e)}class Wa{constructor(e,n,r){this.name=e,this.init=Im(n.init,r),this.apply=Im(n.apply,r)}}const gN=[new Wa("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Wa("selection",{init(t,e){return t.selection||vt.atStart(e.doc)},apply(t){return t.selection}}),new Wa("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Wa("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Au{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=gN.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 Wa(r.key,r.spec.state,r))})}}class Yi{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 Yi(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 mN(this)}static create(e){let n=new Au(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Yi(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 Au(this.schema,e.plugins),r=n.fields,o=new Yi(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 Au(e.schema,e.plugins),i=new Yi(o);return o.fields.forEach(a=>{if(a.name=="doc")i.doc=zo.fromJSON(e.schema,n.doc);else if(a.name=="selection")i.selection=vt.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 ly(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=ly(o,e,{})),n[r]=o}return n}class Qn{constructor(e){this.spec=e,this.props={},e.props&&ly(e.props,this,this.props),this.key=e.key?e.key.key:cy("plugin")}getState(e){return e[this.key]}}const ku=Object.create(null);function cy(t){return t in ku?t+"$"+ ++ku[t]:(ku[t]=0,t+"$")}class vr{constructor(e="key"){this.key=cy(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ln=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},ca=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Fd=null;const lo=function(t,e,n){let r=Fd||(Fd=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},vN=function(){Fd=null},xi=function(t,e,n,r){return n&&(Tm(t,e,n,r,-1)||Tm(t,e,n,r,1))},bN=/^(img|br|input|textarea|hr)$/i;function Tm(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:wr(t))){let i=t.parentNode;if(!i||i.nodeType!=1||Os(t)||bN.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ln(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?wr(t):0}else return!1}}function wr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function yN(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=wr(t)}else if(t.parentNode&&!Os(t))e=Ln(t),t=t.parentNode;else return null}}function CN(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&&!Os(t))e=Ln(t)+1,t=t.parentNode;else return null}}function SN(t,e,n){for(let r=e==0,o=e==wr(t);r||o;){if(t==n)return!0;let i=Ln(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==wr(t)}}function Os(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 Pc=function(t){return t.focusNode&&xi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ri(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function xN(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function wN(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(wr(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(wr(r.startContainer),r.startOffset)}}}const Yr=typeof navigator<"u"?navigator:null,Pm=typeof document<"u"?document:null,Yo=Yr&&Yr.userAgent||"",Hd=/Edge\/(\d+)/.exec(Yo),uy=/MSIE \d/.exec(Yo),Wd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Yo),or=!!(uy||Wd||Hd),Vo=uy?document.documentMode:Wd?+Wd[1]:Hd?+Hd[1]:0,Br=!or&&/gecko\/(\d+)/i.test(Yo);Br&&+(/Firefox\/(\d+)/.exec(Yo)||[0,0])[1];const qd=!or&&/Chrome\/(\d+)/.exec(Yo),Un=!!qd,dy=qd?+qd[1]:0,er=!or&&!!Yr&&/Apple Computer/.test(Yr.vendor),ua=er&&(/Mobile\/\w+/.test(Yo)||!!Yr&&Yr.maxTouchPoints>2),xr=ua||(Yr?/Mac/.test(Yr.platform):!1),EN=Yr?/Win/.test(Yr.platform):!1,uo=/Android \d/.test(Yo),$s=!!Pm&&"webkitFontSmoothing"in Pm.documentElement.style,NN=$s?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function ON(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 io(t,e){return typeof t=="number"?t:t[e]}function $N(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 Am(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=ca(a);continue}let s=a,l=s==i.body,c=l?ON(i):$N(s),u=0,d=0;if(e.top<c.top+io(r,"top")?d=-(c.top-e.top+io(o,"top")):e.bottom>c.bottom-io(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+io(o,"top")-c.top:e.bottom-c.bottom+io(o,"bottom")),e.left<c.left+io(r,"left")?u=-(c.left-e.left+io(o,"left")):e.right>c.right-io(r,"right")&&(u=e.right-c.right+io(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 v=s.scrollLeft-p,g=s.scrollTop-m;e={left:e.left-v,top:e.top-g,right:e.right-v,bottom:e.bottom-g}}let f=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(f))break;a=f=="absolute"?a.offsetParent:ca(a)}}function MN(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:fy(t.dom)}}function fy(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=ca(r));return e}function RN({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;hy(n,r==0?0:r-e)}function hy(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 Bi=null;function IN(t){if(t.setActive)return t.setActive();if(Bi)return t.focus(Bi);let e=fy(t);t.focus(Bi==null?{get preventScroll(){return Bi={preventScroll:!0},!0}}:void 0),Bi||(Bi=!1,hy(e,0))}function py(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=lo(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 v=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(v<r){n=u,r=v,o=v&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,u.nodeType==1&&v&&(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?TN(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:py(n,o)}function TN(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=$o(r,1);if(i.top!=i.bottom&&Mh(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function Mh(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function PN(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function AN(t,e,n){let{node:r,offset:o}=py(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 kN(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 my(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(Mh(e,c))return my(a,e,c)}}if((i=(i+1)%r)==o)break}return t}function DN(t,e){let n=t.dom.ownerDocument,r,o=0,i=wN(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(!Mh(e,c)||(a=my(t.dom,e,c),!a))return null}if(er)for(let c=a;r&&c;c=ca(c))c.draggable&&(r=void 0);if(a=PN(a,e),r){if(Br&&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;$s&&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=kN(t,r,o,e))}s==null&&(s=AN(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function km(t){return t.top<t.bottom||t.left<t.right}function $o(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(km(r))return r}return Array.prototype.find.call(n,km)||t.getBoundingClientRect()}const _N=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function gy(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),a=$s||Br;if(r.nodeType==3)if(a&&(_N.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=$o(lo(r,o,o),n);if(Br&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=$o(lo(r,o-1,o-1),-1);if(c.top==l.top){let u=$o(lo(r,o,o+1),-1);if(u.top!=l.top)return ka(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++,ka($o(lo(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==wr(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Du(l.getBoundingClientRect(),!1)}if(i==null&&o<wr(r)){let l=r.childNodes[o];if(l.nodeType==1)return Du(l.getBoundingClientRect(),!0)}return Du(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==wr(r))){let l=r.childNodes[o-1],c=l.nodeType==3?lo(l,wr(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return ka($o(c,1),!1)}if(i==null&&o<wr(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?lo(l,0,a?0:1):l.nodeType==1?l:null:null;if(c)return ka($o(c,-1),!0)}return ka($o(r.nodeType==3?lo(r):r,-n),n>=0)}function ka(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 Du(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 vy(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 BN(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return vy(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=gy(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=lo(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 jN=/[\u0590-\u08ac]/;function zN(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?!jN.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?i:a:vy(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:v}=t.domSelectionRange(),g=m&&!p.contains(m.nodeType==1?m:m.parentNode)||l==m&&c==v;try{s.collapse(u,d),l&&(l!=u||c!=d)&&s.extend&&s.extend(l,c)}catch{}return f!=null&&(s.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let Dm=null,_m=null,Bm=!1;function LN(t,e,n){return Dm==e&&_m==n?Bm:(Dm=e,_m=n,Bm=n=="up"||n=="down"?BN(t,e,n):zN(t,e,n))}const Er=0,jm=1,si=2,Jr=3;class Ms{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Er,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>Ln(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 yy){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 by&&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?Ln(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?Ln(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=Ln(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=Ln(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 v=this.children[p],g=m+v.size;if(i>m&&a<g)return v.setSelection(e-m-v.border,n-m-v.border,r,o);m=g}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((Br||er)&&e==n){let{node:p,offset:m}=s;if(p.nodeType==3){if(d=!!(m&&p.nodeValue[m-1]==`
|
|
75
|
-
`),d&&m==p.nodeValue.length)for(let v=p,g;v;v=v.parentNode){if(g=v.nextSibling){g.nodeName=="BR"&&(s=l={node:g.parentNode,offset:Ln(g)+1});break}let y=v.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let v=p.childNodes[m-1];d=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(Br&&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&&er)&&xi(s.node,s.offset,u.anchorNode,u.anchorOffset)&&xi(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?si:jm,e==s&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Jr:i.markDirty(e-s,n-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?si:Jr}r=a}this.dirty=si}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?si:jm;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class by extends Ms{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==Er&&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 VN extends Ms{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 wi extends Ms{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=Ii.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new wi(e,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&Jr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Jr&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Er){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Er}}slice(e,n,r){let o=wi.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=Ud(i,n,a,r)),e>0&&(i=Ud(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 Fo extends Ms{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}=Ii.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=xy(u,r,n),c?l=new FN(e,n,r,o,u,d||null,f,c,i,a+1):n.isText?new Ac(e,n,r,o,u,f,i):new Fo(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=()=>Re.empty)}return e}matchesNode(e,n,r){return this.dirty==Er&&e.eq(this.node)&&Zl(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 WN(this,a&&a.node,e);UN(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?rn.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==si)&&(a&&this.protectLocalComposition(e,a),Cy(this.contentDOM,this.children,e),ua&&GN(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof gt)||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=XN(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 VN(this,i,n,o);e.input.compositionNodes.push(a),this.children=Ud(this.children,r,r+o.length,e,a)}update(e,n,r,o){return this.dirty==Jr||!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=Er}updateOuterDeco(e){if(Zl(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Sy(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 zm(t,e,n,r,o){xy(r,e,t);let i=new Fo(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Ac extends Fo{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==Jr||this.dirty!=Er&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Er||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=Er,!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 Ac(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=Jr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class yy extends Ms{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Er&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class FN extends Fo{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==Jr)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 Cy(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=Lm(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(s,r);if(a instanceof wi){let l=r?r.previousSibling:t.lastChild;Cy(a.contentDOM,a.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=Lm(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const Ya=function(t){t&&(this.nodeName=t)};Ya.prototype=Object.create(null);const li=[new Ya];function Kd(t,e,n){if(t.length==0)return li;let r=n?li[0]:new Ya,o=[r];for(let i=0;i<t.length;i++){let a=t[i].type.attrs;if(a){a.nodeName&&o.push(r=new Ya(a.nodeName));for(let s in a){let l=a[s];l!=null&&(n&&o.length==1&&o.push(r=new Ya(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 Sy(t,e,n,r){if(n==li&&r==li)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=li[0]),o=l}HN(o,s||li[0],a)}return o}function HN(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 xy(t,e,n){return Sy(t,t,li,Kd(e,n,t.nodeType!=1))}function Zl(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 Lm(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class WN{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=qN(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=Er,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=wi.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==Jr&&a.dom==a.contentDOM&&(a.dirty=si),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 Fo){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!=Jr&&Zl(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=si,d.updateChildren(o,a+1),d.dirty=Er),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)||!Zl(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let s=Fo.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=Fo.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 by(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 wi;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Ac)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((er||Un)&&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 yy(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 qN(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 wi)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 KN(t,e){return t.type.side-e.type.side}function UN(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 g=o[a++];g.widget&&(u?(d||(d=[u])).push(g):u=g)}if(u)if(d){d.sort(KN);for(let g=0;g<d.length;g++)n(d[g],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 g=0;g<s.length;g++)s[g].to<=i&&s.splice(g--,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 g=m;a<o.length&&o[a].from<g&&(g=o[a].from);for(let y=0;y<s.length;y++)s[y].to<g&&(g=s[y].to);g<m&&(l=f.cut(g-i),f=f.cut(0,g-i),m=g,p=-1)}else for(;a<o.length&&o[a].to<m;)a++;let v=f.isInline&&!f.isLeaf?s.filter(g=>!g.inline):s.slice();r(f,v,e.forChild(i,f),p),i=m}}function GN(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 XN(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 Ud(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 Rh(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(Pc(n)){for(l=a;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&mt.isSelectable(d)&&o.parent&&!(d.isInline&&SN(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;c=new mt(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=Ih(t,u,s,d)}return c}function wy(t){return t.editable?t.hasFocus():Ny(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function mo(t,e=!1){let n=t.state.selection;if(Ey(t,n),!!wy(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Un){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&xi(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)JN(t);else{let{anchor:r,head:o}=n,i,a;Vm&&!(n instanceof gt)&&(n.$from.parent.inlineContent||(i=Fm(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=Fm(t,n.to))),t.docView.setSelection(r,o,t,e),Vm&&(i&&Hm(i),a&&Hm(a)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&YN(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Vm=er||Un&&dy<63;function Fm(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(er&&o&&o.contentEditable=="false")return _u(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return _u(o);if(i)return _u(i)}}function _u(t){return t.contentEditable="true",er&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Hm(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function YN(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(()=>{(!wy(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function JN(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,Ln(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&or&&Vo<=11&&(r.disabled=!0,r.disabled=!1)}function Ey(t,e){if(e instanceof mt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Wm(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Wm(t)}function Wm(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Ih(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||gt.between(e,n,r)}function qm(t){return t.editable&&!t.hasFocus()?!1:Ny(t)}function Ny(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 QN(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return xi(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Gd(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&&vt.findFrom(i,e)}function Ro(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Km(t,e,n){let r=t.state.selection;if(r instanceof gt)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 Ro(t,new gt(r.$anchor,a))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=Gd(t.state,e);return o&&o instanceof mt?Ro(t,o):!1}else if(!(xr&&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?mt.isSelectable(i)?Ro(t,new mt(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):$s?Ro(t,new gt(t.state.doc.resolve(e<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof mt&&r.node.isInline)return Ro(t,new gt(e>0?r.$to:r.$from));{let o=Gd(t.state,e);return o?Ro(t,o):!1}}}function ec(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ja(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ji(t,e){return e<0?ZN(t):eO(t)}function ZN(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,a=!1;for(Br&&n.nodeType==1&&r<ec(n)&&Ja(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(Ja(s,-1))o=n,i=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(Oy(n))break;{let s=n.previousSibling;for(;s&&Ja(s,-1);)o=n.parentNode,i=Ln(s),s=s.previousSibling;if(s)n=s,r=ec(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?Xd(t,n,r):o&&Xd(t,o,i)}function eO(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=ec(n),i,a;for(;;)if(r<o){if(n.nodeType!=1)break;let s=n.childNodes[r];if(Ja(s,1))i=n,a=++r;else break}else{if(Oy(n))break;{let s=n.nextSibling;for(;s&&Ja(s,1);)i=s.parentNode,a=Ln(s)+1,s=s.nextSibling;if(s)n=s,r=0,o=ec(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&Xd(t,i,a)}function Oy(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function tO(t,e){for(;t&&e==t.childNodes.length&&!Os(t);)e=Ln(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 nO(t,e){for(;t&&!e&&!Os(t);)e=Ln(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 Xd(t,e,n){if(e.nodeType!=3){let i,a;(a=tO(e,n))?(e=a,n=0):(i=nO(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Pc(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&&mo(t)},50)}function Um(t,e){let n=t.state.doc.resolve(e);if(!(Un||EN)&&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 Gm(t,e,n){let r=t.state.selection;if(r instanceof gt&&!r.empty||n.indexOf("s")>-1||xr&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=Gd(t.state,e);if(a&&a instanceof mt)return Ro(t,a)}if(!o.parent.inlineContent){let a=e<0?o:i,s=r instanceof mr?vt.near(a,e):vt.findFrom(a,e);return s?Ro(t,s):!1}return!1}function Xm(t,e){if(!(t.state.selection instanceof gt))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 Ym(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function rO(t){if(!er||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;Ym(t,r,"true"),setTimeout(()=>Ym(t,r,"false"),20)}return!1}function oO(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function iO(t,e){let n=e.keyCode,r=oO(e);if(n==8||xr&&n==72&&r=="c")return Xm(t,-1)||ji(t,-1);if(n==46&&!e.shiftKey||xr&&n==68&&r=="c")return Xm(t,1)||ji(t,1);if(n==13||n==27)return!0;if(n==37||xr&&n==66&&r=="c"){let o=n==37?Um(t,t.state.selection.from)=="ltr"?-1:1:-1;return Km(t,o,r)||ji(t,o)}else if(n==39||xr&&n==70&&r=="c"){let o=n==39?Um(t,t.state.selection.from)=="ltr"?1:-1:1;return Km(t,o,r)||ji(t,o)}else{if(n==38||xr&&n==80&&r=="c")return Gm(t,-1,r)||ji(t,-1);if(n==40||xr&&n==78&&r=="c")return rO(t)||Gm(t,1,r)||ji(t,1);if(r==(xr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Th(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")||Ii.fromSchema(t.state.schema),s=Py(),l=s.createElement("div");l.appendChild(a.serializeFragment(r,{document:s}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=Ty[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,`
|
|
76
|
-
|
|
77
|
-
`);return{dom:l,text:f,slice:e}}function $y(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 Ge(Re.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
78
|
-
`))),0,0):Ge.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=Ii.fromSchema(p);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(v=>{let g=a.appendChild(document.createElement("p"));v&&g.appendChild(m.serializeNode(p.text(v,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),a=cO(n),$s&&uO(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")||Lo.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!aO.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)s=dO(Jm(s,+u[1],+u[2]),u[4]);else if(s=Ge.maxOpen(sO(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=Jm(s,d,f)}return t.someProp("transformPasted",d=>{s=d(s,t)}),s}const aO=/^(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 sO(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&&Ry(l,i,s,a[a.length-1],0))a[a.length-1]=c;else{a.length&&(a[a.length-1]=Iy(a[a.length-1],i.length));let u=My(s,l);a.push(u),o=o.matchType(u.type),i=l}}),a)return Re.from(a)}return t}function My(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Re.from(t));return t}function Ry(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=Ry(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(Re.from(My(n,t,o+1))))}}function Iy(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Iy(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Re.empty,!0);return t.copy(n.append(r))}function Yd(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=Yd(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(Re.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(s))}function Jm(t,e,n){return e<t.openStart&&(t=new Ge(Yd(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Ge(Yd(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Ty={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 Qm=null;function Py(){return Qm||(Qm=document.implementation.createHTMLDocument("title"))}let Bu=null;function lO(t){let e=window.trustedTypes;return e?(Bu||(Bu=e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Bu.createHTML(t)):t}function cO(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Py().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Ty[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=lO(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function uO(t){let e=t.querySelectorAll(Un?"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 dO(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=Re.from(l.create(r[s+1],o)),i++,a++}return new Ge(o,i,a)}const tr={},nr={},fO={touchstart:!0,touchmove:!0};class hO{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},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 pO(t){for(let e in tr){let n=tr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{gO(t,r)&&!Ph(t,r)&&(t.editable||!(r.type in nr))&&n(t,r)},fO[e]?{passive:!0}:void 0)}er&&t.dom.addEventListener("input",()=>null),Jd(t)}function _o(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function mO(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 Jd(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Ph(t,r))})}function Ph(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function gO(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 vO(t,e){!Ph(t,e)&&tr[e.type]&&(t.editable||!(e.type in nr))&&tr[e.type](t,e)}nr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!ky(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(uo&&Un&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),ua&&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,ri(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||iO(t,n)?n.preventDefault():_o(t,"key")};nr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};nr.keypress=(t,e)=>{let n=e;if(ky(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||xr&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof gt)||!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 kc(t){return{left:t.clientX,top:t.clientY}}function bO(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Ah(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 na(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 yO(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&mt.isSelectable(r)?(na(t,new mt(n)),!0):!1}function CO(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof mt&&(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(mt.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?(na(t,mt.create(t.state.doc,o)),!0):!1}function SO(t,e,n,r,o){return Ah(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?CO(t,n):yO(t,n))}function xO(t,e,n,r){return Ah(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function wO(t,e,n,r){return Ah(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||EO(t,n,r)}function EO(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(na(t,gt.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)na(t,gt.create(r,s+1,s+1+a.content.size));else if(mt.isSelectable(a))na(t,mt.create(r,s));else continue;return!0}}function kh(t){return tc(t)}const Ay=xr?"metaKey":"ctrlKey";tr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=kh(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&bO(n,t.input.lastClick)&&!n[Ay]&&(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};let a=t.posAtCoords(kc(n));a&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new NO(t,a,n,!!r)):(i=="doubleClick"?xO:wO)(t,a.pos,a.inside,n)?n.preventDefault():_o(t,"pointer"))};class NO{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[Ay],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 mt&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Br&&!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)),_o(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(()=>mo(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(kc(e))),this.updateAllowDefault(e),this.allowDefault||!n?_o(this.view,"pointer"):SO(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||er&&this.mightDrag&&!this.mightDrag.node.isAtom||Un&&!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)?(na(this.view,vt.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):_o(this.view,"pointer")}move(e){this.updateAllowDefault(e),_o(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)}}tr.touchstart=t=>{t.input.lastTouch=Date.now(),kh(t),_o(t,"pointer")};tr.touchmove=t=>{t.input.lastTouch=Date.now(),_o(t,"pointer")};tr.contextmenu=t=>kh(t);function ky(t,e){return t.composing?!0:er&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const OO=uo?5e3:-1;nr.compositionstart=nr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof gt&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),tc(t,!0),t.markCursor=null;else if(tc(t,!e.selection.empty),Br&&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}Dy(t,OO)};nr.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++,Dy(t,20))};function Dy(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>tc(t),e))}function _y(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=MO());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function $O(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=yN(e.focusNode,e.focusOffset),r=CN(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 MO(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function tc(t,e=!1){if(!(uo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),_y(t),e||t.docView&&t.docView.dirty){let n=Rh(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function RO(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 ls=or&&Vo<15||ua&&NN<604;tr.copy=nr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=ls?null:n.clipboardData,a=r.content(),{dom:s,text:l}=Th(t,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):RO(t,s),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function IO(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function TO(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?cs(t,r.value,null,o,e):cs(t,r.textContent,r.innerHTML,o,e)},50)}function cs(t,e,n,r,o){let i=$y(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,i||Ge.empty)))return!0;if(!i)return!1;let a=IO(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 By(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," "):""}nr.paste=(t,e)=>{let n=e;if(t.composing&&!uo)return;let r=ls?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&cs(t,By(r),r.getData("text/html"),o,n)?n.preventDefault():TO(t,n)};class jy{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const zy=xr?"altKey":"ctrlKey";tr.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(kc(n)),a;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof mt?o.to-1:o.to))){if(r&&r.mightDrag)a=mt.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=mt.create(t.state.doc,d.posBefore))}}let s=(a||t.state.selection).content(),{dom:l,text:c,slice:u}=Th(t,s);(!n.dataTransfer.files.length||!Un||dy>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ls?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ls||n.dataTransfer.setData("text/plain",c),t.dragging=new jy(u,!n[zy],a)};tr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};nr.dragover=nr.dragenter=(t,e)=>e.preventDefault();nr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(kc(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=$y(t,By(n.dataTransfer),ls?null:n.dataTransfer.getData("text/html"),!1,i);let s=!!(r&&!n[zy]);if(t.someProp("handleDrop",m=>m(t,n,a||Ge.empty,s))){n.preventDefault();return}if(!a)return;n.preventDefault();let l=a?ty(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&&mt.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new mt(p));else{let m=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((v,g,y,b)=>m=b),c.setSelection(Ih(t,p,c.doc.resolve(m)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};tr.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())&&mo(t)},20))};tr.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)};tr.beforeinput=(t,e)=>{if(Un&&uo&&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,ri(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 nr)tr[t]=nr[t];function us(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 nc{constructor(e,n){this.toDOM=e,this.spec=n||mi,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 Zn(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof nc&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&us(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Ho{constructor(e,n){this.attrs=e,this.spec=n||mi}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 Zn(i,a,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Ho&&us(this.attrs,e.attrs)&&us(this.spec,e.spec)}static is(e){return e.type instanceof Ho}destroy(){}}class Dh{constructor(e,n){this.attrs=e,this.spec=n||mi}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 Zn(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 Dh&&us(this.attrs,e.attrs)&&us(this.spec,e.spec)}destroy(){}}class Zn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Zn(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 Zn(e,e,new nc(n,r))}static inline(e,n,r,o){return new Zn(e,n,new Ho(r,o))}static node(e,n,r,o){return new Zn(e,n,new Dh(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ho}get widget(){return this.type instanceof nc}}const Xi=[],mi={};class bn{constructor(e,n){this.local=e.length?e:Xi,this.children=n.length?n:Xi}static create(e,n){return n.length?rc(n,e,0,mi):qn}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==qn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||mi)}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?PO(this.children,a||[],e,n,r,o,i):a?new bn(a.sort(gi),Xi):qn}add(e,n){return n.length?this==qn?bn.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=Vy(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,rc(u,s,c+1,mi)),i+=3}});let a=Ly(i?Fy(n):n,-r);for(let s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new bn(a.length?this.local.concat(a).sort(gi):this.local,o||this.children)}remove(e){return e.length==0||this==qn?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!=qn?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 bn(o,r):qn}forChild(e,n){if(this==qn)return this;if(n.isLeaf)return bn.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 Ho){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 bn(o.sort(gi),Xi);return r?new To([s,r]):s}return r||qn}eq(e){if(this==e)return!0;if(!(e instanceof bn)||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 _h(this.localsInner(e))}localsInner(e){if(this==qn)return Xi;if(e.inlineContent||!this.local.some(Ho.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Ho||n.push(this.local[r]);return n}forEachSet(e){e(this)}}bn.empty=new bn([],[]);bn.removeOverlap=_h;const qn=bn.empty;class To{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,mi));return To.from(r)}forChild(e,n){if(n.isLeaf)return bn.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=qn&&(i instanceof To?r=r.concat(i.members):r.push(i))}return To.from(r)}eq(e){if(!(e instanceof To)||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?_h(r?n:n.sort(gi)):Xi}static from(e){switch(e.length){case 0:return qn;case 1:return e[0];default:return new To(e.every(n=>n instanceof bn)?e:e.reduce((n,r)=>n.concat(r instanceof bn?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function PO(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,v)=>{let g=v-m-(p-f);for(let y=0;y<s.length;y+=3){let b=s[y+1];if(b<0||f>b+u-d)continue;let C=s[y]+u-d;p>=C?s[y+1]=f<=C?-2:-1:f>=u&&g&&(s[y]+=g,s[y+1]+=g)}d+=g}),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:v}=r.content.findIndex(d),g=r.maybeChild(m);if(g&&v==d&&v+g.nodeSize==p){let y=s[c+2].mapInner(n,g,u+1,t[c]+i+1,a);y!=qn?(s[c]=d,s[c+1]=p,s[c+2]=y):(s[c+1]=-2,l=!0)}else l=!0}if(l){let c=AO(s,t,e,n,o,i,a),u=rc(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 bn(e.sort(gi),s)}function Ly(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 Zn(o.from+e,o.to+e,o.type))}return n}function AO(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 Vy(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 Fy(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function rc(t,e,n,r){let o=[],i=!1;e.forEach((s,l)=>{let c=Vy(t,s,l+n);if(c){i=!0;let u=rc(c,s,n+l+1,r);u!=qn&&o.push(l,l+s.nodeSize,u)}});let a=Ly(i?Fy(t):t,-n).sort(gi);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 bn(a,o):qn}function gi(t,e){return t.from-e.from||t.to-e.to}function _h(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),Zm(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),Zm(e,o,r.copy(i.from,r.to)));break}}}return e}function Zm(t,e,n){for(;e<t.length&&gi(n,t[e])>0;)e++;t.splice(e,0,n)}function ju(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=qn&&e.push(r)}),t.cursorWrapper&&e.push(bn.create(t.state.doc,[t.cursorWrapper.deco])),To.from(e)}const kO={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},DO=or&&Vo<=11;class _O{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 BO{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new _O,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]);or&&Vo<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),DO&&(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,kO)),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(qm(this.view)){if(this.suppressingSelectionUpdates)return mo(this.view);if(or&&Vo<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&xi(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=ca(i))n.add(i);for(let i=e.anchorNode;i;i=ca(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)&&qm(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(Br&&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||LO(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&&Pc(r)&&(c=Rh(e))&&c.eq(vt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,mo(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,a),jO(e)),this.handleDOMChange(i,a,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||mo(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(or&&Vo<=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?Ln(o)+1:0,s=r.localPosFromDOM(e.target,a,-1),l=i&&i.parentNode==e.target?Ln(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 eg=new WeakMap,tg=!1;function jO(t){if(!eg.has(t)&&(eg.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Br,tg)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."),tg=!0}}function ng(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return xi(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function zO(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return ng(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?ng(t,n):null}function LO(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 VO(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}],Pc(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Un&&t.input.lastKeyCode===8)for(let g=i;g>o;g--){let y=r.childNodes[g-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){i=g;break}if(!b||b.size)break}let d=t.state.doc,f=t.someProp("domParser")||Lo.fromSchema(t.state.schema),p=d.resolve(a),m=null,v=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:FO,context:p});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),m={anchor:g+a,head:y+a}}return{doc:v,sel:m,from:a,to:s}}function FO(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(er&&/^(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||er&&/^(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 HO=/^(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 WO(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let $=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,R=Rh(t,$);if(R&&!t.state.selection.eq(R)){if(Un&&uo&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",D=>D(t,ri(13,"Enter"))))return;let I=t.state.tr.setSelection(R);$=="pointer"?I.setMeta("pointer",!0):$=="key"&&I.scrollIntoView(),i&&I.setMeta("composition",i),t.dispatch(I)}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=VO(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=UO(d.content,c.doc.content,c.from,f,p);if(m&&t.input.domChangeCount++,(ua&&t.input.lastIOSEnter>Date.now()-225||uo)&&o.some($=>$.nodeType==1&&!HO.test($.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",$=>$(t,ri(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&l instanceof gt&&!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 $=rg(t,t.state.doc,c.sel);if($&&!$.eq(t.state.selection)){let R=t.state.tr.setSelection($);i&&R.setMeta("composition",i),t.dispatch(R)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof gt&&(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)),or&&Vo<=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 v=c.doc.resolveNoCache(m.start-c.from),g=c.doc.resolveNoCache(m.endB-c.from),y=u.resolve(m.start),b=v.sameParent(g)&&v.parent.inlineContent&&y.end()>=m.endA,C;if((ua&&t.input.lastIOSEnter>Date.now()-225&&(!b||o.some($=>$.nodeName=="DIV"||$.nodeName=="P"))||!b&&v.pos<c.doc.content.size&&!v.sameParent(g)&&(C=vt.findFrom(c.doc.resolve(v.pos+1),1,!0))&&C.head==g.pos)&&t.someProp("handleKeyDown",$=>$(t,ri(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&KO(u,m.start,m.endA,v,g)&&t.someProp("handleKeyDown",$=>$(t,ri(8,"Backspace")))){uo&&Un&&t.domObserver.suppressSelectionUpdates();return}Un&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),uo&&!b&&v.start()!=g.start()&&g.parentOffset==0&&v.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==m.endA&&(m.endB-=2,g=c.doc.resolveNoCache(m.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function($){return $(t,ri(13,"Enter"))})},20));let x=m.start,S=m.endA,w,E,M;if(b){if(v.pos==g.pos)or&&Vo<=11&&v.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>mo(t),20)),w=t.state.tr.delete(x,S),E=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(M=qO(v.parent.content.cut(v.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,m.endA-y.start()))))w=t.state.tr,M.type=="add"?w.addMark(x,S,M.mark):w.removeMark(x,S,M.mark);else if(v.parent.child(v.index()).isText&&v.index()==g.index()-(g.textOffset?0:1)){let $=v.parent.textBetween(v.parentOffset,g.parentOffset);if(t.someProp("handleTextInput",R=>R(t,x,S,$)))return;w=t.state.tr.insertText($,x,S)}}if(w||(w=t.state.tr.replace(x,S,c.doc.slice(m.start-c.from,m.endB-c.from))),c.sel){let $=rg(t,w.doc,c.sel);$&&!(Un&&t.composing&&$.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&($.head==x||$.head==w.mapping.map(S)-1)||or&&$.empty&&$.head==x)&&w.setSelection($)}E&&w.ensureMarks(E),i&&w.setMeta("composition",i),t.dispatch(w.scrollIntoView())}function rg(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Ih(t,e.resolve(n.anchor),e.resolve(n.head))}function qO(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(Re.from(c).eq(t))return{mark:s,type:a}}function KO(t,e,n,r,o){if(n-e<=o.pos-r.pos||zu(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(zu(i,!0,!0));return!a.parent.isTextblock||a.pos>n||zu(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function zu(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 UO(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&&og(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&&og(t.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}return{start:i,endA:a,endB:s}}function og(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 GO{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 hO,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(cg),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=sg(this),ag(this),this.nodeViews=lg(this),this.docView=zm(this.state.doc,ig(this),ju(this),this.dom,this),this.domObserver=new BO(this,(r,o,i,a)=>WO(this,r,o,i,a)),this.domObserver.start(),pO(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&&Jd(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(cg),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&&(_y(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=lg(this);YO(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&Jd(this),this.editable=sg(this),ag(this);let l=ju(this),c=ig(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&&MN(this);if(a){this.domObserver.stop();let p=d&&(or||Un)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&XO(o.selection,e.selection);if(d){let m=Un?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=$O(this)),(i||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=zm(e.doc,c,l,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&QN(this))?mo(this,p):(Ey(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&&RN(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 mt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Am(this,n.getBoundingClientRect(),e)}else Am(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 jy(e.slice,e.move,o<0?void 0:mt.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(or){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&&IN(this.dom),mo(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 DN(this,e)}coordsAtPos(e,n=1){return gy(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 LN(this,n||this.state,e)}pasteHTML(e,n){return cs(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return cs(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Th(this,e)}destroy(){this.docView&&(mO(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ju(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,vN())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return vO(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?er&&this.root.nodeType===11&&xN(this.dom.ownerDocument)==this.dom&&zO(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function ig(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"),[Zn.node(0,t.state.doc.content.size,e)]}function ag(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:Zn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function sg(t){return!t.someProp("editable",e=>e(t.state)===!1)}function XO(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 lg(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 YO(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 cg(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 Wo={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:"'"},oc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},JO=typeof navigator<"u"&&/Mac/.test(navigator.platform),QO=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Vn=0;Vn<10;Vn++)Wo[48+Vn]=Wo[96+Vn]=String(Vn);for(var Vn=1;Vn<=24;Vn++)Wo[Vn+111]="F"+Vn;for(var Vn=65;Vn<=90;Vn++)Wo[Vn]=String.fromCharCode(Vn+32),oc[Vn]=String.fromCharCode(Vn);for(var Lu in Wo)oc.hasOwnProperty(Lu)||(oc[Lu]=Wo[Lu]);function ZO(t){var e=JO&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||QO&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?oc:Wo)[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 e$=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function t$(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))e$?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 n$(t){let e=Object.create(null);for(let n in t)e[t$(n)]=t[n];return e}function Vu(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 r$(t){return new Qn({props:{handleKeyDown:Bh(t)}})}function Bh(t){let e=n$(t);return function(n,r){let o=ZO(r),i,a=e[Vu(o,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=e[Vu(o,r,!1)];if(s&&s(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=Wo[r.keyCode])&&i!=o){let s=e[Vu(i,r)];if(s&&s(n.state,n.dispatch,n))return!0}}return!1}}const jh=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Hy(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Wy=(t,e,n)=>{let r=Hy(t,n);if(!r)return!1;let o=zh(r);if(!o){let a=r.blockRange(),s=a&&wa(a);return s==null?!1:(e&&e(t.tr.lift(a,s).scrollIntoView()),!0)}let i=o.nodeBefore;if(Zy(t,o,e,-1))return!0;if(r.parent.content.size==0&&(da(i,"end")||mt.isSelectable(i)))for(let a=r.depth;;a--){let s=Ic(t.doc,r.before(a),r.after(a),Ge.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(da(i,"end")?vt.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):mt.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},o$=(t,e,n)=>{let r=Hy(t,n);if(!r)return!1;let o=zh(r);return o?qy(t,o,e):!1},i$=(t,e,n)=>{let r=Uy(t,n);if(!r)return!1;let o=Lh(r);return o?qy(t,o,e):!1};function qy(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=Ic(t.doc,i,l,Ge.empty);if(!c||c.from!=i||c instanceof Dn&&c.slice.size>=l-i)return!1;if(n){let u=t.tr.step(c);u.setSelection(gt.create(u.doc,i)),n(u.scrollIntoView())}return!0}function da(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 Ky=(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=zh(r)}let a=i&&i.nodeBefore;return!a||!mt.isSelectable(a)?!1:(e&&e(t.tr.setSelection(mt.create(t.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function zh(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 Uy(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Gy=(t,e,n)=>{let r=Uy(t,n);if(!r)return!1;let o=Lh(r);if(!o)return!1;let i=o.nodeAfter;if(Zy(t,o,e,1))return!0;if(r.parent.content.size==0&&(da(i,"start")||mt.isSelectable(i))){let a=Ic(t.doc,r.before(),r.after(),Ge.empty);if(a&&a.slice.size<a.to-a.from){if(e){let s=t.tr.step(a);s.setSelection(da(i,"start")?vt.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):mt.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},Xy=(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=Lh(r)}let a=i&&i.nodeAfter;return!a||!mt.isSelectable(a)?!1:(e&&e(t.tr.setSelection(mt.create(t.doc,i.pos)).scrollIntoView()),!0)};function Lh(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 a$=(t,e)=>{let n=t.selection,r=n instanceof mt,o;if(r){if(n.node.isTextblock||!Xo(t.doc,n.from))return!1;o=n.from}else if(o=Rc(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(mt.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},s$=(t,e)=>{let n=t.selection,r;if(n instanceof mt){if(n.node.isTextblock||!Xo(t.doc,n.to))return!1;r=n.to}else if(r=Rc(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},l$=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&wa(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},Yy=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
79
|
-
`).scrollIntoView()),!0)};function Vh(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 c$=(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=Vh(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(vt.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},Jy=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof mr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Vh(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(gt.create(s.doc,a+1)),e(s.scrollIntoView())}return!0},Qy=(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(po(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&wa(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function u$(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof mt&&e.selection.node.isBlock)return!r.parentOffset||!po(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=Vh(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 gt||e.selection instanceof mr)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=po(u.doc,d,i.length,i);if(f||(i[0]=s?{type:s}:null,f=po(u.doc,d,i.length,i)),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 d$=u$(),f$=(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(mt.create(t.doc,o))),!0)};function h$(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||Xo(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Zy(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,a,s,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&h$(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=Re.empty;for(let y=a.length-1;y>=0;y--)m=Re.from(a[y].create(null,m));m=Re.from(o.copy(m));let v=t.tr.step(new _n(e.pos-1,p,e.pos,p,new Ge(m,1,0),a.length,!0)),g=v.doc.resolve(p+2*a.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Xo(v.doc,g.pos)&&v.join(g.pos),n(v.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&l?null:vt.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),f=d&&wa(d);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(d,f).scrollIntoView()),!0;if(c&&da(i,"start",!0)&&da(o,"end")){let p=o,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let v=i,g=1;for(;!v.isTextblock;v=v.firstChild)g++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(n){let y=Re.empty;for(let C=m.length-1;C>=0;C--)y=Re.from(m[C].copy(y));let b=t.tr.step(new _n(e.pos-m.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new Ge(y,m.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function eC(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(gt.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const p$=eC(-1),m$=eC(1);function g$(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=a&&Oh(a,t,e);return s?(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0):!1}}function ug(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 Fh(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}Fh(jh,Wy,Ky);Fh(jh,Gy,Xy);Fh(Yy,Jy,Qy,d$);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function v$(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 b$(s,a,t,e)?(r&&r(s.scrollIntoView()),!0):!1}}function b$(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 Jl(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Jl(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let s=Oh(i,n,r,e);return s?(t&&y$(t,e,s,o,n),!0):!1}function y$(t,e,n,r,o){let i=Re.empty;for(let u=n.length-1;u>=0;u--)i=Re.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 Ge(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&&po(t.doc,l,s)&&(t.split(l,s),l+=2*s),l+=c.child(u).nodeSize;return t}function C$(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?S$(e,n,t,i):x$(e,n,i):!0:!1}}function S$(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 Ge(Re.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Jl(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const s=wa(r);if(s==null)return!1;o.lift(r,s);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return Xo(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function x$(t,e,n){let r=t.tr,o=n.parent;for(let p=n.end,m=n.endIndex-1,v=n.startIndex;m>v;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?Re.empty:Re.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 Ge((s?Re.empty:Re.from(o.copy(Re.empty))).append(l?Re.empty:Re.from(o.copy(Re.empty))),s?0:1,l?0:1),s?0:1)),e(r.scrollIntoView()),!0}function w$(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=Re.from(c?t.create():null),d=new Ge(Re.from(t.create(null,Re.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 Dc(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 _c{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,(...v)=>{const g=this.buildProps(c,n),y=p(...v)(g);return s.push(y),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:Dc({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 E${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 ut(t,e,n){return t.config[e]===void 0&&t.parent?ut(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?ut(t.parent,e,n):null}):t.config[e]}function Bc(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 tC(t){const e=[],{nodeExtensions:n,markExtensions:r}=Bc(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=ut(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=ut(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 jn(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 Zt(...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 ic(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)=>Zt(n,r),{})}function nC(t){return typeof t=="function"}function Mt(t,e=void 0,...n){return nC(t)?e?t.bind(e)(...n):t(...n):t}function N$(t={}){return Object.keys(t).length===0&&t.constructor===Object}function O$(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function dg(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):O$(n.getAttribute(a.name));return s==null?i:{...i,[a.name]:s}},{});return{...r,...o}}}}function fg(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&N$(n)?!1:n!=null))}function $$(t,e){var n;const r=tC(t),{nodeExtensions:o,markExtensions:i}=Bc(t),a=(n=o.find(c=>ut(c,"topNode")))===null||n===void 0?void 0:n.name,s=Object.fromEntries(o.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((y,b)=>{const C=ut(b,"extendNodeSchema",d);return{...y,...C?C(c):{}}},{}),p=fg({...f,content:Mt(ut(c,"content",d)),marks:Mt(ut(c,"marks",d)),group:Mt(ut(c,"group",d)),inline:Mt(ut(c,"inline",d)),atom:Mt(ut(c,"atom",d)),selectable:Mt(ut(c,"selectable",d)),draggable:Mt(ut(c,"draggable",d)),code:Mt(ut(c,"code",d)),whitespace:Mt(ut(c,"whitespace",d)),linebreakReplacement:Mt(ut(c,"linebreakReplacement",d)),defining:Mt(ut(c,"defining",d)),isolating:Mt(ut(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var b;return[y.name,{default:(b=y==null?void 0:y.attribute)===null||b===void 0?void 0:b.default}]}))}),m=Mt(ut(c,"parseHTML",d));m&&(p.parseDOM=m.map(y=>dg(y,u)));const v=ut(c,"renderHTML",d);v&&(p.toDOM=y=>v({node:y,HTMLAttributes:ic(y,u)}));const g=ut(c,"renderText",d);return g&&(p.toText=g),[c.name,p]})),l=Object.fromEntries(i.map(c=>{const u=r.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((g,y)=>{const b=ut(y,"extendMarkSchema",d);return{...g,...b?b(c):{}}},{}),p=fg({...f,inclusive:Mt(ut(c,"inclusive",d)),excludes:Mt(ut(c,"excludes",d)),group:Mt(ut(c,"group",d)),spanning:Mt(ut(c,"spanning",d)),code:Mt(ut(c,"code",d)),attrs:Object.fromEntries(u.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))}),m=Mt(ut(c,"parseHTML",d));m&&(p.parseDOM=m.map(g=>dg(g,u)));const v=ut(c,"renderHTML",d);return v&&(p.toDOM=g=>v({mark:g,HTMLAttributes:ic(g,u)})),[c.name,p]}));return new W0({topNode:a,nodes:s,marks:l})}function Fu(t,e){return e.nodes[t]||e.marks[t]||null}function hg(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Hh(t,e){const n=Ii.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const M$=(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 Wh(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class jc{constructor(e){this.find=e.find,this.handler=e.handler}}const R$=(t,e)=>{if(Wh(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 il(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=M$(c)+i;return a.forEach(f=>{if(u)return;const p=R$(d,f.find);if(!p)return;const m=l.state.tr,v=Dc({state:l.state,transaction:m}),g={from:r-(p[0].length-i.length),to:o},{commands:y,chain:b,can:C}=new _c({editor:n,state:v});f.handler({state:v,range:g,match:p,commands:y,chain:b,can:C})===null||!m.steps.length||(m.setMeta(s,{transform:m,from:r,to:o,text:i}),l.dispatch(m),u=!0)}),u}function I$(t){const{editor:e,rules:n}=t,r=new Qn({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=Hh(Re.from(u),a.schema);const{from:d}=l,f=d+u.length;il({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 il({editor:e,from:i,to:a,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&il({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?il({editor:e,from:a.pos,to:a.pos,text:`
|
|
80
|
-
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function T$(t){return Object.prototype.toString.call(t).slice(8,-1)}function al(t){return T$(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function zc(t,e){const n={...t};return al(t)&&al(e)&&Object.keys(e).forEach(r=>{al(e[r])&&al(t[r])?n[r]=zc(t[r],e[r]):n[r]=e[r]}),n}let to=class Qd{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(ut(this,"addOptions",{name:this.name}))),this.storage=Mt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Qd(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>zc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Qd(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(ut(n,"addOptions",{name:n.name})),n.storage=Mt(ut(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 P$(t){return typeof t=="number"}class A${constructor(e){this.find=e.find,this.handler=e.handler}}const k$=(t,e,n)=>{if(Wh(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 D$(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:a,dropEvent:s}=t,{commands:l,chain:c,can:u}=new _c({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,o,(p,m)=>{if(!p.isTextblock||p.type.spec.code)return;const v=Math.max(r,m),g=Math.min(o,m+p.content.size),y=p.textBetween(v-m,g-m,void 0,"");k$(y,i.find,a).forEach(C=>{if(C.index===void 0)return;const x=v+C.index+1,S=x+C[0].length,w={from:n.tr.mapping.map(x),to:n.tr.mapping.map(S)},E=i.handler({state:n,range:w,match:C,commands:l,chain:c,can:u,pasteEvent:a,dropEvent:s});d.push(E)})}),d.every(p=>p!==null)}let sl=null;const _$=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 B$(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 v=u.tr,g=Dc({state:u,transaction:v});if(!(!D$({editor:e,state:g,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:m,dropEvent:s})||!v.steps.length)){try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,v}};return n.map(u=>new Qn({view(d){const f=m=>{var v;r=!((v=d.dom.parentElement)===null||v===void 0)&&v.contains(m.target)?d.dom.parentElement:null,r&&(sl=e)},p=()=>{sl&&(sl=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=sl;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],v=m.getMeta("uiEvent")==="paste"&&!o,g=m.getMeta("uiEvent")==="drop"&&!i,y=m.getMeta("applyPasteRules"),b=!!y;if(!v&&!g&&!b)return;if(b){let{text:S}=y;typeof S=="string"?S=S:S=Hh(Re.from(S),p.schema);const{from:w}=y,E=w+S.length,M=_$(S);return l({rule:u,state:p,from:w,to:{b:E},pasteEvt:M})}const C=f.doc.content.findDiffStart(p.doc.content),x=f.doc.content.findDiffEnd(p.doc.content);if(!(!P$(C)||!x||C===x.b))return l({rule:u,state:p,from:C,to:x,pasteEvt:a})}}))}function j$(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class Ji{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=Ji.resolve(e),this.schema=$$(this.extensions,n),this.setupExtensions()}static resolve(e){const n=Ji.sort(Ji.flatten(e)),r=j$(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=ut(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=ut(r,"priority")||100,a=ut(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:Fu(n.name,this.schema)},o=ut(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=Ji.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:e,type:Fu(a.name,this.schema)},l=[],c=ut(a,"addKeyboardShortcuts",s);let u={};if(a.type==="mark"&&ut(a,"exitable",s)&&(u.ArrowRight=()=>to.handleExit({editor:e,mark:a})),c){const v=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:e})]));u={...u,...v}}const d=r$(u);l.push(d);const f=ut(a,"addInputRules",s);hg(a,e.options.enableInputRules)&&f&&r.push(...f());const p=ut(a,"addPasteRules",s);hg(a,e.options.enablePasteRules)&&p&&o.push(...p());const m=ut(a,"addProseMirrorPlugins",s);if(m){const v=m();l.push(...v)}return l}).flat();return[I$({editor:e,rules:r}),...B$({editor:e,rules:o}),...i]}get attributes(){return tC(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=Bc(this.extensions);return Object.fromEntries(n.filter(r=>!!ut(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:jn(r.name,this.schema)},a=ut(r,"addNodeView",i);if(!a)return[];const s=(l,c,u,d,f)=>{const p=ic(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:Fu(e.name,this.schema)};e.type==="mark"&&(!((n=Mt(ut(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=ut(e,"onBeforeCreate",r),i=ut(e,"onCreate",r),a=ut(e,"onUpdate",r),s=ut(e,"onSelectionUpdate",r),l=ut(e,"onTransaction",r),c=ut(e,"onFocus",r),u=ut(e,"onBlur",r),d=ut(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 Hn{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(ut(this,"addOptions",{name:this.name}))),this.storage=Mt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Hn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>zc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Hn({...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(ut(n,"addOptions",{name:n.name})),n.storage=Mt(ut(n,"addStorage",{name:n.name,options:n.options})),n}}function rC(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
81
|
-
|
|
82
|
-
`,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 oC(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const z$=Hn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Qn({key:new vr("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=oC(n);return rC(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),L$=()=>({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),V$=(t=!1)=>({commands:e})=>e.setContent("",t),F$=()=>({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=wa(p);if(s.type.isTextblock){const{defaultType:v}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(p.start,v)}(m||m===0)&&e.lift(p,m)})}),!0},H$=t=>e=>t(e),W$=()=>({state:t,dispatch:e})=>Jy(t,e),q$=(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 gt(r.doc.resolve(a-1))),!0},K$=()=>({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},U$=t=>({tr:e,state:n,dispatch:r})=>{const o=jn(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},G$=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},X$=()=>({state:t,dispatch:e})=>jh(t,e),Y$=()=>({commands:t})=>t.keyboardShortcut("Enter"),J$=()=>({state:t,dispatch:e})=>c$(t,e);function ac(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Wh(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function iC(t,e,n={}){return t.find(r=>r.type===e&&ac(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function pg(t,e,n={}){return!!iC(t,e,n)}function qh(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),!iC([...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&&pg([...t.parent.child(a-1).marks],e,n);)a-=1,s-=t.parent.child(a).nodeSize;for(;l<t.parent.childCount&&pg([...t.parent.child(l).marks],e,n);)c+=t.parent.child(l).nodeSize,l+=1;return{from:s,to:c}}function Jo(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 Q$=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=Jo(t,r.schema),{doc:a,selection:s}=n,{$from:l,from:c,to:u}=s;if(o){const d=qh(l,i,e);if(d&&d.from<=c&&d.to>=u){const f=gt.create(a,d.from,d.to);n.setSelection(f)}}return!0},Z$=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 aC(t){return t instanceof gt}function ci(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function sC(t,e=null){if(!e)return null;const n=vt.atStart(t),r=vt.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?gt.create(t,ci(0,o,i),ci(t.content.size,o,i)):gt.create(t,ci(e,o,i),ci(e,o,i))}function lC(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Lc(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const eM=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const a=()=>{(Lc()||lC())&&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&&!aC(n.state.selection))return a(),!0;const s=sC(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},tM=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),nM=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),cC=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&&cC(r)}return t};function ll(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return cC(n)}function sc(t,e,n){if(t instanceof zo||t instanceof Re)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 Re.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),sc("",e,n)}if(o){if(n.errorOnInvalidContent){let a=!1,s="";const l=new W0({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?Lo.fromSchema(l).parseSlice(ll(t),n.parseOptions):Lo.fromSchema(l).parse(ll(t),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const i=Lo.fromSchema(e);return n.slice?i.parseSlice(ll(t),n.parseOptions).content:i.parse(ll(t),n.parseOptions)}return sc("",e,n)}function rM(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof Dn||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(vt.near(t.doc.resolve(a),n))}const oM=t=>!("type"in t),iM=(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=sc(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((oM(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 Re){let m="";e.forEach(v=>{v.text&&(m+=v.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&&rM(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},aM=()=>({state:t,dispatch:e})=>a$(t,e),sM=()=>({state:t,dispatch:e})=>s$(t,e),lM=()=>({state:t,dispatch:e})=>Wy(t,e),cM=()=>({state:t,dispatch:e})=>Gy(t,e),uM=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Rc(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},dM=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Rc(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},fM=()=>({state:t,dispatch:e})=>o$(t,e),hM=()=>({state:t,dispatch:e})=>i$(t,e);function uC(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function pM(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))Lc()||uC()?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 mM=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=pM(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 ds(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,a=e?jn(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=>ac(d.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}const gM=(t,e={})=>({state:n,dispatch:r})=>{const o=jn(t,n.schema);return ds(n,o,e)?l$(n,r):!1},vM=()=>({state:t,dispatch:e})=>Qy(t,e),bM=t=>({state:e,dispatch:n})=>{const r=jn(t,e.schema);return C$(r)(e,n)},yM=()=>({state:t,dispatch:e})=>Yy(t,e);function Vc(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function mg(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 CM=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=Vc(typeof t=="string"?t:t.name,r.schema);return s?(s==="node"&&(i=jn(t,r.schema)),s==="mark"&&(a=Jo(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,mg(c.attrs,e)),a&&c.marks.length&&c.marks.forEach(d=>{a===d.type&&n.addMark(u,u+c.nodeSize,a.create(mg(d.attrs,e)))})})}),!0):!1},SM=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),xM=()=>({tr:t,dispatch:e})=>{if(e){const n=new mr(t.doc);t.setSelection(n)}return!0},wM=()=>({state:t,dispatch:e})=>Ky(t,e),EM=()=>({state:t,dispatch:e})=>Xy(t,e),NM=()=>({state:t,dispatch:e})=>f$(t,e),OM=()=>({state:t,dispatch:e})=>m$(t,e),$M=()=>({state:t,dispatch:e})=>p$(t,e);function Zd(t,e,n={},r={}){return sc(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const MM=(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=Zd(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 dC(t,e){const n=Jo(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 RM(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 fC(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=>fC(e.$from,t)}function IM(t,e){const n={from:0,to:t.content.size};return rC(t,n,e)}function TM(t,e){const n=jn(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 PM(t,e){const n=Vc(typeof e=="string"?e:e.name,t.schema);return n==="node"?TM(t,e):n==="mark"?dC(t,e):{}}function hC(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),a=qh(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 Rl(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 ef(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?Jo(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>ac(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,(v,g)=>{if(!v.isText&&!v.marks.length)return;const y=Math.max(p,g),b=Math.min(m,g+v.nodeSize),C=b-y;a+=C,s.push(...v.marks.map(x=>({mark:x,from:y,to:b})))})}),a===0)return!1;const l=s.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>ac(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 AM(t,e,n={}){if(!e)return ds(t,null,n)||ef(t,null,n);const r=Vc(e,t.schema);return r==="node"?ds(t,e,n):r==="mark"?ef(t,e,n):!1}function gg(t,e){const{nodeExtensions:n}=Bc(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(ut(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Uh(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&&(Uh(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function kM(t){return t instanceof mt}function DM(t,e,n){var r;const{selection:o}=e;let i=null;if(aC(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(v=>v.type.excludes(n));c=p&&m}return!c}),c})}const _M=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:a,ranges:s}=i,l=Jo(t,r.schema);if(o)if(a){const c=dC(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),v=Math.min(p+f.nodeSize,d);f.marks.find(y=>y.type===l)?f.marks.forEach(y=>{l===y.type&&n.addMark(m,v,l.create({...y.attrs,...e}))}):n.addMark(m,v,l.create(e))})});return DM(r,n,l)},BM=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),jM=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=jn(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})=>ug(i,{...a,...e})(n)?!0:s.clearNodes()).command(({state:s})=>ug(i,{...a,...e})(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},zM=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=ci(t,0,r.content.size),i=mt.create(r,o);e.setSelection(i)}return!0},LM=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,a=gt.atStart(r).from,s=gt.atEnd(r).to,l=ci(o,a,s),c=ci(i,a,s),u=gt.create(r,l,c);e.setSelection(u)}return!0},VM=t=>({state:e,dispatch:n})=>{const r=jn(t,e.schema);return w$(r)(e,n)};function vg(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 FM=({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=Rl(c,s.node().type.name,s.node().attrs);if(i instanceof mt&&i.node.isBlock)return!s.parentOffset||!po(a,s.pos)?!1:(r&&(t&&vg(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:RM(s.node(-1).contentMatchAt(s.indexAfter(-1)));let p=d&&f?[{type:f,attrs:u}]:void 0,m=po(e.doc,e.mapping.map(s.pos),1,p);if(!p&&!m&&po(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 gt&&e.deleteSelection(),e.split(e.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){const v=e.mapping.map(s.before()),g=e.doc.resolve(v);s.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&e.setNodeMarkup(e.mapping.map(s.before()),f)}t&&vg(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return m},HM=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var a;const s=jn(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 y=Re.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let M=l.depth-b;M>=l.depth-3;M-=1)y=Re.from(l.node(M).copy(y));const C=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,x={...Rl(f,l.node().type.name,l.node().attrs),...e},S=((a=s.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(x))||void 0;y=y.append(Re.from(s.createAndFill(null,S)||void 0));const w=l.before(l.depth-(b-1));n.replace(w,l.after(-C),new Ge(y,4-b,0));let E=-1;n.doc.nodesBetween(w,n.doc.content.size,(M,$)=>{if(E>-1)return!1;M.isTextblock&&M.content.size===0&&(E=$+1)}),E>-1&&n.setSelection(gt.near(n.doc.resolve(E))),n.scrollIntoView()}return!0}const p=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,m={...Rl(f,d.type.name,d.attrs),...e},v={...Rl(f,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const g=p?[{type:s,attrs:m},{type:p,attrs:v}]:[{type:s,attrs:m}];if(!po(n.doc,l.pos,2))return!1;if(o){const{selection:y,storedMarks:b}=r,{splittableMarks:C}=i.extensionManager,x=b||y.$to.parentOffset&&y.$from.marks();if(n.split(l.pos,2,g).scrollIntoView(),!x||!o)return!0;const S=x.filter(w=>C.includes(w.type.name));n.ensureMarks(S)}return!0},Hu=(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)&&Xo(t.doc,n.pos)&&t.join(n.pos),!0},Wu=(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)&&Xo(t.doc,r)&&t.join(r),!0},WM=(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=jn(t,a.schema),m=jn(e,a.schema),{selection:v,storedMarks:g}=a,{$from:y,$to:b}=v,C=y.blockRange(b),x=g||v.$to.parentOffset&&v.$from.marks();if(!C)return!1;const S=Kh(w=>gg(w.type.name,d))(v);if(C.depth>=1&&S&&C.depth-S.depth<=1){if(S.node.type===p)return c.liftListItem(m);if(gg(S.node.type.name,d)&&p.validContent(S.node.content)&&s)return l().command(()=>(i.setNodeMarkup(S.pos,p),!0)).command(()=>Hu(i,p)).command(()=>Wu(i,p)).run()}return!n||!x||!s?l().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>Hu(i,p)).command(()=>Wu(i,p)).run():l().command(()=>{const w=u().wrapInList(p,r),E=x.filter(M=>f.includes(M.type.name));return i.ensureMarks(E),w?!0:c.clearNodes()}).wrapInList(p,r).command(()=>Hu(i,p)).command(()=>Wu(i,p)).run()},qM=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,a=Jo(t,r.schema);return ef(r,a,e)?o.unsetMark(a,{extendEmptyMarkRange:i}):o.setMark(a,e)},KM=(t,e,n={})=>({state:r,commands:o})=>{const i=jn(t,r.schema),a=jn(e,r.schema),s=ds(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})},UM=(t,e={})=>({state:n,commands:r})=>{const o=jn(t,n.schema);return ds(n,o,e)?r.lift(o):r.wrapIn(o,e)},GM=()=>({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},XM=()=>({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},YM=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:a=!1}=e,{selection:s}=n,l=Jo(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(g=>g.type===l))===null||i===void 0?void 0:i.attrs,v=qh(c,l,m);v&&(f=v.from,p=v.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},JM=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=Vc(typeof t=="string"?t:t.name,r.schema);return s?(s==="node"&&(i=jn(t,r.schema)),s==="mark"&&(a=Jo(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,(v,g)=>{i&&i===v.type&&(p=Math.max(g,c),m=Math.min(g+v.nodeSize,u),d=g,f=v)}):r.doc.nodesBetween(c,u,(v,g)=>{g<c&&i&&i===v.type&&(p=Math.max(g,c),m=Math.min(g+v.nodeSize,u),d=g,f=v),g>=c&&g<=u&&(i&&i===v.type&&n.setNodeMarkup(g,void 0,{...v.attrs,...e}),a&&v.marks.length&&v.marks.forEach(y=>{if(a===y.type){const b=Math.max(g,c),C=Math.min(g+v.nodeSize,u);n.addMark(b,C,a.create({...y.attrs,...e}))}}))}),f&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...f.attrs,...e}),a&&f.marks.length&&f.marks.forEach(v=>{a===v.type&&n.addMark(p,m,a.create({...v.attrs,...e}))}))}),!0):!1},QM=(t,e={})=>({state:n,dispatch:r})=>{const o=jn(t,n.schema);return g$(o,e)(n,r)},ZM=(t,e={})=>({state:n,dispatch:r})=>{const o=jn(t,n.schema);return v$(o,e)(n,r)};var eR=Object.freeze({__proto__:null,blur:L$,clearContent:V$,clearNodes:F$,command:H$,createParagraphNear:W$,cut:q$,deleteCurrentNode:K$,deleteNode:U$,deleteRange:G$,deleteSelection:X$,enter:Y$,exitCode:J$,extendMarkRange:Q$,first:Z$,focus:eM,forEach:tM,insertContent:nM,insertContentAt:iM,joinBackward:lM,joinDown:sM,joinForward:cM,joinItemBackward:uM,joinItemForward:dM,joinTextblockBackward:fM,joinTextblockForward:hM,joinUp:aM,keyboardShortcut:mM,lift:gM,liftEmptyBlock:vM,liftListItem:bM,newlineInCode:yM,resetAttributes:CM,scrollIntoView:SM,selectAll:xM,selectNodeBackward:wM,selectNodeForward:EM,selectParentNode:NM,selectTextblockEnd:OM,selectTextblockStart:$M,setContent:MM,setMark:_M,setMeta:BM,setNode:jM,setNodeSelection:zM,setTextSelection:LM,sinkListItem:VM,splitBlock:FM,splitListItem:HM,toggleList:WM,toggleMark:qM,toggleNode:KM,toggleWrap:UM,undoInputRule:GM,unsetAllMarks:XM,unsetMark:YM,updateAttributes:JM,wrapIn:QM,wrapInList:ZM});const tR=Hn.create({name:"commands",addCommands(){return{...eR}}}),nR=Hn.create({name:"drop",addProseMirrorPlugins(){return[new Qn({key:new vr("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),rR=Hn.create({name:"editable",addProseMirrorPlugins(){return[new Qn({key:new vr("editable"),props:{editable:()=>this.editor.options.editable}})]}}),oR=Hn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Qn({key:new vr("focusEvents"),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}}}})]}}),iR=Hn.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,v=m.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=v&&m.parent.childCount===1?g===d.pos:vt.atStart(c).from===f;return!u||!p.type.isTextblock||p.textContent.length||!y||y&&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 Lc()||uC()?i:o},addProseMirrorPlugins(){return[new Qn({key:new vr("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(v=>v.getMeta("composition")))return;const r=t.some(v=>v.docChanged)&&!e.doc.eq(n.doc),o=t.some(v=>v.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:a,to:s}=e.selection,l=vt.atStart(e.doc).from,c=vt.atEnd(e.doc).to;if(i||!(a===l&&s===c)||!Uh(n.doc))return;const f=n.tr,p=Dc({state:n,transaction:f}),{commands:m}=new _c({editor:this.editor,state:p});if(m.clearNodes(),!!f.steps.length)return f}})]}}),aR=Hn.create({name:"paste",addProseMirrorPlugins(){return[new Qn({key:new vr("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),sR=Hn.create({name:"tabindex",addProseMirrorPlugins(){return[new Qn({key:new vr("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class oi{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 oi(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 oi(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 oi(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 oi(s,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),e.push(new oi(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 lR=`.ProseMirror {
|
|
83
|
-
position: relative;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.ProseMirror {
|
|
87
|
-
word-wrap: break-word;
|
|
88
|
-
white-space: pre-wrap;
|
|
89
|
-
white-space: break-spaces;
|
|
90
|
-
-webkit-font-variant-ligatures: none;
|
|
91
|
-
font-variant-ligatures: none;
|
|
92
|
-
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.ProseMirror [contenteditable="false"] {
|
|
96
|
-
white-space: normal;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
100
|
-
white-space: pre-wrap;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.ProseMirror pre {
|
|
104
|
-
white-space: pre-wrap;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
img.ProseMirror-separator {
|
|
108
|
-
display: inline !important;
|
|
109
|
-
border: none !important;
|
|
110
|
-
margin: 0 !important;
|
|
111
|
-
width: 0 !important;
|
|
112
|
-
height: 0 !important;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.ProseMirror-gapcursor {
|
|
116
|
-
display: none;
|
|
117
|
-
pointer-events: none;
|
|
118
|
-
position: absolute;
|
|
119
|
-
margin: 0;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.ProseMirror-gapcursor:after {
|
|
123
|
-
content: "";
|
|
124
|
-
display: block;
|
|
125
|
-
position: absolute;
|
|
126
|
-
top: -2px;
|
|
127
|
-
width: 20px;
|
|
128
|
-
border-top: 1px solid black;
|
|
129
|
-
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
@keyframes ProseMirror-cursor-blink {
|
|
133
|
-
to {
|
|
134
|
-
visibility: hidden;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.ProseMirror-hideselection *::selection {
|
|
139
|
-
background: transparent;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.ProseMirror-hideselection *::-moz-selection {
|
|
143
|
-
background: transparent;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.ProseMirror-hideselection * {
|
|
147
|
-
caret-color: transparent;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
151
|
-
display: block;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
155
|
-
opacity: 0
|
|
156
|
-
}`;function cR(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 uR extends E${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=cR(lR,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=nC(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=n.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?[rR,z$.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),tR,oR,iR,sR,nR,aR].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 Ji(o,this)}createCommandManager(){this.commandManager=new _c({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=Zd(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=Zd(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=sC(n,this.options.autofocus);this.view=new GO(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:Yi.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 PM(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return AM(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Hh(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
|
157
|
-
|
|
158
|
-
`,textSerializers:r={}}=e||{};return IM(this.state.doc,{blockSeparator:n,textSerializers:{...oC(this.schema),...r}})}get isEmpty(){return Uh(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 oi(n,this)}get $doc(){return this.$pos(0)}}function Ei(t){return new jc({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(hC(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(v=>v===t.type&&v!==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 dR(t){return new jc({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 tf(t){return new jc({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 fa(t){return new jc({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&&Oh(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 v=m.filter(g=>p.includes(g.type.name));a.ensureMarks(v)}}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&&Xo(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(ut(this,"addOptions",{name:this.name}))),this.storage=Mt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Sn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>zc(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(ut(n,"addOptions",{name:n.name})),n.storage=Mt(ut(n,"addStorage",{name:n.name,options:n.options})),n}}class fR{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(),b=d.getBoundingClientRect(),C=(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=b.x-y.x+C,p=b.y-y.y+x}(l=e.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,f,p);const m=this.getPos();if(typeof m!="number")return;const v=mt.create(c.state.doc,m),g=c.state.tr.setSelection(v);c.dispatch(g)}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=mt.isSelectable(this.node),f=e.type==="copy",p=e.type==="paste",m=e.type==="cut",v=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&&v){const g=r.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(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||v&&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"&&(Lc()||lC())&&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 Ni(t){return new A$({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(hC(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(g=>g===t.type&&g!==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 hR(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nf={exports:{}},qu={};/**
|
|
159
|
-
* @license React
|
|
160
|
-
* use-sync-external-store-shim.production.min.js
|
|
161
|
-
*
|
|
162
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the MIT license found in the
|
|
165
|
-
* LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/var bg;function pR(){if(bg)return qu;bg=1;var t=N;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}}),v=m[0].inst,g=m[1];return i(function(){v.value=p,v.getSnapshot=f,l(v)&&g({inst:v})},[d,p,f]),o(function(){return l(v)&&g({inst:v}),d(function(){l(v)&&g({inst:v})})},[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 qu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,qu}var Ku={};/**
|
|
167
|
-
* @license React
|
|
168
|
-
* use-sync-external-store-shim.development.js
|
|
169
|
-
*
|
|
170
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the MIT license found in the
|
|
173
|
-
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/var yg;function mR(){return yg||(yg=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=N,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(C){{for(var x=arguments.length,S=new Array(x>1?x-1:0),w=1;w<x;w++)S[w-1]=arguments[w];r("error",C,S)}}function r(C,x,S){{var w=e.ReactDebugCurrentFrame,E=w.getStackAddendum();E!==""&&(x+="%s",S=S.concat([E]));var M=S.map(function($){return String($)});M.unshift("Warning: "+x),Function.prototype.apply.call(console[C],console,M)}}function o(C,x){return C===x&&(C!==0||1/C===1/x)||C!==C&&x!==x}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,x,S){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=x();if(!d){var E=x();i(w,E)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var M=a({inst:{value:w,getSnapshot:x}}),$=M[0].inst,R=M[1];return l(function(){$.value=w,$.getSnapshot=x,p($)&&R({inst:$})},[C,w,x]),s(function(){p($)&&R({inst:$});var I=function(){p($)&&R({inst:$})};return C(I)},[C]),c(w),w}function p(C){var x=C.getSnapshot,S=C.value;try{var w=x();return!i(S,w)}catch{return!0}}function m(C,x,S){return x()}var v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!v,y=g?m:f,b=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y;Ku.useSyncExternalStore=b,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"?nf.exports=pR():nf.exports=mR();var Fc=nf.exports;const gR=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},vR=({contentComponent:t})=>{const e=Fc.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return N.createElement(N.Fragment,null,Object.values(e))};function bR(){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]:_r.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 yR extends N.Component{constructor(e){var n;super(e),this.editorContentRef=N.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=bR(),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 N.createElement(N.Fragment,null,N.createElement("div",{ref:gR(n,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&N.createElement(vR,{contentComponent:e.contentComponent}))}}const CR=N.forwardRef((t,e)=>{const n=N.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return N.createElement(yR,{key:n,innerRef:e,...t})}),SR=N.memo(CR);var xR=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},wR=hR(xR),rf={exports:{}},Uu={};/**
|
|
175
|
-
* @license React
|
|
176
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
177
|
-
*
|
|
178
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the MIT license found in the
|
|
181
|
-
* LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/var Cg;function ER(){if(Cg)return Uu;Cg=1;var t=N,e=Fc;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 Uu.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var m=i(null);if(m.current===null){var v={hasValue:!1,value:null};m.current=v}else v=m.current;m=s(function(){function y(w){if(!b){if(b=!0,C=w,w=f(w),p!==void 0&&v.hasValue){var E=v.value;if(p(E,w))return x=E}return x=w}if(E=x,r(C,w))return E;var M=f(w);return p!==void 0&&p(E,M)?E:(C=w,x=M)}var b=!1,C,x,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,f,p]);var g=o(c,m[0],m[1]);return a(function(){v.hasValue=!0,v.value=g},[g]),l(g),g},Uu}var Gu={};/**
|
|
183
|
-
* @license React
|
|
184
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
185
|
-
*
|
|
186
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the MIT license found in the
|
|
189
|
-
* LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/var Sg;function NR(){return Sg||(Sg=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=N,e=Fc;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 v=i(null),g;v.current===null?(g={hasValue:!1,value:null},v.current=g):g=v.current;var y=s(function(){var S=!1,w,E,M=function(D){if(!S){S=!0,w=D;var _=p(D);if(m!==void 0&&g.hasValue){var A=g.value;if(m(A,_))return E=A,A}return E=_,_}var z=w,k=E;if(r(z,D))return k;var P=p(D);return m!==void 0&&m(k,P)?k:(w=D,E=P,P)},$=f===void 0?null:f,R=function(){return M(d())},I=$===null?void 0:function(){return M($())};return[R,I]},[d,f,p,m]),b=y[0],C=y[1],x=o(u,b,C);return a(function(){g.hasValue=!0,g.value=x},[x]),l(x),x}Gu.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Gu}process.env.NODE_ENV==="production"?rf.exports=ER():rf.exports=NR();var OR=rf.exports;const $R=typeof window<"u"?N.useLayoutEffect:N.useEffect;class MR{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 RR(t){var e;const[n]=N.useState(()=>new MR(t.editor)),r=OR.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:wR);return $R(()=>n.watch(t.editor),[t.editor,n]),N.useDebugValue(r),r}const xg=process.env.NODE_ENV!=="production",of=typeof window>"u",IR=of||!!(typeof window<"u"&&window.next);class Gh{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 of||IR?(xg&&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&&of&&xg)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 uR(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?Gh.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 TR(t={},e=[]){const n=N.useRef(t);n.current=t;const[r]=N.useState(()=>new Gh(n)),o=Fc.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return N.useDebugValue(o),N.useEffect(r.onRender(e)),RR({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&i===0?0:i+1}),o}const PR=N.createContext({editor:null});PR.Consumer;const pC=N.createContext({onDragStart:void 0}),mC=()=>N.useContext(pC),AR=t=>{const e=t.as||"div",{nodeViewContentRef:n}=mC();return N.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},gC=N.forwardRef((t,e)=>{const{onDragStart:n}=mC(),r=t.as||"div";return N.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function kR(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function DR(t){var e;return typeof t=="object"&&((e=t.$$typeof)===null||e===void 0?void 0:e.toString())==="Symbol(react.forward_ref)"}class _R{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?_r.flushSync(()=>{this.render()}):this.render()}render(){var e;const n=this.component,r=this.props,o=this.editor;(kR(n)||DR(n))&&(r.ref=i=>{this.ref=i}),this.reactElement=N.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 BR extends fR{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=N.memo(c=>N.createElement(pC.Provider,{value:o},N.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 _R(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=ic(this.node,n);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function vC(t,e){return n=>n.editor.contentComponent?new BR(t,n,e):{}}function Le(){return Le=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},Le.apply(null,arguments)}function st(t){"@babel/helpers - typeof";return st=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},st(t)}var jR=Symbol.for("react.element"),zR=Symbol.for("react.transitional.element"),LR=Symbol.for("react.fragment");function bC(t){return t&&st(t)==="object"&&(t.$$typeof===jR||t.$$typeof===zR)&&t.type===LR}function gr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return N.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(gr(r)):bC(r)&&r.props?n=n.concat(gr(r.props.children,e)):n.push(r))}),n}var af={},Xh=[],VR=function(e){Xh.push(e)};function Qr(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=Xh.reduce(function(r,o){return o(r??"","warning")},e);n&&console.error("Warning: ".concat(n))}}function FR(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var n=Xh.reduce(function(r,o){return o(r??"","note")},e);n&&console.warn("Note: ".concat(n))}}function yC(){af={}}function CC(t,e,n){!e&&!af[n]&&(t(!1,n),af[n]=!0)}function yt(t,e){CC(Qr,t,e)}function sf(t,e){CC(FR,t,e)}yt.preMessage=VR;yt.resetWarned=yC;yt.noteOnce=sf;function HR(t,e){if(st(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(st(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function SC(t){var e=HR(t,"string");return st(e)=="symbol"?e:e+""}function W(t,e,n){return(e=SC(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wg(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 q(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wg(Object(n),!0).forEach(function(r){W(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function fs(t){return t instanceof HTMLElement||t instanceof SVGElement}function WR(t){return t&&st(t)==="object"&&fs(t.nativeElement)?t.nativeElement:fs(t)?t:null}function Il(t){var e=WR(t);if(e)return e;if(t instanceof N.Component){var n;return(n=_r.findDOMNode)===null||n===void 0?void 0:n.call(_r,t)}return null}var cl={exports:{}},Kt={};/**
|
|
191
|
-
* @license React
|
|
192
|
-
* react-is.production.min.js
|
|
193
|
-
*
|
|
194
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the MIT license found in the
|
|
197
|
-
* LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/var Eg;function qR(){if(Eg)return Kt;Eg=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 v(g){if(typeof g=="object"&&g!==null){var y=g.$$typeof;switch(y){case t:switch(g=g.type,g){case n:case o:case r:case c:case u:return g;default:switch(g=g&&g.$$typeof,g){case s:case a:case l:case f:case d:case i:return g;default:return y}}case e:return y}}}return Kt.ContextConsumer=a,Kt.ContextProvider=i,Kt.Element=t,Kt.ForwardRef=l,Kt.Fragment=n,Kt.Lazy=f,Kt.Memo=d,Kt.Portal=e,Kt.Profiler=o,Kt.StrictMode=r,Kt.Suspense=c,Kt.SuspenseList=u,Kt.isAsyncMode=function(){return!1},Kt.isConcurrentMode=function(){return!1},Kt.isContextConsumer=function(g){return v(g)===a},Kt.isContextProvider=function(g){return v(g)===i},Kt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},Kt.isForwardRef=function(g){return v(g)===l},Kt.isFragment=function(g){return v(g)===n},Kt.isLazy=function(g){return v(g)===f},Kt.isMemo=function(g){return v(g)===d},Kt.isPortal=function(g){return v(g)===e},Kt.isProfiler=function(g){return v(g)===o},Kt.isStrictMode=function(g){return v(g)===r},Kt.isSuspense=function(g){return v(g)===c},Kt.isSuspenseList=function(g){return v(g)===u},Kt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===o||g===r||g===c||g===u||g===p||typeof g=="object"&&g!==null&&(g.$$typeof===f||g.$$typeof===d||g.$$typeof===i||g.$$typeof===a||g.$$typeof===l||g.$$typeof===m||g.getModuleId!==void 0)},Kt.typeOf=v,Kt}var Ut={};/**
|
|
199
|
-
* @license React
|
|
200
|
-
* react-is.development.js
|
|
201
|
-
*
|
|
202
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the MIT license found in the
|
|
205
|
-
* LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/var Ng;function KR(){return Ng||(Ng=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,v=!1,g=!1,y=!1,b=!1,C;C=Symbol.for("react.module.reference");function x(ne){return!!(typeof ne=="string"||typeof ne=="function"||ne===n||ne===o||b||ne===r||ne===c||ne===u||y||ne===p||m||v||g||typeof ne=="object"&&ne!==null&&(ne.$$typeof===f||ne.$$typeof===d||ne.$$typeof===i||ne.$$typeof===a||ne.$$typeof===l||ne.$$typeof===C||ne.getModuleId!==void 0))}function S(ne){if(typeof ne=="object"&&ne!==null){var ce=ne.$$typeof;switch(ce){case t:var me=ne.type;switch(me){case n:case o:case r:case c:case u:return me;default:var Oe=me&&me.$$typeof;switch(Oe){case s:case a:case l:case f:case d:case i:return Oe;default:return ce}}case e:return ce}}}var w=a,E=i,M=t,$=l,R=n,I=f,D=d,_=e,A=o,z=r,k=c,P=u,B=!1,F=!1;function H(ne){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(ne){return F||(F=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function G(ne){return S(ne)===a}function J(ne){return S(ne)===i}function V(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===t}function X(ne){return S(ne)===l}function Q(ne){return S(ne)===n}function ue(ne){return S(ne)===f}function Y(ne){return S(ne)===d}function fe(ne){return S(ne)===e}function be(ne){return S(ne)===o}function de(ne){return S(ne)===r}function oe(ne){return S(ne)===c}function ge(ne){return S(ne)===u}Ut.ContextConsumer=w,Ut.ContextProvider=E,Ut.Element=M,Ut.ForwardRef=$,Ut.Fragment=R,Ut.Lazy=I,Ut.Memo=D,Ut.Portal=_,Ut.Profiler=A,Ut.StrictMode=z,Ut.Suspense=k,Ut.SuspenseList=P,Ut.isAsyncMode=H,Ut.isConcurrentMode=L,Ut.isContextConsumer=G,Ut.isContextProvider=J,Ut.isElement=V,Ut.isForwardRef=X,Ut.isFragment=Q,Ut.isLazy=ue,Ut.isMemo=Y,Ut.isPortal=fe,Ut.isProfiler=be,Ut.isStrictMode=de,Ut.isSuspense=oe,Ut.isSuspenseList=ge,Ut.isValidElementType=x,Ut.typeOf=S}()),Ut}var Og;function UR(){return Og||(Og=1,process.env.NODE_ENV==="production"?cl.exports=qR():cl.exports=KR()),cl.exports}var Xu=UR();function Rs(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 GR=Number(N.version.split(".")[0]),Yh=function(e,n){typeof e=="function"?e(n):st(e)==="object"&&e&&"current"in e&&(e.current=n)},ir=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){Yh(a,i)})}},Qo=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Rs(function(){return ir.apply(void 0,n)},n,function(o,i){return o.length!==i.length||o.every(function(a,s){return a!==i[s]})})},Zo=function(e){var n,r;if(!e)return!1;if(Jh(e)&&GR>=19)return!0;var o=Xu.isMemo(e)?e.type.type:e.type;return!(typeof o=="function"&&!((n=o.prototype)!==null&&n!==void 0&&n.render)&&o.$$typeof!==Xu.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==Xu.ForwardRef)};function Jh(t){return N.isValidElement(t)&&!bC(t)}var XR=function(e){return Jh(e)&&Zo(e)},Ti=function(e){if(e&&Jh(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},lf=h.createContext(null);function YR(t){var e=t.children,n=t.onBatchResize,r=h.useRef(0),o=h.useRef([]),i=h.useContext(lf),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(lf.Provider,{value:a},e)}var xC=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}()}(),cf=typeof window<"u"&&typeof document<"u"&&window.document===document,lc=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")()}(),JR=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(lc):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),QR=2;function ZR(t,e){var n=!1,r=!1,o=0;function i(){n&&(n=!1,t()),r&&s()}function a(){JR(i)}function s(){var l=Date.now();if(n){if(l-o<QR)return;r=!0}else n=!0,r=!1,setTimeout(a,e);o=l}return s}var eI=20,tI=["top","right","bottom","left","width","height","size","weight"],nI=typeof MutationObserver<"u",rI=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=ZR(this.refresh.bind(this),eI)}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(){!cf||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),nI?(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(){!cf||!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=tI.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}(),wC=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},ha=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||lc},EC=Hc(0,0,0,0);function cc(t){return parseFloat(t)||0}function $g(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+cc(i)},0)}function oI(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]=cc(a)}return n}function iI(t){var e=t.getBBox();return Hc(0,0,e.width,e.height)}function aI(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return EC;var r=ha(t).getComputedStyle(t),o=oI(r),i=o.left+o.right,a=o.top+o.bottom,s=cc(r.width),l=cc(r.height);if(r.boxSizing==="border-box"&&(Math.round(s+i)!==e&&(s-=$g(r,"left","right")+i),Math.round(l+a)!==n&&(l-=$g(r,"top","bottom")+a)),!lI(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 Hc(o.left,o.top,s,l)}var sI=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof ha(t).SVGGraphicsElement}:function(t){return t instanceof ha(t).SVGElement&&typeof t.getBBox=="function"}}();function lI(t){return t===ha(t).document.documentElement}function cI(t){return cf?sI(t)?iI(t):aI(t):EC}function uI(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 wC(a,{x:e,y:n,width:r,height:o,top:n,right:e+r,bottom:o+n,left:e}),a}function Hc(t,e,n,r){return{x:t,y:e,width:n,height:r}}var dI=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Hc(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=cI(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}(),fI=function(){function t(e,n){var r=uI(n);wC(this,{target:e,contentRect:r})}return t}(),hI=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new xC,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 ha(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new dI(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 ha(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 fI(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}(),NC=typeof WeakMap<"u"?new WeakMap:new xC,OC=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=rI.getInstance(),r=new hI(e,n,this);NC.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){OC.prototype[t]=function(){var e;return(e=NC.get(this))[t].apply(e,arguments)}});var pI=function(){return typeof lc.ResizeObserver<"u"?lc.ResizeObserver:OC}(),fo=new Map;function $C(t){t.forEach(function(e){var n,r=e.target;(n=fo.get(r))===null||n===void 0||n.forEach(function(o){return o(r)})})}var MC=new pI($C);process.env.NODE_ENV;process.env.NODE_ENV;function mI(t,e){fo.has(t)||(fo.set(t,new Set),MC.observe(t)),fo.get(t).add(e)}function gI(t,e){fo.has(t)&&(fo.get(t).delete(e),fo.get(t).size||(MC.unobserve(t),fo.delete(t)))}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mg(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,SC(r.key),r)}}function wn(t,e,n){return e&&Mg(t.prototype,e),n&&Mg(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function hs(t,e){return hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},hs(t,e)}function bo(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&&hs(t,e)}function ps(t){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ps(t)}function Qh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qh=function(){return!!t})()}function It(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vI(t,e){if(e&&(st(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return It(t)}function yo(t){var e=Qh();return function(){var n,r=ps(t);if(e){var o=ps(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vI(this,n)}}var bI=function(t){bo(n,t);var e=yo(n);function n(){return xn(this,n),e.apply(this,arguments)}return wn(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component);function yI(t,e){var n=t.children,r=t.disabled,o=h.useRef(null),i=h.useRef(null),a=h.useContext(lf),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)&&Zo(l),d=u?Ti(l):null,f=Qo(d,o),p=function(){var y;return Il(o.current)||(o.current&&st(o.current)==="object"?Il((y=o.current)===null||y===void 0?void 0:y.nativeElement):null)||Il(i.current)};h.useImperativeHandle(e,function(){return p()});var m=h.useRef(t);m.current=t;var v=h.useCallback(function(g){var y=m.current,b=y.onResize,C=y.data,x=g.getBoundingClientRect(),S=x.width,w=x.height,E=g.offsetWidth,M=g.offsetHeight,$=Math.floor(S),R=Math.floor(w);if(c.current.width!==$||c.current.height!==R||c.current.offsetWidth!==E||c.current.offsetHeight!==M){var I={width:$,height:R,offsetWidth:E,offsetHeight:M};c.current=I;var D=E===Math.round(S)?S:E,_=M===Math.round(w)?w:M,A=q(q({},I),{},{offsetWidth:D,offsetHeight:_});a==null||a(A,g,C),b&&Promise.resolve().then(function(){b(A,g)})}},[]);return h.useEffect(function(){var g=p();return g&&!r&&mI(g,v),function(){return gI(g,v)}},[o.current,r]),h.createElement(bI,{ref:i},u?h.cloneElement(l,{ref:f}):l)}var RC=h.forwardRef(yI);process.env.NODE_ENV!=="production"&&(RC.displayName="SingleObserver");var CI="rc-observer-key";function SI(t,e){var n=t.children,r=typeof n=="function"?[n]:gr(n);return process.env.NODE_ENV!=="production"&&(r.length>1?Qr(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&Qr(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(o,i){var a=(o==null?void 0:o.key)||"".concat(CI,"-").concat(i);return h.createElement(RC,Le({},t,{key:a,ref:i===0?e:void 0}),o)})}var Co=h.forwardRef(SI);process.env.NODE_ENV!=="production"&&(Co.displayName="ResizeObserver");Co.Collection=YR;function uf(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 xI(t){if(Array.isArray(t))return uf(t)}function IC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Zh(t,e){if(t){if(typeof t=="string")return uf(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)?uf(t,e):void 0}}function wI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
207
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pe(t){return xI(t)||IC(t)||Zh(t)||wI()}var TC=function(e){return+setTimeout(e,16)},PC=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(TC=function(e){return window.requestAnimationFrame(e)},PC=function(e){return window.cancelAnimationFrame(e)});var Rg=0,Wc=new Map;function AC(t){Wc.delete(t)}var kt=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Rg+=1;var r=Rg;function o(i){if(i===0)AC(r),e();else{var a=TC(function(){o(i-1)});Wc.set(r,a)}}return o(n),r};kt.cancel=function(t){var e=Wc.get(t);return AC(t),PC(e)};process.env.NODE_ENV!=="production"&&(kt.ids=function(){return Wc});function kC(t){if(Array.isArray(t))return t}function EI(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 DC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
208
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function le(t,e){return kC(t)||EI(t,e)||Zh(t,e)||DC()}function ms(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 Gn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function df(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 Ig="data-rc-order",Tg="data-rc-priority",NI="rc-util-key",ff=new Map;function _C(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):NI}function qc(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function OI(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function ep(t){return Array.from((ff.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function BC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Gn())return null;var n=e.csp,r=e.prepend,o=e.priority,i=o===void 0?0:o,a=OI(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(Ig,a),s&&i&&l.setAttribute(Tg,"".concat(i)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=qc(e),u=c.firstChild;if(r){if(s){var d=(e.styles||ep(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(Ig)))return!1;var p=Number(f.getAttribute(Tg)||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 jC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=qc(e);return(e.styles||ep(n)).find(function(r){return r.getAttribute(_C(e))===t})}function gs(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=jC(t,e);if(n){var r=qc(e);r.removeChild(n)}}function $I(t,e){var n=ff.get(t);if(!n||!df(document,n)){var r=BC("",e),o=r.parentNode;ff.set(t,o),t.removeChild(r)}}function go(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=qc(n),o=ep(r),i=q(q({},n),{},{styles:o});$I(r,i);var a=jC(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=BC(t,i);return u.setAttribute(_C(i),e),u}function MI(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 xt(t,e){if(t==null)return{};var n,r,o=MI(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 pa(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(yt(!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&&st(i)==="object"&&st(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 RI="%";function hf(t){return t.join(RI)}var II=function(){function t(e){xn(this,t),W(this,"instanceId",void 0),W(this,"cache",new Map),this.instanceId=e}return wn(t,[{key:"get",value:function(n){return this.opGet(hf(n))}},{key:"opGet",value:function(n){return this.cache.get(n)||null}},{key:"update",value:function(n,r){return this.opUpdate(hf(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}(),ma="data-token-hash",kr="data-css-hash",TI="data-cache-path",Bo="__cssinjs_instance__";function PI(){var t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var e=document.body.querySelectorAll("style[".concat(kr,"]"))||[],n=document.head.firstChild;Array.from(e).forEach(function(o){o[Bo]=o[Bo]||t,o[Bo]===t&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(kr,"]"))).forEach(function(o){var i=o.getAttribute(kr);if(r[i]){if(o[Bo]===t){var a;(a=o.parentNode)===null||a===void 0||a.removeChild(o)}}else r[i]=!0})}return new II(t)}var Is=h.createContext({hashPriority:"low",cache:PI(),defaultCache:!0});function AI(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 tp=function(){function t(){xn(this,t),W(this,"cache",void 0),W(this,"keys",void 0),W(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return wn(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=le(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),a=le(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!AI(r,n)}),this.deleteByPath(this.cache,n)}}]),t}();W(tp,"MAX_CACHE_SIZE",20);W(tp,"MAX_CACHE_OFFSET",5);var Pg=0,zC=function(){function t(e){xn(this,t),W(this,"derivatives",void 0),W(this,"id",void 0),this.derivatives=Array.isArray(e)?e:[e],this.id=Pg,e.length===0&&Qr(e.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Pg+=1}return wn(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),t}(),Yu=new tp;function pf(t){var e=Array.isArray(t)?t:[t];return Yu.has(e)||Yu.set(e,new zC(e)),Yu.get(e)}var kI=new WeakMap,Ju={};function DI(t,e){for(var n=kI,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(Ju)||n.set(Ju,t()),n.get(Ju)}var Ag=new WeakMap;function Qa(t){var e=Ag.get(t)||"";return e||(Object.keys(t).forEach(function(n){var r=t[n];e+=n,r instanceof zC?e+=r.id:r&&st(r)==="object"?e+=Qa(r):e+=r}),e=ms(e),Ag.set(t,e)),e}function kg(t,e){return ms("".concat(e,"_").concat(Qa(t)))}var mf=Gn();function se(t){return typeof t=="number"?"".concat(t,"px"):t}function uc(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=q(q({},o),{},(r={},W(r,ma,e),W(r,kr,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 Tl=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()},_I=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=le(o,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},LC=function(e,n,r){var o={},i={};return Object.entries(e).forEach(function(a){var s,l,c=le(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=Tl(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,_I(o,n,{scope:r==null?void 0:r.scope})]},Dg=process.env.NODE_ENV!=="test"&&Gn()?h.useLayoutEffect:h.useEffect,Jt=function(e,n){var r=h.useRef(!0);Dg(function(){return e(r.current)},n),Dg(function(){return r.current=!1,function(){r.current=!0}},[])},Za=function(e,n){Jt(function(r){if(!r)return e()},n)},BI=q({},h),_g=BI.useInsertionEffect,jI=function(e,n,r){h.useMemo(e,r),Jt(function(){return n(!0)},r)},zI=_g?function(t,e,n){return _g(function(){return t(),e()},n)}:jI,LI=q({},h),VI=LI.useInsertionEffect,FI=function(e){var n=[],r=!1;function o(i){if(r){process.env.NODE_ENV!=="production"&&Qr(!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},HI=function(){return function(e){e()}},WI=typeof VI<"u"?FI:HI;function qI(){return!1}var gf=!1;function KI(){return gf}const UI=process.env.NODE_ENV==="production"?qI:KI;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){var ul=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(ul&&typeof ul.webpackHotUpdate=="function"){var GI=ul.webpackHotUpdate;ul.webpackHotUpdate=function(){return gf=!0,setTimeout(function(){gf=!1},0),GI.apply(void 0,arguments)}}}function np(t,e,n,r,o){var i=h.useContext(Is),a=i.cache,s=[t].concat(Pe(e)),l=hf(s),c=WI([l]),u=UI(),d=function(v){a.opUpdate(l,function(g){var y=g||[void 0,void 0],b=le(y,2),C=b[0],x=C===void 0?0:C,S=b[1],w=S;process.env.NODE_ENV!=="production"&&S&&u&&(r==null||r(w,u),w=null);var E=w||n(),M=[x,E];return v?v(M):M})};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 zI(function(){o==null||o(p)},function(m){return d(function(v){var g=le(v,2),y=g[0],b=g[1];return m&&y===0&&(o==null||o(p)),[y+1,b]}),function(){a.opUpdate(l,function(v){var g=v||[],y=le(g,2),b=y[0],C=b===void 0?0:b,x=y[1],S=C-1;return S===0?(c(function(){(m||!a.opGet(l))&&(r==null||r(x,!1))}),null):[C-1,x]})}},[l]),p}var XI={},YI=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",ii=new Map;function JI(t){ii.set(t,(ii.get(t)||0)+1)}function QI(t,e){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(ma,'="').concat(t,'"]'));n.forEach(function(r){if(r[Bo]===e){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var ZI=0;function eT(t,e){ii.set(t,(ii.get(t)||0)-1);var n=Array.from(ii.keys()),r=n.filter(function(o){var i=ii.get(o)||0;return i<=0});n.length-r.length>ZI&&r.forEach(function(o){QI(o,e),ii.delete(o)})}var tT=function(e,n,r,o){var i=r.getDerivativeToken(e),a=q(q({},i),n);return o&&(a=o(a)),a},VC="token";function nT(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=N.useContext(Is),o=r.cache.instanceId,i=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?XI:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,p=DI(function(){return Object.assign.apply(Object,[{}].concat(Pe(e)))},e),m=Qa(p),v=Qa(c),g=f?Qa(f):"",y=np(VC,[s,t.id,m,v,g],function(){var b,C=d?d(p,c,t):tT(p,c,t,u),x=q({},C),S="";if(f){var w=LC(C,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),E=le(w,2);C=E[0],S=E[1]}var M=kg(C,s);C._tokenKey=M,x._tokenKey=kg(x,s);var $=(b=f==null?void 0:f.key)!==null&&b!==void 0?b:M;C._themeKey=$,JI($);var R="".concat(YI,"-").concat(ms(M));return C._hashId=R,[C,R,x,S,(f==null?void 0:f.key)||""]},function(b){eT(b[0]._themeKey,o)},function(b){var C=le(b,4),x=C[0],S=C[3];if(f&&S){var w=go(S,ms("css-variables-".concat(x._themeKey)),{mark:kr,prepend:"queue",attachTo:i,priority:-999});w[Bo]=o,w.setAttribute(ma,x._themeKey)}});return y}var rT=function(e,n,r){var o=le(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=uc(a,s,u,f,c);return[d,u,p]},oT={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},FC="comm",HC="rule",WC="decl",iT="@import",aT="@namespace",sT="@keyframes",lT="@layer",qC=Math.abs,rp=String.fromCharCode;function KC(t){return t.trim()}function Pl(t,e,n){return t.replace(e,n)}function cT(t,e,n){return t.indexOf(e,n)}function ra(t,e){return t.charCodeAt(e)|0}function ga(t,e,n){return t.slice(e,n)}function Kr(t){return t.length}function uT(t){return t.length}function dl(t,e){return e.push(t),t}var Kc=1,va=1,UC=0,Nr=0,On=0,Ea="";function op(t,e,n,r,o,i,a,s){return{value:t,root:e,parent:n,type:r,props:o,children:i,line:Kc,column:va,length:a,return:"",siblings:s}}function dT(){return On}function fT(){return On=Nr>0?ra(Ea,--Nr):0,va--,On===10&&(va=1,Kc--),On}function Dr(){return On=Nr<UC?ra(Ea,Nr++):0,va++,On===10&&(va=1,Kc++),On}function jo(){return ra(Ea,Nr)}function Al(){return Nr}function Uc(t,e){return ga(Ea,t,e)}function vs(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 hT(t){return Kc=va=1,UC=Kr(Ea=t),Nr=0,[]}function pT(t){return Ea="",t}function Qu(t){return KC(Uc(Nr-1,vf(t===91?t+2:t===40?t+1:t)))}function mT(t){for(;(On=jo())&&On<33;)Dr();return vs(t)>2||vs(On)>3?"":" "}function gT(t,e){for(;--e&&Dr()&&!(On<48||On>102||On>57&&On<65||On>70&&On<97););return Uc(t,Al()+(e<6&&jo()==32&&Dr()==32))}function vf(t){for(;Dr();)switch(On){case t:return Nr;case 34:case 39:t!==34&&t!==39&&vf(On);break;case 40:t===41&&vf(t);break;case 92:Dr();break}return Nr}function vT(t,e){for(;Dr()&&t+On!==57;)if(t+On===84&&jo()===47)break;return"/*"+Uc(e,Nr-1)+"*"+rp(t===47?t:Dr())}function bT(t){for(;!vs(jo());)Dr();return Uc(t,Nr)}function yT(t){return pT(kl("",null,null,null,[""],t=hT(t),0,[0],t))}function kl(t,e,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,v=1,g=1,y=1,b=0,C="",x=o,S=i,w=r,E=C;g;)switch(m=b,b=Dr()){case 40:if(m!=108&&ra(E,d-1)==58){cT(E+=Pl(Qu(b),"&","&\f"),"&\f",qC(c?s[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:E+=Qu(b);break;case 9:case 10:case 13:case 32:E+=mT(m);break;case 92:E+=gT(Al()-1,7);continue;case 47:switch(jo()){case 42:case 47:dl(CT(vT(Dr(),Al()),e,n,l),l),(vs(m||1)==5||vs(jo()||1)==5)&&Kr(E)&&ga(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*v:s[c++]=Kr(E)*y;case 125*v:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:y==-1&&(E=Pl(E,/\f/g,"")),p>0&&(Kr(E)-d||v===0&&m===47)&&dl(p>32?jg(E+";",r,n,d-1,l):jg(Pl(E," ","")+";",r,n,d-2,l),l);break;case 59:E+=";";default:if(dl(w=Bg(E,e,n,c,u,o,s,C,x=[],S=[],d,i),i),b===123)if(u===0)kl(E,e,w,w,x,i,d,s,S);else{switch(f){case 99:if(ra(E,3)===110)break;case 108:if(ra(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?kl(t,w,w,r&&dl(Bg(t,w,w,0,0,o,s,C,o,x=[],d,S),S),o,S,d,s,r?x:S):kl(E,w,w,w,[""],S,0,s,S)}}c=u=p=0,v=y=1,C=E="",d=a;break;case 58:d=1+Kr(E),p=m;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&fT()==125)continue}switch(E+=rp(b),b*v){case 38:y=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(Kr(E)-1)*y,y=1;break;case 64:jo()===45&&(E+=Qu(Dr())),f=jo(),u=d=Kr(C=E+=bT(Al())),b++;break;case 45:m===45&&Kr(E)==2&&(v=0)}}return i}function Bg(t,e,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,p=o===0?i:[""],m=uT(p),v=0,g=0,y=0;v<r;++v)for(var b=0,C=ga(t,f+1,f=qC(g=a[v])),x=t;b<m;++b)(x=KC(g>0?p[b]+" "+C:Pl(C,/&\f/g,p[b])))&&(l[y++]=x);return op(t,e,n,o===0?HC:s,l,c,u,d)}function CT(t,e,n,r){return op(t,e,n,FC,rp(dT()),ga(t,2,-2),0,r)}function jg(t,e,n,r,o){return op(t,e,n,WC,ga(t,0,r),ga(t,r+1,-1),r,o)}function bf(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function ST(t,e,n,r){switch(t.type){case lT:if(t.children.length)break;case iT:case aT:case WC:return t.return=t.return||t.value;case FC:return"";case sT:return t.return=t.value+"{"+bf(t.children,r)+"}";case HC:if(!Kr(t.value=t.props.join(",")))return""}return Kr(n=bf(t.children,r))?t.return=t.value+"{"+n+"}":""}function GC(t,e){var n=e.path,r=e.parentSelectors;yt(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(t).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var xT=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)!=="'"))&&GC("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},wT=function(e,n,r){e==="animation"&&r.hashId&&n!=="none"&&GC("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},zg="data-ant-cssinjs-cache-path",XC="_FILE_STYLE__",vi,YC=!0;function ET(){if(!vi&&(vi={},Gn())){var t=document.createElement("div");t.className=zg,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=le(i,2),s=a[0],l=a[1];vi[s]=l});var n=document.querySelector("style[".concat(zg,"]"));if(n){var r;YC=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(t)}}function NT(t){return ET(),!!vi[t]}function OT(t){var e=vi[t],n=null;if(e&&Gn())if(YC)n=XC;else{var r=document.querySelector("style[".concat(kr,'="').concat(vi[t],'"]'));r?n=r.innerHTML:delete vi[t]}return[n,e]}var JC="_skip_check_",QC="_multi_value_";function Dl(t){var e=bf(yT(t),ST);return e.replace(/\{%%%\:[^;];}/g,";")}function $T(t){return st(t)==="object"&&t&&(JC in t||QC in t)}function Lg(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(Pe(l.slice(1))).join(" ")});return i.join(",")}var MT=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,v="",g={};function y(x){var S=x.getName(s);if(!g[S]){var w=t(x.style,n,{root:!1,parentSelectors:a}),E=le(w,1),M=E[0];g[S]="@keyframes ".concat(x.getName(s)).concat(M)}}function b(x){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return x.forEach(function(w){Array.isArray(w)?b(w,S):w&&S.push(w)}),S}var C=b(Array.isArray(e)?e:[e]);return C.forEach(function(x){var S=typeof x=="string"&&!o?{}:x;if(typeof S=="string")v+="".concat(S,`
|
|
209
|
-
`);else if(S._keyframe)y(S);else{var w=f.reduce(function(E,M){var $;return(M==null||($=M.visit)===null||$===void 0?void 0:$.call(M,E))||E},S);Object.keys(w).forEach(function(E){var M=w[E];if(st(M)==="object"&&M&&(E!=="animationName"||!M._keyframe)&&!$T(M)){var $=!1,R=E.trim(),I=!1;(o||i)&&s?R.startsWith("@")?$=!0:R==="&"?R=Lg("",s,u):R=Lg(E,s,u):o&&!s&&(R==="&"||R==="")&&(R="",I=!0);var D=t(M,n,{root:I,injectHash:$,parentSelectors:[].concat(Pe(a),[R])}),_=le(D,2),A=_[0],z=_[1];g=q(q({},g),z),v+="".concat(R).concat(A)}else{let B=function(F,H){process.env.NODE_ENV!=="production"&&(st(M)!=="object"||!(M!=null&&M[JC]))&&[xT,wT].concat(Pe(m)).forEach(function(J){return J(F,H,{path:c,hashId:s,parentSelectors:a})});var L=F.replace(/[A-Z]/g,function(J){return"-".concat(J.toLowerCase())}),G=H;!oT[F]&&typeof G=="number"&&G!==0&&(G="".concat(G,"px")),F==="animationName"&&H!==null&&H!==void 0&&H._keyframe&&(y(H),G=H.getName(s)),v+="".concat(L,":").concat(G,";")};var k,P=(k=M==null?void 0:M.value)!==null&&k!==void 0?k:M;st(M)==="object"&&M!==null&&M!==void 0&&M[QC]&&Array.isArray(P)?P.forEach(function(F){B(E,F)}):B(E,P)}})}}),o?l&&(v&&(v="@layer ".concat(l.name," {").concat(v,"}")),l.dependencies&&(g["@layer ".concat(l.name)]=l.dependencies.map(function(x){return"@layer ".concat(x,", ").concat(l.name,";")}).join(`
|
|
210
|
-
`))):v="{".concat(v,"}"),[v,g]};function ZC(t,e){return ms("".concat(t.join("%")).concat(e))}function RT(){return null}var eS="style";function yf(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(Is),d=u.autoClear,f=u.mock,p=u.defaultCache,m=u.hashPriority,v=u.container,g=u.ssrInline,y=u.transformers,b=u.linters,C=u.cache,x=u.layer,S=n._tokenKey,w=[S];x&&w.push("layer"),w.push.apply(w,Pe(r));var E=mf;process.env.NODE_ENV!=="production"&&f!==void 0&&(E=f==="client");var M=np(eS,w,function(){var _=w.join("|");if(NT(_)){var A=OT(_),z=le(A,2),k=z[0],P=z[1];if(k)return[k,S,P,{},s,c]}var B=e(),F=MT(B,{hashId:o,hashPriority:m,layer:x?i:void 0,path:r.join("-"),transformers:y,linters:b}),H=le(F,2),L=H[0],G=H[1],J=Dl(L),V=ZC(w,J);return[J,S,V,G,s,c]},function(_,A){var z=le(_,3),k=z[2];(A||d)&&mf&&gs(k,{mark:kr})},function(_){var A=le(_,4),z=A[0];A[1];var k=A[2],P=A[3];if(E&&z!==XC){var B={mark:kr,prepend:x?!1:"queue",attachTo:v,priority:c},F=typeof a=="function"?a():a;F&&(B.csp={nonce:F});var H=[],L=[];Object.keys(P).forEach(function(J){J.startsWith("@layer")?H.push(J):L.push(J)}),H.forEach(function(J){go(Dl(P[J]),"_layer-".concat(J),q(q({},B),{},{prepend:!0}))});var G=go(z,k,B);G[Bo]=C.instanceId,G.setAttribute(ma,S),process.env.NODE_ENV!=="production"&&G.setAttribute(TI,w.join("|")),L.forEach(function(J){go(Dl(P[J]),"_effect-".concat(J),B)})}}),$=le(M,3),R=$[0],I=$[1],D=$[2];return function(_){var A;if(!g||E||!p)A=h.createElement(RT,null);else{var z;A=h.createElement("style",Le({},(z={},W(z,ma,I),W(z,kr,D),z),{dangerouslySetInnerHTML:{__html:R}}))}return h.createElement(h.Fragment,null,A,_)}}var IT=function(e,n,r){var o=le(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=uc(i,a,s,m,f),l&&Object.keys(l).forEach(function(v){if(!n[v]){n[v]=!0;var g=Dl(l[v]),y=uc(g,a,"_effect-".concat(v),m,f);v.startsWith("@layer")?p=y+p:p+=y}}),[u,s,p]},tS="cssVar",TT=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=N.useContext(Is),d=u.cache.instanceId,f=u.container,p=s._tokenKey,m=[].concat(Pe(e.path),[r,c,p]),v=np(tS,m,function(){var g=n(),y=LC(g,r,{prefix:o,unitless:i,ignore:a,scope:c}),b=le(y,2),C=b[0],x=b[1],S=ZC(m,x);return[C,x,S,r]},function(g){var y=le(g,3),b=y[2];mf&&gs(b,{mark:kr})},function(g){var y=le(g,3),b=y[1],C=y[2];if(b){var x=go(b,C,{mark:kr,prepend:"queue",attachTo:f,priority:-999});x[Bo]=d,x.setAttribute(ma,r)}});return v},PT=function(e,n,r){var o=le(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=uc(i,s,a,d,c);return[u,a,f]},Da;Da={},W(Da,eS,IT),W(Da,VC,rT),W(Da,tS,PT);var qt=function(){function t(e,n){xn(this,t),W(this,"name",void 0),W(this,"style",void 0),W(this,"_keyframe",!0),this.name=e,this.style=n}return wn(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 zi(t){return t.notSplit=!0,t}zi(["borderTop","borderBottom"]),zi(["borderTop"]),zi(["borderBottom"]),zi(["borderLeft","borderRight"]),zi(["borderLeft"]),zi(["borderRight"]);var ip=N.createContext({});function nS(t){return kC(t)||IC(t)||Zh(t)||DC()}function Gr(t,e){for(var n=t,r=0;r<e.length;r+=1){if(n==null)return;n=n[e[r]]}return n}function rS(t,e,n,r){if(!e.length)return n;var o=nS(e),i=o[0],a=o.slice(1),s;return!t&&typeof i=="number"?s=[]:Array.isArray(t)?s=Pe(t):s=q({},t),r&&n===void 0&&a.length===1?delete s[i][a[0]]:s[i]=rS(s[i],a,n,r),s}function Tr(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!Gr(t,e.slice(0,-1))?t:rS(t,e,n,r)}function AT(t){return st(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function Vg(t){return Array.isArray(t)?[]:{}}var kT=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Qi(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Vg(e[0]);return e.forEach(function(o){function i(a,s){var l=new Set(s),c=Gr(o,a),u=Array.isArray(c);if(u||AT(c)){if(!l.has(c)){l.add(c);var d=Gr(r,a);u?r=Tr(r,a,[]):(!d||st(d)!=="object")&&(r=Tr(r,a,Vg(c))),kT(c).forEach(function(f){i([].concat(Pe(a),[f]),l)})}}else r=Tr(r,a,c)}i([])}),r}function oS(){}let ao=null;function DT(){ao=null,yC()}let ap=oS;process.env.NODE_ENV!=="production"&&(ap=(t,e,n)=>{yt(t,`[antd: ${e}] ${n}`),process.env.NODE_ENV==="test"&&DT()});const iS=h.createContext({}),on=process.env.NODE_ENV!=="production"?t=>{const{strict:e}=h.useContext(iS),n=(r,o,i)=>{if(!r)if(e===!1&&o==="deprecated"){const a=ao;ao||(ao={}),ao[t]=ao[t]||[],ao[t].includes(i||"")||ao[t].push(i||""),a||console.warn("[antd] There exists deprecated usage in your code:",ao)}else process.env.NODE_ENV!=="production"&&ap(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=oS,t},Pi=ap,_T=N.createContext(void 0);var BT={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"},jT={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},zT=q(q({},jT),{},{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 aS={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Fg={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"]},zT),timePickerLocale:Object.assign({},aS)},sr="${label} is not a valid ${type}",Oi={locale:"en",Pagination:BT,DatePicker:Fg,TimePicker:aS,Calendar:Fg,global:{placeholder:"Please select"},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:sr,method:sr,array:sr,object:sr,number:sr,date:sr,boolean:sr,integer:sr,float:sr,regexp:sr,email:sr,url:sr,hex:sr},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 _l=Object.assign({},Oi.Modal),Bl=[];const Hg=()=>Bl.reduce((t,e)=>Object.assign(Object.assign({},t),e),Oi.Modal);function LT(t){if(t){const e=Object.assign({},t);return Bl.push(e),_l=Hg(),()=>{Bl=Bl.filter(n=>n!==e),_l=Hg()}}_l=Object.assign({},Oi.Modal)}function sS(){return _l}const sp=N.createContext(void 0),So=(t,e)=>{const n=h.useContext(sp),r=h.useMemo(()=>{var i;const a=e||Oi[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?Oi.locale:i},[n]);return[r,o]},lS="internalMark",cS=t=>{const{locale:e={},children:n,_ANT_MARK__:r}=t;if(process.env.NODE_ENV!=="production"){const i=on("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===lS,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}h.useEffect(()=>LT(e==null?void 0:e.Modal),[e]);const o=h.useMemo(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return h.createElement(sp.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(cS.displayName="LocaleProvider");const uS={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"},bs=Object.assign(Object.assign({},uS),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
211
|
-
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
212
|
-
'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}),kn=Math.round;function Zu(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 Wg=(t,e,n)=>n===0?t:t/100;function _a(t,e){const n=e||255;return t>n?n:t<0?0:t}class Ht{constructor(e){W(this,"isValid",!0),W(this,"r",0),W(this,"g",0),W(this,"b",0),W(this,"a",1),W(this,"_h",void 0),W(this,"_s",void 0),W(this,"_l",void 0),W(this,"_v",void 0),W(this,"_max",void 0),W(this,"_min",void 0),W(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 Ht)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=_a(e.r),this.g=_a(e.g),this.b=_a(e.b),this.a=typeof e.a=="number"?_a(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=kn(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:kn(i("r")),g:kn(i("g")),b:kn(i("b")),a:kn(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=>kn((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=kn(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=kn(this.getSaturation()*100),r=kn(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]=_a(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=kn(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=kn((i+d)*255),this.g=kn((a+d)*255),this.b=kn((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=kn(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=kn(r*(1-n)*255),u=kn(r*(1-n*l)*255),d=kn(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=Zu(e,Wg);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=Zu(e,Wg);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=Zu(e,(r,o)=>o.includes("%")?kn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var fl=2,qg=.16,VT=.05,FT=.05,HT=.15,dS=5,fS=4,WT=[{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 Kg(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-fl*e:Math.round(t.h)+fl*e:r=n?Math.round(t.h)+fl*e:Math.round(t.h)-fl*e,r<0?r+=360:r>=360&&(r-=360),r}function Ug(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-qg*e:e===fS?r=t.s+qg:r=t.s+VT*e,r>1&&(r=1),n&&e===dS&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Gg(t,e,n){var r;return n?r=t.v+FT*e:r=t.v-HT*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function ys(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Ht(t),o=r.toHsv(),i=dS;i>0;i-=1){var a=new Ht({h:Kg(o,i,!0),s:Ug(o,i,!0),v:Gg(o,i,!0)});n.push(a)}n.push(r);for(var s=1;s<=fS;s+=1){var l=new Ht({h:Kg(o,s),s:Ug(o,s),v:Gg(o,s)});n.push(l)}return e.theme==="dark"?WT.map(function(c){var u=c.index,d=c.amount;return new Ht(e.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var ed={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"},Cf=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Cf.primary=Cf[5];var Sf=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Sf.primary=Sf[5];var xf=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];xf.primary=xf[5];var wf=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];wf.primary=wf[5];var Ef=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Ef.primary=Ef[5];var Nf=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Nf.primary=Nf[5];var Of=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Of.primary=Of[5];var $f=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];$f.primary=$f[5];var dc=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];dc.primary=dc[5];var Mf=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Mf.primary=Mf[5];var Rf=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Rf.primary=Rf[5];var If=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];If.primary=If[5];var Tf=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Tf.primary=Tf[5];var td={red:Cf,volcano:Sf,orange:xf,gold:wf,yellow:Ef,lime:Nf,green:Of,cyan:$f,blue:dc,geekblue:Mf,purple:Rf,magenta:If,grey:Tf};function qT(t,e){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=e;const{colorSuccess:o,colorWarning:i,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=t,d=n(l),f=n(o),p=n(i),m=n(a),v=n(s),g=r(c,u),y=t.colorLink||t.colorInfo,b=n(y),C=new Ht(m[1]).mix(new Ht(m[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:C,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new Ht("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const KT=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 UT(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},KT(r))}const GT=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function jl(t){return(t+8)/t}function XT(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:jl(n)}))}const YT=t=>{const e=XT(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 JT(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 yr=(t,e)=>new Ht(t).setA(e).toRgbString(),Ba=(t,e)=>new Ht(t).darken(e).toHexString(),QT=t=>{const e=ys(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]}},ZT=(t,e)=>{const n=t||"#fff",r=e||"#000";return{colorBgBase:n,colorTextBase:r,colorText:yr(r,.88),colorTextSecondary:yr(r,.65),colorTextTertiary:yr(r,.45),colorTextQuaternary:yr(r,.25),colorFill:yr(r,.15),colorFillSecondary:yr(r,.06),colorFillTertiary:yr(r,.04),colorFillQuaternary:yr(r,.02),colorBgSolid:yr(r,1),colorBgSolidHover:yr(r,.75),colorBgSolidActive:yr(r,.95),colorBgLayout:Ba(n,4),colorBgContainer:Ba(n,0),colorBgElevated:Ba(n,0),colorBgSpotlight:yr(r,.85),colorBgBlur:"transparent",colorBorder:Ba(n,15),colorBorderSecondary:Ba(n,6)}};function eP(t){ed.pink=ed.magenta,td.pink=td.magenta;const e=Object.keys(uS).map(n=>{const r=t[n]===ed[n]?td[n]:ys(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),qT(t,{generateColorPalettes:QT,generateNeutralColorPalettes:ZT})),YT(t.fontSize)),JT(t)),GT(t)),UT(t))}const hS=pf(eP),Pf={token:bs,override:{override:bs},hashed:!0},pS=N.createContext(Pf),Cs="ant",Gc="anticon",tP=["outlined","borderless","filled","underlined"],nP=(t,e)=>e||(t?`${Cs}-${t}`:Cs),At=h.createContext({getPrefixCls:nP,iconPrefixCls:Gc}),{Consumer:d6}=At,Xg={};function br(t){const e=h.useContext(At),{getPrefixCls:n,direction:r,getPopupContainer:o}=e,i=e[t];return Object.assign(Object.assign({classNames:Xg,styles:Xg},i),{getPrefixCls:n,direction:r,getPopupContainer:o})}const rP=`-ant-${Date.now()}-${Math.random()}`;function oP(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 Ht(a),c=ys(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 Ht(e.primaryColor),s=ys(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 Ht(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"),`
|
|
213
|
-
:root {
|
|
214
|
-
${Object.keys(n).map(a=>`--${t}-${a}: ${n[a]};`).join(`
|
|
215
|
-
`)}
|
|
216
|
-
}
|
|
217
|
-
`.trim()}function iP(t,e){const n=oP(t,e);Gn()?go(n,`${rP}-dynamic-theme`):process.env.NODE_ENV!=="production"&&Pi(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const jr=h.createContext(!1),mS=t=>{let{children:e,disabled:n}=t;const r=h.useContext(jr);return h.createElement(jr.Provider,{value:n??r},e)},ba=h.createContext(void 0),aP=t=>{let{children:e,size:n}=t;const r=h.useContext(ba);return h.createElement(ba.Provider,{value:n||r},e)};function sP(){const t=N.useContext(jr),e=N.useContext(ba);return{componentDisabled:t,componentSize:e}}var gS=wn(function t(){xn(this,t)}),vS="CALC_UNIT",lP=new RegExp(vS,"g");function nd(t){return typeof t=="number"?"".concat(t).concat(vS):t}var cP=function(t){bo(n,t);var e=yo(n);function n(r,o){var i;xn(this,n),i=e.call(this),W(It(i),"result",""),W(It(i),"unitlessCssVar",void 0),W(It(i),"lowPriority",void 0);var a=st(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=nd(r):a==="string"&&(i.result=r),i}return wn(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(nd(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(nd(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(lP,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(gS),uP=function(t){bo(n,t);var e=yo(n);function n(r){var o;return xn(this,n),o=e.call(this),W(It(o),"result",0),r instanceof n?o.result=r.result:typeof r=="number"&&(o.result=r),o}return wn(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}(gS),dP=function(e,n){var r=e==="css"?cP:uP;return function(o){return new r(o,n)}},Yg=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 Wt(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 ya(t){var e=h.useRef(!1),n=h.useState(t),r=le(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 rd(t){return t!==void 0}function mn(t,e){var n=e||{},r=n.defaultValue,o=n.value,i=n.onChange,a=n.postState,s=ya(function(){return rd(o)?o:rd(r)?typeof r=="function"?r():r:typeof t=="function"?t():t}),l=le(s,2),c=l[0],u=l[1],d=o!==void 0?o:c,f=a?a(d):d,p=Wt(i),m=ya([d]),v=le(m,2),g=v[0],y=v[1];Za(function(){var C=g[0];c!==C&&p(c,C)},[g]),Za(function(){rd(o)||u(o)},[o]);var b=Wt(function(C,x){u(C,x),y([d],x)});return[f,b]}function Jg(t,e,n,r){var o=q({},e[t]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=le(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&yt(!(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=q(q({},n),o);return Object.keys(a).forEach(function(s){a[s]===e[s]&&delete a[s]}),a}var bS=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Af=!0;function Lt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(!bS)return Object.assign.apply(Object,[{}].concat(e));Af=!1;var r={};return e.forEach(function(o){if(st(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),Af=!0,r}var Qg={};function fP(){}var hP=function(e){var n,r=e,o=fP;return bS&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(e,{get:function(a,s){if(Af){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;Qg[a]={global:Array.from(n),component:q(q({},(l=Qg[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function Zg(t,e,n){if(typeof n=="function"){var r;return n(Lt(e,(r=e[t])!==null&&r!==void 0?r:{}))}return n??{}}function pP(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 se(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 se(i)}).join(","),")")}}}var mP=1e3*60*10,gP=function(){function t(){xn(this,t),W(this,"map",new Map),W(this,"objectIDMap",new WeakMap),W(this,"nextID",0),W(this,"lastAccessBeat",new Map),W(this,"accessBeat",0)}return wn(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&&st(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(st(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>mP&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),t}(),ev=new gP;function vP(t,e){return N.useMemo(function(){var n=ev.get(e);if(n)return n;var r=t();return ev.set(e,r),r},e)}var bP=function(){return{}};function yP(t){var e=t.useCSP,n=e===void 0?bP:e,r=t.useToken,o=t.usePrefix,i=t.getResetStyles,a=t.getCommonStyle,s=t.getCompUnitless;function l(f,p,m,v){var g=Array.isArray(f)?f[0]:f;function y(M){return"".concat(String(g)).concat(M.slice(0,1).toUpperCase()).concat(M.slice(1))}var b=(v==null?void 0:v.unitless)||{},C=typeof s=="function"?s(f):{},x=q(q({},C),{},W({},y("zIndexPopup"),!0));Object.keys(b).forEach(function(M){x[y(M)]=b[M]});var S=q(q({},v),{},{unitless:x,prefixToken:y}),w=u(f,p,m,S),E=c(g,m,S);return function(M){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M,R=w(M,$),I=le(R,2),D=I[1],_=E($),A=le(_,2),z=A[0],k=A[1];return[z,D,k]}}function c(f,p,m){var v=m.unitless,g=m.injectStyle,y=g===void 0?!0:g,b=m.prefixToken,C=m.ignore,x=function(E){var M=E.rootCls,$=E.cssVar,R=$===void 0?{}:$,I=r(),D=I.realToken;return TT({path:[f],prefix:R.prefix,key:R.key,unitless:v,ignore:C,token:D,scope:M},function(){var _=Zg(f,D,p),A=Jg(f,D,_,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(_).forEach(function(z){A[b(z)]=A[z],delete A[z]}),A}),null},S=function(E){var M=r(),$=M.cssVar;return[function(R){return y&&$?N.createElement(N.Fragment,null,N.createElement(x,{rootCls:E,cssVar:$,component:f}),R):R},$==null?void 0:$.key]};return S}function u(f,p,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(f)?f:[f,f],y=le(g,1),b=y[0],C=g.join("-"),x=t.layer||{name:"antd"};return function(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:S,E=r(),M=E.theme,$=E.realToken,R=E.hashId,I=E.token,D=E.cssVar,_=o(),A=_.rootPrefixCls,z=_.iconPrefixCls,k=n(),P=D?"css":"js",B=vP(function(){var V=new Set;return D&&Object.keys(v.unitless||{}).forEach(function(X){V.add(Tl(X,D.prefix)),V.add(Tl(X,Yg(b,D.prefix)))}),dP(P,V)},[P,b,D==null?void 0:D.prefix]),F=pP(P),H=F.max,L=F.min,G={theme:M,token:I,hashId:R,nonce:function(){return k.nonce},clientOnly:v.clientOnly,layer:x,order:v.order||-999};typeof i=="function"&&yf(q(q({},G),{},{clientOnly:!1,path:["Shared",A]}),function(){return i(I,{prefix:{rootPrefixCls:A,iconPrefixCls:z},csp:k})});var J=yf(q(q({},G),{},{path:[C,S,z]}),function(){if(v.injectStyle===!1)return[];var V=hP(I),X=V.token,Q=V.flush,ue=Zg(b,$,m),Y=".".concat(S),fe=Jg(b,$,ue,{deprecatedTokens:v.deprecatedTokens});D&&ue&&st(ue)==="object"&&Object.keys(ue).forEach(function(ge){ue[ge]="var(".concat(Tl(ge,Yg(b,D.prefix)),")")});var be=Lt(X,{componentCls:Y,prefixCls:S,iconCls:".".concat(z),antCls:".".concat(A),calc:B,max:H,min:L},D?ue:fe),de=p(be,{hashId:R,prefixCls:S,rootPrefixCls:A,iconPrefixCls:z});Q(b,fe);var oe=typeof a=="function"?a(be,S,w,v.resetFont):null;return[v.resetStyle===!1?null:oe,de]});return[J,R]}}function d(f,p,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(f,p,m,q({resetStyle:!1,order:-998},v)),y=function(C){var x=C.prefixCls,S=C.rootCls,w=S===void 0?x:S;return g(x,w),null};return process.env.NODE_ENV!=="production"&&(y.displayName="SubStyle_".concat(String(Array.isArray(f)?f.join("."):f))),y}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const qo=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],CP="5.24.5";function od(t){return t>=0&&t<=255}function qa(t,e){const{r:n,g:r,b:o,a:i}=new Ht(t).toRgb();if(i<1)return t;const{r:a,g:s,b:l}=new Ht(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(od(u)&&od(d)&&od(f))return new Ht({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ht({r:n,g:r,b:o,a:1}).toRgbString()}var SP=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 yS(t){const{override:e}=t,n=SP(t,["override"]),r=Object.assign({},e);Object.keys(bs).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:qa(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:qa(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:qa(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:qa(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:`
|
|
218
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
219
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
220
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
221
|
-
`,boxShadowSecondary:`
|
|
222
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
223
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
224
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
225
|
-
`,boxShadowTertiary:`
|
|
226
|
-
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
227
|
-
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
228
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
229
|
-
`,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:`
|
|
230
|
-
0 1px 2px -2px ${new Ht("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
231
|
-
0 3px 6px 0 ${new Ht("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
232
|
-
0 5px 12px 4px ${new Ht("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
233
|
-
`,boxShadowDrawerRight:`
|
|
234
|
-
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
235
|
-
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
236
|
-
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
237
|
-
`,boxShadowDrawerLeft:`
|
|
238
|
-
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
239
|
-
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
240
|
-
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
241
|
-
`,boxShadowDrawerUp:`
|
|
242
|
-
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
243
|
-
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
244
|
-
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
245
|
-
`,boxShadowDrawerDown:`
|
|
246
|
-
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
247
|
-
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
248
|
-
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
249
|
-
`,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 tv=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 CS={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},xP={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},wP={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},SS=(t,e,n)=>{const r=n.getDerivativeToken(t),{override:o}=e,i=tv(e,["override"]);let a=Object.assign(Object.assign({},r),{override:o});return a=yS(a),i&&Object.entries(i).forEach(s=>{let[l,c]=s;const{theme:u}=c,d=tv(c,["theme"]);let f=d;u&&(f=SS(Object.assign(Object.assign({},a),d),{override:d},u)),a[l]=f}),a};function ar(){const{token:t,hashed:e,theme:n,override:r,cssVar:o}=N.useContext(pS),i=`${CP}-${e||""}`,a=n||hS,[s,l,c]=nT(a,[bs,t],{salt:i,override:r,getComputedToken:SS,formatToken:yS,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:CS,ignore:xP,preserve:wP}});return[a,c,e?l:"",s,o]}const Ss={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Fn=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}},Ai=()=>({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"}}),fc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),EP=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"}}}),NP=(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})}},lp=(t,e)=>({outline:`${se(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),Ca=(t,e)=>({"&:focus-visible":Object.assign({},lp(t,e))}),xS=t=>({[`.${t}`]:Object.assign(Object.assign({},Ai()),{[`.${t} .${t}-icon`]:{display:"block"}})}),{genStyleHooks:hn,genComponentStyleHook:OP,genSubStyleComponent:wS}=yP({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=N.useContext(At);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,r,o]=ar();return{theme:t,realToken:e,hashId:n,token:r,cssVar:o}},useCSP:()=>{const{csp:t}=N.useContext(At);return t??{}},getResetStyles:(t,e)=>{var n;const r=EP(t);return[r,{"&":r},xS((n=e==null?void 0:e.prefix.iconPrefixCls)!==null&&n!==void 0?n:Gc)]},getCommonStyle:NP,getCompUnitless:()=>CS});function $P(t,e){return qo.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 MP=(t,e)=>{const[n,r]=ar();return yf({token:r,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>[xS(t)])},RP=Object.assign({},h),{useId:nv}=RP,IP=()=>"",TP=typeof nv>"u"?IP:nv;function PP(t,e,n){var r,o;const i=on("ConfigProvider"),a=t||{},s=a.inherit===!1||!e?Object.assign(Object.assign({},Pf),{hashed:(r=e==null?void 0:e.hashed)!==null&&r!==void 0?r:Pf.hashed,cssVar:e==null?void 0:e.cssVar}):e,l=TP();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 Rs(()=>{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!pa(d,p,!0)}))}var AP=["children"],ES=h.createContext({});function kP(t){var e=t.children,n=xt(t,AP);return h.createElement(ES.Provider,{value:n},e)}var DP=function(t){bo(n,t);var e=yo(n);function n(){return xn(this,n),e.apply(this,arguments)}return wn(n,[{key:"render",value:function(){return this.props.children}}]),n}(h.Component);function _P(t){var e=h.useReducer(function(s){return s+1},0),n=le(e,2),r=n[1],o=h.useRef(t),i=Wt(function(){return o.current}),a=Wt(function(s){o.current=typeof s=="function"?s(o.current):s,r()});return[i,a]}var Mo="none",hl="appear",pl="enter",ml="leave",rv="none",Pr="prepare",Zi="start",ea="active",cp="end",NS="prepared";function ov(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 BP(t,e){var n={animationend:ov("Animation","AnimationEnd"),transitionend:ov("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var jP=BP(Gn(),typeof window<"u"?window:{}),OS={};if(Gn()){var zP=document.createElement("div");OS=zP.style}var gl={};function $S(t){if(gl[t])return gl[t];var e=jP[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 OS)return gl[t]=e[i],gl[t]}return""}var MS=$S("animationend"),RS=$S("transitionend"),IS=!!(MS&&RS),iv=MS||"animationend",av=RS||"transitionend";function sv(t,e){if(!t)return null;if(st(t)==="object"){var n=e.replace(/-\w/g,function(r){return r[1].toUpperCase()});return t[n]}return"".concat(t,"-").concat(e)}const LP=function(t){var e=N.useRef();function n(o){o&&(o.removeEventListener(av,t),o.removeEventListener(iv,t))}function r(o){e.current&&e.current!==o&&n(e.current),o&&o!==e.current&&(o.addEventListener(av,t),o.addEventListener(iv,t),e.current=o)}return h.useEffect(function(){return function(){n(e.current)}},[]),[r,n]};var TS=Gn()?N.useLayoutEffect:N.useEffect;const VP=function(){var t=h.useRef(null);function e(){kt.cancel(t.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var i=kt(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 FP=[Pr,Zi,ea,cp],HP=[Pr,NS],PS=!1,WP=!0;function AS(t){return t===ea||t===cp}const qP=function(t,e,n){var r=ya(rv),o=le(r,2),i=o[0],a=o[1],s=VP(),l=le(s,2),c=l[0],u=l[1];function d(){a(Pr,!0)}var f=e?HP:FP;return TS(function(){if(i!==rv&&i!==cp){var p=f.indexOf(i),m=f[p+1],v=n(i);v===PS?a(m,!0):m&&c(function(g){function y(){g.isCanceled()||a(m,!0)}v===!0?y():Promise.resolve(v).then(y)})}},[t,i]),h.useEffect(function(){return function(){u()}},[]),[d,i]};function KP(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,v=r.onAppearStart,g=r.onEnterStart,y=r.onLeaveStart,b=r.onAppearActive,C=r.onEnterActive,x=r.onLeaveActive,S=r.onAppearEnd,w=r.onEnterEnd,E=r.onLeaveEnd,M=r.onVisibleChanged,$=ya(),R=le($,2),I=R[0],D=R[1],_=_P(Mo),A=le(_,2),z=A[0],k=A[1],P=ya(null),B=le(P,2),F=B[0],H=B[1],L=z(),G=N.useRef(!1),J=N.useRef(null);function V(){return n()}var X=N.useRef(!1);function Q(){k(Mo),H(null,!0)}var ue=Wt(function(O){var ee=z();if(ee!==Mo){var K=V();if(!(O&&!O.deadline&&O.target!==K)){var ie=X.current,Ee;ee===hl&&ie?Ee=S==null?void 0:S(K,O):ee===pl&&ie?Ee=w==null?void 0:w(K,O):ee===ml&&ie&&(Ee=E==null?void 0:E(K,O)),ie&&Ee!==!1&&Q()}}}),Y=LP(ue),fe=le(Y,1),be=fe[0],de=function(ee){switch(ee){case hl:return W(W(W({},Pr,f),Zi,v),ea,b);case pl:return W(W(W({},Pr,p),Zi,g),ea,C);case ml:return W(W(W({},Pr,m),Zi,y),ea,x);default:return{}}},oe=h.useMemo(function(){return de(L)},[L]),ge=qP(L,!t,function(O){if(O===Pr){var ee=oe[Pr];return ee?ee(V()):PS}if(me in oe){var K;H(((K=oe[me])===null||K===void 0?void 0:K.call(oe,V(),null))||null)}return me===ea&&L!==Mo&&(be(V()),u>0&&(clearTimeout(J.current),J.current=setTimeout(function(){ue({deadline:!0})},u))),me===NS&&Q(),WP}),ne=le(ge,2),ce=ne[0],me=ne[1],Oe=AS(me);X.current=Oe;var Me=N.useRef(null);TS(function(){if(!(G.current&&Me.current===e)){D(e);var O=G.current;G.current=!0;var ee;!O&&e&&s&&(ee=hl),O&&e&&i&&(ee=pl),(O&&!e&&c||!O&&d&&!e&&c)&&(ee=ml);var K=de(ee);ee&&(t||K[Pr])?(k(ee),ce()):k(Mo),Me.current=e}},[e]),N.useEffect(function(){(L===hl&&!s||L===pl&&!i||L===ml&&!c)&&k(Mo)},[s,i,c]),N.useEffect(function(){return function(){G.current=!1,clearTimeout(J.current)}},[]);var Ne=h.useRef(!1);N.useEffect(function(){I&&(Ne.current=!0),I!==void 0&&L===Mo&&((Ne.current||I)&&(M==null||M(I)),Ne.current=!0)},[I,L]);var je=F;return oe[Pr]&&me===Zi&&(je=q({transition:"none"},je)),[L,me,je,I??e]}function UP(t){var e=t;st(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,v=h.useContext(ES),g=v.motion,y=n(o,g),b=N.useRef(),C=N.useRef();function x(){try{return b.current instanceof HTMLElement?b.current:Il(C.current)}catch{return null}}var S=KP(y,s,x,o),w=le(S,4),E=w[0],M=w[1],$=w[2],R=w[3],I=h.useRef(R);R&&(I.current=!0);var D=h.useCallback(function(B){b.current=B,Yh(i,B)},[i]),_,A=q(q({},m),{},{visible:s});if(!d)_=null;else if(E===Mo)R?_=d(q({},A),D):!c&&I.current&&p?_=d(q(q({},A),{},{className:p}),D):u||!c&&!p?_=d(q(q({},A),{},{style:{display:"none"}}),D):_=null;else{var z;M===Pr?z="prepare":AS(M)?z="active":M===Zi&&(z="start");var k=sv(f,"".concat(E,"-").concat(z));_=d(q(q({},A),{},{className:re(sv(f,E),W(W({},k,k&&z),f,typeof f=="string")),style:$}),D)}if(h.isValidElement(_)&&Zo(_)){var P=Ti(_);P||(_=h.cloneElement(_,{ref:D}))}return h.createElement(DP,{ref:C},_)});return r.displayName="CSSMotion",r}const no=UP(IS);var kf="add",Df="keep",_f="remove",id="removed";function GP(t){var e;return t&&st(t)==="object"&&"key"in t?e=t:e={key:t},q(q({},e),{},{key:String(e.key)})}function Bf(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(GP)}function XP(){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=Bf(t),a=Bf(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 q(q({},p),{},{status:kf})})),r=d),n.push(q(q({},f),{},{status:Df})),r+=1,u=!0;break}}u||n.push(q(q({},c),{},{status:_f}))}),r<o&&(n=n.concat(a.slice(r).map(function(c){return q(q({},c),{},{status:kf})})));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!==_f}),n.forEach(function(u){u.key===c&&(u.status=Df)})}),n}var YP=["component","children","onVisibleChanged","onAllRemoved"],JP=["status"],QP=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function ZP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:no,n=function(r){bo(i,r);var o=yo(i);function i(){var a;xn(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)),W(It(a),"state",{keyEntities:[]}),W(It(a),"removeKey",function(u){a.setState(function(d){var f=d.keyEntities.map(function(p){return p.key!==u?p:q(q({},p),{},{status:id})});return{keyEntities:f}},function(){var d=a.state.keyEntities,f=d.filter(function(p){var m=p.status;return m!==id}).length;f===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return wn(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=xt(c,YP),m=u||h.Fragment,v={};return QP.forEach(function(g){v[g]=p[g],delete p[g]}),delete p.keys,h.createElement(m,p,l.map(function(g,y){var b=g.status,C=xt(g,JP),x=b===kf||b===Df;return h.createElement(e,Le({},v,{key:C.key,visible:x,eventProps:C,onVisibleChanged:function(w){f==null||f(w,{key:C.key}),w||s.removeKey(C.key)}}),function(S,w){return d(q(q({},S),{},{index:y}),w)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=Bf(c),f=XP(u,d);return{keyEntities:f.filter(function(p){var m=u.find(function(v){var g=v.key;return p.key===g});return!(m&&m.status===id&&p.status===_f)})}}}]),i}(h.Component);return W(n,"defaultProps",{component:"div"}),n}ZP(IS);function eA(t){const{children:e}=t,[,n]=ar(),{motion:r}=n,o=h.useRef(!1);return o.current=o.current||r===!1,o.current?h.createElement(kP,{motion:r},e):e}const kS=h.memo(t=>{let{dropdownMatchSelectWidth:e}=t;return on("ConfigProvider").deprecated(e===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(kS.displayName="PropWarning");const tA=process.env.NODE_ENV!=="production"?kS:()=>null;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};let jf=!1;const rA=process.env.NODE_ENV!=="production"?t=>{process.env.NODE_ENV!=="production"&&Pi(!jf,t,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,oA=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let hc,DS,_S,BS;function zl(){return hc||Cs}function iA(){return DS||Gc}function aA(t){return Object.keys(t).some(e=>e.endsWith("Color"))}const sA=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:o}=t;e!==void 0&&(hc=e),n!==void 0&&(DS=n),"holderRender"in t&&(BS=o),r&&(aA(r)?(process.env.NODE_ENV!=="production"&&Pi(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),iP(zl(),r)):_S=r)},lA=()=>({getPrefixCls:(t,e)=>e||(t?`${zl()}-${t}`:zl()),getIconPrefixCls:iA,getRootPrefixCls:()=>hc||zl(),getTheme:()=>_S,holderRender:BS}),cA=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:v,legacyLocale:g,parentContext:y,iconPrefixCls:b,theme:C,componentDisabled:x,segmented:S,statistic:w,spin:E,calendar:M,carousel:$,cascader:R,collapse:I,typography:D,checkbox:_,descriptions:A,divider:z,drawer:k,skeleton:P,steps:B,image:F,layout:H,list:L,mentions:G,modal:J,progress:V,result:X,slider:Q,breadcrumb:ue,menu:Y,pagination:fe,input:be,textArea:de,empty:oe,badge:ge,radio:ne,rate:ce,switch:me,transfer:Oe,avatar:Me,message:Ne,tag:je,table:O,card:ee,tabs:K,timeline:ie,timePicker:Ee,upload:Se,notification:he,tree:Ae,colorPicker:_e,datePicker:$e,rangePicker:ze,flex:Fe,wave:Ie,dropdown:Be,warning:Te,tour:He,tooltip:Ze,popover:ht,popconfirm:Tt,floatButtonGroup:Pt,variant:an,inputNumber:Ye,treeSelect:We}=t,lt=h.useCallback((nt,dt)=>{const{prefixCls:Dt}=t;if(dt)return dt;const Nt=Dt||y.getPrefixCls("");return nt?`${Nt}-${nt}`:Nt},[y.getPrefixCls,t.prefixCls]),it=b||y.iconPrefixCls||Gc,pt=n||y.csp;MP(it,pt);const Qe=PP(C,y.theme,{prefixCls:lt("")});process.env.NODE_ENV!=="production"&&(jf=jf||!!Qe);const Ke={csp:pt,autoInsertSpaceInButton:r,alert:o,anchor:i,locale:s||g,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:m??p,popupOverflow:v,getPrefixCls:lt,iconPrefixCls:it,theme:Qe,segmented:S,statistic:w,spin:E,calendar:M,carousel:$,cascader:R,collapse:I,typography:D,checkbox:_,descriptions:A,divider:z,drawer:k,skeleton:P,steps:B,image:F,input:be,textArea:de,layout:H,list:L,mentions:G,modal:J,progress:V,result:X,slider:Q,breadcrumb:ue,menu:Y,pagination:fe,empty:oe,badge:ge,radio:ne,rate:ce,switch:me,transfer:Oe,avatar:Me,message:Ne,tag:je,table:O,card:ee,tabs:K,timeline:ie,timePicker:Ee,upload:Se,notification:he,tree:Ae,colorPicker:_e,datePicker:$e,rangePicker:ze,flex:Fe,wave:Ie,dropdown:Be,warning:Te,tour:He,tooltip:Ze,popover:ht,popconfirm:Tt,floatButtonGroup:Pt,variant:an,inputNumber:Ye,treeSelect:We};process.env.NODE_ENV!=="production"&&on("ConfigProvider")(!("autoInsertSpaceInButton"in t),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Ue=Object.assign({},y);Object.keys(Ke).forEach(nt=>{Ke[nt]!==void 0&&(Ue[nt]=Ke[nt])}),oA.forEach(nt=>{const dt=t[nt];dt&&(Ue[nt]=dt)}),typeof r<"u"&&(Ue.button=Object.assign({autoInsertSpace:r},Ue.button));const wt=Rs(()=>Ue,Ue,(nt,dt)=>{const Dt=Object.keys(nt),Nt=Object.keys(dt);return Dt.length!==Nt.length||Dt.some(Gt=>nt[Gt]!==dt[Gt])}),{layer:$t}=h.useContext(Is),et=h.useMemo(()=>({prefixCls:it,csp:pt,layer:$t?"antd":void 0}),[it,pt,$t]);let qe=h.createElement(h.Fragment,null,h.createElement(tA,{dropdownMatchSelectWidth:p}),e);const ot=h.useMemo(()=>{var nt,dt,Dt,Nt;return Qi(((nt=Oi.Form)===null||nt===void 0?void 0:nt.defaultValidateMessages)||{},((Dt=(dt=wt.locale)===null||dt===void 0?void 0:dt.Form)===null||Dt===void 0?void 0:Dt.defaultValidateMessages)||{},((Nt=wt.form)===null||Nt===void 0?void 0:Nt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[wt,a==null?void 0:a.validateMessages]);Object.keys(ot).length>0&&(qe=h.createElement(_T.Provider,{value:ot},qe)),s&&(qe=h.createElement(cS,{locale:s,_ANT_MARK__:lS},qe)),qe=h.createElement(ip.Provider,{value:et},qe),l&&(qe=h.createElement(aP,{size:l},qe)),qe=h.createElement(eA,null,qe);const at=h.useMemo(()=>{const nt=Qe||{},{algorithm:dt,token:Dt,components:Nt,cssVar:Gt}=nt,Rt=nA(nt,["algorithm","token","components","cssVar"]),Bt=dt&&(!Array.isArray(dt)||dt.length>0)?pf(dt):hS,Ft={};Object.entries(Nt||{}).forEach(Mn=>{let[Yt,sn]=Mn;const Ve=Object.assign({},sn);"algorithm"in Ve&&(Ve.algorithm===!0?Ve.theme=Bt:(Array.isArray(Ve.algorithm)||typeof Ve.algorithm=="function")&&(Ve.theme=pf(Ve.algorithm)),delete Ve.algorithm),Ft[Yt]=Ve});const Xt=Object.assign(Object.assign({},bs),Dt);return Object.assign(Object.assign({},Rt),{theme:Bt,token:Xt,components:Ft,override:Object.assign({override:Xt},Ft),cssVar:Gt})},[Qe]);return C&&(qe=h.createElement(pS.Provider,{value:at},qe)),wt.warning&&(qe=h.createElement(iS.Provider,{value:wt.warning},qe)),x!==void 0&&(qe=h.createElement(mS,{disabled:x},qe)),h.createElement(At.Provider,{value:wt},qe)},ro=t=>{const e=h.useContext(At),n=h.useContext(sp);return h.createElement(cA,Object.assign({parentContext:e,legacyLocale:n},t))};ro.ConfigContext=At;ro.SizeContext=ba;ro.config=sA;ro.useConfig=sP;Object.defineProperty(ro,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&Pi(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),ba)});process.env.NODE_ENV!=="production"&&(ro.displayName="ConfigProvider");var uA={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 jS(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function dA(t){return jS(t)instanceof ShadowRoot}function pc(t){return dA(t)?jS(t):null}function fA(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function hA(t,e){yt(t,"[@ant-design/icons] ".concat(e))}function lv(t){return st(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(st(t.icon)==="object"||typeof t.icon=="function")}function cv(){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[fA(n)]=r}return e},{})}function zf(t,e,n){return n?N.createElement(t.tag,q(q({key:e},cv(t.attrs)),n),(t.children||[]).map(function(r,o){return zf(r,"".concat(e,"-").concat(t.tag,"-").concat(o))})):N.createElement(t.tag,q({key:e},cv(t.attrs)),(t.children||[]).map(function(r,o){return zf(r,"".concat(e,"-").concat(t.tag,"-").concat(o))}))}function zS(t){return ys(t)[0]}function LS(t){return t?Array.isArray(t)?t:[t]:[]}var pA=`
|
|
250
|
-
.anticon {
|
|
251
|
-
display: inline-flex;
|
|
252
|
-
align-items: center;
|
|
253
|
-
color: inherit;
|
|
254
|
-
font-style: normal;
|
|
255
|
-
line-height: 0;
|
|
256
|
-
text-align: center;
|
|
257
|
-
text-transform: none;
|
|
258
|
-
vertical-align: -0.125em;
|
|
259
|
-
text-rendering: optimizeLegibility;
|
|
260
|
-
-webkit-font-smoothing: antialiased;
|
|
261
|
-
-moz-osx-font-smoothing: grayscale;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.anticon > * {
|
|
265
|
-
line-height: 1;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.anticon svg {
|
|
269
|
-
display: inline-block;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.anticon::before {
|
|
273
|
-
display: none;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.anticon .anticon-icon {
|
|
277
|
-
display: block;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.anticon[tabindex] {
|
|
281
|
-
cursor: pointer;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.anticon-spin::before,
|
|
285
|
-
.anticon-spin {
|
|
286
|
-
display: inline-block;
|
|
287
|
-
-webkit-animation: loadingCircle 1s infinite linear;
|
|
288
|
-
animation: loadingCircle 1s infinite linear;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
@-webkit-keyframes loadingCircle {
|
|
292
|
-
100% {
|
|
293
|
-
-webkit-transform: rotate(360deg);
|
|
294
|
-
transform: rotate(360deg);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
@keyframes loadingCircle {
|
|
299
|
-
100% {
|
|
300
|
-
-webkit-transform: rotate(360deg);
|
|
301
|
-
transform: rotate(360deg);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
`,mA=function(e){var n=N.useContext(ip),r=n.csp,o=n.prefixCls,i=n.layer,a=pA;o&&(a=a.replace(/anticon/g,o)),i&&(a="@layer ".concat(i,` {
|
|
305
|
-
`).concat(a,`
|
|
306
|
-
}`)),N.useEffect(function(){var s=e.current,l=pc(s);go(a,"@ant-design-icons",{prepend:!i,csp:r,attachTo:l})},[])},gA=["icon","className","onClick","style","primaryColor","secondaryColor"],es={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function vA(t){var e=t.primaryColor,n=t.secondaryColor;es.primaryColor=e,es.secondaryColor=n||zS(e),es.calculated=!!n}function bA(){return q({},es)}var Na=function(e){var n=e.icon,r=e.className,o=e.onClick,i=e.style,a=e.primaryColor,s=e.secondaryColor,l=xt(e,gA),c=h.useRef(),u=es;if(a&&(u={primaryColor:a,secondaryColor:s||zS(a)}),mA(c),hA(lv(n),"icon should be icon definiton, but got ".concat(n)),!lv(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=q(q({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),zf(d.icon,"svg-".concat(d.name),q(q({className:r,onClick:o,style:i,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};Na.displayName="IconReact";Na.getTwoToneColors=bA;Na.setTwoToneColors=vA;function VS(t){var e=LS(t),n=le(e,2),r=n[0],o=n[1];return Na.setTwoToneColors({primaryColor:r,secondaryColor:o})}function yA(){var t=Na.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var CA=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];VS(dc.primary);var An=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=xt(t,CA),u=h.useContext(ip),d=u.prefixCls,f=d===void 0?"anticon":d,p=u.rootClassName,m=re(p,f,W(W({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!o||r.name==="loading"),n),v=a;v===void 0&&s&&(v=-1);var g=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,y=LS(l),b=le(y,2),C=b[0],x=b[1];return h.createElement("span",Le({role:"img","aria-label":r.name},c,{ref:e,tabIndex:v,onClick:s,className:m}),h.createElement(Na,{icon:r,primaryColor:C,secondaryColor:x,style:g}))});An.displayName="AntdIcon";An.getTwoToneColor=yA;An.setTwoToneColor=VS;var SA=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:uA}))},FS=h.forwardRef(SA);process.env.NODE_ENV!=="production"&&(FS.displayName="CheckCircleFilled");var xA={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"},wA=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:xA}))},Xc=h.forwardRef(wA);process.env.NODE_ENV!=="production"&&(Xc.displayName="CloseCircleFilled");var EA={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"},NA=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:EA}))},Ts=h.forwardRef(NA);process.env.NODE_ENV!=="production"&&(Ts.displayName="CloseOutlined");var OA={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"},$A=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:OA}))},HS=h.forwardRef($A);process.env.NODE_ENV!=="production"&&(HS.displayName="ExclamationCircleFilled");var MA={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"},RA=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:MA}))},WS=h.forwardRef(RA);process.env.NODE_ENV!=="production"&&(WS.displayName="InfoCircleFilled");var IA=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
307
|
-
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
308
|
-
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
309
|
-
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
310
|
-
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
311
|
-
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
312
|
-
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
313
|
-
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
314
|
-
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
315
|
-
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
316
|
-
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
317
|
-
summary tabIndex target title type useMap value width wmode wrap`,TA=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
318
|
-
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
319
|
-
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
320
|
-
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
321
|
-
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
322
|
-
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
323
|
-
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,PA="".concat(IA," ").concat(TA).split(/[\s\n]+/),AA="aria-",kA="data-";function uv(t,e){return t.indexOf(e)===0}function Zr(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=q({},e);var r={};return Object.keys(t).forEach(function(o){(n.aria&&(o==="role"||uv(o,AA))||n.data&&uv(o,kA)||n.attr&&PA.includes(o))&&(r[o]=t[o])}),r}function qS(t){return t&&N.isValidElement(t)&&t.type===N.Fragment}const DA=(t,e,n)=>N.isValidElement(t)?N.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function Or(t,e){return DA(t,t,e)}const xo=t=>{const[,,,,e]=ar();return e?`${t}-css-var`:""};var Je={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},_A={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"},BA=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:_A}))},up=h.forwardRef(BA);process.env.NODE_ENV!=="production"&&(up.displayName="LoadingOutlined");const Ps=N.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ps.displayName="zIndexContext");const co=100,jA=10,KS=co*jA,zA=KS+co,US={Modal:co,Drawer:co,Popover:co,Popconfirm:co,Tooltip:co,Tour:co,FloatButton:co},LA={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function VA(t){return t in US}const As=(t,e)=>{const[,n]=ar(),r=N.useContext(Ps),o=VA(t);let i;if(e!==void 0)i=[e,e];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+US[t]:a+=LA[t],i=[r===void 0?e:a,a]}if(process.env.NODE_ENV!=="production"){const a=on(t),s=n.zIndexPopupBase+zA,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 FA(){const[t,e]=h.useState([]),n=h.useCallback(r=>(e(o=>[].concat(Pe(o),[r])),()=>{e(o=>o.filter(i=>i!==r))}),[]);return[t,n]}function rr(){rr=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(k,P,B){k[P]=B.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(k,P,B){return Object.defineProperty(k,P,{value:B,enumerable:!0,configurable:!0,writable:!0}),k[P]}try{c({},"")}catch{c=function(B,F,H){return B[F]=H}}function u(k,P,B,F){var H=P&&P.prototype instanceof y?P:y,L=Object.create(H.prototype),G=new A(F||[]);return o(L,"_invoke",{value:R(k,B,G)}),L}function d(k,P,B){try{return{type:"normal",arg:k.call(P,B)}}catch(F){return{type:"throw",arg:F}}}e.wrap=u;var f="suspendedStart",p="suspendedYield",m="executing",v="completed",g={};function y(){}function b(){}function C(){}var x={};c(x,a,function(){return this});var S=Object.getPrototypeOf,w=S&&S(S(z([])));w&&w!==n&&r.call(w,a)&&(x=w);var E=C.prototype=y.prototype=Object.create(x);function M(k){["next","throw","return"].forEach(function(P){c(k,P,function(B){return this._invoke(P,B)})})}function $(k,P){function B(H,L,G,J){var V=d(k[H],k,L);if(V.type!=="throw"){var X=V.arg,Q=X.value;return Q&&st(Q)=="object"&&r.call(Q,"__await")?P.resolve(Q.__await).then(function(ue){B("next",ue,G,J)},function(ue){B("throw",ue,G,J)}):P.resolve(Q).then(function(ue){X.value=ue,G(X)},function(ue){return B("throw",ue,G,J)})}J(V.arg)}var F;o(this,"_invoke",{value:function(L,G){function J(){return new P(function(V,X){B(L,G,V,X)})}return F=F?F.then(J,J):J()}})}function R(k,P,B){var F=f;return function(H,L){if(F===m)throw Error("Generator is already running");if(F===v){if(H==="throw")throw L;return{value:t,done:!0}}for(B.method=H,B.arg=L;;){var G=B.delegate;if(G){var J=I(G,B);if(J){if(J===g)continue;return J}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(F===f)throw F=v,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);F=m;var V=d(k,P,B);if(V.type==="normal"){if(F=B.done?v:p,V.arg===g)continue;return{value:V.arg,done:B.done}}V.type==="throw"&&(F=v,B.method="throw",B.arg=V.arg)}}}function I(k,P){var B=P.method,F=k.iterator[B];if(F===t)return P.delegate=null,B==="throw"&&k.iterator.return&&(P.method="return",P.arg=t,I(k,P),P.method==="throw")||B!=="return"&&(P.method="throw",P.arg=new TypeError("The iterator does not provide a '"+B+"' method")),g;var H=d(F,k.iterator,P.arg);if(H.type==="throw")return P.method="throw",P.arg=H.arg,P.delegate=null,g;var L=H.arg;return L?L.done?(P[k.resultName]=L.value,P.next=k.nextLoc,P.method!=="return"&&(P.method="next",P.arg=t),P.delegate=null,g):L:(P.method="throw",P.arg=new TypeError("iterator result is not an object"),P.delegate=null,g)}function D(k){var P={tryLoc:k[0]};1 in k&&(P.catchLoc=k[1]),2 in k&&(P.finallyLoc=k[2],P.afterLoc=k[3]),this.tryEntries.push(P)}function _(k){var P=k.completion||{};P.type="normal",delete P.arg,k.completion=P}function A(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(D,this),this.reset(!0)}function z(k){if(k||k===""){var P=k[a];if(P)return P.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var B=-1,F=function H(){for(;++B<k.length;)if(r.call(k,B))return H.value=k[B],H.done=!1,H;return H.value=t,H.done=!0,H};return F.next=F}}throw new TypeError(st(k)+" is not iterable")}return b.prototype=C,o(E,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:b,configurable:!0}),b.displayName=c(C,l,"GeneratorFunction"),e.isGeneratorFunction=function(k){var P=typeof k=="function"&&k.constructor;return!!P&&(P===b||(P.displayName||P.name)==="GeneratorFunction")},e.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,C):(k.__proto__=C,c(k,l,"GeneratorFunction")),k.prototype=Object.create(E),k},e.awrap=function(k){return{__await:k}},M($.prototype),c($.prototype,s,function(){return this}),e.AsyncIterator=$,e.async=function(k,P,B,F,H){H===void 0&&(H=Promise);var L=new $(u(k,P,B,F),H);return e.isGeneratorFunction(P)?L:L.next().then(function(G){return G.done?G.value:L.next()})},M(E),c(E,l,"Generator"),c(E,a,function(){return this}),c(E,"toString",function(){return"[object Generator]"}),e.keys=function(k){var P=Object(k),B=[];for(var F in P)B.push(F);return B.reverse(),function H(){for(;B.length;){var L=B.pop();if(L in P)return H.value=L,H.done=!1,H}return H.done=!0,H}},e.values=z,A.prototype={constructor:A,reset:function(P){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!P)for(var B in this)B.charAt(0)==="t"&&r.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=t)},stop:function(){this.done=!0;var P=this.tryEntries[0].completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(P){if(this.done)throw P;var B=this;function F(X,Q){return G.type="throw",G.arg=P,B.next=X,Q&&(B.method="next",B.arg=t),!!Q}for(var H=this.tryEntries.length-1;H>=0;--H){var L=this.tryEntries[H],G=L.completion;if(L.tryLoc==="root")return F("end");if(L.tryLoc<=this.prev){var J=r.call(L,"catchLoc"),V=r.call(L,"finallyLoc");if(J&&V){if(this.prev<L.catchLoc)return F(L.catchLoc,!0);if(this.prev<L.finallyLoc)return F(L.finallyLoc)}else if(J){if(this.prev<L.catchLoc)return F(L.catchLoc,!0)}else{if(!V)throw Error("try statement without catch or finally");if(this.prev<L.finallyLoc)return F(L.finallyLoc)}}}},abrupt:function(P,B){for(var F=this.tryEntries.length-1;F>=0;--F){var H=this.tryEntries[F];if(H.tryLoc<=this.prev&&r.call(H,"finallyLoc")&&this.prev<H.finallyLoc){var L=H;break}}L&&(P==="break"||P==="continue")&&L.tryLoc<=B&&B<=L.finallyLoc&&(L=null);var G=L?L.completion:{};return G.type=P,G.arg=B,L?(this.method="next",this.next=L.finallyLoc,g):this.complete(G)},complete:function(P,B){if(P.type==="throw")throw P.arg;return P.type==="break"||P.type==="continue"?this.next=P.arg:P.type==="return"?(this.rval=this.arg=P.arg,this.method="return",this.next="end"):P.type==="normal"&&B&&(this.next=B),g},finish:function(P){for(var B=this.tryEntries.length-1;B>=0;--B){var F=this.tryEntries[B];if(F.finallyLoc===P)return this.complete(F.completion,F.afterLoc),_(F),g}},catch:function(P){for(var B=this.tryEntries.length-1;B>=0;--B){var F=this.tryEntries[B];if(F.tryLoc===P){var H=F.completion;if(H.type==="throw"){var L=H.arg;_(F)}return L}}throw Error("illegal catch attempt")},delegateYield:function(P,B,F){return this.delegate={iterator:z(P),resultName:B,nextLoc:F},this.method==="next"&&(this.arg=t),g}},e}function dv(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 ki(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(l){dv(i,r,o,a,s,"next",l)}function s(l){dv(i,r,o,a,s,"throw",l)}a(void 0)})}}var ks=q({},M0),HA=ks.version,ad=ks.render,WA=ks.unmountComponentAtNode,Yc;try{var qA=Number((HA||"").split(".")[0]);qA>=18&&(Yc=ks.createRoot)}catch{}function fv(t){var e=ks.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&st(e)==="object"&&(e.usingClientEntryPoint=t)}var mc="__rc_react_root__";function KA(t,e){fv(!0);var n=e[mc]||Yc(e);fv(!1),n.render(t),e[mc]=n}function UA(t,e){ad==null||ad(t,e)}function GA(t,e){if(Yc){KA(t,e);return}UA(t,e)}function XA(t){return Lf.apply(this,arguments)}function Lf(){return Lf=ki(rr().mark(function t(e){return rr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var o;(o=e[mc])===null||o===void 0||o.unmount(),delete e[mc]}));case 1:case"end":return r.stop()}},t)})),Lf.apply(this,arguments)}function YA(t){WA(t)}function JA(t){return Vf.apply(this,arguments)}function Vf(){return Vf=ki(rr().mark(function t(e){return rr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Yc===void 0){r.next=2;break}return r.abrupt("return",XA(e));case 2:YA(e);case 3:case"end":return r.stop()}},t)})),Vf.apply(this,arguments)}const QA=(t,e)=>{if(process.env.NODE_ENV!=="production"){const n=parseInt(h.version.split(".")[0],10),r=Object.keys(M0);process.env.NODE_ENV!=="production"&&Pi(n<19||r.includes("createRoot"),"compatible","antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.")}return GA(t,e),()=>JA(e)};let ZA=QA;function GS(){return ZA}const sd=()=>({height:0,opacity:0}),hv=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},ek=t=>({height:t?t.offsetHeight:0}),ld=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",XS=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:Cs}-motion-collapse`,onAppearStart:sd,onEnterStart:sd,onAppearActive:hv,onEnterActive:hv,onLeaveStart:ek,onLeaveActive:sd,onAppearEnd:ld,onEnterEnd:ld,onLeaveEnd:ld,motionDeadline:500}},$i=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function Tn(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const dp=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},tk=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(",")}}}}},nk=OP("Wave",t=>[tk(t)]),YS=`${Cs}-wave-target`;function cd(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 rk(t){const{borderTopColor:e,borderColor:n,backgroundColor:r}=getComputedStyle(t);return cd(e)?e:cd(n)?n:cd(r)?r:null}function ud(t){return Number.isNaN(t)?0:t}const ok=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),[v,g]=h.useState(0),[y,b]=h.useState(0),[C,x]=h.useState(!1),S={left:d,top:p,width:v,height:y,borderRadius:c.map(M=>`${M}px`).join(" ")};s&&(S["--wave-color"]=s);function w(){const M=getComputedStyle(n);l(rk(n));const $=M.position==="static",{borderLeftWidth:R,borderTopWidth:I}=M;f($?n.offsetLeft:ud(-parseFloat(R))),m($?n.offsetTop:ud(-parseFloat(I))),g(n.offsetWidth),b(n.offsetHeight);const{borderTopLeftRadius:D,borderTopRightRadius:_,borderBottomLeftRadius:A,borderBottomRightRadius:z}=M;u([D,_,z,A].map(k=>ud(parseFloat(k))))}if(h.useEffect(()=>{if(n){const M=kt(()=>{w(),x(!0)});let $;return typeof ResizeObserver<"u"&&($=new ResizeObserver(w),$.observe(n)),()=>{kt.cancel(M),$==null||$.disconnect()}}},[]),!C)return null;const E=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(YS));return h.createElement(no,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(M,$)=>{var R,I;if($.deadline||$.propertyName==="opacity"){const D=(R=i.current)===null||R===void 0?void 0:R.parentElement;(I=a.current)===null||I===void 0||I.call(a).then(()=>{D==null||D.remove()})}return!1}},(M,$)=>{let{className:R}=M;return h.createElement("div",{ref:ir(i,$),className:re(e,R,{"wave-quick":E}),style:S})})},ik=(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=GS();let a=null;function s(){return a}a=i(h.createElement(ok,Object.assign({},e,{target:t,registerUnmount:s})),o)},ak=(t,e,n)=>{const{wave:r}=h.useContext(At),[,o,i]=ar(),a=Wt(c=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${YS}`)||u,{showEffect:f}=r||{};(f||ik)(d,{className:e,token:o,component:n,event:c,hashId:i})}),s=h.useRef(null);return c=>{kt.cancel(s.current),s.current=kt(()=>{a(c)})}},JS=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:o}=N.useContext(At),i=N.useRef(null),a=o("wave"),[,s]=nk(a),l=ak(i,re(a,s),r);if(N.useEffect(()=>{const u=i.current;if(!u||u.nodeType!==1||n)return;const d=f=>{!dp(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]),!N.isValidElement(e))return e??null;const c=Zo(e)?ir(Ti(e),i):i;return Or(e,{ref:c})};process.env.NODE_ENV!=="production"&&(JS.displayName="Wave");const Vr=t=>{const e=N.useContext(ba);return N.useMemo(()=>t?typeof t=="string"?t??e:typeof t=="function"?t(e):e:e,[t,e])},sk=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},lk=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"}}}},ck=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}}}},QS=hn("Space",t=>{const e=Lt(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[lk(e),ck(e),sk(e)]},()=>({}),{resetStyle:!1});var ZS=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 Jc=h.createContext(null),ei=(t,e)=>{const n=h.useContext(Jc),r=h.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return re(`${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}},uk=t=>{const{children:e}=t;return h.createElement(Jc.Provider,{value:null},e)},dk=t=>{const{children:e}=t,n=ZS(t,["children"]);return h.createElement(Jc.Provider,{value:h.useMemo(()=>n,[n])},e)},fk=t=>{const{getPrefixCls:e,direction:n}=h.useContext(At),{size:r,direction:o,block:i,prefixCls:a,className:s,rootClassName:l,children:c}=t,u=ZS(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=Vr(C=>r??C),f=e("space-compact",a),[p,m]=QS(f),v=re(f,m,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:i,[`${f}-vertical`]:o==="vertical"},s,l),g=h.useContext(Jc),y=gr(c),b=h.useMemo(()=>y.map((C,x)=>{const S=(C==null?void 0:C.key)||`${f}-item-${x}`;return h.createElement(dk,{key:S,compactSize:d,compactDirection:o,isFirstItem:x===0&&(!g||(g==null?void 0:g.isFirstItem)),isLastItem:x===y.length-1&&(!g||(g==null?void 0:g.isLastItem))},C)}),[r,y,g]);return y.length===0?null:p(h.createElement("div",Object.assign({className:v},u),b))};var hk=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 ex=h.createContext(void 0),pk=t=>{const{getPrefixCls:e,direction:n}=h.useContext(At),{prefixCls:r,size:o,className:i}=t,a=hk(t,["prefixCls","size","className"]),s=e("btn-group",r),[,,l]=ar(),c=h.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=on("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=re(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return h.createElement(ex.Provider,{value:o},h.createElement("div",Object.assign({},a,{className:u})))},pv=/^[\u4E00-\u9FA5]{2}$/,Ff=pv.test.bind(pv);function tx(t){return t==="danger"?{danger:!0}:{type:t}}function mv(t){return typeof t=="string"}function vl(t){return t==="text"||t==="link"}function mk(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&mv(t.type)&&Ff(t.props.children)?Or(t,{children:t.props.children.split("").join(n)}):mv(t)?Ff(t)?N.createElement("span",null,t.split("").join(n)):N.createElement("span",null,t):qS(t)?N.createElement("span",null,t):t}function gk(t,e){let n=!1;const r=[];return N.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}),N.Children.map(r,o=>mk(o,e))}["default","primary","danger"].concat(Pe(qo));const Hf=N.forwardRef((t,e)=>{const{className:n,style:r,children:o,prefixCls:i}=t,a=re(`${i}-icon`,n);return N.createElement("span",{ref:e,className:a,style:r},o)}),gv=N.forwardRef((t,e)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=t,a=re(`${n}-loading-icon`,r);return N.createElement(Hf,{prefixCls:n,className:a,style:o,ref:e},N.createElement(up,{className:i}))}),dd=()=>({width:0,opacity:0,transform:"scale(0)"}),fd=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),vk=t=>{const{prefixCls:e,loading:n,existIcon:r,className:o,style:i,mount:a}=t,s=!!n;return r?N.createElement(gv,{prefixCls:e,className:o,style:i}):N.createElement(no,{visible:s,motionName:`${e}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:dd,onAppearActive:fd,onEnterStart:dd,onEnterActive:fd,onLeaveStart:fd,onLeaveActive:dd},(l,c)=>{let{className:u,style:d}=l;const f=Object.assign(Object.assign({},i),d);return N.createElement(gv,{prefixCls:e,className:re(o,u),style:f,ref:c})})},vv=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),bk=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}},vv(`${e}-primary`,o),vv(`${e}-danger`,i)]}};var yk=["b"],Ck=["v"],hd=function(e){return Math.round(Number(e||0))},Sk=function(e){if(e instanceof Ht)return e;if(e&&st(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,o=xt(n,yk);return q(q({},o),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},zr=function(t){bo(n,t);var e=yo(n);function n(r){return xn(this,n),e.call(this,Sk(r))}return wn(n,[{key:"toHsbString",value:function(){var o=this.toHsb(),i=hd(o.s*100),a=hd(o.b*100),s=hd(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=xt(o,Ck);return q(q({},a),{},{b:i,a:this.a})}}]),n}(Ht),xk="rc-color-picker",oa=function(e){return e instanceof zr?e:new zr(e)},wk=oa("#1677ff"),nx=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,v=(n.x+p)/l,g=1-(n.y+m)/c,y=i.toHsb(),b=v,C=(n.x+p)/l*360;if(a)switch(a){case"hue":return oa(q(q({},y),{},{h:C<=0?0:C}));case"alpha":return oa(q(q({},y),{},{a:b<=0?0:b}))}return oa({h:y.h,s:v<=0?0:v,b:g>=1?1:g,a:y.a})},rx=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}}},fp=function(e){var n=e.color,r=e.prefixCls,o=e.className,i=e.style,a=e.onClick,s="".concat(r,"-color-block");return N.createElement("div",{className:re(s,o),style:i,onClick:a},N.createElement("div",{className:"".concat(s,"-inner"),style:{background:n}}))};function Ek(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 ox(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=N.useState({x:0,y:0}),u=le(c,2),d=u[0],f=u[1],p=N.useRef(null),m=N.useRef(null);N.useEffect(function(){f(a())},[s]),N.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 v=function(x){var S=Ek(x),w=S.pageX,E=S.pageY,M=n.current.getBoundingClientRect(),$=M.x,R=M.y,I=M.width,D=M.height,_=e.current.getBoundingClientRect(),A=_.width,z=_.height,k=A/2,P=z/2,B=Math.max(0,Math.min(w-$,I))-k,F=Math.max(0,Math.min(E-R,D))-P,H={x:B,y:r==="x"?d.y:F};if(A===0&&z===0||A!==z)return!1;o==null||o(H)},g=function(x){x.preventDefault(),v(x)},y=function(x){x.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()},b=function(x){document.removeEventListener("mousemove",p.current),document.removeEventListener("mouseup",m.current),!l&&(v(x),document.addEventListener("mousemove",g),document.addEventListener("mouseup",y),document.addEventListener("touchmove",g),document.addEventListener("touchend",y),p.current=g,m.current=y)};return[d,b]}var ix=function(e){var n=e.size,r=n===void 0?"default":n,o=e.color,i=e.prefixCls;return N.createElement("div",{className:re("".concat(i,"-handler"),W({},"".concat(i,"-handler-sm"),r==="small")),style:{backgroundColor:o}})},ax=function(e){var n=e.children,r=e.style,o=e.prefixCls;return N.createElement("div",{className:"".concat(o,"-palette"),style:q({position:"relative"},r)},n)},sx=N.forwardRef(function(t,e){var n=t.children,r=t.x,o=t.y;return N.createElement("div",{ref:e,style:{position:"absolute",left:"".concat(r,"%"),top:"".concat(o,"%"),zIndex:1,transform:"translate(-50%, -50%)"}},n)}),Nk=function(e){var n=e.color,r=e.onChange,o=e.prefixCls,i=e.onChangeComplete,a=e.disabled,s=N.useRef(),l=N.useRef(),c=N.useRef(n),u=Wt(function(v){var g=nx({offset:v,targetRef:l,containerRef:s,color:n});c.current=g,r(g)}),d=ox({color:n,containerRef:s,targetRef:l,calculate:function(){return rx(n)},onDragChange:u,onDragChangeComplete:function(){return i==null?void 0:i(c.current)},disabledDrag:a}),f=le(d,2),p=f[0],m=f[1];return N.createElement("div",{ref:s,className:"".concat(o,"-select"),onMouseDown:m,onTouchStart:m},N.createElement(ax,{prefixCls:o},N.createElement(sx,{x:p.x,y:p.y,ref:l},N.createElement(ix,{color:n.toRgbString(),prefixCls:o})),N.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))"}})))},Ok=function(e,n){var r=mn(e,{value:n}),o=le(r,2),i=o[0],a=o[1],s=N.useMemo(function(){return oa(i)},[i]);return[s,a]},$k=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=N.useMemo(function(){return n.map(function(c,u){var d=oa(c);return a==="alpha"&&u===n.length-1&&(d=new zr(d.setA(1))),d.toRgbString()}).join(",")},[n,a]);return N.createElement("div",{className:"".concat(s,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(i,", ").concat(l,")")}},r)},Mk=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=N.useRef(),u=N.useRef(),d=N.useRef(s),f=function(S){return l==="hue"?S.getHue():S.a*100},p=Wt(function(x){var S=nx({offset:x,targetRef:u,containerRef:c,color:s,type:l});d.current=S,i(f(S))}),m=ox({color:s,targetRef:u,containerRef:c,calculate:function(){return rx(s,l)},onDragChange:p,onDragChangeComplete:function(){a(f(d.current))},direction:"x",disabledDrag:o}),v=le(m,2),g=v[0],y=v[1],b=N.useMemo(function(){if(l==="hue"){var x=s.toHsb();x.s=1,x.b=1,x.a=1;var S=new zr(x);return S}return s},[s,l]),C=N.useMemo(function(){return r.map(function(x){return"".concat(x.color," ").concat(x.percent,"%")})},[r]);return N.createElement("div",{ref:c,className:re("".concat(n,"-slider"),"".concat(n,"-slider-").concat(l)),onMouseDown:y,onTouchStart:y},N.createElement(ax,{prefixCls:n},N.createElement(sx,{x:g.x,y:g.y,ref:u},N.createElement(ix,{size:"small",color:b.toHexString(),prefixCls:n})),N.createElement($k,{colors:C,type:l,prefixCls:n})))};function Rk(t){return h.useMemo(function(){var e=t||{},n=e.slider;return[n||Mk]},[t])}var Ik=[{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}],lx=N.forwardRef(function(t,e){var n=t.value,r=t.defaultValue,o=t.prefixCls,i=o===void 0?xk: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,v=t.components,g=Rk(v),y=le(g,1),b=y[0],C=Ok(r||wk,n),x=le(C,2),S=x[0],w=x[1],E=N.useMemo(function(){return S.setA(1).toRgbString()},[S]),M=function(F,H){n||w(F),a==null||a(F,H)},$=function(F){return new zr(S.setHue(F))},R=function(F){return new zr(S.setA(F/100))},I=function(F){M($(F),{type:"hue",value:F})},D=function(F){M(R(F),{type:"alpha",value:F})},_=function(F){s&&s($(F))},A=function(F){s&&s(R(F))},z=re("".concat(i,"-panel"),l,W({},"".concat(i,"-panel-disabled"),m)),k={prefixCls:i,disabled:m,color:S},P=N.createElement(N.Fragment,null,N.createElement(Nk,Le({onChange:M},k,{onChangeComplete:s})),N.createElement("div",{className:"".concat(i,"-slider-container")},N.createElement("div",{className:re("".concat(i,"-slider-group"),W({},"".concat(i,"-slider-group-disabled-alpha"),f))},N.createElement(b,Le({},k,{type:"hue",colors:Ik,min:0,max:359,value:S.getHue(),onChange:I,onChangeComplete:_})),!f&&N.createElement(b,Le({},k,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:E}],min:0,max:100,value:S.a*100,onChange:D,onChangeComplete:A}))),N.createElement(fp,{color:S.toRgbString(),prefixCls:i})));return N.createElement("div",{className:z,style:c,ref:e},typeof u=="function"?u(P):P)});process.env.NODE_ENV!=="production"&&(lx.displayName="ColorPicker");const Ka=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",Tk=(t,e)=>t?Ka(t,e):"";let hr=function(){function t(e){xn(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(o=>{let{color:i,percent:a}=o;return{color:new t(i),percent:a}}),this.metaColor=new zr(this.colors[0].color.metaColor)):this.metaColor=new zr(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return wn(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return Tk(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 Pk={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"},Ak=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:Pk}))},xs=h.forwardRef(Ak);process.env.NODE_ENV!=="production"&&(xs.displayName="RightOutlined");var cx=N.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=N.useState(s||r),f=le(d,2),p=f[0],m=f[1];return N.useEffect(function(){(r||s)&&m(!0)},[r,s]),p?N.createElement("div",{ref:e,className:re("".concat(n,"-content"),W(W({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),o),style:i,role:l},N.createElement("div",{className:re("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});cx.displayName="PanelContent";var kk=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],ux=N.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,v=t.accordion,g=t.panelKey,y=t.extra,b=t.header,C=t.expandIcon,x=t.openMotion,S=t.destroyInactivePanel,w=t.children,E=xt(t,kk),M=m==="disabled",$=y!=null&&typeof y!="boolean",R=W(W(W({onClick:function(){a==null||a(g)},onKeyDown:function(P){(P.key==="Enter"||P.keyCode===Je.ENTER||P.which===Je.ENTER)&&(a==null||a(g))},role:v?"tab":"button"},"aria-expanded",i),"aria-disabled",M),"tabIndex",M?-1:0),I=typeof C=="function"?C(t):N.createElement("i",{className:"arrow"}),D=I&&N.createElement("div",Le({className:"".concat(p,"-expand-icon")},["header","icon"].includes(m)?R:{}),I),_=re("".concat(p,"-item"),W(W({},"".concat(p,"-item-active"),i),"".concat(p,"-item-disabled"),M),l),A=re(o,"".concat(p,"-header"),W({},"".concat(p,"-collapsible-").concat(m),!!m),u.header),z=q({className:A,style:f.header},["header","icon"].includes(m)?{}:R);return N.createElement("div",Le({},E,{ref:e,className:_}),N.createElement("div",z,r&&D,N.createElement("span",Le({className:"".concat(p,"-header-text")},m==="header"?R:{}),b),$&&N.createElement("div",{className:"".concat(p,"-extra")},y)),N.createElement(no,Le({visible:i,leavedClassName:"".concat(p,"-content-hidden")},x,{forceRender:s,removeOnLeave:S}),function(k,P){var B=k.className,F=k.style;return N.createElement(cx,{ref:P,prefixCls:p,className:B,classNames:u,style:F,styles:f,isActive:i,forceRender:s,role:v?"tabpanel":void 0},w)}))}),Dk=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],_k=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,v=d.key,g=d.collapsible,y=d.onItemClick,b=d.destroyInactivePanel,C=xt(d,Dk),x=String(v??f),S=g??i,w=b??a,E=function(R){S!=="disabled"&&(s(R),y==null||y(R))},M=!1;return o?M=l[0]===x:M=l.indexOf(x)>-1,N.createElement(ux,Le({},C,{prefixCls:r,key:x,panelKey:x,isActive:M,accordion:o,openMotion:c,expandIcon:u,header:m,collapsible:S,onItemClick:E,destroyInactivePanel:w}),p)})},Bk=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,v=p.headerClass,g=p.destroyInactivePanel,y=p.collapsible,b=p.onItemClick,C=!1;i?C=c[0]===f:C=c.indexOf(f)>-1;var x=y??a,S=function(M){x!=="disabled"&&(l(M),b==null||b(M))},w={key:f,panelKey:f,header:m,headerClass:v,isActive:C,prefixCls:o,destroyInactivePanel:g??s,openMotion:u,accordion:i,children:e.props.children,onItemClick:S,expandIcon:d,collapsible:x};return typeof e.type=="string"?e:(Object.keys(w).forEach(function(E){typeof w[E]>"u"&&delete w[E]}),N.cloneElement(e,w))};function jk(t,e,n){return Array.isArray(t)?_k(t,n):gr(e).map(function(r,o){return Bk(r,o,n)})}function zk(t){var e=t;if(!Array.isArray(e)){var n=st(e);e=n==="number"||n==="string"?[e]:[]}return e.map(function(r){return String(r)})}var Lk=N.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,v=t.onChange,g=t.items,y=re(r,l),b=mn([],{value:p,onChange:function($){return v==null?void 0:v($)},defaultValue:m,postState:zk}),C=le(b,2),x=C[0],S=C[1],w=function($){return S(function(){if(s)return x[0]===$?[]:[$];var R=x.indexOf($),I=R>-1;return I?x.filter(function(D){return D!==$}):[].concat(Pe(x),[$])})};yt(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var E=jk(g,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:i,onItemClick:w,activeKey:x});return N.createElement("div",Le({ref:e,className:y,style:a,role:s?"tablist":void 0},Zr(t,{aria:!0,data:!0})),E)});const hp=Object.assign(Lk,{Panel:ux});hp.Panel;const Vk=h.forwardRef((t,e)=>{process.env.NODE_ENV!=="production"&&on("Collapse.Panel").deprecated(!("disabled"in t),"disabled",'collapsible="disabled"');const{getPrefixCls:n}=h.useContext(At),{prefixCls:r,className:o,showArrow:i=!0}=t,a=n("collapse",r),s=re({[`${a}-no-arrow`]:!i},o);return h.createElement(hp.Panel,Object.assign({ref:e},t,{prefixCls:a,className:s}))}),dx=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
|
|
324
|
-
opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}},[`${t.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
|
|
325
|
-
opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),Fk=t=>({animationDuration:t,animationFillMode:"both"}),Hk=t=>({animationDuration:t,animationFillMode:"both"}),Qc=function(t,e,n,r){const i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
|
|
326
|
-
${i}${t}-enter,
|
|
327
|
-
${i}${t}-appear
|
|
328
|
-
`]:Object.assign(Object.assign({},Fk(r)),{animationPlayState:"paused"}),[`${i}${t}-leave`]:Object.assign(Object.assign({},Hk(r)),{animationPlayState:"paused"}),[`
|
|
329
|
-
${i}${t}-enter${t}-enter-active,
|
|
330
|
-
${i}${t}-appear${t}-appear-active
|
|
331
|
-
`]:{animationName:e,animationPlayState:"running"},[`${i}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},Wk=new qt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),qk=new qt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Kk=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=t,r=`${n}-fade`,o=e?"&":"";return[Qc(r,Wk,qk,t.motionDurationMid,e),{[`
|
|
332
|
-
${o}${r}-enter,
|
|
333
|
-
${o}${r}-appear
|
|
334
|
-
`]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},Uk=new qt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Gk=new qt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),Xk=new qt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Yk=new qt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Jk=new qt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Qk=new qt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Zk=new qt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),eD=new qt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),tD={"move-up":{inKeyframes:Zk,outKeyframes:eD},"move-down":{inKeyframes:Uk,outKeyframes:Gk},"move-left":{inKeyframes:Xk,outKeyframes:Yk},"move-right":{inKeyframes:Jk,outKeyframes:Qk}},gc=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=tD[e];return[Qc(r,o,i,t.motionDurationMid),{[`
|
|
335
|
-
${r}-enter,
|
|
336
|
-
${r}-appear
|
|
337
|
-
`]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},pp=new qt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),mp=new qt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),gp=new qt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),vp=new qt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),nD=new qt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),rD=new qt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),oD=new qt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),iD=new qt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),aD={"slide-up":{inKeyframes:pp,outKeyframes:mp},"slide-down":{inKeyframes:gp,outKeyframes:vp},"slide-left":{inKeyframes:nD,outKeyframes:rD},"slide-right":{inKeyframes:oD,outKeyframes:iD}},Sa=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=aD[e];return[Qc(r,o,i,t.motionDurationMid),{[`
|
|
338
|
-
${r}-enter,
|
|
339
|
-
${r}-appear
|
|
340
|
-
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},sD=new qt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),lD=new qt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),bv=new qt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),yv=new qt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),cD=new qt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),uD=new qt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),dD=new qt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),fD=new qt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),hD=new qt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),pD=new qt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),mD=new qt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),gD=new qt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),vD={zoom:{inKeyframes:sD,outKeyframes:lD},"zoom-big":{inKeyframes:bv,outKeyframes:yv},"zoom-big-fast":{inKeyframes:bv,outKeyframes:yv},"zoom-left":{inKeyframes:dD,outKeyframes:fD},"zoom-right":{inKeyframes:hD,outKeyframes:pD},"zoom-up":{inKeyframes:cD,outKeyframes:uD},"zoom-down":{inKeyframes:mD,outKeyframes:gD}},Ds=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:o,outKeyframes:i}=vD[e];return[Qc(r,o,i,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[`
|
|
341
|
-
${r}-enter,
|
|
342
|
-
${r}-appear
|
|
343
|
-
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},bD=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:v,lineHeight:g,lineHeightLG:y,marginSM:b,paddingSM:C,paddingLG:x,paddingXS:S,motionDurationSlow:w,fontSizeIcon:E,contentPadding:M,fontHeight:$,fontHeightLG:R}=t,I=`${se(c)} ${u} ${d}`;return{[e]:Object.assign(Object.assign({},Fn(t)),{backgroundColor:o,border:I,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:I,"&:first-child":{[`
|
|
344
|
-
&,
|
|
345
|
-
& > ${e}-header`]:{borderRadius:`${se(l)} ${se(l)} 0 0`}},"&:last-child":{[`
|
|
346
|
-
&,
|
|
347
|
-
& > ${e}-header`]:{borderRadius:`0 0 ${se(l)} ${se(l)}`}},[`> ${e}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:p,lineHeight:g,cursor:"pointer",transition:`all ${w}, visibility 0s`},Ca(t)),{[`> ${e}-header-text`]:{flex:"auto"},[`${e}-expand-icon`]:{height:$,display:"flex",alignItems:"center",paddingInlineEnd:b},[`${e}-arrow`]:Object.assign(Object.assign({},Ai()),{fontSize:E,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:I,[`& > ${e}-content-box`]:{padding:M},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:a,paddingInlineStart:S,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(C).sub(S).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:C}}},"&-large":{[`> ${e}-item`]:{fontSize:v,lineHeight:y,[`> ${e}-header`]:{padding:s,paddingInlineStart:r,[`> ${e}-expand-icon`]:{height:R,marginInlineStart:t.calc(x).sub(r).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:x}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-content`]:{borderRadius:`0 0 ${se(l)} ${se(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:b}}}}})}},yD=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},CD=t=>{const{componentCls:e,headerBg:n,paddingXXS:r,colorBorder:o}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${o}`},[`
|
|
348
|
-
> ${e}-item:last-child,
|
|
349
|
-
> ${e}-item:last-child ${e}-header
|
|
350
|
-
`]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{paddingTop:r}}}},SD=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}}}}}},xD=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer}),wD=hn("Collapse",t=>{const e=Lt(t,{collapseHeaderPaddingSM:`${se(t.paddingXS)} ${se(t.paddingSM)}`,collapseHeaderPaddingLG:`${se(t.padding)} ${se(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[bD(e),CD(e),SD(e),yD(e),dx(e)]},xD),fx=h.forwardRef((t,e)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:a}=br("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:p,expandIconPosition:m="start",children:v,expandIcon:g}=t,y=Vr(_=>{var A;return(A=p??_)!==null&&A!==void 0?A:"middle"}),b=n("collapse",s),C=n(),[x,S,w]=wD(b);if(process.env.NODE_ENV!=="production"){const _=on("Collapse");process.env.NODE_ENV!=="production"&&_(m!=="left"&&m!=="right","deprecated","`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.")}const E=h.useMemo(()=>m==="left"?"start":m==="right"?"end":m,[m]),M=g??o,$=h.useCallback(function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const A=typeof M=="function"?M(_):h.createElement(xs,{rotate:_.isActive?r==="rtl"?-90:90:void 0,"aria-label":_.isActive?"expanded":"collapsed"});return Or(A,()=>{var z;return{className:re((z=A==null?void 0:A.props)===null||z===void 0?void 0:z.className,`${b}-arrow`)}})},[M,b]),R=re(`${b}-icon-position-${E}`,{[`${b}-borderless`]:!d,[`${b}-rtl`]:r==="rtl",[`${b}-ghost`]:!!f,[`${b}-${y}`]:y!=="middle"},i,l,c,S,w),I=Object.assign(Object.assign({},XS(C)),{motionAppear:!1,leavedClassName:`${b}-content-hidden`}),D=h.useMemo(()=>v?gr(v).map((_,A)=>{var z,k;const P=_.props;if(P!=null&&P.disabled){const B=(z=_.key)!==null&&z!==void 0?z:String(A),F=Object.assign(Object.assign({},Tn(_.props,["disabled"])),{key:B,collapsible:(k=P.collapsible)!==null&&k!==void 0?k:"disabled"});return Or(_,F)}return _}):null,[v]);return x(h.createElement(hp,Object.assign({ref:e,openMotion:I},Tn(t,["rootClassName"]),{expandIcon:$,prefixCls:b,className:R,style:Object.assign(Object.assign({},a),u)}),D))});process.env.NODE_ENV!=="production"&&(fx.displayName="Collapse");const ED=Object.assign(fx,{Panel:Vk}),Xn=t=>t instanceof hr?t:new hr(t),Ll=t=>Math.round(Number(t||0)),bp=t=>Ll(t.toHsb().a*100),Vl=(t,e)=>{const n=t.toRgb();if(!n.r&&!n.g&&!n.b){const r=t.toHsb();return r.a=1,Xn(r)}return n.a=1,Xn(n)},hx=(t,e)=>{const n=[{percent:0,color:t[0].color}].concat(Pe(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 zr(a),d=new zr(s);return u.mix(d,c).toRgbString()}}return""},pd=t=>t.map(e=>(e.colors=e.colors.map(Xn),e)),px=(t,e)=>{const{r:n,g:r,b:o,a:i}=t.toRgb(),a=new zr(t.toRgbString()).onBackground(e).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},Cv=(t,e)=>{var n;return`panel-${(n=t.key)!==null&&n!==void 0?n:e}`},ND=t=>{let{prefixCls:e,presets:n,value:r,onChange:o}=t;const[i]=So("ColorPicker"),[,a]=ar(),[s]=mn(pd(n),{value:pd(n),postState:pd}),l=`${e}-presets`,c=N.useMemo(()=>s.reduce((f,p,m)=>{const{defaultOpen:v=!0}=p;return v&&f.push(Cv(p,m)),f},[]),[s]),u=f=>{o==null||o(f)},d=s.map((f,p)=>{var m;return{key:Cv(f,p),label:N.createElement("div",{className:`${l}-label`},f==null?void 0:f.label),children:N.createElement("div",{className:`${l}-items`},Array.isArray(f==null?void 0:f.colors)&&((m=f.colors)===null||m===void 0?void 0:m.length)>0?f.colors.map((v,g)=>N.createElement(fp,{key:`preset-${g}-${v.toHexString()}`,color:Xn(v).toRgbString(),prefixCls:e,className:re(`${l}-color`,{[`${l}-color-checked`]:v.toHexString()===(r==null?void 0:r.toHexString()),[`${l}-color-bright`]:px(v,a.colorBgElevated)}),onClick:()=>u(v)})):N.createElement("span",{className:`${l}-empty`},i.presetEmpty))}});return N.createElement("div",{className:l},N.createElement(ED,{defaultActiveKey:c,ghost:!0,items:d}))},mx=t=>{const{paddingInline:e,onlyIconSize:n}=t;return Lt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},gx=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:jl(s),d=(i=t.contentLineHeightSM)!==null&&i!==void 0?i:jl(l),f=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:jl(c),p=px(new hr(t.colorBgSolid),"#fff")?"#000":"#fff",m=qo.reduce((v,g)=>Object.assign(Object.assign({},v),{[`${g}ShadowColor`]:`0 ${se(t.controlOutlineWidth)} 0 ${qa(t[`${g}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)})},OD=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:`${se(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`]:Ai(),"> a":{color:"currentColor"},"&:not(:disabled)":Ca(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()}}}}}},vx=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),$D=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),MD=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.calc(t.controlHeight).div(2).equal(),paddingInlineEnd:t.calc(t.controlHeight).div(2).equal()}),RD=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Zc=(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"},vx(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),ID=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},RD(t))}),TD=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),eu=(t,e,n,r)=>{const i=r&&["link","text"].includes(r)?TD:ID;return Object.assign(Object.assign({},i(t)),vx(t.componentCls,e,n))},tu=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},eu(t,r,o))}),nu=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},eu(t,r,o))}),ru=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),ou=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},eu(t,n,r))}),eo=(t,e,n,r,o)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},eu(t,r,o,n))}),PD=t=>{const{componentCls:e}=t;return qo.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`]},tu(t,t.colorTextLightSolid,o,{background:a},{background:c})),nu(t,o,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),ru(t)),ou(t,i,{background:s},{background:l})),eo(t,o,"link",{color:a},{color:c})),eo(t,o,"text",{color:a,background:i},{color:c,background:l}))})},{})},AD=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},tu(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),ru(t)),ou(t,t.colorFillTertiary,{background:t.colorFillSecondary},{background:t.colorFill})),Zc(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),eo(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),kD=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},nu(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),ru(t)),ou(t,t.colorPrimaryBg,{background:t.colorPrimaryBgHover},{background:t.colorPrimaryBorder})),eo(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),eo(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Zc(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),DD=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},tu(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),nu(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),ru(t)),ou(t,t.colorErrorBg,{background:t.colorErrorBgFilledHover},{background:t.colorErrorBgActive})),eo(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),eo(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Zc(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),_D=t=>Object.assign(Object.assign({},eo(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Zc(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),BD=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:AD(t),[`${e}-color-primary`]:kD(t),[`${e}-color-dangerous`]:DD(t),[`${e}-color-link`]:_D(t)},PD(t))},jD=t=>Object.assign(Object.assign(Object.assign(Object.assign({},nu(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),eo(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),tu(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),eo(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),yp=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";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:`${se(l)} ${se(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${e}`]:$D(t)},{[`${n}${n}-round${e}`]:MD(t)}]},zD=t=>{const e=Lt(t,{fontSize:t.contentFontSize});return yp(e,t.componentCls)},LD=t=>{const e=Lt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return yp(e,`${t.componentCls}-sm`)},VD=t=>{const e=Lt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return yp(e,`${t.componentCls}-lg`)},FD=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},HD=hn("Button",t=>{const e=mx(t);return[OD(e),zD(e),LD(e),VD(e),FD(e),BD(e),jD(e),bk(e)]},gx,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function WD(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 qD(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 _s(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=t,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},WD(t,r,e)),qD(n,r,e))}}function KD(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 UD(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 GD(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},KD(t,e)),UD(t.componentCls,e))}}const XD=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))},YD=wS(["Button","compact"],t=>{const e=mx(t);return[_s(e),GD(e),XD(e)]},gx);var JD=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 QD(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 ZD={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},e2=N.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:v,children:g,icon:y,iconPosition:b="start",ghost:C=!1,block:x=!1,htmlType:S="button",classNames:w,style:E={},autoInsertSpace:M,autoFocus:$}=t,R=JD(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),I=l||"default",[D,_]=N.useMemo(()=>{if(a&&s)return[a,s];const Te=ZD[I]||[];return c?["danger",Te[1]]:Te},[l,a,s,c]),z=D==="danger"?"dangerous":D,{getPrefixCls:k,direction:P,autoInsertSpace:B,className:F,style:H,classNames:L,styles:G}=br("button"),J=(n=M??B)!==null&&n!==void 0?n:!0,V=k("btn",i),[X,Q,ue]=HD(V),Y=N.useContext(jr),fe=p??Y,be=N.useContext(ex),de=N.useMemo(()=>QD(o),[o]),[oe,ge]=N.useState(de.loading),[ne,ce]=N.useState(!1),me=N.useRef(null),Oe=Qo(e,me),Me=N.Children.count(g)===1&&!y&&!vl(_),Ne=N.useRef(!0);N.useEffect(()=>(Ne.current=!1,()=>{Ne.current=!0}),[]),N.useEffect(()=>{let Te=null;de.delay>0?Te=setTimeout(()=>{Te=null,ge(!0)},de.delay):ge(de.loading);function He(){Te&&(clearTimeout(Te),Te=null)}return He},[de]),N.useEffect(()=>{if(!me.current||!J)return;const Te=me.current.textContent||"";Me&&Ff(Te)?ne||ce(!0):ne&&ce(!1)}),N.useEffect(()=>{$&&me.current&&me.current.focus()},[]);const je=N.useCallback(Te=>{var He;if(oe||fe){Te.preventDefault();return}(He=t.onClick)===null||He===void 0||He.call(t,("href"in t,Te))},[t.onClick,oe,fe]);if(process.env.NODE_ENV!=="production"){const Te=on("Button");process.env.NODE_ENV!=="production"&&Te(!(typeof y=="string"&&y.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${y}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&Te(!(C&&vl(_)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:O,compactItemClassnames:ee}=ei(V,P),K={large:"lg",small:"sm",middle:void 0},ie=Vr(Te=>{var He,Ze;return(Ze=(He=d??O)!==null&&He!==void 0?He:be)!==null&&Ze!==void 0?Ze:Te}),Ee=ie&&(r=K[ie])!==null&&r!==void 0?r:"",Se=oe?"loading":y,he=Tn(R,["navigate"]),Ae=re(V,Q,ue,{[`${V}-${u}`]:u!=="default"&&u,[`${V}-${I}`]:I,[`${V}-dangerous`]:c,[`${V}-color-${z}`]:z,[`${V}-variant-${_}`]:_,[`${V}-${Ee}`]:Ee,[`${V}-icon-only`]:!g&&g!==0&&!!Se,[`${V}-background-ghost`]:C&&!vl(_),[`${V}-loading`]:oe,[`${V}-two-chinese-chars`]:ne&&J&&!oe,[`${V}-block`]:x,[`${V}-rtl`]:P==="rtl",[`${V}-icon-end`]:b==="end"},ee,m,v,F),_e=Object.assign(Object.assign({},H),E),$e=re(w==null?void 0:w.icon,L.icon),ze=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),G.icon||{}),Fe=y&&!oe?N.createElement(Hf,{prefixCls:V,className:$e,style:ze},y):o&&typeof o=="object"&&o.icon?N.createElement(Hf,{prefixCls:V,className:$e,style:ze},o.icon):N.createElement(vk,{existIcon:!!y,prefixCls:V,loading:oe,mount:Ne.current}),Ie=g||g===0?gk(g,Me&&J):null;if(he.href!==void 0)return X(N.createElement("a",Object.assign({},he,{className:re(Ae,{[`${V}-disabled`]:fe}),href:fe?void 0:he.href,style:_e,onClick:je,ref:Oe,tabIndex:fe?-1:0}),Fe,Ie));let Be=N.createElement("button",Object.assign({},R,{type:S,className:Ae,style:_e,onClick:je,disabled:fe,ref:Oe}),Fe,Ie,ee&&N.createElement(YD,{prefixCls:V}));return vl(_)||(Be=N.createElement(JS,{component:"Button",disabled:oe},Be)),X(Be)}),vo=e2;vo.Group=pk;vo.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(vo.displayName="Button");function md(t){return!!(t!=null&&t.then)}const bx=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]=ya(!1),v=function(){i==null||i.apply(void 0,arguments)};h.useEffect(()=>{let b=null;return a&&(b=setTimeout(()=>{var C;(C=f.current)===null||C===void 0||C.focus({preventScroll:!0})})),()=>{b&&clearTimeout(b)}},[]);const g=b=>{md(b)&&(m(!0),b.then(function(){m(!1,!0),v.apply(void 0,arguments),d.current=!1},C=>{if(m(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(C)}))},y=b=>{if(d.current)return;if(d.current=!0,!u){v();return}let C;if(s){if(C=u(b),c&&!md(C)){d.current=!1,v(b);return}}else if(u.length)C=u(i),d.current=!1;else if(C=u(),!md(C)){v();return}g(C)};return h.createElement(vo,Object.assign({},tx(e),{onClick:y,loading:p,prefixCls:r},o,{ref:f}),n)},Bs=N.createContext({}),{Provider:yx}=Bs,Sv=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:s,onConfirm:l}=N.useContext(Bs);return o?N.createElement(bx,{isSilent:r,actionFn:s,close:function(){a==null||a.apply(void 0,arguments),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${i}-btn`},n):null},xv=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:s,onOk:l}=N.useContext(Bs);return N.createElement(bx,{isSilent:n,type:a||"primary",actionFn:l,close:function(){e==null||e.apply(void 0,arguments),s==null||s(!0)},autoFocus:t==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)};var Cx=h.createContext(null),wv=[];function t2(t,e){var n=h.useState(function(){if(!Gn())return null;var m=document.createElement("div");return process.env.NODE_ENV!=="production"&&e&&m.setAttribute("data-debug",e),m}),r=le(n,1),o=r[0],i=h.useRef(!1),a=h.useContext(Cx),s=h.useState(wv),l=le(s,2),c=l[0],u=l[1],d=a||(i.current?void 0:function(m){u(function(v){var g=[m].concat(Pe(v));return g})});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 Jt(function(){return t?a?a(f):f():p(),p},[t]),Jt(function(){c.length&&(c.forEach(function(m){return m()}),u(wv))},[c]),[o,d]}function n2(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,";"):"";go(`
|
|
351
|
-
#`.concat(e,`::-webkit-scrollbar {
|
|
352
|
-
`).concat(u,`
|
|
353
|
-
`).concat(d,`
|
|
354
|
-
}`),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),gs(e),{width:f,height:p}}function r2(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:n2(t)}function o2(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var i2="rc-util-locker-".concat(Date.now()),Ev=0;function a2(t){var e=!!t,n=h.useState(function(){return Ev+=1,"".concat(i2,"_").concat(Ev)}),r=le(n,1),o=r[0];Jt(function(){if(e){var i=r2(document.body).width,a=o2();go(`
|
|
355
|
-
html body {
|
|
356
|
-
overflow-y: hidden;
|
|
357
|
-
`.concat(a?"width: calc(100% - ".concat(i,"px);"):"",`
|
|
358
|
-
}`),o)}else gs(o);return function(){gs(o)}},[e,o])}var s2=!1;function l2(t){return s2}var Nv=function(e){return e===!1?!1:!Gn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},iu=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=le(c,2),d=u[0],f=u[1],p=d||n;process.env.NODE_ENV!=="production"&&yt(Gn()||!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 Nv(o)}),v=le(m,2),g=v[0],y=v[1];h.useEffect(function(){var D=Nv(o);y(D??null)});var b=t2(p&&!g,i),C=le(b,2),x=C[0],S=C[1],w=g??x;a2(r&&n&&Gn()&&(w===x||w===document.body));var E=null;if(l&&Zo(l)&&e){var M=l;E=M.ref}var $=Qo(E,e);if(!p||!Gn()||g===void 0)return null;var R=w===!1||l2(),I=l;return e&&(I=h.cloneElement(l,{ref:$})),h.createElement(Cx.Provider,{value:S},R?I:_r.createPortal(I,w))});process.env.NODE_ENV!=="production"&&(iu.displayName="Portal");var Sx=h.createContext({});function c2(){var t=q({},h);return t.useId}var Ov=0,$v=c2();const au=$v?function(e){var n=$v();return e||(process.env.NODE_ENV==="test"?"test-id":n)}:function(e){var n=h.useState("ssr-id"),r=le(n,2),o=r[0],i=r[1];return h.useEffect(function(){var a=Ov;Ov+=1,i("rc_unique_".concat(a))},[]),e||(process.env.NODE_ENV==="test"?"test-id":o)};function Mv(t,e,n){var r=e;return!r&&n&&(r="".concat(t,"-").concat(n)),r}function Rv(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 u2(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},r=t.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=Rv(o),n.top+=Rv(o,!0),n}const d2=h.memo(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var f2={width:0,height:0,overflow:"hidden",outline:"none"},h2={outline:"none"},Cp=N.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,v=t.onMouseDown,g=t.onMouseUp,y=t.holderRef,b=t.visible,C=t.forceRender,x=t.width,S=t.height,w=t.classNames,E=t.styles,M=N.useContext(Sx),$=M.panel,R=Qo(y,$),I=N.useRef(),D=N.useRef();N.useImperativeHandle(e,function(){return{focus:function(){var G;(G=I.current)===null||G===void 0||G.focus({preventScroll:!0})},changeActive:function(G){var J=document,V=J.activeElement;G&&V===D.current?I.current.focus({preventScroll:!0}):!G&&V===I.current&&D.current.focus({preventScroll:!0})}}});var _={};x!==void 0&&(_.width=x),S!==void 0&&(_.height=S);var A=s?N.createElement("div",{className:re("".concat(n,"-footer"),w==null?void 0:w.footer),style:q({},E==null?void 0:E.footer)},s):null,z=i?N.createElement("div",{className:re("".concat(n,"-header"),w==null?void 0:w.header),style:q({},E==null?void 0:E.header)},N.createElement("div",{className:"".concat(n,"-title"),id:a},i)):null,k=N.useMemo(function(){return st(l)==="object"&&l!==null?l:l?{closeIcon:c??N.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),P=Zr(k,!0),B=st(l)==="object"&&l.disabled,F=l?N.createElement("button",Le({type:"button",onClick:u,"aria-label":"Close"},P,{className:"".concat(n,"-close"),disabled:B}),k.closeIcon):null,H=N.createElement("div",{className:re("".concat(n,"-content"),w==null?void 0:w.content),style:E==null?void 0:E.content},F,z,N.createElement("div",Le({className:re("".concat(n,"-body"),w==null?void 0:w.body),style:q(q({},f),E==null?void 0:E.body)},p),d),A);return N.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:R,style:q(q({},o),_),className:re(n,r),onMouseDown:v,onMouseUp:g},N.createElement("div",{ref:I,tabIndex:0,style:h2},N.createElement(d2,{shouldUpdate:b||C},m?m(H):H)),N.createElement("div",{tabIndex:0,ref:D,style:f2}))});process.env.NODE_ENV!=="production"&&(Cp.displayName="Panel");var xx=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=N.useRef(),m=h.useState(),v=le(m,2),g=v[0],y=v[1],b={};g&&(b.transformOrigin=g);function C(){var x=u2(p.current);y(f&&(f.x||f.y)?"".concat(f.x-x.left,"px ").concat(f.y-x.top,"px"):"")}return h.createElement(no,{visible:a,onVisibleChanged:d,onAppearPrepare:C,onEnterPrepare:C,forceRender:s,motionName:c,removeOnLeave:l,ref:p},function(x,S){var w=x.className,E=x.style;return h.createElement(Cp,Le({},t,{ref:e,title:r,ariaId:u,prefixCls:n,holderRef:S,style:q(q(q({},E),o),b),className:re(i,w)}))})});xx.displayName="Content";var p2=function(e){var n=e.prefixCls,r=e.style,o=e.visible,i=e.maskProps,a=e.motionName,s=e.className;return h.createElement(no,{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",Le({ref:c,style:q(q({},d),r),className:re("".concat(n,"-mask"),u,s)},i))})},m2=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,v=e.afterOpenChange,g=e.afterClose,y=e.transitionName,b=e.animation,C=e.closable,x=C===void 0?!0:C,S=e.mask,w=S===void 0?!0:S,E=e.maskTransitionName,M=e.maskAnimation,$=e.maskClosable,R=$===void 0?!0:$,I=e.maskStyle,D=e.maskProps,_=e.rootClassName,A=e.classNames,z=e.styles;process.env.NODE_ENV!=="production"&&(["wrapStyle","bodyStyle","maskStyle"].forEach(function(ce){Qr(!(ce in e),"".concat(ce," is deprecated, please use styles instead."))}),"wrapClassName"in e&&Qr(!1,"wrapClassName is deprecated, please use classNames instead."));var k=N.useRef(),P=N.useRef(),B=N.useRef(),F=h.useState(a),H=le(F,2),L=H[0],G=H[1],J=au();function V(){df(P.current,document.activeElement)||(k.current=document.activeElement)}function X(){if(!df(P.current,document.activeElement)){var ce;(ce=B.current)===null||ce===void 0||ce.focus()}}function Q(ce){if(ce)X();else{if(G(!1),w&&k.current&&u){try{k.current.focus({preventScroll:!0})}catch{}k.current=null}L&&(g==null||g())}v==null||v(ce)}function ue(ce){m==null||m(ce)}var Y=N.useRef(!1),fe=N.useRef(),be=function(){clearTimeout(fe.current),Y.current=!0},de=function(){fe.current=setTimeout(function(){Y.current=!1})},oe=null;R&&(oe=function(me){Y.current?Y.current=!1:P.current===me.target&&ue(me)});function ge(ce){if(l&&ce.keyCode===Je.ESC){ce.stopPropagation(),ue(ce);return}a&&ce.keyCode===Je.TAB&&B.current.changeActive(!ce.shiftKey)}N.useEffect(function(){a&&(G(!0),V())},[a]),N.useEffect(function(){return function(){clearTimeout(fe.current)}},[]);var ne=q(q(q({zIndex:o},d),z==null?void 0:z.wrapper),{},{display:L?null:"none"});return h.createElement("div",Le({className:re("".concat(r,"-root"),_)},Zr(e,{data:!0})),h.createElement(p2,{prefixCls:r,visible:w&&a,motionName:Mv(r,E,M),style:q(q({zIndex:o},I),z==null?void 0:z.mask),maskProps:D,className:A==null?void 0:A.mask}),h.createElement("div",Le({tabIndex:-1,onKeyDown:ge,className:re("".concat(r,"-wrap"),f,A==null?void 0:A.wrapper),ref:P,onClick:oe,style:ne},p),h.createElement(xx,Le({},e,{onMouseDown:be,onMouseUp:de,ref:B,closable:x,ariaId:J,prefixCls:r,visible:a&&L,onClose:ue,onVisibleChanged:Q,motionName:Mv(r,y,b)}))))},wx=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=le(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(Sx.Provider,{value:p},h.createElement(iu,{open:n||o||d,autoDestroy:!1,getContainer:r,autoLock:n||d},h.createElement(m2,Le({},e,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};wx.displayName="Dialog";var ui="RC_FORM_INTERNAL_HOOKS",Qt=function(){yt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},xa=h.createContext({getFieldValue:Qt,getFieldsValue:Qt,getFieldError:Qt,getFieldWarning:Qt,getFieldsError:Qt,isFieldsTouched:Qt,isFieldTouched:Qt,isFieldValidating:Qt,isFieldsValidating:Qt,resetFields:Qt,setFields:Qt,setFieldValue:Qt,setFieldsValue:Qt,validateFields:Qt,submit:Qt,getInternalHooks:function(){return Qt(),{dispatch:Qt,initEntityValue:Qt,registerField:Qt,useSubscribe:Qt,setInitialValues:Qt,destroyForm:Qt,setCallbacks:Qt,registerWatch:Qt,getFields:Qt,setValidateMessages:Qt,setPreserve:Qt,getInitialValue:Qt}}}),vc=h.createContext(null);function Wf(t){return t==null?[]:Array.isArray(t)?t:[t]}function g2(t){return t&&!!t._init}function qf(){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=qf();function v2(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function b2(t,e,n){if(Qh())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&hs(o,n.prototype),o}function Uf(t){var e=typeof Map=="function"?new Map:void 0;return Uf=function(r){if(r===null||!v2(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 b2(r,arguments,ps(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),hs(o,r)},Uf(t)}var y2=/%[sdj%]/g,Ex=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Ex=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 Gf(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 pr(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(y2,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 C2(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Pn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||C2(e)&&typeof t=="string"&&!t)}function S2(t,e,n){var r=[],o=0,i=t.length;function a(s){r.push.apply(r,Pe(s||[])),o++,o===i&&n(r)}t.forEach(function(s){e(s,a)})}function Iv(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 x2(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,Pe(t[n]||[]))}),e}var Tv=function(t){bo(n,t);var e=yo(n);function n(r,o){var i;return xn(this,n),i=e.call(this,"Async Validation Error"),W(It(i),"errors",void 0),W(It(i),"fields",void 0),i.errors=r,i.fields=o,i}return wn(n)}(Uf(Error));function w2(t,e,n,r,o){if(e.first){var i=new Promise(function(f,p){var m=function(y){return r(y),y.length?p(new Tv(y,Gf(y))):f(o)},v=x2(t);Iv(v,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(g){if(u.push.apply(u,g),c++,c===l)return r(u),u.length?p(new Tv(u,Gf(u))):f(o)};s.length||(r(u),f(o)),s.forEach(function(v){var g=t[v];a.indexOf(v)!==-1?Iv(g,n,m):S2(g,n,m)})});return d.catch(function(f){return f}),d}function E2(t){return!!(t&&t.message!==void 0)}function N2(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function Pv(t,e){return function(n){var r;return t.fullFields?r=N2(e,t.fullFields):r=e[n.field||t.fullField],E2(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 Av(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];st(r)==="object"&&st(t[n])==="object"?t[n]=q(q({},t[n]),r):t[n]=r}}return t}var Li="enum",O2=function(e,n,r,o,i){e[Li]=Array.isArray(e[Li])?e[Li]:[],e[Li].indexOf(n)===-1&&o.push(pr(i.messages[Li],e.fullField,e[Li].join(", ")))},$2=function(e,n,r,o,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||o.push(pr(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(pr(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},M2=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(pr(i.messages[d].len,e.fullField,e.len)):s&&!l&&u<e.min?o.push(pr(i.messages[d].min,e.fullField,e.min)):l&&!s&&u>e.max?o.push(pr(i.messages[d].max,e.fullField,e.max)):s&&l&&(u<e.min||u>e.max)&&o.push(pr(i.messages[d].range,e.fullField,e.min,e.max))},Nx=function(e,n,r,o,i,a){e.required&&(!r.hasOwnProperty(e.field)||Pn(n,a||e.type))&&o.push(pr(i.messages.required,e.fullField))},bl;const R2=function(){if(bl)return bl;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(S){return S&&S.exact?l:new RegExp("".concat(e(S)).concat(n).concat(e(S)),"g")},u.v6=function(S){return S&&S.exact?c:new RegExp("".concat(e(S)).concat(a).concat(e(S)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,m=u.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",y="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",b="(?::\\d{2,5})?",C='(?:[/?#][^\\s"]*)?',x="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(p,"|").concat(m,"|").concat(v).concat(g).concat(y,")").concat(b).concat(C);return bl=new RegExp("(?:^".concat(x,"$)"),"i"),bl};var kv={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},Ua={integer:function(e){return Ua.number(e)&&parseInt(e,10)===e},float:function(e){return Ua.number(e)&&!Ua.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 st(e)==="object"&&!Ua.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(kv.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(R2())},hex:function(e){return typeof e=="string"&&!!e.match(kv.hex)}},I2=function(e,n,r,o,i){if(e.required&&n===void 0){Nx(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?Ua[s](n)||o.push(pr(i.messages.types[s],e.fullField,e.type)):s&&st(n)!==e.type&&o.push(pr(i.messages.types[s],e.fullField,e.type))},T2=function(e,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(pr(i.messages.whitespace,e.fullField))};const _t={required:Nx,whitespace:T2,type:I2,range:M2,enum:O2,pattern:$2};var P2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i)}r(a)},A2=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)},k2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&_t.type(e,n,o,a,i)}r(a)},D2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n,"date")&&!e.required)return r();if(_t.required(e,n,o,a,i),!Pn(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)},_2="enum",B2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&_t[_2](e,n,o,a,i)}r(a)},j2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(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)},z2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(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)},L2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&_t.type(e,n,o,a,i)}r(a)},V2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),Pn(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)},F2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),n!==void 0&&_t.type(e,n,o,a,i)}r(a)},H2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n,"string")&&!e.required)return r();_t.required(e,n,o,a,i),Pn(n,"string")||_t.pattern(e,n,o,a,i)}r(a)},W2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n)&&!e.required)return r();_t.required(e,n,o,a,i),Pn(n)||_t.type(e,n,o,a,i)}r(a)},q2=function(e,n,r,o,i){var a=[],s=Array.isArray(n)?"array":st(n);_t.required(e,n,o,a,i,s),r(a)},K2=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(Pn(n,"string")&&!e.required)return r();_t.required(e,n,o,a,i,"string"),Pn(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)},gd=function(e,n,r,o,i){var a=e.type,s=[],l=e.required||!e.required&&o.hasOwnProperty(e.field);if(l){if(Pn(n,a)&&!e.required)return r();_t.required(e,n,o,s,i,a),Pn(n,a)||_t.type(e,n,o,s,i)}r(s)};const ts={string:K2,method:L2,number:V2,boolean:k2,regexp:W2,integer:z2,float:j2,array:A2,object:F2,enum:B2,pattern:H2,date:D2,url:gd,hex:gd,email:gd,required:q2,any:P2};var js=function(){function t(e){xn(this,t),W(this,"rules",null),W(this,"_messages",Kf),this.define(e)}return wn(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(st(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=Av(qf(),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 v=[],g={};function y(C){if(Array.isArray(C)){var x;v=(x=v).concat.apply(x,Pe(C))}else v.push(C)}for(var b=0;b<m.length;b++)y(m[b]);v.length?(g=Gf(v),l(v,g)):l(null,a)}if(s.messages){var u=this.messages();u===Kf&&(u=qf()),Av(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 v=r.rules[m],g=a[m];v.forEach(function(y){var b=y;typeof b.transform=="function"&&(a===n&&(a=q({},a)),g=a[m]=b.transform(g),g!=null&&(b.type=b.type||(Array.isArray(g)?"array":st(g)))),typeof b=="function"?b={validator:b}:b=q({},b),b.validator=r.getValidationMethod(b),b.validator&&(b.field=m,b.fullField=b.fullField||m,b.type=r.getType(b),d[m]=d[m]||[],d[m].push({rule:b,value:g,source:a,field:m}))})});var p={};return w2(d,s,function(m,v){var g=m.rule,y=(g.type==="object"||g.type==="array")&&(st(g.fields)==="object"||st(g.defaultField)==="object");y=y&&(g.required||!g.required&&m.value),g.field=m.field;function b(E,M){return q(q({},M),{},{fullField:"".concat(g.fullField,".").concat(E),fullFields:g.fullFields?[].concat(Pe(g.fullFields),[E]):[E]})}function C(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],M=Array.isArray(E)?E:[E];!s.suppressWarning&&M.length&&t.warning("async-validator:",M),M.length&&g.message!==void 0&&(M=[].concat(g.message));var $=M.map(Pv(g,a));if(s.first&&$.length)return p[g.field]=1,v($);if(!y)v($);else{if(g.required&&!m.value)return g.message!==void 0?$=[].concat(g.message).map(Pv(g,a)):s.error&&($=[s.error(g,pr(s.messages.required,g.field))]),v($);var R={};g.defaultField&&Object.keys(m.value).map(function(_){R[_]=g.defaultField}),R=q(q({},R),m.rule.fields);var I={};Object.keys(R).forEach(function(_){var A=R[_],z=Array.isArray(A)?A:[A];I[_]=z.map(b.bind(null,_))});var D=new t(I);D.messages(s.messages),m.rule.options&&(m.rule.options.messages=s.messages,m.rule.options.error=s.error),D.validate(m.value,m.rule.options||s,function(_){var A=[];$&&$.length&&A.push.apply(A,Pe($)),_&&_.length&&A.push.apply(A,Pe(_)),v(A.length?A:null)})}}var x;if(g.asyncValidator)x=g.asyncValidator(g,m.value,C,m.source,s);else if(g.validator){try{x=g.validator(g,m.value,C,m.source,s)}catch(E){var S,w;(S=(w=console).error)===null||S===void 0||S.call(w,E),s.suppressValidatorError||setTimeout(function(){throw E},0),C(E.message)}x===!0?C():x===!1?C(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):x instanceof Array?C(x):x instanceof Error&&C(x.message)}x&&x.then&&x.then(function(){return C()},function(E){return C(E)})},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&&!ts.hasOwnProperty(n.type))throw new Error(pr("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"?ts.required:ts[this.getType(n)]||void 0}}]),t}();W(js,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");ts[e]=n});W(js,"warning",Ex);W(js,"messages",Kf);W(js,"validators",ts);var lr="'${name}' is not a valid ${type}",Ox={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:lr,method:lr,array:lr,object:lr,number:lr,date:lr,boolean:lr,integer:lr,float:lr,regexp:lr,email:lr,url:lr,hex:lr},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}"}},Dv=js;function U2(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 _v="CODE_LOGIC_ERROR";function Xf(t,e,n,r,o){return Yf.apply(this,arguments)}function Yf(){return Yf=ki(rr().mark(function t(e,n,r,o,i){var a,s,l,c,u,d,f,p,m;return rr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return a=q({},r),delete a.ruleIndex,Dv.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(y){return console.error(y),Promise.reject(_v)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new Dv(W({},e,[a])),u=Qi(Ox,o.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(W({},e,n),q({},o)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(d=g.t0.errors.map(function(y,b){var C=y.message,x=C===_v?u.default:C;return h.isValidElement(x)?h.cloneElement(x,{key:"error_".concat(b)}):x}));case 18:if(!(!d.length&&l)){g.next=23;break}return g.next=21,Promise.all(n.map(function(y,b){return Xf("".concat(e,".").concat(b),y,l,o,i)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(y,b){return[].concat(Pe(y),Pe(b))},[]));case 23:return p=q(q({},r),{},{name:e,enum:(r.enum||[]).join(", ")},i),m=d.map(function(y){return typeof y=="string"?U2(y,p):y}),g.abrupt("return",m);case 26:case"end":return g.stop()}},t,null,[[10,15]])})),Yf.apply(this,arguments)}function G2(t,e,n,r,o,i){var a=t.join("."),s=n.map(function(u,d){var f=u.validator,p=q(q({},u),{},{ruleIndex:d});return f&&(p.validator=function(m,v,g){var y=!1,b=function(){for(var S=arguments.length,w=new Array(S),E=0;E<S;E++)w[E]=arguments[E];Promise.resolve().then(function(){yt(!y,"Your validator function has already return a promise. `callback` will be ignored."),y||g.apply(void 0,w)})},C=f(m,v,b);y=C&&typeof C.then=="function"&&typeof C.catch=="function",yt(y,"`callback` is deprecated. Please return a promise instead."),y&&C.then(function(){g()}).catch(function(x){g(x||" ")})}),p}).sort(function(u,d){var f=u.warningOnly,p=u.ruleIndex,m=d.warningOnly,v=d.ruleIndex;return!!f==!!m?p-v:f?1:-1}),l;if(o===!0)l=new Promise(function(){var u=ki(rr().mark(function d(f,p){var m,v,g;return rr().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:m=0;case 1:if(!(m<s.length)){b.next=12;break}return v=s[m],b.next=5,Xf(a,e,v,r,i);case 5:if(g=b.sent,!g.length){b.next=9;break}return p([{errors:g,rule:v}]),b.abrupt("return");case 9:m+=1,b.next=1;break;case 12:f([]);case 13:case"end":return b.stop()}},d)}));return function(d,f){return u.apply(this,arguments)}}());else{var c=s.map(function(u){return Xf(a,e,u,r,i).then(function(d){return{errors:d,rule:u}})});l=(o?Y2(c):X2(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function X2(t){return Jf.apply(this,arguments)}function Jf(){return Jf=ki(rr().mark(function t(e){return rr().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,Pe(o));return a}));case 1:case"end":return r.stop()}},t)})),Jf.apply(this,arguments)}function Y2(t){return Qf.apply(this,arguments)}function Qf(){return Qf=ki(rr().mark(function t(e){var n;return rr().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)})),Qf.apply(this,arguments)}function Nn(t){return Wf(t)}function Bv(t,e){var n={};return e.forEach(function(r){var o=Gr(t,r);n=Tr(n,r,o)}),n}function ia(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return $x(e,r,n)})}function $x(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 J2(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||st(t)!=="object"||st(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),o=new Set([].concat(n,r));return Pe(o).every(function(i){var a=t[i],s=e[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function Q2(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&st(e.target)==="object"&&t in e.target?e.target[t]:e}function jv(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(Pe(t.slice(0,n)),[o],Pe(t.slice(n,e)),Pe(t.slice(e+1,r))):i<0?[].concat(Pe(t.slice(0,e)),Pe(t.slice(e+1,n+1)),[o],Pe(t.slice(n+1,r))):t}var Z2=["name"],Cr=[];function vd(t,e,n,r,o,i){return typeof t=="function"?t(e,n,"source"in i?{source:i.source}:{}):r!==o}var Sp=function(t){bo(n,t);var e=yo(n);function n(r){var o;if(xn(this,n),o=e.call(this,r),W(It(o),"state",{resetCount:0}),W(It(o),"cancelRegisterFunc",null),W(It(o),"mounted",!1),W(It(o),"touched",!1),W(It(o),"dirty",!1),W(It(o),"validatePromise",void 0),W(It(o),"prevValidating",void 0),W(It(o),"errors",Cr),W(It(o),"warnings",Cr),W(It(o),"cancelRegister",function(){var l=o.props,c=l.preserve,u=l.isListField,d=l.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(u,c,Nn(d)),o.cancelRegisterFunc=null}),W(It(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(Pe(f),Pe(c)):[]}),W(It(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})}),W(It(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),W(It(o),"metaCache",null),W(It(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=q(q({},o.getMeta()),{},{destroy:l});pa(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),W(It(o),"onStoreChange",function(l,c,u){var d=o.props,f=d.shouldUpdate,p=d.dependencies,m=p===void 0?[]:p,v=d.onReset,g=u.store,y=o.getNamePath(),b=o.getValue(l),C=o.getValue(g),x=c&&ia(c,y);switch(u.type==="valueUpdate"&&u.source==="external"&&!pa(b,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Cr,o.warnings=Cr,o.triggerMetaEvent()),u.type){case"reset":if(!c||x){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Cr,o.warnings=Cr,o.triggerMetaEvent(),v==null||v(),o.refresh();return}break;case"remove":{if(f&&vd(f,l,g,b,C,u)){o.reRender();return}break}case"setField":{var S=u.data;if(x){"touched"in S&&(o.touched=S.touched),"validating"in S&&!("originRCField"in S)&&(o.validatePromise=S.validating?Promise.resolve([]):null),"errors"in S&&(o.errors=S.errors||Cr),"warnings"in S&&(o.warnings=S.warnings||Cr),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in S&&ia(c,y,!0)){o.reRender();return}if(f&&!y.length&&vd(f,l,g,b,C,u)){o.reRender();return}break}case"dependenciesUpdate":{var w=m.map(Nn);if(w.some(function(E){return ia(u.relatedFields,E)})){o.reRender();return}break}default:if(x||(!m.length||y.length||f)&&vd(f,l,g,b,C,u)){o.reRender();return}break}f===!0&&o.reRender()}),W(It(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,v=Promise.resolve().then(ki(rr().mark(function g(){var y,b,C,x,S,w,E;return rr().wrap(function($){for(;;)switch($.prev=$.next){case 0:if(o.mounted){$.next=2;break}return $.abrupt("return",[]);case 2:if(y=o.props,b=y.validateFirst,C=b===void 0?!1:b,x=y.messageVariables,S=y.validateDebounce,w=o.getRules(),f&&(w=w.filter(function(R){return R}).filter(function(R){var I=R.validateTrigger;if(!I)return!0;var D=Wf(I);return D.includes(f)})),!(S&&f)){$.next=10;break}return $.next=8,new Promise(function(R){setTimeout(R,S)});case 8:if(o.validatePromise===v){$.next=10;break}return $.abrupt("return",[]);case 10:return E=G2(c,u,w,l,C,x),E.catch(function(R){return R}).then(function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Cr;if(o.validatePromise===v){var I;o.validatePromise=null;var D=[],_=[];(I=R.forEach)===null||I===void 0||I.call(R,function(A){var z=A.rule.warningOnly,k=A.errors,P=k===void 0?Cr:k;z?_.push.apply(_,Pe(P)):D.push.apply(D,Pe(P))}),o.errors=D,o.warnings=_,o.triggerMetaEvent(),o.reRender()}}),$.abrupt("return",E);case 13:case"end":return $.stop()}},g)})));return m||(o.validatePromise=v,o.dirty=!0,o.errors=Cr,o.warnings=Cr,o.triggerMetaEvent(),o.reRender()),v}),W(It(o),"isFieldValidating",function(){return!!o.validatePromise}),W(It(o),"isFieldTouched",function(){return o.touched}),W(It(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var l=o.props.fieldContext,c=l.getInternalHooks(ui),u=c.getInitialValue;return u(o.getNamePath())!==void 0}),W(It(o),"getErrors",function(){return o.errors}),W(It(o),"getWarnings",function(){return o.warnings}),W(It(o),"isListField",function(){return o.props.isListField}),W(It(o),"isList",function(){return o.props.isList}),W(It(o),"isPreserve",function(){return o.props.preserve}),W(It(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}),W(It(o),"getOnlyChild",function(l){if(typeof l=="function"){var c=o.getMeta();return q(q({},o.getOnlyChild(l(o.getControlled(),c,o.props.fieldContext))),{},{isFunction:!0})}var u=gr(l);return u.length!==1||!h.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),W(It(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return Gr(l||c(!0),u)}),W(It(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,v=c.valuePropName,g=c.getValueProps,y=c.fieldContext,b=f!==void 0?f:y.validateTrigger,C=o.getNamePath(),x=y.getInternalHooks,S=y.getFieldsValue,w=x(ui),E=w.dispatch,M=o.getValue(),$=g||function(A){return W({},v,A)},R=l[d],I=u!==void 0?$(M):{};process.env.NODE_ENV!=="production"&&I&&Object.keys(I).forEach(function(A){yt(typeof I[A]!="function","It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(A,")"))});var D=q(q({},l),I);D[d]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var A,z=arguments.length,k=new Array(z),P=0;P<z;P++)k[P]=arguments[P];p?A=p.apply(void 0,k):A=Q2.apply(void 0,[v].concat(k)),m&&(A=m(A,M,S(!0))),A!==M&&E({type:"updateValue",namePath:C,value:A}),R&&R.apply(void 0,k)};var _=Wf(b||[]);return _.forEach(function(A){var z=D[A];D[A]=function(){z&&z.apply(void 0,arguments);var k=o.props.rules;k&&k.length&&E({type:"validateField",namePath:C,triggerName:A})}}),D}),r.fieldContext){var i=r.fieldContext.getInternalHooks,a=i(ui),s=a.initEntityValue;s(It(o))}return o}return wn(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(ui),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)):(yt(!s,"`children` of Field is not validate ReactElement."),c=s),h.createElement(h.Fragment,{key:o},c)}}]),n}(h.Component);W(Sp,"contextType",xa);W(Sp,"defaultProps",{trigger:"onChange",valuePropName:"value"});function Mx(t){var e,n=t.name,r=xt(t,Z2),o=h.useContext(xa),i=h.useContext(vc),a=n!==void 0?Nn(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&&yt(!1,"`preserve` should not apply on Form.List fields."),h.createElement(Sp,Le({key:l,name:a,isListField:s},r,{fieldContext:o}))}function e_(t){var e=t.name,n=t.initialValue,r=t.children,o=t.rules,i=t.validateTrigger,a=t.isListField,s=h.useContext(xa),l=h.useContext(vc),c=h.useRef({keys:[],id:0}),u=c.current,d=h.useMemo(function(){var v=Nn(s.prefixName)||[];return[].concat(Pe(v),Pe(Nn(e)))},[s.prefixName,e]),f=h.useMemo(function(){return q(q({},s),{},{prefixName:d})},[s,d]),p=h.useMemo(function(){return{getKey:function(g){var y=d.length,b=g[y];return[u.keys[b],g.slice(y+1)]}}},[d]);if(typeof r!="function")return yt(!1,"Form.List only accepts function as children."),null;var m=function(g,y,b){var C=b.source;return C==="internal"?!1:g!==y};return h.createElement(vc.Provider,{value:p},h.createElement(xa.Provider,{value:f},h.createElement(Mx,{name:[],shouldUpdate:m,rules:o,validateTrigger:i,initialValue:n,isList:!0,isListField:a??!!l},function(v,g){var y=v.value,b=y===void 0?[]:y,C=v.onChange,x=s.getFieldValue,S=function(){var $=x(d||[]);return $||[]},w={add:function($,R){var I=S();R>=0&&R<=I.length?(u.keys=[].concat(Pe(u.keys.slice(0,R)),[u.id],Pe(u.keys.slice(R))),C([].concat(Pe(I.slice(0,R)),[$],Pe(I.slice(R))))):(process.env.NODE_ENV!=="production"&&(R<0||R>I.length)&&yt(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(Pe(u.keys),[u.id]),C([].concat(Pe(I),[$]))),u.id+=1},remove:function($){var R=S(),I=new Set(Array.isArray($)?$:[$]);I.size<=0||(u.keys=u.keys.filter(function(D,_){return!I.has(_)}),C(R.filter(function(D,_){return!I.has(_)})))},move:function($,R){if($!==R){var I=S();$<0||$>=I.length||R<0||R>=I.length||(u.keys=jv(u.keys,$,R),C(jv(I,$,R)))}}},E=b||[];return Array.isArray(E)||(E=[],process.env.NODE_ENV!=="production"&&yt(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),r(E.map(function(M,$){var R=u.keys[$];return R===void 0&&(u.keys[$]=u.id,R=u.keys[$],u.id+=1),{name:$,key:R,isListField:!0}}),w,g)})))}function t_(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 Rx="__@field_split__";function bd(t){return t.map(function(e){return"".concat(st(e),":").concat(e)}).join(Rx)}var Vi=function(){function t(){xn(this,t),W(this,"kvs",new Map)}return wn(t,[{key:"set",value:function(n,r){this.kvs.set(bd(n),r)}},{key:"get",value:function(n){return this.kvs.get(bd(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(bd(n))}},{key:"map",value:function(n){return Pe(this.kvs.entries()).map(function(r){var o=le(r,2),i=o[0],a=o[1],s=i.split(Rx);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=le(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}(),n_=["name"],r_=wn(function t(e){var n=this;xn(this,t),W(this,"formHooked",!1),W(this,"forceRootUpdate",void 0),W(this,"subscribable",!0),W(this,"store",{}),W(this,"fieldEntities",[]),W(this,"initialValues",{}),W(this,"callbacks",{}),W(this,"validateMessages",null),W(this,"preserve",null),W(this,"lastValidatePromise",null),W(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}}),W(this,"getInternalHooks",function(r){return r===ui?(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}):(yt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),W(this,"useSubscribe",function(r){n.subscribable=r}),W(this,"prevWithoutPreserves",null),W(this,"setInitialValues",function(r,o){if(n.initialValues=r||{},o){var i,a=Qi(r,n.store);(i=n.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=Tr(a,l,Gr(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),W(this,"destroyForm",function(r){if(r)n.updateStore({});else{var o=new Vi;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||o.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=o}}),W(this,"getInitialValue",function(r){var o=Gr(n.initialValues,r);return r.length?Qi(o):o}),W(this,"setCallbacks",function(r){n.callbacks=r}),W(this,"setValidateMessages",function(r){n.validateMessages=r}),W(this,"setPreserve",function(r){n.preserve=r}),W(this,"watchList",[]),W(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(o){return o!==r})}}),W(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)})}}),W(this,"timeoutId",null),W(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||yt(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),W(this,"updateStore",function(r){n.store=r}),W(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}),W(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new Vi;return n.getFieldEntities(r).forEach(function(i){var a=i.getNamePath();o.set(a,i)}),o}),W(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var o=n.getFieldsMap(!0);return r.map(function(i){var a=Nn(i);return o.get(a)||{INVALIDATE_NAME_PATH:Nn(i)}})}),W(this,"getFieldsValue",function(r,o){n.warningUnhooked();var i,a,s;if(r===!0||Array.isArray(r)?(i=r,a=o):r&&st(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,v;if((m=(v=u).isList)!==null&&m!==void 0&&m.call(v))return}else if(!i&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(p);else{var g="getMeta"in u?u.getMeta():null;a(g)&&c.push(p)}}),Bv(n.store,c.map(Nn))}),W(this,"getFieldValue",function(r){n.warningUnhooked();var o=Nn(r);return Gr(n.store,o)}),W(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:Nn(r[a]),errors:[],warnings:[]}})}),W(this,"getFieldError",function(r){n.warningUnhooked();var o=Nn(r),i=n.getFieldsError([o])[0];return i.errors}),W(this,"getFieldWarning",function(r){n.warningUnhooked();var o=Nn(r),i=n.getFieldsError([o])[0];return i.warnings}),W(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(Nn),c=!1):(l=null,c=a):(l=a.map(Nn),c=s);var u=n.getFieldEntities(!0),d=function(g){return g.isFieldTouched()};if(!l)return c?u.every(function(v){return d(v)||v.isList()}):u.some(d);var f=new Vi;l.forEach(function(v){f.set(v,[])}),u.forEach(function(v){var g=v.getNamePath();l.forEach(function(y){y.every(function(b,C){return g[C]===b})&&f.update(y,function(b){return[].concat(Pe(b),[v])})})});var p=function(g){return g.some(d)},m=f.map(function(v){var g=v.value;return g});return c?m.every(p):m.some(p)}),W(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),W(this,"isFieldsValidating",function(r){n.warningUnhooked();var o=n.getFieldEntities();if(!r)return o.some(function(a){return a.isFieldValidating()});var i=r.map(Nn);return o.some(function(a){var s=a.getNamePath();return ia(i,s)&&a.isFieldValidating()})}),W(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),W(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=new Vi,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)yt(!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)yt(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(m){var v=n.getFieldValue(f),g=u.isListField();!g&&(!r.skipExist||v===void 0)&&n.updateStore(Tr(n.store,f,Pe(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,Pe(Pe(c).map(function(d){return d.entity})))}})):s=i,a(s)}),W(this,"resetFields",function(r){n.warningUnhooked();var o=n.store;if(!r){n.updateStore(Qi(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(o,null,{type:"reset"}),n.notifyWatch();return}var i=r.map(Nn);i.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(Tr(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:i}),n.notifyObservers(o,i,{type:"reset"}),n.notifyWatch(i)}),W(this,"setFields",function(r){n.warningUnhooked();var o=n.store,i=[];r.forEach(function(a){var s=a.name,l=xt(a,n_),c=Nn(s);i.push(c),"value"in l&&n.updateStore(Tr(n.store,c,l.value)),n.notifyObservers(o,[c],{type:"setField",data:a})}),n.notifyWatch(i)}),W(this,"getFields",function(){var r=n.getFieldEntities(!0),o=r.map(function(i){var a=i.getNamePath(),s=i.getMeta(),l=q(q({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return o}),W(this,"initEntityValue",function(r){var o=r.props.initialValue;if(o!==void 0){var i=r.getNamePath(),a=Gr(n.store,i);a===void 0&&n.updateStore(Tr(n.store,i,o))}}),W(this,"isMergedPreserve",function(r){var o=r!==void 0?r:n.preserve;return o??!0}),W(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!$x(d.getNamePath(),o)})){var u=n.store;n.updateStore(Tr(u,o,c,!0)),n.notifyObservers(u,[o],{type:"remove"}),n.triggerDependenciesUpdate(u,o)}}n.notifyWatch([o])}}),W(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}}}),W(this,"notifyObservers",function(r,o,i){if(n.subscribable){var a=q(q({},i),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,o,a)})}else n.forceRootUpdate()}),W(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(Pe(i))}),i}),W(this,"updateValue",function(r,o){var i=Nn(r),a=n.store;n.updateStore(Tr(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=Bv(n.store,[i]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([i].concat(Pe(s)))}),W(this,"setFieldsValue",function(r){n.warningUnhooked();var o=n.store;if(r){var i=Qi(n.store,r);n.updateStore(i)}n.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),W(this,"setFieldValue",function(r,o){n.setFields([{name:r,value:o,errors:[],warnings:[]}])}),W(this,"getDependencyChildrenFields",function(r){var o=new Set,i=[],a=new Vi;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=Nn(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}),W(this,"triggerOnFieldsChange",function(r,o){var i=n.callbacks.onFieldsChange;if(i){var a=n.getFields();if(o){var s=new Vi;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 ia(r,u)});l.length&&i(l,a)}}),W(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(Nn):[],c=[],u=String(Date.now()),d=new Set,f=a||{},p=f.recursive,m=f.dirty;n.getFieldEntities(!0).forEach(function(b){if(s||l.push(b.getNamePath()),!(!b.props.rules||!b.props.rules.length)&&!(m&&!b.isFieldDirty())){var C=b.getNamePath();if(d.add(C.join(u)),!s||ia(l,C,p)){var x=b.validateRules(q({validateMessages:q(q({},Ox),n.validateMessages)},a));c.push(x.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(S){var w,E=[],M=[];return(w=S.forEach)===null||w===void 0||w.call(S,function($){var R=$.rule.warningOnly,I=$.errors;R?M.push.apply(M,Pe(I)):E.push.apply(E,Pe(I))}),E.length?Promise.reject({name:C,errors:E,warnings:M}):{name:C,errors:E,warnings:M}}))}}});var v=t_(c);n.lastValidatePromise=v,v.catch(function(b){return b}).then(function(b){var C=b.map(function(x){var S=x.name;return S});n.notifyObservers(n.store,C,{type:"validateFinish"}),n.triggerOnFieldsChange(C,b)});var g=v.then(function(){return n.lastValidatePromise===v?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(b){var C=b.filter(function(x){return x&&x.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:C,outOfDate:n.lastValidatePromise!==v})});g.catch(function(b){return b});var y=l.filter(function(b){return d.has(b.join(u))});return n.triggerOnFieldsChange(y),g}),W(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 Ix(t){var e=h.useRef(),n=h.useState({}),r=le(n,2),o=r[1];if(!e.current)if(t)e.current=t;else{var i=function(){o({})},a=new r_(i);e.current=a.getForm()}return[e.current]}var Zf=h.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),o_=function(e){var n=e.validateMessages,r=e.onFormChange,o=e.onFormFinish,i=e.children,a=h.useContext(Zf),s=h.useRef({});return h.createElement(Zf.Provider,{value:q(q({},a),{},{validateMessages:q(q({},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=q(q({},s.current),{},W({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=q({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},i)},i_=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],a_=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,v=e.onFieldsChange,g=e.onFinish,y=e.onFinishFailed,b=e.clearOnDestroy,C=xt(e,i_),x=h.useRef(null),S=h.useContext(Zf),w=Ix(a),E=le(w,1),M=E[0],$=M.getInternalHooks(ui),R=$.useSubscribe,I=$.setInitialValues,D=$.setCallbacks,_=$.setValidateMessages,A=$.setPreserve,z=$.destroyForm;h.useImperativeHandle(n,function(){return q(q({},M),{},{nativeElement:x.current})}),h.useEffect(function(){return S.registerForm(r,M),function(){S.unregisterForm(r)}},[S,M,r]),_(q(q({},S.validateMessages),d)),D({onValuesChange:m,onFieldsChange:function(V){if(S.triggerFormChange(r,V),v){for(var X=arguments.length,Q=new Array(X>1?X-1:0),ue=1;ue<X;ue++)Q[ue-1]=arguments[ue];v.apply(void 0,[V].concat(Q))}},onFinish:function(V){S.triggerFormFinish(r,V),g&&g(V)},onFinishFailed:y}),A(s);var k=h.useRef(null);I(o,!k.current),k.current||(k.current=!0),h.useEffect(function(){return function(){return z(b)}},[]);var P,B=typeof l=="function";if(B){var F=M.getFieldsValue(!0);P=l(F,M)}else P=l;R(!B);var H=h.useRef();h.useEffect(function(){J2(H.current||[],i||[])||M.setFields(i||[]),H.current=i},[i,M]);var L=h.useMemo(function(){return q(q({},M),{},{validateTrigger:p})},[M,p]),G=h.createElement(vc.Provider,{value:null},h.createElement(xa.Provider,{value:L},P));return u===!1?G:h.createElement(u,Le({},C,{ref:x,onSubmit:function(V){V.preventDefault(),V.stopPropagation(),M.submit()},onReset:function(V){var X;V.preventDefault(),M.resetFields(),(X=C.onReset)===null||X===void 0||X.call(C,V)}}),G)};function zv(t){try{return JSON.stringify(t)}catch{return Math.random()}}var s_=process.env.NODE_ENV!=="production"?function(t){var e=t.join("__RC_FIELD_FORM_SPLIT__"),n=N.useRef(e);yt(n.current===e,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")}:function(){};function l_(){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=g2(i)?{form:i}:i,s=a.form,l=N.useState(),c=le(l,2),u=c[0],d=c[1],f=N.useMemo(function(){return zv(u)},[u]),p=N.useRef(f);p.current=f;var m=N.useContext(xa),v=s||m,g=v&&v._init;process.env.NODE_ENV!=="production"&&yt(e.length===2?s?g:!0:g,"useWatch requires a form instance since it can not auto detect from context.");var y=Nn(r),b=N.useRef(y);return b.current=y,s_(y),N.useEffect(function(){if(g){var C=v.getFieldsValue,x=v.getInternalHooks,S=x(ui),w=S.registerWatch,E=function(I,D){var _=a.preserve?D:I;return typeof r=="function"?r(_):Gr(_,b.current)},M=w(function(R,I){var D=E(R,I),_=zv(D);p.current!==_&&(p.current=_,d(D))}),$=E(C(),C(!0));return u!==$&&d($),M}},[g]),u}var c_=h.forwardRef(a_),zs=c_;zs.FormProvider=o_;zs.Field=Mx;zs.List=e_;zs.useForm=Ix;zs.useWatch=l_;const $r=h.createContext({});process.env.NODE_ENV!=="production"&&($r.displayName="FormItemInputContext");const u_=t=>{let{children:e,status:n,override:r}=t;const o=h.useContext($r),i=h.useMemo(()=>{const a=Object.assign({},o);return r&&delete a.isFormItemInput,n&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[n,r,o]);return h.createElement($r.Provider,{value:i},e)},d_=h.createContext(void 0),Ko=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let o=r;return n&&(o=N.createElement(u_,{override:!0,status:!0},o)),e&&(o=N.createElement(uk,null,o)),o};function Lv(t){if(t)return{closable:t.closable,closeIcon:t.closeIcon}}function Vv(t){const{closable:e,closeIcon:n}=t||{};return N.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])}function Fv(){const t={};for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(o=>{o&&Object.keys(o).forEach(i=>{o[i]!==void 0&&(t[i]=o[i])})}),t}const f_={};function h_(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f_;const r=Vv(t),o=Vv(e),i=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,a=N.useMemo(()=>Object.assign({closeIcon:N.createElement(Ts,null)},n),[n]),s=N.useMemo(()=>r===!1?!1:r?Fv(a,o,r):o===!1?!1:o?Fv(a,o):a.closable?a:!1,[r,o,a]);return N.useMemo(()=>{if(s===!1)return[!1,null,i];const{closeIconRender:l}=a,{closeIcon:c}=s;let u=c;if(u!=null){l&&(u=l(c));const d=Zr(s,!0);Object.keys(d).length&&(u=N.isValidElement(u)?N.cloneElement(u,d):N.createElement("span",Object.assign({},d),u))}return[!0,u,i]},[s,a])}const p_=()=>Gn()&&window.document.documentElement,su=t=>{const{prefixCls:e,className:n,style:r,size:o,shape:i}=t,a=re({[`${e}-lg`]:o==="large",[`${e}-sm`]:o==="small"}),s=re({[`${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:re(e,a,s,n),style:Object.assign(Object.assign({},l),r)})},m_=new qt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),lu=t=>({height:t,lineHeight:se(t)}),aa=t=>Object.assign({width:t},lu(t)),g_=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:m_,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),yd=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},lu(t)),v_=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},aa(r)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},aa(o)),[`${e}${e}-sm`]:Object.assign({},aa(i))}},b_=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},yd(e,s)),[`${r}-lg`]:Object.assign({},yd(o,s)),[`${r}-sm`]:Object.assign({},yd(i,s))}},Hv=t=>Object.assign({width:t},lu(t)),y_=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},Hv(i(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},Hv(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%"}}},Cd=(t,e,n)=>{const{skeletonButtonCls:r}=t;return{[`${n}${r}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:e}}},Sd=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},lu(t)),C_=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()},Sd(r,s))},Cd(t,r,n)),{[`${n}-lg`]:Object.assign({},Sd(o,s))}),Cd(t,o,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Sd(i,s))}),Cd(t,i,`${n}-sm`))},S_=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:v,blockRadius:g,paragraphLiHeight:y,controlHeightXS:b,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},aa(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},aa(c)),[`${n}-sm`]:Object.assign({},aa(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:v,background:d,borderRadius:g,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:b}}},[`${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"},C_(t)),v_(t)),b_(t)),y_(t)),[`${e}${e}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${e}${e}-active`]:{[`
|
|
359
|
-
${r},
|
|
360
|
-
${o} > li,
|
|
361
|
-
${n},
|
|
362
|
-
${i},
|
|
363
|
-
${a},
|
|
364
|
-
${s}
|
|
365
|
-
`]:Object.assign({},g_(t))}}},x_=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}},Oa=hn("Skeleton",t=>{const{componentCls:e,calc:n}=t,r=Lt(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[S_(r)]},x_,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),w_=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,shape:i="circle",size:a="default"}=t,{getPrefixCls:s}=h.useContext(At),l=s("skeleton",e),[c,u,d]=Oa(l),f=Tn(t,["prefixCls","className"]),p=re(l,`${l}-element`,{[`${l}-active`]:o},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(su,Object.assign({prefixCls:`${l}-avatar`,shape:i,size:a},f))))},E_=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,block:i=!1,size:a="default"}=t,{getPrefixCls:s}=h.useContext(At),l=s("skeleton",e),[c,u,d]=Oa(l),f=Tn(t,["prefixCls"]),p=re(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(su,Object.assign({prefixCls:`${l}-button`,size:a},f))))},N_="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",O_=t=>{const{prefixCls:e,className:n,rootClassName:r,style:o,active:i}=t,{getPrefixCls:a}=h.useContext(At),s=a("skeleton",e),[l,c,u]=Oa(s),d=re(s,`${s}-element`,{[`${s}-active`]:i},n,r,c,u);return l(h.createElement("div",{className:d},h.createElement("div",{className:re(`${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:N_,className:`${s}-image-path`})))))},$_=t=>{const{prefixCls:e,className:n,rootClassName:r,active:o,block:i,size:a="default"}=t,{getPrefixCls:s}=h.useContext(At),l=s("skeleton",e),[c,u,d]=Oa(l),f=Tn(t,["prefixCls"]),p=re(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(h.createElement("div",{className:p},h.createElement(su,Object.assign({prefixCls:`${l}-input`,size:a},f))))},M_=t=>{const{prefixCls:e,className:n,rootClassName:r,style:o,active:i,children:a}=t,{getPrefixCls:s}=h.useContext(At),l=s("skeleton",e),[c,u,d]=Oa(l),f=re(l,`${l}-element`,{[`${l}-active`]:i},u,n,r,d);return c(h.createElement("div",{className:f},h.createElement("div",{className:re(`${l}-image`,n),style:o},a)))},R_=(t,e)=>{const{width:n,rows:r=2}=e;if(Array.isArray(n))return n[t];if(r-1===t)return n},I_=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:R_(s,t)}}));return h.createElement("ul",{className:re(e,n),style:r},i)},T_=t=>{let{prefixCls:e,className:n,width:r,style:o}=t;return h.createElement("h3",{className:re(e,n),style:Object.assign({width:r},o)})};function xd(t){return t&&typeof t=="object"?t:{}}function P_(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function A_(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function k_(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Di=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:v}=br("skeleton"),g=f("skeleton",e),[y,b,C]=Oa(g);if(n||!("loading"in t)){const x=!!s,S=!!l,w=!!c;let E;if(x){const R=Object.assign(Object.assign({prefixCls:`${g}-avatar`},P_(S,w)),xd(s));E=h.createElement("div",{className:`${g}-header`},h.createElement(su,Object.assign({},R)))}let M;if(S||w){let R;if(S){const D=Object.assign(Object.assign({prefixCls:`${g}-title`},A_(x,w)),xd(l));R=h.createElement(T_,Object.assign({},D))}let I;if(w){const D=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},k_(x,S)),xd(c));I=h.createElement(I_,Object.assign({},D))}M=h.createElement("div",{className:`${g}-content`},R,I)}const $=re(g,{[`${g}-with-avatar`]:x,[`${g}-active`]:u,[`${g}-rtl`]:p==="rtl",[`${g}-round`]:d},m,r,o,b,C);return y(h.createElement("div",{className:$,style:Object.assign(Object.assign({},v),i)},E,M))}return a??null};Di.Button=E_;Di.Avatar=w_;Di.Input=$_;Di.Image=O_;Di.Node=M_;process.env.NODE_ENV!=="production"&&(Di.displayName="Skeleton");function Wv(){}const D_=h.createContext({add:Wv,remove:Wv});function __(t){const e=h.useContext(D_),n=h.useRef(null);return Wt(o=>{if(o){const i=t?o.querySelector(t):o;e.add(i),n.current=i}else e.remove(n.current)})}const qv=()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:n}=N.useContext(Bs);return N.createElement(vo,Object.assign({onClick:n},t),e)},Kv=()=>{const{confirmLoading:t,okButtonProps:e,okType:n,okTextLocale:r,onOk:o}=N.useContext(Bs);return N.createElement(vo,Object.assign({},tx(n),{loading:t,onClick:o},e),r)};function Tx(t,e){return N.createElement("span",{className:`${t}-close-x`},e||N.createElement(Ts,{className:`${t}-close-icon`}))}const Px=t=>{const{okText:e,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=t,[u]=So("Modal",sS()),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=N.useMemo(()=>p,Pe(Object.values(p)));let v;return typeof c=="function"||typeof c>"u"?(v=N.createElement(N.Fragment,null,N.createElement(qv,null),N.createElement(Kv,null)),typeof c=="function"&&(v=c(v,{OkBtn:Kv,CancelBtn:qv})),v=N.createElement(yx,{value:m},v)):v=c,N.createElement(mS,{disabled:!1},v)},B_=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"}}}},j_=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},z_=(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},eh=(t,e)=>z_(t,e),L_=(t,e,n)=>({[`@media (min-width: ${se(e)})`]:Object.assign({},eh(t,n))}),V_=()=>({}),F_=()=>({});hn("Grid",B_,V_);const Ax=t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin});hn("Grid",t=>{const e=Lt(t,{gridColumns:24}),n=Ax(e);return delete n.xs,[j_(e),eh(e,""),eh(e,"-xs"),Object.keys(n).map(r=>L_(e,n[r],`-${r}`)).reduce((r,o)=>Object.assign(Object.assign({},r),o),{})]},F_);function Uv(t){return{position:t,inset:0}}const H_=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({},Uv("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Object.assign(Object.assign({},Uv("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:Kk(t)}]},W_=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:`${se(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Object.assign(Object.assign({},Fn(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${se(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:se(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},Ca(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${se(t.borderRadiusLG)} ${se(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:`${se(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,
|
|
366
|
-
${e}-body,
|
|
367
|
-
${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},q_=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},K_=t=>{const{componentCls:e}=t,n=Ax(t);delete n.xs;const r=Object.keys(n).map(o=>({[`@media (min-width: ${se(n[o])})`]:{width:`var(--${e.replace(".","")}-${o}-width)`}}));return{[`${e}-root`]:{[e]:[{width:`var(--${e.replace(".","")}-xs-width)`}].concat(Pe(r))}}},kx=t=>{const e=t.padding,n=t.fontSizeHeading5,r=t.lineHeightHeading5;return Lt(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()})},Dx=t=>({footerBg:"transparent",headerBg:t.colorBgElevated,titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${se(t.paddingMD)} ${se(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${se(t.padding)} ${se(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${se(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${se(t.paddingXS)} ${se(t.padding)}`:0,footerBorderTop:t.wireframe?`${se(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${se(t.borderRadiusLG)} ${se(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${se(t.padding*2)} ${se(t.padding*2)} ${se(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM}),_x=hn("Modal",t=>{const e=kx(t);return[W_(e),q_(e),H_(e),Ds(e,"zoom"),K_(e)]},Dx,{unitless:{titleLineHeight:!0}});var U_=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 th;const G_=t=>{th={x:t.pageX,y:t.pageY},setTimeout(()=>{th=null},100)};p_()&&document.documentElement.addEventListener("click",G_,!0);const Bx=t=>{var e;const{getPopupContainer:n,getPrefixCls:r,direction:o,modal:i}=h.useContext(At),a=Q=>{const{onCancel:ue}=t;ue==null||ue(Q)},s=Q=>{const{onOk:ue}=t;ue==null||ue(Q)};if(process.env.NODE_ENV!=="production"){const Q=on("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(ue=>{let[Y,fe]=ue;Q.deprecated(!(Y in t),Y,fe)})}const{prefixCls:l,className:c,rootClassName:u,open:d,wrapClassName:f,centered:p,getContainer:m,focusTriggerAfterClose:v=!0,style:g,visible:y,width:b=520,footer:C,classNames:x,styles:S,children:w,loading:E}=t,M=U_(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading"]),$=r("modal",l),R=r(),I=xo($),[D,_,A]=_x($,I),z=re(f,{[`${$}-centered`]:p??(i==null?void 0:i.centered),[`${$}-wrap-rtl`]:o==="rtl"}),k=C!==null&&!E?h.createElement(Px,Object.assign({},t,{onOk:s,onCancel:a})):null,[P,B,F]=h_(Lv(t),Lv(i),{closable:!0,closeIcon:h.createElement(Ts,{className:`${$}-close-icon`}),closeIconRender:Q=>Tx($,Q)}),H=__(`.${$}-content`),[L,G]=As("Modal",M.zIndex),[J,V]=h.useMemo(()=>b&&typeof b=="object"?[void 0,b]:[b,void 0],[b]),X=h.useMemo(()=>{const Q={};return V&&Object.keys(V).forEach(ue=>{const Y=V[ue];Y!==void 0&&(Q[`--${$}-${ue}-width`]=typeof Y=="number"?`${Y}px`:Y)}),Q},[V]);return D(h.createElement(Ko,{form:!0,space:!0},h.createElement(Ps.Provider,{value:G},h.createElement(wx,Object.assign({width:J},M,{zIndex:L,getContainer:m===void 0?n:m,prefixCls:$,rootClassName:re(_,u,A,I),footer:k,visible:d??y,mousePosition:(e=M.mousePosition)!==null&&e!==void 0?e:th,onClose:a,closable:P&&{disabled:F,closeIcon:B},closeIcon:B,focusTriggerAfterClose:v,transitionName:$i(R,"zoom",t.transitionName),maskTransitionName:$i(R,"fade",t.maskTransitionName),className:re(_,c,i==null?void 0:i.className),style:Object.assign(Object.assign(Object.assign({},i==null?void 0:i.style),g),X),classNames:Object.assign(Object.assign(Object.assign({},i==null?void 0:i.classNames),x),{wrapper:re(z,x==null?void 0:x.wrapper)}),styles:Object.assign(Object.assign({},i==null?void 0:i.styles),S),panelRef:H}),E?h.createElement(Di,{active:!0,title:!1,paragraph:{rows:4},className:`${$}-body-skeleton`}):w))))},X_=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({},fc()),[`&${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% - ${se(t.marginSM)})`},[`${t.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${se(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},
|
|
368
|
-
${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}}},Y_=wS(["Modal","confirm"],t=>{const e=kx(t);return[X_(e)]},Dx,{order:-1e3});var J_=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 jx(t){const{prefixCls:e,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:s,footer:l,locale:c}=t,u=J_(t,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const E=on("Modal");process.env.NODE_ENV!=="production"&&E(!(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(WS,null);break;case"success":d=h.createElement(FS,null);break;case"error":d=h.createElement(Xc,null);break;default:d=h.createElement(HS,null)}const f=s??a==="confirm",p=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",[m]=So("Modal"),v=c||m,g=r||(f?v==null?void 0:v.okText:v==null?void 0:v.justOkText),y=o||(v==null?void 0:v.cancelText),b=Object.assign({autoFocusButton:p,cancelTextLocale:y,okTextLocale:g,mergedOkCancel:f},u),C=h.useMemo(()=>b,Pe(Object.values(b))),x=h.createElement(h.Fragment,null,h.createElement(Sv,null),h.createElement(xv,null)),S=t.title!==void 0&&t.title!==null,w=`${i}-body`;return h.createElement("div",{className:`${i}-body-wrapper`},h.createElement("div",{className:re(w,{[`${w}-has-title`]:S})},d,h.createElement("div",{className:`${i}-paragraph`},S&&h.createElement("span",{className:`${i}-title`},t.title),h.createElement("div",{className:`${i}-content`},t.content))),l===void 0||typeof l=="function"?h.createElement(yx,{value:C},h.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(x,{OkBtn:xv,CancelBtn:Sv}):x)):l,h.createElement(Y_,{prefixCls:e}))}const zx=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 x=on("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(S=>{let[w,E]=S;x.deprecated(!(w in t),w,E)})}const f=`${i}-confirm`,p=t.width||416,m=t.style||{},v=t.mask===void 0?!0:t.mask,g=t.maskClosable===void 0?!1:t.maskClosable,y=re(f,`${f}-${t.type}`,{[`${f}-rtl`]:o==="rtl"},t.className),[,b]=ar(),C=h.useMemo(()=>n!==void 0?n:b.zIndexPopupBase+KS,[n,b]);return h.createElement(Bx,Object.assign({},t,{className:y,wrapClassName:re({[`${f}-centered`]:!!t.centered},a),onCancel:()=>{e==null||e({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:$i(s||"","zoom",t.transitionName),maskTransitionName:$i(s||"","fade",t.maskTransitionName),mask:v,maskClosable:g,style:m,styles:Object.assign({body:l,mask:r},d),width:p,zIndex:C,closable:c}),h.createElement(jx,Object.assign({},t,{confirmPrefixCls:f})))},xp=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:r,theme:o}=t;return h.createElement(ro,{prefixCls:e,iconPrefixCls:n,direction:r,theme:o},h.createElement(zx,Object.assign({},t)))};process.env.NODE_ENV!=="production"&&(zx.displayName="ConfirmDialog",xp.displayName="ConfirmDialogWrapper");const di=[];let Lx="";function Vx(){return Lx}const Q_=t=>{var e,n;const{prefixCls:r,getContainer:o,direction:i}=t,a=sS(),s=N.useContext(At),l=Vx()||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"&&Pi(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),N.createElement(xp,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 Ls(t){const e=lA();process.env.NODE_ENV!=="production"&&!e.holderRender&&rA("Modal");const n=document.createDocumentFragment();let r=Object.assign(Object.assign({},t),{close:l,open:!0}),o,i;function a(){for(var u,d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];if(f.some(g=>g==null?void 0:g.triggerCancel)){var v;(u=t.onCancel)===null||u===void 0||(v=u).call.apply(v,[t,()=>{}].concat(Pe(f.slice(1))))}for(let g=0;g<di.length;g++)if(di[g]===l){di.splice(g,1);break}i()}function s(u){clearTimeout(o),o=setTimeout(()=>{const d=e.getPrefixCls(void 0,Vx()),f=e.getIconPrefixCls(),p=e.getTheme(),m=N.createElement(Q_,Object.assign({},u));i=GS()(N.createElement(ro,{prefixCls:d,iconPrefixCls:f,theme:p},e.holderRender?e.holderRender(m):m),n)})}function l(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),a.apply(this,d)}}),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),di.push(l),{destroy:l,update:c}}function Fx(t){return Object.assign(Object.assign({},t),{type:"warning"})}function Hx(t){return Object.assign(Object.assign({},t),{type:"info"})}function Wx(t){return Object.assign(Object.assign({},t),{type:"success"})}function qx(t){return Object.assign(Object.assign({},t),{type:"error"})}function Kx(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function Z_(t){let{rootPrefixCls:e}=t;process.env.NODE_ENV!=="production"&&Pi(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),Lx=e}var eB=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 tB=(t,e)=>{var n,{afterClose:r,config:o}=t,i=eB(t,["afterClose","config"]);const[a,s]=h.useState(!0),[l,c]=h.useState(o),{direction:u,getPrefixCls:d}=h.useContext(At),f=d("modal"),p=d(),m=()=>{var b;r(),(b=l.afterClose)===null||b===void 0||b.call(l)},v=function(){var b;s(!1);for(var C=arguments.length,x=new Array(C),S=0;S<C;S++)x[S]=arguments[S];if(x.some(M=>M==null?void 0:M.triggerCancel)){var E;(b=l.onCancel)===null||b===void 0||(E=b).call.apply(E,[l,()=>{}].concat(Pe(x.slice(1))))}};h.useImperativeHandle(e,()=>({destroy:v,update:b=>{c(C=>Object.assign(Object.assign({},C),b))}}));const g=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[y]=So("Modal",Oi.Modal);return h.createElement(xp,Object.assign({prefixCls:f,rootPrefixCls:p},l,{close:v,open:a,afterClose:m,okText:l.okText||(g?y==null?void 0:y.okText:y==null?void 0:y.justOkText),direction:l.direction||u,cancelText:l.cancelText||(y==null?void 0:y.cancelText)},i))},nB=h.forwardRef(tB);let Gv=0;const rB=h.memo(h.forwardRef((t,e)=>{const[n,r]=FA();return h.useImperativeHandle(e,()=>({patchElement:r}),[]),h.createElement(h.Fragment,null,n)}));function oB(){const t=h.useRef(null),[e,n]=h.useState([]);h.useEffect(()=>{e.length&&(Pe(e).forEach(a=>{a()}),n([]))},[e]);const r=h.useCallback(i=>function(s){var l;Gv+=1;const c=h.createRef();let u;const d=new Promise(g=>{u=g});let f=!1,p;const m=h.createElement(nB,{key:`modal-${Gv}`,config:i(s),ref:c,afterClose:()=>{p==null||p()},isSilent:()=>f,onConfirm:g=>{u(g)}});return p=(l=t.current)===null||l===void 0?void 0:l.patchElement(m),p&&di.push(p),{destroy:()=>{function g(){var y;(y=c.current)===null||y===void 0||y.destroy()}c.current?g():n(y=>[].concat(Pe(y),[g]))},update:g=>{function y(){var b;(b=c.current)===null||b===void 0||b.update(g)}c.current?y():n(b=>[].concat(Pe(b),[y]))},then:g=>(f=!0,d.then(g))}},[]);return[h.useMemo(()=>({info:r(Hx),success:r(Wx),error:r(qx),warning:r(Fx),confirm:r(Kx)}),[]),h.createElement(rB,{key:"modal-holder",ref:t})]}function Ux(t){return e=>h.createElement(ro,{theme:{token:{motion:!1,zIndexPopupBase:0}}},h.createElement(t,Object.assign({},e)))}const wp=(t,e,n,r,o)=>Ux(a=>{const{prefixCls:s,style:l}=a,c=h.useRef(null),[u,d]=h.useState(0),[f,p]=h.useState(0),[m,v]=mn(!1,{value:a.open}),{getPrefixCls:g}=h.useContext(At),y=g(r||"select",s);h.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(w=>{const E=w[0].target;d(E.offsetHeight+8),p(E.offsetWidth)}),S=setInterval(()=>{var w;const E=o?`.${o(y)}`:`.${y}-dropdown`,M=(w=c.current)===null||w===void 0?void 0:w.querySelector(E);M&&(clearInterval(S),x.observe(M))},10);return()=>{clearInterval(S),x.disconnect()}}},[]);let b=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:m,visible:m,getPopupContainer:()=>c.current});n&&(b=n(b)),e&&Object.assign(b,{[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({},b)))}),Ep=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 cu=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:re(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},iB=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=N.useMemo(function(){if(st(o)==="object")return o.clearIcon;if(i)return i},[o,i]),u=N.useMemo(function(){return!!(!a&&o&&(r.length||s)&&!(l==="combobox"&&s===""))},[o,a,r.length,s,l]);return{allowClear:u,clearIcon:N.createElement(cu,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},Gx=h.createContext(null);function aB(){return h.useContext(Gx)}function sB(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=h.useState(!1),n=le(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 Xx(){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 lB(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 cB(t){return t&&![Je.ESC,Je.SHIFT,Je.BACKSPACE,Je.TAB,Je.WIN_KEY,Je.ALT,Je.META,Je.WIN_KEY_RIGHT,Je.CTRL,Je.SEMICOLON,Je.EQUALS,Je.CAPS_LOCK,Je.CONTEXT_MENU,Je.F1,Je.F2,Je.F3,Je.F4,Je.F5,Je.F6,Je.F7,Je.F8,Je.F9,Je.F10,Je.F11,Je.F12].includes(t)}var uB=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Fi=void 0;function dB(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,v=t.component,g=v===void 0?"div":v,y=xt(t,uB),b=a&&!p;function C(M){l(c,M)}h.useEffect(function(){return function(){C(null)}},[]);var x=i&&o!==Fi?i(o,{index:m}):f,S;r||(S={opacity:b?0:1,height:b?0:Fi,overflowY:b?"hidden":Fi,order:a?m:Fi,pointerEvents:b?"none":Fi,position:b?"absolute":Fi});var w={};b&&(w["aria-hidden"]=!0);var E=h.createElement(g,Le({className:re(!r&&n,u),style:q(q({},S),d)},w,y,{ref:e}),x);return a&&(E=h.createElement(Co,{onResize:function($){var R=$.offsetWidth;C(R)},disabled:s},E)),E}var ns=h.forwardRef(dB);ns.displayName="Item";function fB(t){if(typeof MessageChannel>"u")kt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function hB(){var t=h.useRef(null),e=function(r){t.current||(t.current=[],fB(function(){_r.unstable_batchedUpdates(function(){t.current.forEach(function(o){o()}),t.current=null})})),t.current.push(r)};return e}function ja(t,e){var n=h.useState(e),r=le(n,2),o=r[0],i=r[1],a=Wt(function(s){t(function(){i(s)})});return[o,a]}var bc=N.createContext(null),pB=["component"],mB=["className"],gB=["className"],vB=function(e,n){var r=h.useContext(bc);if(!r){var o=e.component,i=o===void 0?"div":o,a=xt(e,pB);return h.createElement(i,Le({},a,{ref:n}))}var s=r.className,l=xt(r,mB),c=e.className,u=xt(e,gB);return h.createElement(bc.Provider,{value:null},h.createElement(ns,Le({ref:n,className:re(s,c)},l,u)))},Yx=h.forwardRef(vB);Yx.displayName="RawItem";var bB=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Jx="responsive",Qx="invalidate";function yB(t){return"+ ".concat(t.length," ...")}function CB(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,v=t.renderRest,g=t.renderRawRest,y=t.suffix,b=t.component,C=b===void 0?"div":b,x=t.itemComponent,S=t.onVisibleChange,w=xt(t,bB),E=d==="full",M=hB(),$=ja(M,null),R=le($,2),I=R[0],D=R[1],_=I||0,A=ja(M,new Map),z=le(A,2),k=z[0],P=z[1],B=ja(M,0),F=le(B,2),H=F[0],L=F[1],G=ja(M,0),J=le(G,2),V=J[0],X=J[1],Q=ja(M,0),ue=le(Q,2),Y=ue[0],fe=ue[1],be=N.useState(null),de=le(be,2),oe=de[0],ge=de[1],ne=N.useState(null),ce=le(ne,2),me=ce[0],Oe=ce[1],Me=h.useMemo(function(){return me===null&&E?Number.MAX_SAFE_INTEGER:me||0},[me,I]),Ne=N.useState(!1),je=le(Ne,2),O=je[0],ee=je[1],K="".concat(r,"-item"),ie=Math.max(H,V),Ee=m===Jx,Se=i.length&&Ee,he=m===Qx,Ae=Se||typeof m=="number"&&i.length>m,_e=N.useMemo(function(){var Qe=i;return Se?I===null&&E?Qe=i:Qe=i.slice(0,Math.min(i.length,_/u)):typeof m=="number"&&(Qe=i.slice(0,m)),Qe},[i,u,I,m,Se]),$e=N.useMemo(function(){return Se?i.slice(Me+1):i.slice(_e.length)},[i,_e,Se,Me]),ze=N.useCallback(function(Qe,Ke){var Ue;return typeof l=="function"?l(Qe):(Ue=l&&(Qe==null?void 0:Qe[l]))!==null&&Ue!==void 0?Ue:Ke},[l]),Fe=N.useCallback(a||function(Qe){return Qe},[a]);function Ie(Qe,Ke,Ue){me===Qe&&(Ke===void 0||Ke===oe)||(Oe(Qe),Ue||(ee(Qe<i.length-1),S==null||S(Qe)),Ke!==void 0&&ge(Ke))}function Be(Qe,Ke){D(Ke.clientWidth)}function Te(Qe,Ke){P(function(Ue){var wt=new Map(Ue);return Ke===null?wt.delete(Qe):wt.set(Qe,Ke),wt})}function He(Qe,Ke){X(Ke),L(V)}function Ze(Qe,Ke){fe(Ke)}function ht(Qe){return k.get(ze(_e[Qe],Qe))}Jt(function(){if(_&&typeof ie=="number"&&_e){var Qe=Y,Ke=_e.length,Ue=Ke-1;if(!Ke){Ie(0,null);return}for(var wt=0;wt<Ke;wt+=1){var $t=ht(wt);if(E&&($t=$t||0),$t===void 0){Ie(wt-1,void 0,!0);break}if(Qe+=$t,Ue===0&&Qe<=_||wt===Ue-1&&Qe+ht(Ue)<=_){Ie(Ue,null);break}else if(Qe+ie>_){Ie(wt-1,Qe-$t-Y+V);break}}y&&ht(0)+Y>_&&ge(null)}},[_,k,V,Y,ze,_e]);var Tt=O&&!!$e.length,Pt={};oe!==null&&Se&&(Pt={position:"absolute",left:oe,top:0});var an={prefixCls:K,responsive:Se,component:x,invalidate:he},Ye=s?function(Qe,Ke){var Ue=ze(Qe,Ke);return h.createElement(bc.Provider,{key:Ue,value:q(q({},an),{},{order:Ke,item:Qe,itemKey:Ue,registerSize:Te,display:Ke<=Me})},s(Qe,Ke))}:function(Qe,Ke){var Ue=ze(Qe,Ke);return h.createElement(ns,Le({},an,{order:Ke,key:Ue,item:Qe,renderItem:Fe,itemKey:Ue,registerSize:Te,display:Ke<=Me}))},We={order:Tt?Me:Number.MAX_SAFE_INTEGER,className:"".concat(K,"-rest"),registerSize:He,display:Tt},lt=v||yB,it=g?h.createElement(bc.Provider,{value:q(q({},an),We)},g($e)):h.createElement(ns,Le({},an,We),typeof lt=="function"?lt($e):lt),pt=h.createElement(C,Le({className:re(!he&&r,p),style:f,ref:e},w),_e.map(Ye),Ae?it:null,y&&h.createElement(ns,Le({},an,{responsive:Ee,responsiveDisabled:!Se,order:Me,className:"".concat(K,"-suffix"),registerSize:Ze,display:!0,style:Pt}),y));return Ee?h.createElement(Co,{onResize:Be,disabled:!Se},pt):pt}var Xr=h.forwardRef(CB);Xr.displayName="Overflow";Xr.Item=Yx;Xr.RESPONSIVE=Jx;Xr.INVALIDATE=Qx;var SB=function(e,n){var r,o=e.prefixCls,i=e.id,a=e.inputElement,s=e.disabled,l=e.tabIndex,c=e.autoFocus,u=e.autoComplete,d=e.editable,f=e.activeDescendantId,p=e.value,m=e.maxLength,v=e.onKeyDown,g=e.onMouseDown,y=e.onChange,b=e.onPaste,C=e.onCompositionStart,x=e.onCompositionEnd,S=e.onBlur,w=e.open,E=e.attrs,M=a||h.createElement("input",null),$=M,R=$.ref,I=$.props,D=I.onKeyDown,_=I.onChange,A=I.onMouseDown,z=I.onCompositionStart,k=I.onCompositionEnd,P=I.onBlur,B=I.style;return Qr(!("maxLength"in M.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),M=h.cloneElement(M,q(q(q({type:"search"},I),{},{id:i,ref:ir(n,R),disabled:s,tabIndex:l,autoComplete:u||"off",autoFocus:c,className:re("".concat(o,"-selection-search-input"),(r=M)===null||r===void 0||(r=r.props)===null||r===void 0?void 0:r.className),role:"combobox","aria-expanded":w||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":w?f:void 0},E),{},{value:d?p:"",maxLength:m,readOnly:!d,unselectable:d?null:"on",style:q(q({},B),{},{opacity:d?null:0}),onKeyDown:function(H){v(H),D&&D(H)},onMouseDown:function(H){g(H),A&&A(H)},onChange:function(H){y(H),_&&_(H)},onCompositionStart:function(H){C(H),z&&z(H)},onCompositionEnd:function(H){x(H),k&&k(H)},onPaste:b,onBlur:function(H){S(H),P&&P(H)}})),M},Np=h.forwardRef(SB);process.env.NODE_ENV!=="production"&&(Np.displayName="Input");function Op(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}var xB=typeof window<"u"&&window.document&&window.document.documentElement,wB=process.env.NODE_ENV!=="test"&&xB;function EB(t){return t!=null}function NB(t){return!t&&t!==0}function Xv(t){return["string","number"].includes(st(t))}function Zx(t){var e=void 0;return t&&(Xv(t.title)?e=t.title.toString():Xv(t.label)&&(e=t.label.toString())),e}function OB(t,e){wB?h.useLayoutEffect(t,e):h.useEffect(t,e)}function $B(t){var e;return(e=t.key)!==null&&e!==void 0?e:t.value}var Yv=function(e){e.preventDefault(),e.stopPropagation()},MB=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,v=e.activeDescendantId,g=e.tabIndex,y=e.removeIcon,b=e.maxTagCount,C=e.maxTagTextLength,x=e.maxTagPlaceholder,S=x===void 0?function(ne){return"+ ".concat(ne.length," ...")}:x,w=e.tagRender,E=e.onToggleOpen,M=e.onRemove,$=e.onInputChange,R=e.onInputPaste,I=e.onInputKeyDown,D=e.onInputMouseDown,_=e.onInputCompositionStart,A=e.onInputCompositionEnd,z=e.onInputBlur,k=h.useRef(null),P=N.useState(0),B=le(P,2),F=B[0],H=B[1],L=N.useState(!1),G=le(L,2),J=G[0],V=G[1],X="".concat(r,"-selection"),Q=i||d==="multiple"&&s===!1||d==="tags"?a:"",ue=d==="tags"||d==="multiple"&&s===!1||f&&(i||J);OB(function(){H(k.current.scrollWidth)},[Q]);var Y=function(ce,me,Oe,Me,Ne){return h.createElement("span",{title:Zx(ce),className:re("".concat(X,"-item"),W({},"".concat(X,"-item-disabled"),Oe))},h.createElement("span",{className:"".concat(X,"-item-content")},me),Me&&h.createElement(cu,{className:"".concat(X,"-item-remove"),onMouseDown:Yv,onClick:Ne,customizeIcon:y},"×"))},fe=function(ce,me,Oe,Me,Ne,je){var O=function(K){Yv(K),E(!i)};return h.createElement("span",{onMouseDown:O},w({label:me,value:ce,disabled:Oe,closable:Me,onClose:Ne,isMaxTag:!!je}))},be=function(ce){var me=ce.disabled,Oe=ce.label,Me=ce.value,Ne=!u&&!me,je=Oe;if(typeof C=="number"&&(typeof Oe=="string"||typeof Oe=="number")){var O=String(je);O.length>C&&(je="".concat(O.slice(0,C),"..."))}var ee=function(ie){ie&&ie.stopPropagation(),M(ce)};return typeof w=="function"?fe(Me,je,me,Ne,ee):Y(ce,je,me,Ne,ee)},de=function(ce){if(!o.length)return null;var me=typeof S=="function"?S(ce):S;return typeof w=="function"?fe(void 0,me,!1,!1,void 0,!0):Y({title:me},me,!1)},oe=h.createElement("div",{className:"".concat(X,"-search"),style:{width:F},onFocus:function(){V(!0)},onBlur:function(){V(!1)}},h.createElement(Np,{ref:l,open:i,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:p,autoComplete:m,editable:ue,activeDescendantId:v,value:Q,onKeyDown:I,onMouseDown:D,onChange:$,onPaste:R,onCompositionStart:_,onCompositionEnd:A,onBlur:z,tabIndex:g,attrs:Zr(e,!0)}),h.createElement("span",{ref:k,className:"".concat(X,"-search-mirror"),"aria-hidden":!0},Q," ")),ge=h.createElement(Xr,{prefixCls:"".concat(X,"-overflow"),data:o,renderItem:be,renderRest:de,suffix:oe,itemKey:$B,maxCount:b});return h.createElement("span",{className:"".concat(X,"-wrap")},ge,!o.length&&!Q&&h.createElement("span",{className:"".concat(X,"-placeholder")},c))},RB=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,v=e.showSearch,g=e.searchValue,y=e.activeValue,b=e.maxLength,C=e.onInputKeyDown,x=e.onInputMouseDown,S=e.onInputChange,w=e.onInputPaste,E=e.onInputCompositionStart,M=e.onInputCompositionEnd,$=e.onInputBlur,R=e.title,I=h.useState(!1),D=le(I,2),_=D[0],A=D[1],z=u==="combobox",k=z||v,P=f[0],B=g||"";z&&y&&!_&&(B=y),h.useEffect(function(){z&&A(!1)},[z,y]);var F=u!=="combobox"&&!d&&!v?!1:!!B,H=R===void 0?Zx(P):R,L=h.useMemo(function(){return P?null:h.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:F?{visibility:"hidden"}:void 0},p)},[P,F,p,r]);return h.createElement("span",{className:"".concat(r,"-selection-wrap")},h.createElement("span",{className:"".concat(r,"-selection-search")},h.createElement(Np,{ref:i,prefixCls:r,id:o,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:k,activeDescendantId:c,value:B,onKeyDown:C,onMouseDown:x,onChange:function(J){A(!0),S(J)},onPaste:w,onCompositionStart:E,onCompositionEnd:M,onBlur:$,tabIndex:m,attrs:Zr(e,!0),maxLength:z?b:void 0})),!z&&P?h.createElement("span",{className:"".concat(r,"-selection-item"),title:H,style:F?{visibility:"hidden"}:void 0},P.label):null,L)},IB=function(e,n){var r=N.useRef(null),o=N.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,v=e.onToggleOpen,g=e.onInputKeyDown,y=e.onInputBlur,b=e.domRef;h.useImperativeHandle(n,function(){return{focus:function(H){r.current.focus(H)},blur:function(){r.current.blur()}}});var C=Xx(0),x=le(C,2),S=x[0],w=x[1],E=function(H){var L=H.which,G=r.current instanceof HTMLTextAreaElement;!G&&a&&(L===Je.UP||L===Je.DOWN)&&H.preventDefault(),g&&g(H),L===Je.ENTER&&s==="tags"&&!o.current&&!a&&(m==null||m(H.target.value)),!(G&&!a&&~[Je.UP,Je.DOWN,Je.LEFT,Je.RIGHT].indexOf(L))&&cB(L)&&v(!0)},M=function(){w(!0)},$=N.useRef(null),R=function(H){p(H,!0,o.current)!==!1&&v(!0)},I=function(){o.current=!0},D=function(H){o.current=!1,s!=="combobox"&&R(H.target.value)},_=function(H){var L=H.target.value;if(c&&$.current&&/[\r\n]/.test($.current)){var G=$.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");L=L.replace(G,$.current)}$.current=null,R(L)},A=function(H){var L=H.clipboardData,G=L==null?void 0:L.getData("text");$.current=G||""},z=function(H){var L=H.target;if(L!==r.current){var G=document.body.style.msTouchAction!==void 0;G?setTimeout(function(){r.current.focus()}):r.current.focus()}},k=function(H){var L=S();H.target!==r.current&&!L&&!(s==="combobox"&&u)&&H.preventDefault(),(s!=="combobox"&&(!l||!L)||!a)&&(a&&f!==!1&&p("",!0,!1),v())},P={inputRef:r,onInputKeyDown:E,onInputMouseDown:M,onInputChange:_,onInputPaste:A,onInputCompositionStart:I,onInputCompositionEnd:D,onInputBlur:y},B=s==="multiple"||s==="tags"?h.createElement(MB,Le({},e,P)):h.createElement(RB,Le({},e,P));return h.createElement("div",{ref:b,className:"".concat(i,"-selector"),onClick:z,onMouseDown:k},d&&h.createElement("div",{className:"".concat(i,"-prefix")},d),B)},e1=h.forwardRef(IB);process.env.NODE_ENV!=="production"&&(e1.displayName="Selector");function TB(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],v=n.points[1],g=m[0],y=m[1],b=v[0],C=v[1];g===b||!["t","b"].includes(g)?p.top=d:g==="t"?p.top=0:p.bottom=0,y===C||!["l","r"].includes(y)?p.left=c:y==="l"?p.left=0:p.right=0}return h.createElement("div",{ref:f,className:re("".concat(e,"-arrow"),a),style:p},s)}function PB(t){var e=t.prefixCls,n=t.open,r=t.zIndex,o=t.mask,i=t.motion;return o?h.createElement(no,Le({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return h.createElement("div",{style:{zIndex:r},className:re("".concat(e,"-mask"),s)})}):null}var t1=h.memo(function(t){var e=t.children;return e},function(t,e){return e.cache});process.env.NODE_ENV!=="production"&&(t1.displayName="PopupContent");var n1=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,v=t.align,g=t.motion,y=t.maskMotion,b=t.forceRender,C=t.getPopupContainer,x=t.autoDestroy,S=t.portal,w=t.zIndex,E=t.onMouseEnter,M=t.onMouseLeave,$=t.onPointerEnter,R=t.onPointerDownCapture,I=t.ready,D=t.offsetX,_=t.offsetY,A=t.offsetR,z=t.offsetB,k=t.onAlign,P=t.onPrepare,B=t.stretch,F=t.targetWidth,H=t.targetHeight,L=typeof n=="function"?n():n,G=l||c,J=(C==null?void 0:C.length)>0,V=h.useState(!C||!J),X=le(V,2),Q=X[0],ue=X[1];if(Jt(function(){!Q&&J&&a&&ue(!0)},[Q,J,a]),!Q)return null;var Y="auto",fe={left:"-1000vw",top:"-1000vh",right:Y,bottom:Y};if(I||!l){var be,de=v.points,oe=v.dynamicInset||((be=v._experimental)===null||be===void 0?void 0:be.dynamicInset),ge=oe&&de[0][1]==="r",ne=oe&&de[0][0]==="b";ge?(fe.right=A,fe.left=Y):(fe.left=D,fe.right=Y),ne?(fe.bottom=z,fe.top=Y):(fe.top=_,fe.bottom=Y)}var ce={};return B&&(B.includes("height")&&H?ce.height=H:B.includes("minHeight")&&H&&(ce.minHeight=H),B.includes("width")&&F?ce.width=F:B.includes("minWidth")&&F&&(ce.minWidth=F)),l||(ce.pointerEvents="none"),h.createElement(S,{open:b||G,getContainer:C&&function(){return C(a)},autoDestroy:x},h.createElement(PB,{prefixCls:o,open:l,zIndex:w,mask:f,motion:y}),h.createElement(Co,{onResize:k,disabled:!l},function(me){return h.createElement(no,Le({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(o,"-hidden")},g,{onAppearPrepare:P,onEnterPrepare:P,visible:l,onVisibleChanged:function(Me){var Ne;g==null||(Ne=g.onVisibleChanged)===null||Ne===void 0||Ne.call(g,Me),s(Me)}}),function(Oe,Me){var Ne=Oe.className,je=Oe.style,O=re(o,Ne,r);return h.createElement("div",{ref:ir(me,e,Me),className:O,style:q(q(q(q({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},fe),ce),je),{},{boxSizing:"border-box",zIndex:w},i),onMouseEnter:E,onMouseLeave:M,onPointerEnter:$,onClick:d,onPointerDownCapture:R},p&&h.createElement(TB,{prefixCls:o,arrow:p,arrowPos:m,align:v}),h.createElement(t1,{cache:!l&&!u},L))})}))});process.env.NODE_ENV!=="production"&&(n1.displayName="Popup");var r1=h.forwardRef(function(t,e){var n=t.children,r=t.getTriggerDOMNode,o=Zo(n),i=h.useCallback(function(s){Yh(e,r?r(s):s)},[r]),a=Qo(i,Ti(n));return o?h.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(r1.displayName="TriggerWrapper");var Jv=h.createContext(null);function Qv(t){return t?Array.isArray(t)?t:[t]:[]}function AB(t,e,n,r){return h.useMemo(function(){var o=Qv(n??e),i=Qv(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 kB(){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 DB(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(kB((s=t[l])===null||s===void 0?void 0:s.points,o,r))return"".concat(e,"-placement-").concat(l)}return""}function Zv(t,e,n,r){return e||(n?{motionName:"".concat(t,"-").concat(n)}:r?{motionName:r}:null)}function Vs(t){return t.ownerDocument.defaultView}function nh(t){for(var e=[],n=t==null?void 0:t.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=Vs(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 ws(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function za(t){return ws(parseFloat(t),0)}function eb(t,e){var n=q({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var o=Vs(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,v=r.clientWidth,g=za(s),y=za(l),b=za(c),C=za(u),x=ws(Math.round(d.width/m*1e3)/1e3),S=ws(Math.round(d.height/f*1e3)/1e3),w=(m-v-b-C)*x,E=(f-p-g-y)*S,M=g*S,$=y*S,R=b*x,I=C*x,D=0,_=0;if(i==="clip"){var A=za(a);D=A*x,_=A*S}var z=d.x+R-D,k=d.y+M-_,P=z+d.width+2*D-R-I-w,B=k+d.height+2*_-M-$-E;n.left=Math.max(n.left,z),n.top=Math.max(n.top,k),n.right=Math.min(n.right,P),n.bottom=Math.min(n.bottom,B)}}),n}function tb(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 nb(t,e){var n=e||[],r=le(n,2),o=r[0],i=r[1];return[tb(t.width,o),tb(t.height,i)]}function rb(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function Hi(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 Oo(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 _B(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=le(s,2),c=l[0],u=l[1],d=h.useRef(0),f=h.useMemo(function(){return e?nh(e):[]},[e]),p=h.useRef({}),m=function(){p.current={}};t||m();var v=Wt(function(){if(e&&n&&t){let Wn=function(wo,Hr){var Rr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ie,Ta=V.x+wo,Gs=V.y+Hr,Su=Ta+ge,xu=Gs+oe,wu=Math.max(Ta,Rr.left),ct=Math.max(Gs,Rr.top),St=Math.min(Su,Rr.right),fn=Math.min(xu,Rr.bottom);return Math.max(0,(St-wu)*(fn-ct))},Ia=function(){Bt=V.y+Ue,Ft=Bt+oe,Xt=V.x+Ke,Mn=Xt+ge};var b,C,x,S,w=e,E=w.ownerDocument,M=Vs(w),$=M.getComputedStyle(w),R=$.width,I=$.height,D=$.position,_=w.style.left,A=w.style.top,z=w.style.right,k=w.style.bottom,P=w.style.overflow,B=q(q({},o[r]),i),F=E.createElement("div");(b=w.parentElement)===null||b===void 0||b.appendChild(F),F.style.left="".concat(w.offsetLeft,"px"),F.style.top="".concat(w.offsetTop,"px"),F.style.position=D,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 L,G,J=n.getBoundingClientRect();J.x=(L=J.x)!==null&&L!==void 0?L:J.left,J.y=(G=J.y)!==null&&G!==void 0?G:J.top,H={x:J.x,y:J.y,width:J.width,height:J.height}}var V=w.getBoundingClientRect();V.x=(C=V.x)!==null&&C!==void 0?C:V.left,V.y=(x=V.y)!==null&&x!==void 0?x:V.top;var X=E.documentElement,Q=X.clientWidth,ue=X.clientHeight,Y=X.scrollWidth,fe=X.scrollHeight,be=X.scrollTop,de=X.scrollLeft,oe=V.height,ge=V.width,ne=H.height,ce=H.width,me={left:0,top:0,right:Q,bottom:ue},Oe={left:-de,top:-be,right:Y-de,bottom:fe-be},Me=B.htmlRegion,Ne="visible",je="visibleFirst";Me!=="scroll"&&Me!==je&&(Me=Ne);var O=Me===je,ee=eb(Oe,f),K=eb(me,f),ie=Me===Ne?K:ee,Ee=O?K:ie;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";var Se=w.getBoundingClientRect();w.style.left=_,w.style.top=A,w.style.right=z,w.style.bottom=k,w.style.overflow=P,(S=w.parentElement)===null||S===void 0||S.removeChild(F);var he=ws(Math.round(ge/parseFloat(R)*1e3)/1e3),Ae=ws(Math.round(oe/parseFloat(I)*1e3)/1e3);if(he===0||Ae===0||fs(n)&&!dp(n))return;var _e=B.offset,$e=B.targetOffset,ze=nb(V,_e),Fe=le(ze,2),Ie=Fe[0],Be=Fe[1],Te=nb(H,$e),He=le(Te,2),Ze=He[0],ht=He[1];H.x-=Ze,H.y-=ht;var Tt=B.points||[],Pt=le(Tt,2),an=Pt[0],Ye=Pt[1],We=rb(Ye),lt=rb(an),it=Hi(H,We),pt=Hi(V,lt),Qe=q({},B),Ke=it.x-pt.x+Ie,Ue=it.y-pt.y+Be,wt=Wn(Ke,Ue),$t=Wn(Ke,Ue,K),et=Hi(H,["t","l"]),qe=Hi(V,["t","l"]),ot=Hi(H,["b","r"]),at=Hi(V,["b","r"]),nt=B.overflow||{},dt=nt.adjustX,Dt=nt.adjustY,Nt=nt.shiftX,Gt=nt.shiftY,Rt=function(Hr){return typeof Hr=="boolean"?Hr:Hr>=0},Bt,Ft,Xt,Mn;Ia();var Yt=Rt(Dt),sn=lt[0]===We[0];if(Yt&<[0]==="t"&&(Ft>Ee.bottom||p.current.bt)){var Ve=Ue;sn?Ve-=oe-ne:Ve=et.y-at.y-Be;var rt=Wn(Ke,Ve),Xe=Wn(Ke,Ve,K);rt>wt||rt===wt&&(!O||Xe>=$t)?(p.current.bt=!0,Ue=Ve,Be=-Be,Qe.points=[Oo(lt,0),Oo(We,0)]):p.current.bt=!1}if(Yt&<[0]==="b"&&(Bt<Ee.top||p.current.tb)){var De=Ue;sn?De+=oe-ne:De=ot.y-qe.y-Be;var ft=Wn(Ke,De),Et=Wn(Ke,De,K);ft>wt||ft===wt&&(!O||Et>=$t)?(p.current.tb=!0,Ue=De,Be=-Be,Qe.points=[Oo(lt,0),Oo(We,0)]):p.current.tb=!1}var Ot=Rt(dt),ln=lt[1]===We[1];if(Ot&<[1]==="l"&&(Mn>Ee.right||p.current.rl)){var en=Ke;ln?en-=ge-ce:en=et.x-at.x-Ie;var dn=Wn(en,Ue),cn=Wn(en,Ue,K);dn>wt||dn===wt&&(!O||cn>=$t)?(p.current.rl=!0,Ke=en,Ie=-Ie,Qe.points=[Oo(lt,1),Oo(We,1)]):p.current.rl=!1}if(Ot&<[1]==="r"&&(Xt<Ee.left||p.current.lr)){var tn=Ke;ln?tn+=ge-ce:tn=ot.x-qe.x-Ie;var En=Wn(tn,Ue),Rn=Wn(tn,Ue,K);En>wt||En===wt&&(!O||Rn>=$t)?(p.current.lr=!0,Ke=tn,Ie=-Ie,Qe.points=[Oo(lt,1),Oo(We,1)]):p.current.lr=!1}Ia();var T=Nt===!0?0:Nt;typeof T=="number"&&(Xt<K.left&&(Ke-=Xt-K.left-Ie,H.x+ce<K.left+T&&(Ke+=H.x-K.left+ce-T)),Mn>K.right&&(Ke-=Mn-K.right-Ie,H.x>K.right-T&&(Ke+=H.x-K.right+T)));var U=Gt===!0?0:Gt;typeof U=="number"&&(Bt<K.top&&(Ue-=Bt-K.top-Be,H.y+ne<K.top+U&&(Ue+=H.y-K.top+ne-U)),Ft>K.bottom&&(Ue-=Ft-K.bottom-Be,H.y>K.bottom-U&&(Ue+=H.y-K.bottom+U)));var j=V.x+Ke,te=j+ge,ae=V.y+Ue,Z=ae+oe,xe=H.x,ye=xe+ce,pe=H.y,Ce=pe+ne,we=Math.max(j,xe),ke=Math.min(te,ye),tt=(we+ke)/2,bt=tt-j,Ct=Math.max(ae,pe),jt=Math.min(Z,Ce),zt=(Ct+jt)/2,nn=zt-ae;a==null||a(e,Qe);var gn=Se.right-V.x-(Ke+V.width),pn=Se.bottom-V.y-(Ue+V.height);he===1&&(Ke=Math.round(Ke),gn=Math.round(gn)),Ae===1&&(Ue=Math.round(Ue),pn=Math.round(pn));var ti={ready:!0,offsetX:Ke/he,offsetY:Ue/Ae,offsetR:gn/he,offsetB:pn/Ae,arrowX:bt/he,arrowY:nn/Ae,scaleX:he,scaleY:Ae,align:Qe};u(ti)}}),g=function(){d.current+=1;var C=d.current;Promise.resolve().then(function(){d.current===C&&v()})},y=function(){u(function(C){return q(q({},C),{},{ready:!1})})};return Jt(y,[r]),Jt(function(){t||y()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function BB(t,e,n,r,o){Jt(function(){if(t&&e&&n){let d=function(){r(),o()};var i=e,a=n,s=nh(i),l=nh(a),c=Vs(a),u=new Set([c].concat(Pe(s),Pe(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 jB(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(x){var S;l.current&&!a(((S=x.composedPath)===null||S===void 0||(S=S.call(x))===null||S===void 0?void 0:S[0])||x.target)&&!c.current&&s(!1)},p=Vs(r);p.addEventListener("pointerdown",d,!0),p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0);var m=pc(n);if(m&&(m.addEventListener("mousedown",f,!0),m.addEventListener("contextmenu",f,!0)),process.env.NODE_ENV!=="production"){var v,g,y=n==null||(v=n.getRootNode)===null||v===void 0?void 0:v.call(n),b=(g=r.getRootNode)===null||g===void 0?void 0:g.call(r);Qr(y===b,"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 zB=["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 LB(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:iu,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,v=n.mouseEnterDelay,g=n.mouseLeaveDelay,y=g===void 0?.1:g,b=n.focusDelay,C=n.blurDelay,x=n.mask,S=n.maskClosable,w=S===void 0?!0:S,E=n.getPopupContainer,M=n.forceRender,$=n.autoDestroy,R=n.destroyPopupOnHide,I=n.popup,D=n.popupClassName,_=n.popupStyle,A=n.popupPlacement,z=n.builtinPlacements,k=z===void 0?{}:z,P=n.popupAlign,B=n.zIndex,F=n.stretch,H=n.getPopupClassNameFromAlign,L=n.fresh,G=n.alignPoint,J=n.onPopupClick,V=n.onPopupAlign,X=n.arrow,Q=n.popupMotion,ue=n.maskMotion,Y=n.popupTransitionName,fe=n.popupAnimation,be=n.maskTransitionName,de=n.maskAnimation,oe=n.className,ge=n.getTriggerDOMNode,ne=xt(n,zB),ce=$||R||!1,me=h.useState(!1),Oe=le(me,2),Me=Oe[0],Ne=Oe[1];Jt(function(){Ne(Ep())},[]);var je=h.useRef({}),O=h.useContext(Jv),ee=h.useMemo(function(){return{registerSubPopup:function(St,fn){je.current[St]=fn,O==null||O.registerSubPopup(St,fn)}}},[O]),K=au(),ie=h.useState(null),Ee=le(ie,2),Se=Ee[0],he=Ee[1],Ae=h.useRef(null),_e=Wt(function(ct){Ae.current=ct,fs(ct)&&Se!==ct&&he(ct),O==null||O.registerSubPopup(K,ct)}),$e=h.useState(null),ze=le($e,2),Fe=ze[0],Ie=ze[1],Be=h.useRef(null),Te=Wt(function(ct){fs(ct)&&Fe!==ct&&(Ie(ct),Be.current=ct)}),He=h.Children.only(a),Ze=(He==null?void 0:He.props)||{},ht={},Tt=Wt(function(ct){var St,fn,In=Fe;return(In==null?void 0:In.contains(ct))||((St=pc(In))===null||St===void 0?void 0:St.host)===ct||ct===In||(Se==null?void 0:Se.contains(ct))||((fn=pc(Se))===null||fn===void 0?void 0:fn.host)===ct||ct===Se||Object.values(je.current).some(function(vn){return(vn==null?void 0:vn.contains(ct))||ct===vn})}),Pt=Zv(i,Q,fe,Y),an=Zv(i,ue,de,be),Ye=h.useState(f||!1),We=le(Ye,2),lt=We[0],it=We[1],pt=d??lt,Qe=Wt(function(ct){d===void 0&&it(ct)});Jt(function(){it(d||!1)},[d]);var Ke=h.useRef(pt);Ke.current=pt;var Ue=h.useRef([]);Ue.current=[];var wt=Wt(function(ct){var St;Qe(ct),((St=Ue.current[Ue.current.length-1])!==null&&St!==void 0?St:pt)!==ct&&(Ue.current.push(ct),p==null||p(ct))}),$t=h.useRef(),et=function(){clearTimeout($t.current)},qe=function(St){var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;et(),fn===0?wt(St):$t.current=setTimeout(function(){wt(St)},fn*1e3)};h.useEffect(function(){return et},[]);var ot=h.useState(!1),at=le(ot,2),nt=at[0],dt=at[1];Jt(function(ct){(!ct||pt)&&dt(!0)},[pt]);var Dt=h.useState(null),Nt=le(Dt,2),Gt=Nt[0],Rt=Nt[1],Bt=h.useState(null),Ft=le(Bt,2),Xt=Ft[0],Mn=Ft[1],Yt=function(St){Mn([St.clientX,St.clientY])},sn=_B(pt,Se,G&&Xt!==null?Xt:Fe,A,k,P,V),Ve=le(sn,11),rt=Ve[0],Xe=Ve[1],De=Ve[2],ft=Ve[3],Et=Ve[4],Ot=Ve[5],ln=Ve[6],en=Ve[7],dn=Ve[8],cn=Ve[9],tn=Ve[10],En=AB(Me,l,c,u),Rn=le(En,2),T=Rn[0],U=Rn[1],j=T.has("click"),te=U.has("click")||U.has("contextMenu"),ae=Wt(function(){nt||tn()}),Z=function(){Ke.current&&G&&te&&qe(!1)};BB(pt,Fe,Se,ae,Z),Jt(function(){ae()},[Xt,A]),Jt(function(){pt&&!(k!=null&&k[A])&&ae()},[JSON.stringify(P)]);var xe=h.useMemo(function(){var ct=DB(k,i,cn,G);return re(ct,H==null?void 0:H(cn))},[cn,H,k,i,G]);h.useImperativeHandle(r,function(){return{nativeElement:Be.current,popupElement:Ae.current,forceAlign:ae}});var ye=h.useState(0),pe=le(ye,2),Ce=pe[0],we=pe[1],ke=h.useState(0),tt=le(ke,2),bt=tt[0],Ct=tt[1],jt=function(){if(F&&Fe){var St=Fe.getBoundingClientRect();we(St.width),Ct(St.height)}},zt=function(){jt(),ae()},nn=function(St){dt(!1),tn(),m==null||m(St)},gn=function(){return new Promise(function(St){jt(),Rt(function(){return St})})};Jt(function(){Gt&&(tn(),Gt(),Rt(null))},[Gt]);function pn(ct,St,fn,In){ht[ct]=function(vn){var Xs;In==null||In(vn),qe(St,fn);for(var Eu=arguments.length,nm=new Array(Eu>1?Eu-1:0),Ys=1;Ys<Eu;Ys++)nm[Ys-1]=arguments[Ys];(Xs=Ze[ct])===null||Xs===void 0||Xs.call.apply(Xs,[Ze,vn].concat(nm))}}(j||te)&&(ht.onClick=function(ct){var St;Ke.current&&te?qe(!1):!Ke.current&&j&&(Yt(ct),qe(!0));for(var fn=arguments.length,In=new Array(fn>1?fn-1:0),vn=1;vn<fn;vn++)In[vn-1]=arguments[vn];(St=Ze.onClick)===null||St===void 0||St.call.apply(St,[Ze,ct].concat(In))});var ti=jB(pt,te,Fe,Se,x,w,Tt,qe),Wn=T.has("hover"),Ia=U.has("hover"),wo,Hr;Wn&&(pn("onMouseEnter",!0,v,function(ct){Yt(ct)}),pn("onPointerEnter",!0,v,function(ct){Yt(ct)}),wo=function(St){(pt||nt)&&Se!==null&&Se!==void 0&&Se.contains(St.target)&&qe(!0,v)},G&&(ht.onMouseMove=function(ct){var St;(St=Ze.onMouseMove)===null||St===void 0||St.call(Ze,ct)})),Ia&&(pn("onMouseLeave",!1,y),pn("onPointerLeave",!1,y),Hr=function(){qe(!1,y)}),T.has("focus")&&pn("onFocus",!0,b),U.has("focus")&&pn("onBlur",!1,C),T.has("contextMenu")&&(ht.onContextMenu=function(ct){var St;Ke.current&&U.has("contextMenu")?qe(!1):(Yt(ct),qe(!0)),ct.preventDefault();for(var fn=arguments.length,In=new Array(fn>1?fn-1:0),vn=1;vn<fn;vn++)In[vn-1]=arguments[vn];(St=Ze.onContextMenu)===null||St===void 0||St.call.apply(St,[Ze,ct].concat(In))}),oe&&(ht.className=re(Ze.className,oe));var Rr=q(q({},Ze),ht),Ta={},Gs=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Gs.forEach(function(ct){ne[ct]&&(Ta[ct]=function(){for(var St,fn=arguments.length,In=new Array(fn),vn=0;vn<fn;vn++)In[vn]=arguments[vn];(St=Rr[ct])===null||St===void 0||St.call.apply(St,[Rr].concat(In)),ne[ct].apply(ne,In)})});var Su=h.cloneElement(He,q(q({},Rr),Ta)),xu={x:Ot,y:ln},wu=X?q({},X!==!0?X:{}):null;return h.createElement(h.Fragment,null,h.createElement(Co,{disabled:!pt,ref:Te,onResize:zt},h.createElement(r1,{getTriggerDOMNode:ge},Su)),h.createElement(Jv.Provider,{value:ee},h.createElement(n1,{portal:t,ref:_e,prefixCls:i,popup:I,className:re(D,xe),style:_,target:Fe,onMouseEnter:wo,onMouseLeave:Hr,onPointerEnter:wo,zIndex:B,open:pt,keepDom:nt,fresh:L,onClick:J,onPointerDownCapture:ti,mask:x,motion:Pt,maskMotion:an,onVisibleChanged:nn,onPrepare:gn,forceRender:M,autoDestroy:ce,getPopupContainer:E,align:cn,arrow:wu,arrowPos:xu,ready:rt,offsetX:Xe,offsetY:De,offsetR:ft,offsetB:Et,onAlign:ae,stretch:F,targetWidth:Ce/en,targetHeight:bt/dn})))});return process.env.NODE_ENV!=="production"&&(e.displayName="Trigger"),e}const uu=LB(iu);var VB=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],FB=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"}}},HB=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,v=e.dropdownMatchSelectWidth,g=e.dropdownRender,y=e.dropdownAlign,b=e.getPopupContainer,C=e.empty,x=e.getTriggerDOMNode,S=e.onPopupVisibleChange,w=e.onPopupMouseEnter,E=xt(e,VB),M="".concat(r,"-dropdown"),$=a;g&&($=g(a));var R=h.useMemo(function(){return m||FB(v)},[m,v]),I=s?"".concat(M,"-").concat(s):l,D=typeof v=="number",_=h.useMemo(function(){return D?null:v===!1?"minWidth":"width"},[v,D]),A=c;D&&(A=q(q({},A),{},{width:v}));var z=h.useRef(null);return h.useImperativeHandle(n,function(){return{getPopupElement:function(){var P;return(P=z.current)===null||P===void 0?void 0:P.popupElement}}}),h.createElement(uu,Le({},E,{showAction:S?["click"]:[],hideAction:S?["click"]:[],popupPlacement:p||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:R,prefixCls:M,popupTransitionName:I,popup:h.createElement("div",{onMouseEnter:w},$),ref:z,stretch:_,popupAlign:y,popupVisible:o,getPopupContainer:b,popupClassName:re(u,W({},"".concat(M,"-empty"),C)),popupStyle:A,getTriggerDOMNode:x,onPopupVisibleChange:S}),i)},o1=h.forwardRef(HB);process.env.NODE_ENV!=="production"&&(o1.displayName="SelectTrigger");function ob(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 rh(t){return typeof t<"u"&&!Number.isNaN(t)}function i1(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 WB(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,o=[],i=i1(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:ob(p,o.length),groupOption:f,data:p,label:p[a],value:m})}else{var v=p[c];v===void 0&&r&&(v=p.label),o.push({key:ob(p,o.length),group:!0,data:p,label:v}),u(p[l],!0)}})}return u(t,!1),o}function oh(t){var e=q({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return yt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var qB=function(e,n,r){if(!n||!n.length)return null;var o=!1,i=function s(l,c){var u=nS(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,v){return[].concat(Pe(m),Pe(s(v,f)))},[]).filter(Boolean)},a=i(e,n);return o?typeof r<"u"?a.slice(0,r):a:null},$p=h.createContext(null);function KB(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(st(i))?i:a}).join(", ")),n.length>r?", ...":null)}var UB=["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"],GB=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],yc=function(e){return e==="tags"||e==="multiple"},a1=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,v=t.onClear,g=t.mode,y=t.disabled,b=t.loading,C=t.getInputElement,x=t.getRawInputElement,S=t.open,w=t.defaultOpen,E=t.onDropdownVisibleChange,M=t.activeValue,$=t.onActiveValueChange,R=t.activeDescendantId,I=t.searchValue,D=t.autoClearSearchValue,_=t.onSearch,A=t.onSearchSplit,z=t.tokenSeparators,k=t.allowClear,P=t.prefix,B=t.suffixIcon,F=t.clearIcon,H=t.OptionList,L=t.animation,G=t.transitionName,J=t.dropdownStyle,V=t.dropdownClassName,X=t.dropdownMatchSelectWidth,Q=t.dropdownRender,ue=t.dropdownAlign,Y=t.placement,fe=t.builtinPlacements,be=t.getPopupContainer,de=t.showAction,oe=de===void 0?[]:de,ge=t.onFocus,ne=t.onBlur,ce=t.onKeyUp,me=t.onKeyDown,Oe=t.onMouseDown,Me=xt(t,UB),Ne=yc(g),je=(a!==void 0?a:Ne)||g==="combobox",O=q({},Me);GB.forEach(function(ye){delete O[ye]}),c==null||c.forEach(function(ye){delete O[ye]});var ee=h.useState(!1),K=le(ee,2),ie=K[0],Ee=K[1];h.useEffect(function(){Ee(Ep())},[]);var Se=h.useRef(null),he=h.useRef(null),Ae=h.useRef(null),_e=h.useRef(null),$e=h.useRef(null),ze=h.useRef(!1),Fe=sB(),Ie=le(Fe,3),Be=Ie[0],Te=Ie[1],He=Ie[2];h.useImperativeHandle(e,function(){var ye,pe;return{focus:(ye=_e.current)===null||ye===void 0?void 0:ye.focus,blur:(pe=_e.current)===null||pe===void 0?void 0:pe.blur,scrollTo:function(we){var ke;return(ke=$e.current)===null||ke===void 0?void 0:ke.scrollTo(we)},nativeElement:Se.current||he.current}});var Ze=h.useMemo(function(){var ye;if(g!=="combobox")return I;var pe=(ye=u[0])===null||ye===void 0?void 0:ye.value;return typeof pe=="string"||typeof pe=="number"?String(pe):""},[I,g,u]),ht=g==="combobox"&&typeof C=="function"&&C()||null,Tt=typeof x=="function"&&x(),Pt=Qo(he,Tt==null||(n=Tt.props)===null||n===void 0?void 0:n.ref),an=h.useState(!1),Ye=le(an,2),We=Ye[0],lt=Ye[1];Jt(function(){lt(!0)},[]);var it=mn(!1,{defaultValue:w,value:S}),pt=le(it,2),Qe=pt[0],Ke=pt[1],Ue=We?Qe:!1,wt=!m&&f;(y||wt&&Ue&&g==="combobox")&&(Ue=!1);var $t=wt?!1:Ue,et=h.useCallback(function(ye){var pe=ye!==void 0?ye:!Ue;y||(Ke(pe),Ue!==pe&&(E==null||E(pe)))},[y,Ue,Ke,E]),qe=h.useMemo(function(){return(z||[]).some(function(ye){return[`
|
|
369
|
-
`,`\r
|
|
370
|
-
`].includes(ye)})},[z]),ot=h.useContext($p)||{},at=ot.maxCount,nt=ot.rawValues,dt=function(pe,Ce,we){if(!(Ne&&rh(at)&&(nt==null?void 0:nt.size)>=at)){var ke=!0,tt=pe;$==null||$(null);var bt=qB(pe,z,rh(at)?at-nt.size:void 0),Ct=we?null:bt;return g!=="combobox"&&Ct&&(tt="",A==null||A(Ct),et(!1),ke=!1),_&&Ze!==tt&&_(tt,{source:Ce?"typing":"effect"}),ke}},Dt=function(pe){!pe||!pe.trim()||_(pe,{source:"submit"})};h.useEffect(function(){!Ue&&!Ne&&g!=="combobox"&&dt("",!1,!1)},[Ue]),h.useEffect(function(){Qe&&y&&Ke(!1),y&&!ze.current&&Te(!1)},[y]);var Nt=Xx(),Gt=le(Nt,2),Rt=Gt[0],Bt=Gt[1],Ft=h.useRef(!1),Xt=function(pe){var Ce=Rt(),we=pe.key,ke=we==="Enter";if(ke&&(g!=="combobox"&&pe.preventDefault(),Ue||et(!0)),Bt(!!Ze),we==="Backspace"&&!Ce&&Ne&&!Ze&&u.length){for(var tt=Pe(u),bt=null,Ct=tt.length-1;Ct>=0;Ct-=1){var jt=tt[Ct];if(!jt.disabled){tt.splice(Ct,1),bt=jt;break}}bt&&d(tt,{type:"remove",values:[bt]})}for(var zt=arguments.length,nn=new Array(zt>1?zt-1:0),gn=1;gn<zt;gn++)nn[gn-1]=arguments[gn];if(Ue&&(!ke||!Ft.current)){var pn;ke&&(Ft.current=!0),(pn=$e.current)===null||pn===void 0||pn.onKeyDown.apply(pn,[pe].concat(nn))}me==null||me.apply(void 0,[pe].concat(nn))},Mn=function(pe){for(var Ce=arguments.length,we=new Array(Ce>1?Ce-1:0),ke=1;ke<Ce;ke++)we[ke-1]=arguments[ke];if(Ue){var tt;(tt=$e.current)===null||tt===void 0||tt.onKeyUp.apply(tt,[pe].concat(we))}pe.key==="Enter"&&(Ft.current=!1),ce==null||ce.apply(void 0,[pe].concat(we))},Yt=function(pe){var Ce=u.filter(function(we){return we!==pe});d(Ce,{type:"remove",values:[pe]})},sn=function(){Ft.current=!1},Ve=h.useRef(!1),rt=function(){Te(!0),y||(ge&&!Ve.current&&ge.apply(void 0,arguments),oe.includes("focus")&&et(!0)),Ve.current=!0},Xe=function(){ze.current=!0,Te(!1,function(){Ve.current=!1,ze.current=!1,et(!1)}),!y&&(Ze&&(g==="tags"?_(Ze,{source:"submit"}):g==="multiple"&&_("",{source:"blur"})),ne&&ne.apply(void 0,arguments))},De=[];h.useEffect(function(){return function(){De.forEach(function(ye){return clearTimeout(ye)}),De.splice(0,De.length)}},[]);var ft=function(pe){var Ce,we=pe.target,ke=(Ce=Ae.current)===null||Ce===void 0?void 0:Ce.getPopupElement();if(ke&&ke.contains(we)){var tt=setTimeout(function(){var zt=De.indexOf(tt);if(zt!==-1&&De.splice(zt,1),He(),!ie&&!ke.contains(document.activeElement)){var nn;(nn=_e.current)===null||nn===void 0||nn.focus()}});De.push(tt)}for(var bt=arguments.length,Ct=new Array(bt>1?bt-1:0),jt=1;jt<bt;jt++)Ct[jt-1]=arguments[jt];Oe==null||Oe.apply(void 0,[pe].concat(Ct))},Et=h.useState({}),Ot=le(Et,2),ln=Ot[1];function en(){ln({})}var dn;Tt&&(dn=function(pe){et(pe)}),lB(function(){var ye;return[Se.current,(ye=Ae.current)===null||ye===void 0?void 0:ye.getPopupElement()]},$t,et,!!Tt);var cn=h.useMemo(function(){return q(q({},t),{},{notFoundContent:m,open:Ue,triggerOpen:$t,id:r,showSearch:je,multiple:Ne,toggleOpen:et})},[t,m,$t,Ue,r,je,Ne,et]),tn=!!B||b,En;tn&&(En=h.createElement(cu,{className:re("".concat(o,"-arrow"),W({},"".concat(o,"-arrow-loading"),b)),customizeIcon:B,customizeIconProps:{loading:b,searchValue:Ze,open:Ue,focused:Be,showSearch:je}}));var Rn=function(){var pe;v==null||v(),(pe=_e.current)===null||pe===void 0||pe.focus(),d([],{type:"clear",values:u}),dt("",!1,!1)},T=iB(o,Rn,u,k,F,y,Ze,g),U=T.allowClear,j=T.clearIcon,te=h.createElement(H,{ref:$e}),ae=re(o,i,W(W(W(W(W(W(W(W(W(W({},"".concat(o,"-focused"),Be),"".concat(o,"-multiple"),Ne),"".concat(o,"-single"),!Ne),"".concat(o,"-allow-clear"),k),"".concat(o,"-show-arrow"),tn),"".concat(o,"-disabled"),y),"".concat(o,"-loading"),b),"".concat(o,"-open"),Ue),"".concat(o,"-customize-input"),ht),"".concat(o,"-show-search"),je)),Z=h.createElement(o1,{ref:Ae,disabled:y,prefixCls:o,visible:$t,popupElement:te,animation:L,transitionName:G,dropdownStyle:J,dropdownClassName:V,direction:l,dropdownMatchSelectWidth:X,dropdownRender:Q,dropdownAlign:ue,placement:Y,builtinPlacements:fe,getPopupContainer:be,empty:f,getTriggerDOMNode:function(pe){return he.current||pe},onPopupVisibleChange:dn,onPopupMouseEnter:en},Tt?h.cloneElement(Tt,{ref:Pt}):h.createElement(e1,Le({},t,{domRef:he,prefixCls:o,inputElement:ht,ref:_e,id:r,prefix:P,showSearch:je,autoClearSearchValue:D,mode:g,activeDescendantId:R,tagRender:s,values:u,open:Ue,onToggleOpen:et,activeValue:M,searchValue:Ze,onSearch:dt,onSearchSubmit:Dt,onRemove:Yt,tokenWithEnter:qe,onInputBlur:sn}))),xe;return Tt?xe=Z:xe=h.createElement("div",Le({className:ae},O,{ref:Se,onMouseDown:ft,onKeyDown:Xt,onKeyUp:Mn,onFocus:rt,onBlur:Xe}),h.createElement(KB,{visible:Be&&!Ue,values:u}),Z,En,U&&j),h.createElement(Gx.Provider,{value:cn},xe)});process.env.NODE_ENV!=="production"&&(a1.displayName="BaseSelect");var Mp=function(){return null};Mp.isSelectOptGroup=!0;var Rp=function(){return null};Rp.isSelectOption=!0;var s1=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=q(q({},f),{},W(W(W(W(W({transform:"translateY(".concat(r,"px)")},c?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:d},h.createElement(Co,{onResize:function(m){var v=m.offsetHeight;v&&s&&s()}},h.createElement("div",Le({style:f,className:re(W({},"".concat(a,"-holder-inner"),a)),ref:e},l),i,u)))});s1.displayName="Filler";function XB(t){var e=t.children,n=t.setRef,r=h.useCallback(function(o){n(o)},[]);return h.cloneElement(e,{ref:r})}function YB(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(XB,{key:p,setRef:function(v){return i(c,v)}},f)})}function JB(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 QB(t,e,n){var r=h.useState(t),o=le(r,2),i=o[0],a=o[1],s=h.useState(null),l=le(s,2),c=l[0],u=l[1];return h.useEffect(function(){var d=JB(i||[],t||[],e);(d==null?void 0:d.index)!==void 0&&u(t[d.index]),a(t)},[t]),[c]}var ib=(typeof navigator>"u"?"undefined":st(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const l1=function(t,e,n,r){var o=N.useRef(!1),i=N.useRef(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(function(){o.current=!1},50)}var s=N.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 ZB(t,e,n,r,o,i,a){var s=N.useRef(0),l=N.useRef(null),c=N.useRef(null),u=N.useRef(!1),d=l1(e,n,r,o);function f(b,C){if(kt.cancel(l.current),!d(!1,C)){var x=b;if(!x._virtualHandled)x._virtualHandled=!0;else return;s.current+=C,c.current=C,ib||x.preventDefault(),l.current=kt(function(){var S=u.current?10:1;a(s.current*S,!1),s.current=0})}}function p(b,C){a(C,!0),ib||b.preventDefault()}var m=N.useRef(null),v=N.useRef(null);function g(b){if(t){kt.cancel(v.current),v.current=kt(function(){m.current=null},2);var C=b.deltaX,x=b.deltaY,S=b.shiftKey,w=C,E=x;(m.current==="sx"||!m.current&&S&&x&&!C)&&(w=x,E=0,m.current="sx");var M=Math.abs(w),$=Math.abs(E);m.current===null&&(m.current=i&&M>$?"x":"y"),m.current==="y"?f(b,E):p(b,w)}}function y(b){t&&(u.current=b.detail===c.current)}return[g,y]}function ej(t,e,n,r){var o=h.useMemo(function(){return[new Map,[]]},[t,n.id,r]),i=le(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,v=s.length;v<m;v+=1){var g,y=t[v],b=e(y);a.set(b,v);var C=(g=n.get(b))!==null&&g!==void 0?g:r;if(s[v]=(s[v-1]||0)+C,b===u&&(f=v),b===d&&(p=v),f!==void 0&&p!==void 0)break}return{top:s[f-1]||0,bottom:s[p]}};return l}var tj=function(){function t(){xn(this,t),W(this,"maps",void 0),W(this,"id",0),W(this,"diffKeys",new Set),this.maps=Object.create(null)}return wn(t,[{key:"set",value:function(n,r){this.maps[n]=r,this.id+=1,this.diffKeys.add(n)}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),t}();function ab(t){var e=parseFloat(t);return isNaN(e)?0:e}function nj(t,e,n){var r=h.useState(0),o=le(r,2),i=o[0],a=o[1],s=N.useRef(new Map),l=N.useRef(new tj),c=N.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 y=!1;s.current.forEach(function(b,C){if(b&&b.offsetParent){var x=b.offsetHeight,S=getComputedStyle(b),w=S.marginTop,E=S.marginBottom,M=ab(w),$=ab(E),R=x+M+$;l.current.get(C)!==R&&(l.current.set(C,R),y=!0)}}),y&&a(function(b){return b+1})};if(p)m();else{c.current+=1;var v=c.current;Promise.resolve().then(function(){v===c.current&&m()})}}function f(p,m){var v=t(p);s.current.get(v),m?(s.current.set(v,m),d()):s.current.delete(v)}return N.useEffect(function(){return u},[]),[f,d,l.current,i]}var sb=14/15;function rj(t,e,n){var r=N.useRef(!1),o=N.useRef(0),i=N.useRef(0),a=N.useRef(null),s=N.useRef(null),l,c=function(p){if(r.current){var m=Math.ceil(p.touches[0].pageX),v=Math.ceil(p.touches[0].pageY),g=o.current-m,y=i.current-v,b=Math.abs(g)>Math.abs(y);b?o.current=m:i.current=v;var C=n(b,b?g:y,!1,p);C&&p.preventDefault(),clearInterval(s.current),C&&(s.current=setInterval(function(){b?g*=sb:y*=sb;var x=Math.floor(b?g:y);(!n(b,x,!0)||Math.abs(x)<=.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))},Jt(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 lb(t){return Math.floor(Math.pow(t,.5))}function ih(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function oj(t,e,n){h.useEffect(function(){var r=e.current;if(t&&r){var o=!1,i,a,s=function(){kt.cancel(i)},l=function f(){s(),i=kt(function(){n(a),f()})},c=function(p){if(!p.target.draggable){var m=p;m._virtualHandled||(m._virtualHandled=!0,o=!0)}},u=function(){o=!1,s()},d=function(p){if(o){var m=ih(p,!1),v=r.getBoundingClientRect(),g=v.top,y=v.bottom;if(m<=g){var b=g-m;a=-lb(b),l()}else if(m>=y){var C=m-y;a=lb(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 cb=10;function ij(t,e,n,r,o,i,a,s){var l=h.useRef(),c=h.useState(null),u=le(c,2),d=u[0],f=u[1];return Jt(function(){if(d&&d.times<cb){if(!t.current){f(function(F){return q({},F)});return}i();var p=d.targetAlign,m=d.originAlign,v=d.index,g=d.offset,y=t.current.clientHeight,b=!1,C=p,x=null;if(y){for(var S=p||m,w=0,E=0,M=0,$=Math.min(e.length-1,v),R=0;R<=$;R+=1){var I=o(e[R]);E=w;var D=n.get(I);M=E+(D===void 0?r:D),w=M}for(var _=S==="top"?g:y-g,A=$;A>=0;A-=1){var z=o(e[A]),k=n.get(z);if(k===void 0){b=!0;break}if(_-=k,_<=0)break}switch(S){case"top":x=E-g;break;case"bottom":x=M-y+g;break;default:{var P=t.current.scrollTop,B=P+y;E<P?C="top":M>B&&(C="bottom")}}x!==null&&a(x),x!==d.lastTop&&(b=!0)}b&&f(q(q({},d),{},{times:d.times+1,targetAlign:C,lastTop:x}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===cb&&yt(!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(kt.cancel(l.current),typeof p=="number")a(p);else if(p&&st(p)==="object"){var m,v=p.align;"index"in p?m=p.index:m=e.findIndex(function(b){return o(b)===p.key});var g=p.offset,y=g===void 0?0:g;f({times:0,index:m,offset:y,originAlign:v})}}}var ah=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,v=h.useState(!1),g=le(v,2),y=g[0],b=g[1],C=h.useState(null),x=le(C,2),S=x[0],w=x[1],E=h.useState(null),M=le(E,2),$=M[0],R=M[1],I=!r,D=h.useRef(),_=h.useRef(),A=h.useState(m),z=le(A,2),k=z[0],P=z[1],B=h.useRef(),F=function(){m===!0||m===!1||(clearTimeout(B.current),P(!0),B.current=setTimeout(function(){P(!1)},3e3))},H=i-d||0,L=d-u||0,G=h.useMemo(function(){if(o===0||H===0)return 0;var de=o/H;return de*L},[o,H,L]),J=function(oe){oe.stopPropagation(),oe.preventDefault()},V=h.useRef({top:G,dragging:y,pageY:S,startTop:$});V.current={top:G,dragging:y,pageY:S,startTop:$};var X=function(oe){b(!0),w(ih(oe,c)),R(V.current.top),a(),oe.stopPropagation(),oe.preventDefault()};h.useEffect(function(){var de=function(ce){ce.preventDefault()},oe=D.current,ge=_.current;return oe.addEventListener("touchstart",de,{passive:!1}),ge.addEventListener("touchstart",X,{passive:!1}),function(){oe.removeEventListener("touchstart",de),ge.removeEventListener("touchstart",X)}},[]);var Q=h.useRef();Q.current=H;var ue=h.useRef();ue.current=L,h.useEffect(function(){if(y){var de,oe=function(ce){var me=V.current,Oe=me.dragging,Me=me.pageY,Ne=me.startTop;kt.cancel(de);var je=D.current.getBoundingClientRect(),O=d/(c?je.width:je.height);if(Oe){var ee=(ih(ce,c)-Me)*O,K=Ne;!I&&c?K-=ee:K+=ee;var ie=Q.current,Ee=ue.current,Se=Ee?K/Ee:0,he=Math.ceil(Se*ie);he=Math.max(he,0),he=Math.min(he,ie),de=kt(function(){l(he,c)})}},ge=function(){b(!1),s()};return window.addEventListener("mousemove",oe,{passive:!0}),window.addEventListener("touchmove",oe,{passive:!0}),window.addEventListener("mouseup",ge,{passive:!0}),window.addEventListener("touchend",ge,{passive:!0}),function(){window.removeEventListener("mousemove",oe),window.removeEventListener("touchmove",oe),window.removeEventListener("mouseup",ge),window.removeEventListener("touchend",ge),kt.cancel(de)}}},[y]),h.useEffect(function(){return F(),function(){clearTimeout(B.current)}},[o]),h.useImperativeHandle(e,function(){return{delayHidden:F}});var Y="".concat(n,"-scrollbar"),fe={position:"absolute",visibility:k?null:"hidden"},be={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return c?(fe.height=8,fe.left=0,fe.right=0,fe.bottom=0,be.height="100%",be.width=u,I?be.left=G:be.right=G):(fe.width=8,fe.top=0,fe.bottom=0,I?fe.right=0:fe.left=0,be.width="100%",be.height=u,be.top=G),h.createElement("div",{ref:D,className:re(Y,W(W(W({},"".concat(Y,"-horizontal"),c),"".concat(Y,"-vertical"),!c),"".concat(Y,"-visible"),k)),style:q(q({},fe),f),onMouseDown:J,onMouseMove:F},h.createElement("div",{ref:_,className:re("".concat(Y,"-thumb"),W({},"".concat(Y,"-thumb-moving"),y)),style:q(q({},be),p),onMouseDown:X}))});process.env.NODE_ENV!=="production"&&(ah.displayName="ScrollBar");var aj=20;function ub(){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,aj),Math.floor(n)}var sj=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],lj=[],cj={overflowY:"auto",overflowAnchor:"none"};function uj(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,v=t.scrollWidth,g=t.component,y=g===void 0?"div":g,b=t.onScroll,C=t.onVirtualScroll,x=t.onVisibleChange,S=t.innerProps,w=t.extraRender,E=t.styles,M=t.showScrollBar,$=M===void 0?"optional":M,R=xt(t,sj),I=h.useCallback(function(Ve){return typeof f=="function"?f(Ve):Ve==null?void 0:Ve[f]},[f]),D=nj(I),_=le(D,4),A=_[0],z=_[1],k=_[2],P=_[3],B=!!(p!==!1&&i&&a),F=h.useMemo(function(){return Object.values(k.maps).reduce(function(Ve,rt){return Ve+rt},0)},[k.id,k.maps]),H=B&&u&&(Math.max(a*u.length,F)>i||!!v),L=m==="rtl",G=re(r,W({},"".concat(r,"-rtl"),L),o),J=u||lj,V=N.useRef(),X=N.useRef(),Q=N.useRef(),ue=N.useState(0),Y=le(ue,2),fe=Y[0],be=Y[1],de=N.useState(0),oe=le(de,2),ge=oe[0],ne=oe[1],ce=N.useState(!1),me=le(ce,2),Oe=me[0],Me=me[1],Ne=function(){Me(!0)},je=function(){Me(!1)},O={getKey:I};function ee(Ve){be(function(rt){var Xe;typeof Ve=="function"?Xe=Ve(rt):Xe=Ve;var De=lt(Xe);return V.current.scrollTop=De,De})}var K=N.useRef({start:0,end:J.length}),ie=N.useRef(),Ee=QB(J,I),Se=le(Ee,1),he=Se[0];ie.current=he;var Ae=h.useMemo(function(){if(!B)return{scrollHeight:void 0,start:0,end:J.length-1,offset:void 0};if(!H){var Ve;return{scrollHeight:((Ve=X.current)===null||Ve===void 0?void 0:Ve.offsetHeight)||0,start:0,end:J.length-1,offset:void 0}}for(var rt=0,Xe,De,ft,Et=J.length,Ot=0;Ot<Et;Ot+=1){var ln=J[Ot],en=I(ln),dn=k.get(en),cn=rt+(dn===void 0?a:dn);cn>=fe&&Xe===void 0&&(Xe=Ot,De=rt),cn>fe+i&&ft===void 0&&(ft=Ot),rt=cn}return Xe===void 0&&(Xe=0,De=0,ft=Math.ceil(i/a)),ft===void 0&&(ft=J.length-1),ft=Math.min(ft+1,J.length-1),{scrollHeight:rt,start:Xe,end:ft,offset:De}},[H,B,fe,J,P,i]),_e=Ae.scrollHeight,$e=Ae.start,ze=Ae.end,Fe=Ae.offset;K.current.start=$e,K.current.end=ze,h.useLayoutEffect(function(){var Ve=k.getRecord();if(Ve.size===1){var rt=Array.from(Ve)[0],Xe=J[$e];if(Xe){var De=I(Xe);if(De===rt){var ft=k.get(rt),Et=ft-a;ee(function(Ot){return Ot+Et})}}}k.resetRecord()},[_e]);var Ie=h.useState({width:0,height:i}),Be=le(Ie,2),Te=Be[0],He=Be[1],Ze=function(rt){He({width:rt.offsetWidth,height:rt.offsetHeight})},ht=N.useRef(),Tt=N.useRef(),Pt=h.useMemo(function(){return ub(Te.width,v)},[Te.width,v]),an=h.useMemo(function(){return ub(Te.height,_e)},[Te.height,_e]),Ye=_e-i,We=N.useRef(Ye);We.current=Ye;function lt(Ve){var rt=Ve;return Number.isNaN(We.current)||(rt=Math.min(rt,We.current)),rt=Math.max(rt,0),rt}var it=fe<=0,pt=fe>=Ye,Qe=ge<=0,Ke=ge>=v,Ue=l1(it,pt,Qe,Ke),wt=function(){return{x:L?-ge:ge,y:fe}},$t=N.useRef(wt()),et=Wt(function(Ve){if(C){var rt=q(q({},wt()),Ve);($t.current.x!==rt.x||$t.current.y!==rt.y)&&(C(rt),$t.current=rt)}});function qe(Ve,rt){var Xe=Ve;rt?(_r.flushSync(function(){ne(Xe)}),et()):ee(Xe)}function ot(Ve){var rt=Ve.currentTarget.scrollTop;rt!==fe&&ee(rt),b==null||b(Ve),et()}var at=function(rt){var Xe=rt,De=v?v-Te.width:0;return Xe=Math.max(Xe,0),Xe=Math.min(Xe,De),Xe},nt=Wt(function(Ve,rt){rt?(_r.flushSync(function(){ne(function(Xe){var De=Xe+(L?-Ve:Ve);return at(De)})}),et()):ee(function(Xe){var De=Xe+Ve;return De})}),dt=ZB(B,it,pt,Qe,Ke,!!v,nt),Dt=le(dt,2),Nt=Dt[0],Gt=Dt[1];rj(B,V,function(Ve,rt,Xe,De){var ft=De;return Ue(Ve,rt,Xe)?!1:!ft||!ft._virtualHandled?(ft&&(ft._virtualHandled=!0),Nt({preventDefault:function(){},deltaX:Ve?rt:0,deltaY:Ve?0:rt}),!0):!1}),oj(H,V,function(Ve){ee(function(rt){return rt+Ve})}),Jt(function(){function Ve(Xe){var De=it&&Xe.detail<0,ft=pt&&Xe.detail>0;B&&!De&&!ft&&Xe.preventDefault()}var rt=V.current;return rt.addEventListener("wheel",Nt,{passive:!1}),rt.addEventListener("DOMMouseScroll",Gt,{passive:!0}),rt.addEventListener("MozMousePixelScroll",Ve,{passive:!1}),function(){rt.removeEventListener("wheel",Nt),rt.removeEventListener("DOMMouseScroll",Gt),rt.removeEventListener("MozMousePixelScroll",Ve)}},[B,it,pt]),Jt(function(){if(v){var Ve=at(ge);ne(Ve),et({x:Ve})}},[Te.width,v]);var Rt=function(){var rt,Xe;(rt=ht.current)===null||rt===void 0||rt.delayHidden(),(Xe=Tt.current)===null||Xe===void 0||Xe.delayHidden()},Bt=ij(V,J,k,a,I,function(){return z(!0)},ee,Rt);h.useImperativeHandle(e,function(){return{nativeElement:Q.current,getScrollInfo:wt,scrollTo:function(rt){function Xe(De){return De&&st(De)==="object"&&("left"in De||"top"in De)}Xe(rt)?(rt.left!==void 0&&ne(at(rt.left)),Bt(rt.top)):Bt(rt)}}}),Jt(function(){if(x){var Ve=J.slice($e,ze+1);x(Ve,J)}},[$e,ze,J]);var Ft=ej(J,I,k,a),Xt=w==null?void 0:w({start:$e,end:ze,virtual:H,offsetX:ge,offsetY:Fe,rtl:L,getSize:Ft}),Mn=YB(J,$e,ze,v,ge,A,d,O),Yt=null;i&&(Yt=q(W({},l?"height":"maxHeight",i),cj),B&&(Yt.overflowY="hidden",v&&(Yt.overflowX="hidden"),Oe&&(Yt.pointerEvents="none")));var sn={};return L&&(sn.dir="rtl"),h.createElement("div",Le({ref:Q,style:q(q({},c),{},{position:"relative"}),className:G},sn,R),h.createElement(Co,{onResize:Ze},h.createElement(y,{className:"".concat(r,"-holder"),style:Yt,ref:V,onScroll:ot,onMouseEnter:Rt},h.createElement(s1,{prefixCls:r,height:_e,offsetX:ge,offsetY:Fe,scrollWidth:v,onInnerResize:z,ref:X,innerProps:S,rtl:L,extra:Xt},Mn))),H&&_e>i&&h.createElement(ah,{ref:ht,prefixCls:r,scrollOffset:fe,scrollRange:_e,rtl:L,onScroll:qe,onStartMove:Ne,onStopMove:je,spinSize:an,containerSize:Te.height,style:E==null?void 0:E.verticalScrollBar,thumbStyle:E==null?void 0:E.verticalScrollBarThumb,showScrollBar:$}),H&&v>Te.width&&h.createElement(ah,{ref:Tt,prefixCls:r,scrollOffset:ge,scrollRange:v,rtl:L,onScroll:qe,onStartMove:Ne,onStopMove:je,spinSize:Pt,containerSize:Te.width,horizontal:!0,style:E==null?void 0:E.horizontalScrollBar,thumbStyle:E==null?void 0:E.horizontalScrollBarThumb,showScrollBar:$}))}var c1=h.forwardRef(uj);c1.displayName="List";function dj(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var fj=["disabled","title","children","style","className"];function db(t){return typeof t=="string"||typeof t=="number"}var hj=function(e,n){var r=aB(),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($p),m=p.maxCount,v=p.flattenOptions,g=p.onActiveValue,y=p.defaultActiveFirstOption,b=p.onSelect,C=p.menuItemSelectedIcon,x=p.rawValues,S=p.fieldNames,w=p.virtual,E=p.direction,M=p.listHeight,$=p.listItemHeight,R=p.optionRender,I="".concat(o,"-item"),D=Rs(function(){return v},[a,v],function(de,oe){return oe[0]&&de[1]!==oe[1]}),_=h.useRef(null),A=h.useMemo(function(){return s&&rh(m)&&(x==null?void 0:x.size)>=m},[s,m,x==null?void 0:x.size]),z=function(oe){oe.preventDefault()},k=function(oe){var ge;(ge=_.current)===null||ge===void 0||ge.scrollTo(typeof oe=="number"?{index:oe}:oe)},P=h.useCallback(function(de){return l==="combobox"?!1:x.has(de)},[l,Pe(x).toString(),x.size]),B=function(oe){for(var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ne=D.length,ce=0;ce<ne;ce+=1){var me=(oe+ce*ge+ne)%ne,Oe=D[me]||{},Me=Oe.group,Ne=Oe.data;if(!Me&&!(Ne!=null&&Ne.disabled)&&(P(Ne.value)||!A))return me}return-1},F=h.useState(function(){return B(0)}),H=le(F,2),L=H[0],G=H[1],J=function(oe){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;G(oe);var ne={source:ge?"keyboard":"mouse"},ce=D[oe];if(!ce){g(null,-1,ne);return}g(ce.value,oe,ne)};N.useEffect(function(){J(y!==!1?B(0):-1)},[D.length,c]);var V=h.useCallback(function(de){return l==="combobox"?String(de).toLowerCase()===c.toLowerCase():x.has(de)},[l,c,Pe(x).toString(),x.size]);N.useEffect(function(){var de=setTimeout(function(){if(!s&&a&&x.size===1){var ge=Array.from(x)[0],ne=D.findIndex(function(ce){var me=ce.data;return me.value===ge});ne!==-1&&(J(ne),k(ne))}});if(a){var oe;(oe=_.current)===null||oe===void 0||oe.scrollTo(void 0)}return function(){return clearTimeout(de)}},[a,c]);var X=function(oe){oe!==void 0&&b(oe,{selected:!x.has(oe)}),s||u(!1)};if(h.useImperativeHandle(n,function(){return{onKeyDown:function(oe){var ge=oe.which,ne=oe.ctrlKey;switch(ge){case Je.N:case Je.P:case Je.UP:case Je.DOWN:{var ce=0;if(ge===Je.UP?ce=-1:ge===Je.DOWN?ce=1:dj()&&ne&&(ge===Je.N?ce=1:ge===Je.P&&(ce=-1)),ce!==0){var me=B(L+ce,ce);k(me),J(me,!0)}break}case Je.TAB:case Je.ENTER:{var Oe,Me=D[L];Me&&!(Me!=null&&(Oe=Me.data)!==null&&Oe!==void 0&&Oe.disabled)&&!A?X(Me.value):X(void 0),a&&oe.preventDefault();break}case Je.ESC:u(!1),a&&oe.stopPropagation()}},onKeyUp:function(){},scrollTo:function(oe){k(oe)}}}),D.length===0)return h.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(I,"-empty"),onMouseDown:z},d);var Q=Object.keys(S).map(function(de){return S[de]}),ue=function(oe){return oe.label};function Y(de,oe){var ge=de.group;return{role:ge?"presentation":"option",id:"".concat(i,"_list_").concat(oe)}}var fe=function(oe){var ge=D[oe];if(!ge)return null;var ne=ge.data||{},ce=ne.value,me=ge.group,Oe=Zr(ne,!0),Me=ue(ge);return ge?h.createElement("div",Le({"aria-label":typeof Me=="string"&&!me?Me:null},Oe,{key:oe},Y(ge,oe),{"aria-selected":V(ce)}),ce):null},be={role:"listbox",id:"".concat(i,"_list")};return h.createElement(h.Fragment,null,w&&h.createElement("div",Le({},be,{style:{height:0,width:0,overflow:"hidden"}}),fe(L-1),fe(L),fe(L+1)),h.createElement(c1,{itemKey:"key",ref:_,data:D,height:M,itemHeight:$,fullHeight:!1,onMouseDown:z,onScroll:f,virtual:w,direction:E,innerProps:w?null:be},function(de,oe){var ge=de.group,ne=de.groupOption,ce=de.data,me=de.label,Oe=de.value,Me=ce.key;if(ge){var Ne,je=(Ne=ce.title)!==null&&Ne!==void 0?Ne:db(me)?me.toString():void 0;return h.createElement("div",{className:re(I,"".concat(I,"-group"),ce.className),title:je},me!==void 0?me:Me)}var O=ce.disabled,ee=ce.title;ce.children;var K=ce.style,ie=ce.className,Ee=xt(ce,fj),Se=Tn(Ee,Q),he=P(Oe),Ae=O||!he&&A,_e="".concat(I,"-option"),$e=re(I,_e,ie,W(W(W(W({},"".concat(_e,"-grouped"),ne),"".concat(_e,"-active"),L===oe&&!Ae),"".concat(_e,"-disabled"),Ae),"".concat(_e,"-selected"),he)),ze=ue(de),Fe=!C||typeof C=="function"||he,Ie=typeof ze=="number"?ze:ze||Oe,Be=db(Ie)?Ie.toString():void 0;return ee!==void 0&&(Be=ee),h.createElement("div",Le({},Zr(Se),w?{}:Y(de,oe),{"aria-selected":V(Oe),className:$e,title:Be,onMouseMove:function(){L===oe||Ae||J(oe)},onClick:function(){Ae||X(Oe)},style:K}),h.createElement("div",{className:"".concat(_e,"-content")},typeof R=="function"?R(de,{index:oe}):Ie),h.isValidElement(C)||he,Fe&&h.createElement(cu,{className:"".concat(I,"-option-state"),customizeIcon:C,customizeIconProps:{value:Oe,disabled:Ae,isSelected:he}},he?"✓":null))}))},u1=h.forwardRef(hj);process.env.NODE_ENV!=="production"&&(u1.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 q(q({},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 wd(t,e){return Op(t).join("").toUpperCase().includes(e)}const mj=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?wd(m[o],u):m[i]?wd(m[a!=="children"?a:"label"],u):wd(m[s],u)},f=c?function(p){return oh(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 v=p[i].filter(function(g){return d(n,f(g))});v.length&&l.push(q(q({},p),{},W({},i,v)))}return}d(n,f(p))&&l.push(p)}),l},[t,r,o,n,e])};var fb=0,gj=process.env.NODE_ENV!=="test"&&Gn();function vj(){var t;return gj?(t=fb,fb+=1):t="TEST_OR_SSR",t}function bj(t){var e=h.useState(),n=le(e,2),r=n[0],o=n[1];return h.useEffect(function(){o("rc_select_".concat(vj()))},[]),t||r}var yj=["children","value"],Cj=["children"];function Sj(t){var e=t,n=e.key,r=e.props,o=r.children,i=r.value,a=xt(r,yj);return q({key:n,value:i!==void 0?i:n,children:o},a)}function Ip(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return gr(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=xt(s,Cj);return e||!i?Sj(n):q(q({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:Ip(l)})}).filter(function(n){return n})}var xj=function(e,n,r,o,i){return h.useMemo(function(){var a=e,s=!e;s&&(a=Ip(n));var l=new Map,c=new Map,u=function(p,m,v){v&&typeof v=="string"&&p.set(m[v],m)},d=function f(p){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<p.length;v+=1){var g=p[v];!g[r.options]||m?(l.set(g[r.value],g),u(c,g,r.label),u(c,g,o),u(c,g,i)):f(g[r.options],!0)}};return d(a),{options:a,valueOptions:l,labelOptions:c}},[e,n,r,o,i])};function hb(t){var e=h.useRef();e.current=t;var n=h.useCallback(function(){return e.current.apply(e,arguments)},[]);return n}function wj(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,v=t.optionLabelProp,g=yc(e),y=l!==void 0?l:g||e==="combobox",b=n||Ip(r);if(yt(e!=="tags"||b.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=b.some(function(w){return w.options?w.options.some(function(E){return typeof("value"in E?E.value:E.key)=="number"}):typeof("value"in w?w.value:w.key)=="number"});yt(!C,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(yt(e!=="combobox"||!v,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),yt(e==="combobox"||!o,"`backfill` only works with `combobox` mode."),yt(e==="combobox"||!s,"`getInputElement` only work with `combobox` mode."),sf(e!=="combobox"||!s||!i||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),c&&!y&&e!=="combobox"&&e!=="tags"&&yt(!1,"`onSearch` should work with `showSearch` instead of use alone."),sf(!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 x=Op(p);yt(!f||x.every(function(w){return st(w)==="object"&&("key"in w||"value"in w)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),yt(!g||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var S=null;gr(r).some(function(w){if(!h.isValidElement(w)||!w.type)return!1;var E=w,M=E.type;if(M.isSelectOption)return!1;if(M.isSelectOptGroup){var $=gr(w.props.children).every(function(R){return!h.isValidElement(R)||!w.type||R.type.isSelectOption?!0:(S=R.type,!1)});return!$}return S=M,!0}),S&&yt(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(S.displayName||S.name||S,"`.")),yt(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ej(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 yt(!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 Nj=["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"],Oj=["inputValue"];function $j(t){return!t||st(t)!=="object"}var d1=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,v=t.dropdownMatchSelectWidth,g=v===void 0?!0:v,y=t.filterOption,b=t.filterSort,C=t.optionFilterProp,x=t.optionLabelProp,S=t.options,w=t.optionRender,E=t.children,M=t.defaultActiveFirstOption,$=t.menuItemSelectedIcon,R=t.virtual,I=t.direction,D=t.listHeight,_=D===void 0?200:D,A=t.listItemHeight,z=A===void 0?20:A,k=t.labelRender,P=t.value,B=t.defaultValue,F=t.labelInValue,H=t.onChange,L=t.maxCount,G=xt(t,Nj),J=bj(n),V=yc(r),X=!!(!S&&E),Q=h.useMemo(function(){return y===void 0&&r==="combobox"?!1:y},[y,r]),ue=h.useMemo(function(){return i1(s,X)},[JSON.stringify(s),X]),Y=mn("",{value:c!==void 0?c:l,postState:function(qe){return qe||""}}),fe=le(Y,2),be=fe[0],de=fe[1],oe=xj(S,E,ue,C,x),ge=oe.valueOptions,ne=oe.labelOptions,ce=oe.options,me=h.useCallback(function(et){var qe=Op(et);return qe.map(function(ot){var at,nt,dt,Dt,Nt;if($j(ot))at=ot;else{var Gt;dt=ot.key,nt=ot.label,at=(Gt=ot.value)!==null&&Gt!==void 0?Gt:dt}var Rt=ge.get(at);if(Rt){var Bt;if(nt===void 0&&(nt=Rt==null?void 0:Rt[x||ue.label]),dt===void 0&&(dt=(Bt=Rt==null?void 0:Rt.key)!==null&&Bt!==void 0?Bt:at),Dt=Rt==null?void 0:Rt.disabled,Nt=Rt==null?void 0:Rt.title,process.env.NODE_ENV!=="production"&&!x){var Ft=Rt==null?void 0:Rt[ue.label];Ft!==void 0&&!h.isValidElement(Ft)&&!h.isValidElement(nt)&&Ft!==nt&&yt(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:nt,value:at,key:dt,disabled:Dt,title:Nt}})},[ue,x,ge]),Oe=mn(B,{value:P}),Me=le(Oe,2),Ne=Me[0],je=Me[1],O=h.useMemo(function(){var et,qe=V&&Ne===null?[]:Ne,ot=me(qe);return r==="combobox"&&NB((et=ot[0])===null||et===void 0?void 0:et.value)?[]:ot},[Ne,me,r,V]),ee=pj(O,ge),K=le(ee,2),ie=K[0],Ee=K[1],Se=h.useMemo(function(){if(!r&&ie.length===1){var et=ie[0];if(et.value===null&&(et.label===null||et.label===void 0))return[]}return ie.map(function(qe){var ot;return q(q({},qe),{},{label:(ot=typeof k=="function"?k(qe):qe.label)!==null&&ot!==void 0?ot:qe.value})})},[r,ie,k]),he=h.useMemo(function(){return new Set(ie.map(function(et){return et.value}))},[ie]);h.useEffect(function(){if(r==="combobox"){var et,qe=(et=ie[0])===null||et===void 0?void 0:et.value;de(EB(qe)?String(qe):"")}},[ie]);var Ae=hb(function(et,qe){var ot=qe??et;return W(W({},ue.value,et),ue.label,ot)}),_e=h.useMemo(function(){if(r!=="tags")return ce;var et=Pe(ce),qe=function(at){return ge.has(at)};return Pe(ie).sort(function(ot,at){return ot.value<at.value?-1:1}).forEach(function(ot){var at=ot.value;qe(at)||et.push(Ae(at,ot.label))}),et},[Ae,ce,ge,ie,r]),$e=mj(_e,ue,be,Q,C),ze=h.useMemo(function(){return r!=="tags"||!be||$e.some(function(et){return et[C||"value"]===be})||$e.some(function(et){return et[ue.value]===be})?$e:[Ae(be)].concat(Pe($e))},[Ae,C,r,$e,be,ue]),Fe=function et(qe){var ot=Pe(qe).sort(function(at,nt){return b(at,nt,{searchValue:be})});return ot.map(function(at){return Array.isArray(at.options)?q(q({},at),{},{options:at.options.length>0?et(at.options):at.options}):at})},Ie=h.useMemo(function(){return b?Fe(ze):ze},[ze,b,be]),Be=h.useMemo(function(){return WB(Ie,{fieldNames:ue,childrenAsData:X})},[Ie,ue,X]),Te=function(qe){var ot=me(qe);if(je(ot),H&&(ot.length!==ie.length||ot.some(function(dt,Dt){var Nt;return((Nt=ie[Dt])===null||Nt===void 0?void 0:Nt.value)!==(dt==null?void 0:dt.value)}))){var at=F?ot:ot.map(function(dt){return dt.value}),nt=ot.map(function(dt){return oh(Ee(dt.value))});H(V?at:at[0],V?nt:nt[0])}},He=h.useState(null),Ze=le(He,2),ht=Ze[0],Tt=Ze[1],Pt=h.useState(0),an=le(Pt,2),Ye=an[0],We=an[1],lt=M!==void 0?M:r!=="combobox",it=h.useCallback(function(et,qe){var ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},at=ot.source,nt=at===void 0?"keyboard":at;We(qe),a&&r==="combobox"&&et!==null&&nt==="keyboard"&&Tt(String(et))},[a,r]),pt=function(qe,ot,at){var nt=function(){var Yt,sn=Ee(qe);return[F?{label:sn==null?void 0:sn[ue.label],value:qe,key:(Yt=sn==null?void 0:sn.key)!==null&&Yt!==void 0?Yt:qe}:qe,oh(sn)]};if(ot&&p){var dt=nt(),Dt=le(dt,2),Nt=Dt[0],Gt=Dt[1];p(Nt,Gt)}else if(!ot&&m&&at!=="clear"){var Rt=nt(),Bt=le(Rt,2),Ft=Bt[0],Xt=Bt[1];m(Ft,Xt)}},Qe=hb(function(et,qe){var ot,at=V?qe.selected:!0;at?ot=V?[].concat(Pe(ie),[et]):[et]:ot=ie.filter(function(nt){return nt.value!==et}),Te(ot),pt(et,at),r==="combobox"?Tt(""):(!yc||f)&&(de(""),Tt(""))}),Ke=function(qe,ot){Te(qe);var at=ot.type,nt=ot.values;(at==="remove"||at==="clear")&&nt.forEach(function(dt){pt(dt.value,!1,at)})},Ue=function(qe,ot){if(de(qe),Tt(null),ot.source==="submit"){var at=(qe||"").trim();if(at){var nt=Array.from(new Set([].concat(Pe(he),[at])));Te(nt),pt(at,!0),de("")}return}ot.source!=="blur"&&(r==="combobox"&&Te(qe),u==null||u(qe))},wt=function(qe){var ot=qe;r!=="tags"&&(ot=qe.map(function(nt){var dt=ne.get(nt);return dt==null?void 0:dt.value}).filter(function(nt){return nt!==void 0}));var at=Array.from(new Set([].concat(Pe(he),Pe(ot))));Te(at),at.forEach(function(nt){pt(nt,!0)})},$t=h.useMemo(function(){var et=R!==!1&&g!==!1;return q(q({},oe),{},{flattenOptions:Be,onActiveValue:it,defaultActiveFirstOption:lt,onSelect:Qe,menuItemSelectedIcon:$,rawValues:he,fieldNames:ue,virtual:et,direction:I,listHeight:_,listItemHeight:z,childrenAsData:X,maxCount:L,optionRender:w})},[L,oe,Be,it,lt,Qe,$,he,ue,R,g,I,_,z,X,w]);return process.env.NODE_ENV!=="production"&&(wj(t),Ej(ce,ue)),h.createElement($p.Provider,{value:$t},h.createElement(a1,Le({},G,{id:J,prefixCls:i,ref:e,omitDomProps:Oj,mode:r,displayValues:Se,onDisplayValuesChange:Ke,direction:I,searchValue:be,onSearch:Ue,autoClearSearchValue:f,onSearchSplit:wt,dropdownMatchSelectWidth:g,OptionList:u1,emptyOptions:!Be.length,activeValue:ht,activeDescendantId:"".concat(J,"_list_").concat(Ye)})))});process.env.NODE_ENV!=="production"&&(d1.displayName="Select");var Tp=d1;Tp.Option=Rp;Tp.OptGroup=Mp;function Mi(t,e,n){return re({[`${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 Fs=(t,e)=>e||t,f1=()=>{const[,t]=ar(),[e]=So("Empty"),r=new Ht(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"&&(f1.displayName="EmptyImage");const h1=()=>{const[,t]=ar(),[e]=So("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=t,{borderColor:a,shadowColor:s,contentColor:l}=N.useMemo(()=>({borderColor:new Ht(n).onBackground(i).toHexString(),shadowColor:new Ht(r).onBackground(i).toHexString(),contentColor:new Ht(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"&&(h1.displayName="SimpleImage");const Mj=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}}}}},Rj=hn("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:r}=t,o=Lt(t,{emptyImgCls:`${e}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[Mj(o)]});var Ij=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 p1=h.createElement(f1,null),m1=h.createElement(h1,null),Po=t=>{const{className:e,rootClassName:n,prefixCls:r,image:o=p1,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=t,d=Ij(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:p,className:m,style:v,classNames:g,styles:y}=br("empty"),b=f("empty",r),[C,x,S]=Rj(b),[w]=So("Empty"),E=typeof i<"u"?i:w==null?void 0:w.description,M=typeof E=="string"?E:"empty";let $=null;if(typeof o=="string"?$=h.createElement("img",{alt:M,src:o}):$=o,process.env.NODE_ENV!=="production"){const R=on("Empty");[["imageStyle","styles: { image: {} }"]].forEach(I=>{let[D,_]=I;R.deprecated(!(D in t),D,_)})}return C(h.createElement("div",Object.assign({className:re(x,S,b,m,{[`${b}-normal`]:o===m1,[`${b}-rtl`]:p==="rtl"},e,n,g.root,c==null?void 0:c.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},y.root),v),u==null?void 0:u.root),l)},d),h.createElement("div",{className:re(`${b}-image`,g.image,c==null?void 0:c.image),style:Object.assign(Object.assign(Object.assign({},s),y.image),u==null?void 0:u.image)},$),E&&h.createElement("div",{className:re(`${b}-description`,g.description,c==null?void 0:c.description),style:Object.assign(Object.assign({},y.description),u==null?void 0:u.description)},E),a&&h.createElement("div",{className:re(`${b}-footer`,g.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},y.footer),u==null?void 0:u.footer)},a)))};Po.PRESENTED_IMAGE_DEFAULT=p1;Po.PRESENTED_IMAGE_SIMPLE=m1;process.env.NODE_ENV!=="production"&&(Po.displayName="Empty");const Tj=t=>{const{componentName:e}=t,{getPrefixCls:n}=N.useContext(At),r=n("empty");switch(e){case"Table":case"List":return N.createElement(Po,{image:Po.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return N.createElement(Po,{image:Po.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return N.createElement(Po,null)}},du=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var r,o;const{variant:i,[t]:a}=h.useContext(At),s=h.useContext(d_),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=tP.includes(c);return[c,u]},Pj=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 Aj(t,e){return t||Pj(e)}const pb=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"}},kj=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({},Fn(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,[`
|
|
371
|
-
${o}${s}bottomLeft,
|
|
372
|
-
${i}${s}bottomLeft
|
|
373
|
-
`]:{animationName:pp},[`
|
|
374
|
-
${o}${s}topLeft,
|
|
375
|
-
${i}${s}topLeft,
|
|
376
|
-
${o}${s}topRight,
|
|
377
|
-
${i}${s}topRight
|
|
378
|
-
`]:{animationName:gp},[`${a}${s}bottomLeft`]:{animationName:mp},[`
|
|
379
|
-
${a}${s}topLeft,
|
|
380
|
-
${a}${s}topRight
|
|
381
|
-
`]:{animationName:vp},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},pb(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"},Ss),"&-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({},pb(t)),{color:t.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Sa(t,"slide-up"),Sa(t,"slide-down"),gc(t,"move-up"),gc(t,"move-down")]},Dj=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:se(e),itemLineHeight:se(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},_j=t=>{const{multipleSelectItemHeight:e,selectHeight:n,lineWidth:r}=t;return t.calc(n).sub(e).div(2).sub(r).equal()},Bj=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({},Ai()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},jj=(t,e)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=t,o=`${n}-selection-overflow`,i=t.multipleSelectItemHeight,a=_j(t),s=e?`${n}-${e}`:"",l=Dj(t);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},Bj(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:`${se(r)} 0`,lineHeight:se(i),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:se(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:se(i),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${o}-item + ${o}-item,
|
|
382
|
-
${n}-prefix + ${n}-selection-wrap
|
|
383
|
-
`]:{[`${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:se(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 Ed(t,e){const{componentCls:n}=t,r=e?`${n}-${e}`:"",o={[`${n}-multiple${r}`]:{fontSize:t.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
|
|
384
|
-
&${n}-show-arrow ${n}-selector,
|
|
385
|
-
&${n}-allow-clear ${n}-selector
|
|
386
|
-
`]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[jj(t,e),o]}const zj=t=>{const{componentCls:e}=t,n=Lt(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),r=Lt(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[Ed(t),Ed(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},Ed(r,"lg")]};function Nd(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({},Fn(t,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:se(i)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
387
|
-
${n}-selection-item,
|
|
388
|
-
${n}-selection-placeholder
|
|
389
|
-
`]:{display:"block",padding:0,lineHeight:se(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"'}}),[`
|
|
390
|
-
&${n}-show-arrow ${n}-selection-item,
|
|
391
|
-
&${n}-show-arrow ${n}-selection-search,
|
|
392
|
-
&${n}-show-arrow ${n}-selection-placeholder
|
|
393
|
-
`]:{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 ${se(r)}`,[`${n}-selection-search-input`]:{height:i,fontSize:t.fontSize},"&:after":{lineHeight:se(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 ${se(r)}`,"&:after":{display:"none"}}}}}}}function Lj(t){const{componentCls:e}=t,n=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[Nd(t),Nd(Lt(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{padding:`0 ${se(n)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(n).add(t.calc(t.fontSize).mul(1.5)).equal()},[`
|
|
394
|
-
&${e}-show-arrow ${e}-selection-item,
|
|
395
|
-
&${e}-show-arrow ${e}-selection-placeholder
|
|
396
|
-
`]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},Nd(Lt(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const Vj=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:v,colorBgContainerDisabled:g,colorTextDisabled:y,colorPrimaryHover:b,colorPrimary:C,controlOutline:x}=t,S=s*2,w=r*2,E=Math.min(o-S,o-w),M=Math.min(i-S,i-w),$=Math.min(a-S,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:v,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:M,multipleItemHeightLG:$,multipleSelectorBgDisabled:g,multipleItemColorDisabled:y,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:b,activeBorderColor:C,activeOutlineColor:x,selectAffixPadding:s}},g1=(t,e)=>{const{componentCls:n,antCls:r,controlOutlineWidth:o}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${se(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 ${se(o)} ${e.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:e.color}}}},mb=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},g1(t,e))}),Fj=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},g1(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),mb(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),mb(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:`${se(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),v1=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${se(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}}}},gb=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},v1(t,e))}),Hj=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},v1(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),gb(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),gb(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:`${se(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),Wj=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${se(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:`${se(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}}}}),b1=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${se(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}}}},vb=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},b1(t,e))}),qj=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},b1(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),vb(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),vb(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:`${se(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),Kj=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Fj(t)),Hj(t)),Wj(t)),qj(t))}),Uj=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"}}}},Gj=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"}}}},Xj=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=t;return{[n]:Object.assign(Object.assign({},Fn(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},Uj(t)),Gj(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Ss),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Ss),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},Ai()),{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.colorTextTertiary}},[`&:hover ${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(r).add(t.fontSize).add(t.paddingXS).equal()}}}}}},Yj=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},Xj(t),Lj(t),zj(t),kj(t),{[`${e}-rtl`]:{direction:"rtl"}},_s(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},Jj=hn("Select",(t,e)=>{let{rootPrefixCls:n}=e;const r=Lt(t,{rootPrefixCls:n,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[Yj(r),Kj(r)]},Vj,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Qj={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"},Zj=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:Qj}))},y1=h.forwardRef(Zj);process.env.NODE_ENV!=="production"&&(y1.displayName="CheckOutlined");var ez={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"},tz=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:ez}))},Pp=h.forwardRef(tz);process.env.NODE_ENV!=="production"&&(Pp.displayName="DownOutlined");var nz={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"},rz=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:nz}))},Ap=h.forwardRef(rz);process.env.NODE_ENV!=="production"&&(Ap.displayName="SearchOutlined");function oz(t){let{suffixIcon:e,clearIcon:n,menuItemSelectedIcon:r,removeIcon:o,loading:i,multiple:a,hasFeedback:s,prefixCls:l,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:f}=t;process.env.NODE_ENV!=="production"&&on(f).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const p=n??h.createElement(Xc,null),m=b=>e===null&&!s&&!d?null:h.createElement(h.Fragment,null,c!==!1&&b,s&&u);let v=null;if(e!==void 0)v=m(e);else if(i)v=m(h.createElement(up,{spin:!0}));else{const b=`${l}-suffix`;v=C=>{let{open:x,showSearch:S}=C;return m(x&&S?h.createElement(Ap,{className:b}):h.createElement(Pp,{className:b}))}}let g=null;r!==void 0?g=r:a?g=h.createElement(y1,null):g=null;let y=null;return o!==void 0?y=o:y=h.createElement(Ts,null),{clearIcon:p,suffixIcon:v,itemIcon:g,removeIcon:y}}function iz(t,e){return e!==void 0?e:t!==null}var az=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 C1="SECRET_COMBOBOX_MODE_DO_NOT_USE",S1=(t,e)=>{var n;const{prefixCls:r,bordered:o,className:i,rootClassName:a,getPopupContainer:s,popupClassName:l,dropdownClassName:c,listHeight:u=256,placement:d,listItemHeight:f,size:p,disabled:m,notFoundContent:v,status:g,builtinPlacements:y,dropdownMatchSelectWidth:b,popupMatchSelectWidth:C,direction:x,style:S,allowClear:w,variant:E,dropdownStyle:M,transitionName:$,tagRender:R,maxCount:I,prefix:D}=t,_=az(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:A,getPrefixCls:z,renderEmpty:k,direction:P,virtual:B,popupMatchSelectWidth:F,popupOverflow:H}=h.useContext(At),L=br("select"),[,G]=ar(),J=f??(G==null?void 0:G.controlHeight),V=z("select",r),X=z(),Q=x??P,{compactSize:ue,compactItemClassnames:Y}=ei(V,Q),[fe,be]=du("select",E,o),de=xo(V),[oe,ge,ne]=Jj(V,de),ce=h.useMemo(()=>{const{mode:ht}=t;if(ht!=="combobox")return ht===C1?"combobox":ht},[t.mode]),me=ce==="multiple"||ce==="tags",Oe=iz(t.suffixIcon,t.showArrow),Me=(n=C??b)!==null&&n!==void 0?n:F,{status:Ne,hasFeedback:je,isFormItemInput:O,feedbackIcon:ee}=h.useContext($r),K=Fs(Ne,g);let ie;v!==void 0?ie=v:ce==="combobox"?ie=null:ie=(k==null?void 0:k("Select"))||h.createElement(Tj,{componentName:"Select"});const{suffixIcon:Ee,itemIcon:Se,removeIcon:he,clearIcon:Ae}=oz(Object.assign(Object.assign({},_),{multiple:me,hasFeedback:je,feedbackIcon:ee,showSuffixIcon:Oe,prefixCls:V,componentName:"Select"})),_e=w===!0?{clearIcon:Ae}:w,$e=Tn(_,["suffixIcon","itemIcon"]),ze=re(l||c,{[`${V}-dropdown-${Q}`]:Q==="rtl"},a,ne,de,ge),Fe=Vr(ht=>{var Tt;return(Tt=p??ue)!==null&&Tt!==void 0?Tt:ht}),Ie=h.useContext(jr),Be=m??Ie,Te=re({[`${V}-lg`]:Fe==="large",[`${V}-sm`]:Fe==="small",[`${V}-rtl`]:Q==="rtl",[`${V}-${fe}`]:be,[`${V}-in-form-item`]:O},Mi(V,K,je),Y,L.className,i,a,ne,de,ge),He=h.useMemo(()=>d!==void 0?d:Q==="rtl"?"bottomRight":"bottomLeft",[d,Q]);if(process.env.NODE_ENV!=="production"){const ht=on("Select");ht.deprecated(!c,"dropdownClassName","popupClassName"),ht.deprecated(b===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),process.env.NODE_ENV!=="production"&&ht(!("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."),ht.deprecated(!("bordered"in t),"bordered","variant"),process.env.NODE_ENV!=="production"&&ht(!(typeof I<"u"&&!me),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[Ze]=As("SelectLike",M==null?void 0:M.zIndex);return oe(h.createElement(Tp,Object.assign({ref:e,virtual:B,showSearch:L.showSearch},$e,{style:Object.assign(Object.assign({},L.style),S),dropdownMatchSelectWidth:Me,transitionName:$i(X,"slide-up",$),builtinPlacements:Aj(y,H),listHeight:u,listItemHeight:J,mode:ce,prefixCls:V,placement:He,direction:Q,prefix:D,suffixIcon:Ee,menuItemSelectedIcon:Se,removeIcon:he,allowClear:_e,notFoundContent:ie,className:Te,getPopupContainer:s||A,dropdownClassName:ze,disabled:Be,dropdownStyle:Object.assign(Object.assign({},M),{zIndex:Ze}),maxCount:me?I:void 0,tagRender:me?R:void 0})))};process.env.NODE_ENV!=="production"&&(S1.displayName="Select");const ur=h.forwardRef(S1),sz=wp(ur,"dropdownAlign");ur.SECRET_COMBOBOX_MODE_DO_NOT_USE=C1;ur.Option=Rp;ur.OptGroup=Mp;ur._InternalPanelDoNotUseOrYouWillBeFired=sz;process.env.NODE_ENV!=="production"&&(ur.displayName="Select");const Cc=t=>t?typeof t=="function"?t():t:null;function kp(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:re("".concat(n,"-content"),a),style:s},h.createElement("div",{className:re("".concat(n,"-inner"),i),id:r,role:"tooltip",style:o},typeof e=="function"?e():e))}var Wi={shiftX:64,adjustY:1},qi={adjustX:1,shiftY:!0},Sr=[0,0],lz={left:{points:["cr","cl"],overflow:qi,offset:[-4,0],targetOffset:Sr},right:{points:["cl","cr"],overflow:qi,offset:[4,0],targetOffset:Sr},top:{points:["bc","tc"],overflow:Wi,offset:[0,-4],targetOffset:Sr},bottom:{points:["tc","bc"],overflow:Wi,offset:[0,4],targetOffset:Sr},topLeft:{points:["bl","tl"],overflow:Wi,offset:[0,-4],targetOffset:Sr},leftTop:{points:["tr","tl"],overflow:qi,offset:[-4,0],targetOffset:Sr},topRight:{points:["br","tr"],overflow:Wi,offset:[0,-4],targetOffset:Sr},rightTop:{points:["tl","tr"],overflow:qi,offset:[4,0],targetOffset:Sr},bottomRight:{points:["tr","br"],overflow:Wi,offset:[0,4],targetOffset:Sr},rightBottom:{points:["bl","br"],overflow:qi,offset:[4,0],targetOffset:Sr},bottomLeft:{points:["tl","bl"],overflow:Wi,offset:[0,4],targetOffset:Sr},leftBottom:{points:["br","bl"],overflow:qi,offset:[-4,0],targetOffset:Sr}},cz=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],uz=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,v=e.afterVisibleChange,g=e.transitionName,y=e.animation,b=e.motion,C=e.placement,x=C===void 0?"right":C,S=e.align,w=S===void 0?{}:S,E=e.destroyTooltipOnHide,M=E===void 0?!1:E,$=e.defaultVisible,R=e.getTooltipContainer,I=e.overlayInnerStyle;e.arrowContent;var D=e.overlay,_=e.id,A=e.showArrow,z=A===void 0?!0:A,k=e.classNames,P=e.styles,B=xt(e,cz),F=au(_),H=N.useRef(null);N.useImperativeHandle(n,function(){return H.current});var L=q({},B);"visible"in e&&(L.popupVisible=e.visible);var G=function(){return h.createElement(kp,{key:"content",prefixCls:f,id:F,bodyClassName:k==null?void 0:k.body,overlayInnerStyle:q(q({},I),P==null?void 0:P.body)},D)},J=function(){var X=h.Children.only(p),Q=(X==null?void 0:X.props)||{},ue=q(q({},Q),{},{"aria-describedby":D?F:null});return h.cloneElement(p,ue)};return h.createElement(uu,Le({popupClassName:re(r,k==null?void 0:k.root),prefixCls:f,popup:G,action:i,builtinPlacements:lz,popupPlacement:x,ref:H,popupAlign:w,getPopupContainer:R,onPopupVisibleChange:m,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:y,popupMotion:b,defaultPopupVisible:$,autoDestroy:M,mouseLeaveDelay:c,popupStyle:q(q({},u),P==null?void 0:P.root),mouseEnterDelay:s,arrow:z},L),J())};const dz=N.forwardRef(uz);function Dp(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,v=2*o-i,g=a,y=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),b=r*(Math.sqrt(2)-1),C=`polygon(${b}px 100%, 50% ${b}px, ${2*o-b}px 100%, ${b}px 100%)`,x=`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 ${v} ${g} Z')`;return{arrowShadowWidth:y,arrowPath:x,arrowPolygon:C}}const fz=(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 ${se(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},x1=8;function fu(t){const{contentRadius:e,limitVerticalRadius:n}=t,r=e>12?e+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?x1:r}}function yl(t,e){return t?e:{}}function _p(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"},fz(t,e,o)),{"&:before":{background:e}})]},yl(!!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% - ${se(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),yl(!!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% - ${se(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),yl(!!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}})),yl(!!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 hz(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 bb={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"]}},pz={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"]}},mz=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function w1(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=t,s=e/2,l={};return Object.keys(bb).forEach(c=>{const u=r&&pz[c]||bb[c],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=d,mz.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=fu({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=hz(c,f,e,n),a&&(d.htmlRegion="visibleFirst")}),l}const gz=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(),v=e(a).mul(2).add(p).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Fn(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:v,minHeight:l,padding:`${se(t.calc(u).div(2).equal())} ${se(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,x1)}},[`${n}-content`]:{position:"relative"}}),$P(t,(g,y)=>{let{darkColor:b}=y;return{[`&${n}-${g}`]:{[`${n}-inner`]:{backgroundColor:b},[`${n}-arrow`]:{"--antd-arrow-background-color":b}}}})),{"&-rtl":{direction:"rtl"}})},_p(t,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},vz=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},fu({contentRadius:t.borderRadius,limitVerticalRadius:!0})),Dp(Lt(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),E1=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return hn("Tooltip",r=>{const{borderRadius:o,colorTextLightSolid:i,colorBgSpotlight:a}=r,s=Lt(r,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:o,tooltipBg:a});return[gz(s),Ds(r,"zoom-big-fast")]},vz,{resetStyle:!1,injectStyle:e})(t)},bz=qo.map(t=>`${t}-inverse`);function yz(t){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(Pe(bz),Pe(qo)).includes(t):qo.includes(t)}function N1(t,e){const n=yz(e),r=re({[`${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 Cz=t=>{const{prefixCls:e,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a}=t,{getPrefixCls:s}=h.useContext(At),l=s("tooltip",e),[c,u,d]=E1(l),f=N1(l,i),p=f.arrowStyle,m=Object.assign(Object.assign({},a),f.overlayStyle),v=re(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(h.createElement("div",{className:v,style:p},h.createElement("div",{className:`${l}-arrow`}),h.createElement(kp,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:m}),o)))};var Sz=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 xz=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,arrow:p=!0,title:m,overlay:v,builtinPlacements:g,arrowPointAtCenter:y=!1,autoAdjustOverflow:b=!0,motion:C,getPopupContainer:x,placement:S="top",mouseEnterDelay:w=.1,mouseLeaveDelay:E=.1,overlayStyle:M,rootClassName:$,overlayClassName:R,styles:I,classNames:D}=t,_=Sz(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),A=!!p,[,z]=ar(),{getPopupContainer:k,getPrefixCls:P,direction:B,className:F,style:H,classNames:L,styles:G}=br("tooltip"),J=on("Tooltip"),V=h.useRef(null),X=()=>{var $e;($e=V.current)===null||$e===void 0||$e.forceAlign()};h.useImperativeHandle(e,()=>{var $e,ze;return{forceAlign:X,forcePopupAlign:()=>{J.deprecated(!1,"forcePopupAlign","forceAlign"),X()},nativeElement:($e=V.current)===null||$e===void 0?void 0:$e.nativeElement,popupElement:(ze=V.current)===null||ze===void 0?void 0:ze.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName",'classNames={{ root: "" }}']].forEach($e=>{let[ze,Fe]=$e;J.deprecated(!(ze in t),ze,Fe)}),process.env.NODE_ENV!=="production"&&J(!f||typeof f=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&J(!p||typeof p=="boolean"||!("arrowPointAtCenter"in p),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[Q,ue]=mn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),Y=!m&&!v&&m!==0,fe=$e=>{var ze,Fe;ue(Y?!1:$e),Y||((ze=t.onOpenChange)===null||ze===void 0||ze.call(t,$e),(Fe=t.onVisibleChange)===null||Fe===void 0||Fe.call(t,$e))},be=h.useMemo(()=>{var $e,ze;let Fe=y;return typeof p=="object"&&(Fe=(ze=($e=p.pointAtCenter)!==null&&$e!==void 0?$e:p.arrowPointAtCenter)!==null&&ze!==void 0?ze:y),g||w1({arrowPointAtCenter:Fe,autoAdjustOverflow:b,arrowWidth:A?z.sizePopupArrow:0,borderRadius:z.borderRadius,offset:z.marginXXS,visibleFirst:!0})},[y,p,g,z]),de=h.useMemo(()=>m===0?m:v||m||"",[v,m]),oe=h.createElement(Ko,{space:!0},typeof de=="function"?de():de),ge=P("tooltip",o),ne=P(),ce=t["data-popover-inject"];let me=Q;!("open"in t)&&!("visible"in t)&&Y&&(me=!1);const Oe=h.isValidElement(c)&&!qS(c)?c:h.createElement("span",null,c),Me=Oe.props,Ne=!Me.className||typeof Me.className=="string"?re(Me.className,i||`${ge}-open`):Me.className,[je,O,ee]=E1(ge,!ce),K=N1(ge,s),ie=K.arrowStyle,Ee=re(R,{[`${ge}-rtl`]:B==="rtl"},K.className,$,O,ee,F,L.root,D==null?void 0:D.root),Se=re(L.body,D==null?void 0:D.body),[he,Ae]=As("Tooltip",_.zIndex),_e=h.createElement(dz,Object.assign({},_,{zIndex:he,showArrow:A,placement:S,mouseEnterDelay:w,mouseLeaveDelay:E,prefixCls:ge,classNames:{root:Ee,body:Se},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ie),G.root),H),M),I==null?void 0:I.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},G.body),l),I==null?void 0:I.body),K.overlayStyle)},getTooltipContainer:x||a||k,ref:V,builtinPlacements:be,overlay:oe,visible:me,onVisibleChange:fe,afterVisibleChange:u??d,arrowContent:h.createElement("span",{className:`${ge}-arrow-content`}),motion:{motionName:$i(ne,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!f}),me?Or(Oe,{className:Ne}):Oe);return je(h.createElement(Ps.Provider,{value:Ae},_e))}),Uo=xz;process.env.NODE_ENV!=="production"&&(Uo.displayName="Tooltip");Uo._InternalPanelDoNotUseOrYouWillBeFired=Cz;const wz=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:v}=t;return[{[e]:Object.assign(Object.assign({},Fn(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:v},[`${e}-inner-content`]:{color:n,padding:m}})},_p(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},Ez=t=>{const{componentCls:e}=t;return{[e]:qo.map(n=>{const r=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":r,[`${e}-inner`]:{backgroundColor:r},[`${e}-arrow`]:{background:"transparent"}}}})}},Nz=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,v=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},Dp(t)),fu({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:l,titlePadding:i?`${p}px ${v}px ${m}px`:0,titleBorderBottom:i?`${e}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${v}px`:0})},O1=hn("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,r=Lt(t,{popoverBg:e,popoverColor:n});return[wz(r),Ez(r),Ds(r,"zoom-big")]},Nz,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var Oz=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 $1=t=>{let{title:e,content:n,prefixCls:r}=t;return!e&&!n?null:h.createElement(h.Fragment,null,e&&h.createElement("div",{className:`${r}-title`},e),n&&h.createElement("div",{className:`${r}-inner-content`},n))},$z=t=>{const{hashId:e,prefixCls:n,className:r,style:o,placement:i="top",title:a,content:s,children:l}=t,c=Cc(a),u=Cc(s),d=re(e,n,`${n}-pure`,`${n}-placement-${i}`,r);return h.createElement("div",{className:d,style:o},h.createElement("div",{className:`${n}-arrow`}),h.createElement(kp,Object.assign({},t,{className:e,prefixCls:n}),l||h.createElement($1,{prefixCls:n,title:c,content:u})))},Mz=t=>{const{prefixCls:e,className:n}=t,r=Oz(t,["prefixCls","className"]),{getPrefixCls:o}=h.useContext(At),i=o("popover",e),[a,s,l]=O1(i);return a(h.createElement($z,Object.assign({},r,{prefixCls:i,hashId:s,className:re(n,l)})))};var Rz=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 Iz=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:v,classNames:g}=t,y=Rz(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:b,className:C,style:x,classNames:S,styles:w}=br("popover"),E=b("popover",o),[M,$,R]=O1(E),I=b(),D=re(s,$,R,C,S.root,g==null?void 0:g.root),_=re(S.body,g==null?void 0:g.body),[A,z]=mn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),k=(L,G)=>{z(L,!0),p==null||p(L,G)},P=L=>{L.keyCode===Je.ESC&&k(!1,L)},B=L=>{k(L)},F=Cc(i),H=Cc(a);return M(h.createElement(Uo,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},y,{prefixCls:E,classNames:{root:D,body:_},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},w.root),x),m),v==null?void 0:v.root),body:Object.assign(Object.assign({},w.body),v==null?void 0:v.body)},ref:e,open:A,onOpenChange:B,overlay:F||H?h.createElement($1,{prefixCls:E,title:F,content:H}):null,transitionName:$i(I,"zoom-big",y.transitionName),"data-popover-inject":!0}),Or(u,{onKeyDown:L=>{var G,J;h.isValidElement(u)&&((J=u==null?void 0:(G=u.props).onKeyDown)===null||J===void 0||J.call(G,L)),P(L)}})))}),Bp=Iz;Bp._InternalPanelDoNotUseOrYouWillBeFired=Mz;process.env.NODE_ENV!=="production"&&(Bp.displayName="Popover");var Tz={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"},Pz=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:Tz}))},Sc=h.forwardRef(Pz);process.env.NODE_ENV!=="production"&&(Sc.displayName="LeftOutlined");var Az=Je.ESC,kz=Je.TAB;function Dz(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 Az:s();break;case kz:{var f=!1;a.current||(f=l()),f?d.preventDefault():s();break}}};h.useEffect(function(){return e?(window.addEventListener("keydown",c),o&&kt(l,3),function(){window.removeEventListener("keydown",c),a.current=!1}):function(){a.current=!1}},[e])}var _z=N.forwardRef(function(t,e){var n=t.overlay,r=t.arrow,o=t.prefixCls,i=N.useMemo(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),a=ir(e,Ti(i));return N.createElement(N.Fragment,null,r&&N.createElement("div",{className:"".concat(o,"-arrow")}),N.cloneElement(i,{ref:Zo(i)?a:void 0}))}),Ki={adjustX:1,adjustY:1},Ui=[0,0],Bz={topLeft:{points:["bl","tl"],overflow:Ki,offset:[0,-4],targetOffset:Ui},top:{points:["bc","tc"],overflow:Ki,offset:[0,-4],targetOffset:Ui},topRight:{points:["br","tr"],overflow:Ki,offset:[0,-4],targetOffset:Ui},bottomLeft:{points:["tl","bl"],overflow:Ki,offset:[0,4],targetOffset:Ui},bottom:{points:["tc","bc"],overflow:Ki,offset:[0,4],targetOffset:Ui},bottomRight:{points:["tr","br"],overflow:Ki,offset:[0,4],targetOffset:Ui}},jz=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function zz(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?Bz:f,m=t.getPopupContainer,v=t.showAction,g=t.hideAction,y=t.overlayClassName,b=t.overlayStyle,C=t.visible,x=t.trigger,S=x===void 0?["hover"]:x,w=t.autoFocus,E=t.overlay,M=t.children,$=t.onVisibleChange,R=xt(t,jz),I=N.useState(),D=le(I,2),_=D[0],A=D[1],z="visible"in t?C:_,k=N.useRef(null),P=N.useRef(null),B=N.useRef(null);N.useImperativeHandle(e,function(){return k.current});var F=function(Y){A(Y),$==null||$(Y)};Dz({visible:z,triggerRef:B,onVisibleChange:F,autoFocus:w,overlayRef:P});var H=function(Y){var fe=t.onOverlayClick;A(!1),fe&&fe(Y)},L=function(){return N.createElement(_z,{ref:P,overlay:E,prefixCls:a,arrow:o})},G=function(){return typeof E=="function"?L:L()},J=function(){var Y=t.minOverlayWidthMatchTrigger,fe=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?Y:!fe},V=function(){var Y=t.openClassName;return Y!==void 0?Y:"".concat(a,"-open")},X=N.cloneElement(M,{className:re((n=M.props)===null||n===void 0?void 0:n.className,z&&V()),ref:Zo(M)?ir(B,Ti(M)):void 0}),Q=g;return!Q&&S.indexOf("contextMenu")!==-1&&(Q=["click"]),N.createElement(uu,Le({builtinPlacements:p},R,{prefixCls:a,ref:k,popupClassName:re(y,W({},"".concat(a,"-show-arrow"),o)),popupStyle:b,action:S,showAction:v,hideAction:Q,popupPlacement:d,popupAlign:c,popupTransitionName:s,popupAnimation:l,popupVisible:z,stretch:J()?"minWidth":"",popup:G(),onPopupVisibleChange:F,onPopupClick:H,getPopupContainer:m}),X)}const Lz=N.forwardRef(zz),Vz=t=>typeof t!="object"&&typeof t!="function"||t===null;var M1=h.createContext(null);function R1(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function I1(t){var e=h.useContext(M1);return R1(e,t)}var Fz=["children","locked"],Lr=h.createContext(null);function Hz(t,e){var n=q({},t);return Object.keys(e).forEach(function(r){var o=e[r];o!==void 0&&(n[r]=o)}),n}function Es(t){var e=t.children,n=t.locked,r=xt(t,Fz),o=h.useContext(Lr),i=Rs(function(){return Hz(o,r)},[o,r],function(a,s){return!n&&(a[0]!==s[0]||!pa(a[1],s[1],!0))});return h.createElement(Lr.Provider,{value:i},e)}var Wz=[],T1=h.createContext(null);function hu(){return h.useContext(T1)}var P1=h.createContext(Wz);function $a(t){var e=h.useContext(P1);return h.useMemo(function(){return t!==void 0?[].concat(Pe(e),[t]):e},[e,t])}var A1=h.createContext(null),jp=h.createContext({});function yb(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(dp(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 qz(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Pe(t.querySelectorAll("*")).filter(function(r){return yb(r,e)});return yb(t,e)&&n.unshift(t),n}var sh=Je.LEFT,lh=Je.RIGHT,ch=Je.UP,Fl=Je.DOWN,Hl=Je.ENTER,k1=Je.ESC,La=Je.HOME,Va=Je.END,Cb=[ch,Fl,sh,lh];function Kz(t,e,n,r){var o,i="prev",a="next",s="children",l="parent";if(t==="inline"&&r===Hl)return{inlineTrigger:!0};var c=W(W({},ch,i),Fl,a),u=W(W(W(W({},sh,n?a:i),lh,n?i:a),Fl,s),Hl,s),d=W(W(W(W(W(W({},ch,i),Fl,a),Hl,s),k1,l),sh,n?s:l),lh,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 Uz(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function Gz(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function zp(t,e){var n=qz(t,!0);return n.filter(function(r){return e.has(r)})}function Sb(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var o=zp(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 uh=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(R1(n,a),"']"));s&&(r.add(s),i.set(s,a),o.set(a,s))}),{elements:r,key2element:o,element2key:i}};function Xz(t,e,n,r,o,i,a,s,l,c){var u=h.useRef(),d=h.useRef();d.current=e;var f=function(){kt.cancel(u.current)};return h.useEffect(function(){return function(){f()}},[]),function(p){var m=p.which;if([].concat(Cb,[Hl,k1,La,Va]).includes(m)){var v=i(),g=uh(v,r),y=g,b=y.elements,C=y.key2element,x=y.element2key,S=C.get(e),w=Gz(S,b),E=x.get(w),M=Kz(t,a(E,!0).length===1,n,m);if(!M&&m!==La&&m!==Va)return;(Cb.includes(m)||[La,Va].includes(m))&&p.preventDefault();var $=function(P){if(P){var B=P,F=P.querySelector("a");F!=null&&F.getAttribute("href")&&(B=F);var H=x.get(P);s(H),f(),u.current=kt(function(){d.current===H&&B.focus()})}};if([La,Va].includes(m)||M.sibling||!w){var R;!w||t==="inline"?R=o.current:R=Uz(w);var I,D=zp(R,b);m===La?I=D[0]:m===Va?I=D[D.length-1]:I=Sb(R,b,w,M.offset),$(I)}else if(M.inlineTrigger)l(E);else if(M.offset>0)l(E,!0),f(),u.current=kt(function(){g=uh(v,r);var k=w.getAttribute("aria-controls"),P=document.getElementById(k),B=Sb(P,g.elements);$(B)},5);else if(M.offset<0){var _=a(E,!0),A=_[_.length-2],z=C.get(A);l(A,!1),$(z)}}c==null||c(p)}}function Yz(t){Promise.resolve().then(t)}var Lp="__RC_UTIL_PATH_SPLIT__",xb=function(e){return e.join(Lp)},Jz=function(e){return e.split(Lp)},dh="rc-menu-more";function Qz(){var t=h.useState({}),e=le(t,2),n=e[1],r=N.useRef(new Map),o=N.useRef(new Map),i=h.useState([]),a=le(i,2),s=a[0],l=a[1],c=N.useRef(0),u=N.useRef(!1),d=function(){u.current||n({})},f=N.useCallback(function(C,x){process.env.NODE_ENV!=="production"&&yt(!r.current.has(C),"Duplicated key '".concat(C,"' used in Menu by path [").concat(x.join(" > "),"]"));var S=xb(x);o.current.set(S,C),r.current.set(C,S),c.current+=1;var w=c.current;Yz(function(){w===c.current&&d()})},[]),p=N.useCallback(function(C,x){var S=xb(x);o.current.delete(S),r.current.delete(C)},[]),m=N.useCallback(function(C){l(C)},[]),v=N.useCallback(function(C,x){var S=r.current.get(C)||"",w=Jz(S);return x&&s.includes(w[0])&&w.unshift(dh),w},[s]),g=N.useCallback(function(C,x){return C.filter(function(S){return S!==void 0}).some(function(S){var w=v(S,!0);return w.includes(x)})},[v]),y=function(){var x=Pe(r.current.keys());return s.length&&x.push(dh),x},b=N.useCallback(function(C){var x="".concat(r.current.get(C)).concat(Lp),S=new Set;return Pe(o.current.keys()).forEach(function(w){w.startsWith(x)&&S.add(o.current.get(w))}),S},[]);return h.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:p,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:v,getKeys:y,getSubPathKeys:b}}function Ga(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 Zz=Math.random().toFixed(5).toString().slice(2),wb=0;function eL(t){var e=mn(t,{value:t}),n=le(e,2),r=n[0],o=n[1];return h.useEffect(function(){wb+=1;var i=process.env.NODE_ENV==="test"?"test":"".concat(Zz,"-").concat(wb);o("rc-menu-uuid-".concat(i))},[]),r}function D1(t,e,n,r){var o=h.useContext(Lr),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 _1(t){var e=h.useContext(Lr),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 B1(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,q({},n)):typeof e!="boolean"&&(o=e),o||r||null)}var tL=["item"];function xc(t){var e=t.item,n=xt(t,tL);return Object.defineProperty(n,"item",{get:function(){return yt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e}}),n}var nL=["title","attribute","elementRef"],rL=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],oL=["active"],iL=function(t){bo(n,t);var e=yo(n);function n(){return xn(this,n),e.apply(this,arguments)}return wn(n,[{key:"render",value:function(){var o=this.props,i=o.title,a=o.attribute,s=o.elementRef,l=xt(o,nL),c=Tn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return yt(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),h.createElement(Xr.Item,Le({},a,{title:typeof i=="string"?i:void 0},c,{ref:s}))}}]),n}(h.Component),aL=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,v=xt(t,rL),g=I1(o),y=h.useContext(Lr),b=y.prefixCls,C=y.onItemClick,x=y.disabled,S=y.overflowDisabled,w=y.itemIcon,E=y.selectedKeys,M=y.onActive,$=h.useContext(jp),R=$._internalRenderMenuItem,I="".concat(b,"-item"),D=h.useRef(),_=h.useRef(),A=x||a,z=Qo(e,_),k=$a(o);process.env.NODE_ENV!=="production"&&i&&yt(!1,"MenuItem should not leave undefined `key`.");var P=function(be){return{key:o,keyPath:Pe(k).reverse(),item:D.current,domEvent:be}},B=s||w,F=D1(o,A,u,d),H=F.active,L=xt(F,oL),G=E.includes(o),J=_1(k.length),V=function(be){if(!A){var de=P(be);f==null||f(xc(de)),C(de)}},X=function(be){if(p==null||p(be),be.which===Je.ENTER){var de=P(be);f==null||f(xc(de)),C(de)}},Q=function(be){M(o),m==null||m(be)},ue={};t.role==="option"&&(ue["aria-selected"]=G);var Y=h.createElement(iL,Le({ref:D,elementRef:z,role:c===null?"none":c||"menuitem",tabIndex:a?null:-1,"data-menu-id":S&&g?null:g},Tn(v,["extra"]),L,ue,{component:"li","aria-disabled":a,style:q(q({},J),n),className:re(I,W(W(W({},"".concat(I,"-active"),H),"".concat(I,"-selected"),G),"".concat(I,"-disabled"),A),r),onClick:V,onKeyDown:X,onFocus:Q}),l,h.createElement(B1,{props:q(q({},t),{},{isSelected:G}),icon:B}));return R&&(Y=R(Y,t,{selected:G})),Y});function sL(t,e){var n=t.eventKey,r=hu(),o=$a(n);return h.useEffect(function(){if(r)return r.registerPath(n,o),function(){r.unregisterPath(n,o)}},[o]),r?null:h.createElement(aL,Le({},t,{ref:e}))}const pu=h.forwardRef(sL);var lL=["className","children"],cL=function(e,n){var r=e.className,o=e.children,i=xt(e,lL),a=h.useContext(Lr),s=a.prefixCls,l=a.mode,c=a.rtl;return h.createElement("ul",Le({className:re(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)},Vp=h.forwardRef(cL);Vp.displayName="SubMenuList";function Fp(t,e){return gr(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(Pe(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 Kn={adjustX:1,adjustY:1},uL={topLeft:{points:["bl","tl"],overflow:Kn},topRight:{points:["br","tr"],overflow:Kn},bottomLeft:{points:["tl","bl"],overflow:Kn},bottomRight:{points:["tr","br"],overflow:Kn},leftTop:{points:["tr","tl"],overflow:Kn},leftBottom:{points:["br","bl"],overflow:Kn},rightTop:{points:["tl","tr"],overflow:Kn},rightBottom:{points:["bl","br"],overflow:Kn}},dL={topLeft:{points:["bl","tl"],overflow:Kn},topRight:{points:["br","tr"],overflow:Kn},bottomLeft:{points:["tl","bl"],overflow:Kn},bottomRight:{points:["tr","br"],overflow:Kn},rightTop:{points:["tr","tl"],overflow:Kn},rightBottom:{points:["br","bl"],overflow:Kn},leftTop:{points:["tl","tr"],overflow:Kn},leftBottom:{points:["bl","br"],overflow:Kn}};function j1(t,e,n){if(e)return e;if(n)return n[t]||n.other}var fL={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function hL(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(Lr),f=d.getPopupContainer,p=d.rtl,m=d.subMenuOpenDelay,v=d.subMenuCloseDelay,g=d.builtinPlacements,y=d.triggerSubMenuAction,b=d.forceSubMenuRender,C=d.rootClassName,x=d.motion,S=d.defaultMotions,w=h.useState(!1),E=le(w,2),M=E[0],$=E[1],R=q(p?q({},dL):q({},uL),g),I=fL[c],D=j1(c,x,S),_=h.useRef(D);c!=="inline"&&(_.current=D);var A=q(q({},_.current),{},{leavedClassName:"".concat(e,"-hidden"),removeOnLeave:!1,motionAppear:!0}),z=h.useRef();return h.useEffect(function(){return z.current=kt(function(){$(n)}),function(){kt.cancel(z.current)}},[n]),h.createElement(uu,{prefixCls:e,popupClassName:re("".concat(e,"-popup"),W({},"".concat(e,"-rtl"),p),a,C),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:R,popupPlacement:I,popupVisible:M,popup:o,popupStyle:i,popupAlign:s&&{offset:s},action:l?[]:[y],mouseEnterDelay:m,mouseLeaveDelay:v,onPopupVisibleChange:u,forceRender:b,popupMotion:A,fresh:!0},r)}function pL(t){var e=t.id,n=t.open,r=t.keyPath,o=t.children,i="inline",a=h.useContext(Lr),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=le(p,2),v=m[0],g=m[1],y=f.current?n:!1;h.useEffect(function(){f.current&&g(!1)},[d]);var b=q({},j1(i,c,u));r.length>1&&(b.motionAppear=!1);var C=b.onVisibleChanged;return b.onVisibleChanged=function(x){return!f.current&&!x&&g(!0),C==null?void 0:C(x)},v?null:h.createElement(Es,{mode:i,locked:!f.current},h.createElement(no,Le({visible:y},b,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(x){var S=x.className,w=x.style;return h.createElement(Vp,{id:e,className:S,style:w},o)}))}var mL=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],gL=["active"],vL=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,v=t.onClick,g=t.onMouseEnter,y=t.onMouseLeave,b=t.onTitleClick,C=t.onTitleMouseEnter,x=t.onTitleMouseLeave,S=xt(t,mL),w=I1(i),E=h.useContext(Lr),M=E.prefixCls,$=E.mode,R=E.openKeys,I=E.disabled,D=E.overflowDisabled,_=E.activeKey,A=E.selectedKeys,z=E.itemIcon,k=E.expandIcon,P=E.onItemClick,B=E.onOpenChange,F=E.onActive,H=h.useContext(jp),L=H._internalRenderSubMenuItem,G=h.useContext(A1),J=G.isSubPathKey,V=$a(),X="".concat(M,"-submenu"),Q=I||s,ue=h.useRef(),Y=h.useRef();process.env.NODE_ENV!=="production"&&a&&yt(!1,"SubMenu should not leave undefined `key`.");var fe=u??z,be=d??k,de=R.includes(i),oe=!D&&de,ge=J(A,i),ne=D1(i,Q,C,x),ce=ne.active,me=xt(ne,gL),Oe=h.useState(!1),Me=le(Oe,2),Ne=Me[0],je=Me[1],O=function(Ze){Q||je(Ze)},ee=function(Ze){O(!0),g==null||g({key:i,domEvent:Ze})},K=function(Ze){O(!1),y==null||y({key:i,domEvent:Ze})},ie=h.useMemo(function(){return ce||($!=="inline"?Ne||J([_],i):!1)},[$,ce,_,Ne,i,J]),Ee=_1(V.length),Se=function(Ze){Q||(b==null||b({key:i,domEvent:Ze}),$==="inline"&&B(i,!de))},he=Ga(function(He){v==null||v(xc(He)),P(He)}),Ae=function(Ze){$!=="inline"&&B(i,Ze)},_e=function(){F(i)},$e=w&&"".concat(w,"-popup"),ze=h.useMemo(function(){return h.createElement(B1,{icon:$!=="horizontal"?be:void 0,props:q(q({},t),{},{isOpen:oe,isSubMenu:!0})},h.createElement("i",{className:"".concat(X,"-arrow")}))},[$,be,t,oe,X]),Fe=h.createElement("div",Le({role:"menuitem",style:Ee,className:"".concat(X,"-title"),tabIndex:Q?null:-1,ref:ue,title:typeof o=="string"?o:null,"data-menu-id":D&&w?null:w,"aria-expanded":oe,"aria-haspopup":!0,"aria-controls":$e,"aria-disabled":Q,onClick:Se,onFocus:_e},me),o,ze),Ie=h.useRef($);if($!=="inline"&&V.length>1?Ie.current="vertical":Ie.current=$,!D){var Be=Ie.current;Fe=h.createElement(hL,{mode:Be,prefixCls:X,visible:!l&&oe&&$!=="inline",popupClassName:f,popupOffset:p,popupStyle:m,popup:h.createElement(Es,{mode:Be==="horizontal"?"vertical":Be},h.createElement(Vp,{id:$e,ref:Y},c)),disabled:Q,onVisibleChange:Ae},Fe)}var Te=h.createElement(Xr.Item,Le({ref:e,role:"none"},S,{component:"li",style:n,className:re(X,"".concat(X,"-").concat($),r,W(W(W(W({},"".concat(X,"-open"),oe),"".concat(X,"-active"),ie),"".concat(X,"-selected"),ge),"".concat(X,"-disabled"),Q)),onMouseEnter:ee,onMouseLeave:K}),Fe,!D&&h.createElement(pL,{id:$e,open:oe,keyPath:V},c));return L&&(Te=L(Te,t,{selected:ge,active:ie,open:oe,disabled:Q})),h.createElement(Es,{onItemClick:he,mode:$==="horizontal"?"vertical":$,itemIcon:fe,expandIcon:be},Te)}),Hs=h.forwardRef(function(t,e){var n=t.eventKey,r=t.children,o=$a(n),i=Fp(r,o),a=hu();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(vL,Le({ref:e},t),i),h.createElement(P1.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Hs.displayName="SubMenu");function Hp(t){var e=t.className,n=t.style,r=h.useContext(Lr),o=r.prefixCls,i=hu();return i?null:h.createElement("li",{role:"separator",className:re("".concat(o,"-item-divider"),e),style:n})}var bL=["className","title","eventKey","children"],yL=h.forwardRef(function(t,e){var n=t.className,r=t.title;t.eventKey;var o=t.children,i=xt(t,bL),a=h.useContext(Lr),s=a.prefixCls,l="".concat(s,"-item-group");return h.createElement("li",Le({ref:e,role:"presentation"},i,{onClick:function(u){return u.stopPropagation()},className:re(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))}),mu=h.forwardRef(function(t,e){var n=t.eventKey,r=t.children,o=$a(n),i=Fp(r,o),a=hu();return a?i:h.createElement(yL,Le({ref:e},Tn(t,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(mu.displayName="MenuItemGroup");var CL=["label","children","key","type","extra"];function fh(t,e,n){var r=e.item,o=e.group,i=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&st(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,p=c.type,m=c.extra,v=xt(c,CL),g=f??"tmp-".concat(l);return d||p==="group"?p==="group"?h.createElement(o,Le({key:g},v,{title:u}),fh(d,e,n)):h.createElement(i,Le({key:g},v,{title:u}),fh(d,e,n)):p==="divider"?h.createElement(a,Le({key:g},v)):h.createElement(r,Le({key:g},v,{extra:m}),u,(!!m||m===0)&&h.createElement("span",{className:"".concat(n,"-item-extra")},m))}return null}).filter(function(s){return s})}function Eb(t,e,n,r,o){var i=t,a=q({divider:Hp,item:pu,group:mu,submenu:Hs},r);return e&&(i=fh(e,a,o)),Fp(i,n)}var SL=["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"],ni=[],xL=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,v=r.mode,g=v===void 0?"vertical":v,y=r.inlineCollapsed,b=r.disabled,C=r.disabledOverflow,x=r.subMenuOpenDelay,S=x===void 0?.1:x,w=r.subMenuCloseDelay,E=w===void 0?.1:w,M=r.forceSubMenuRender,$=r.defaultOpenKeys,R=r.openKeys,I=r.activeKey,D=r.defaultActiveFirst,_=r.selectable,A=_===void 0?!0:_,z=r.multiple,k=z===void 0?!1:z,P=r.defaultSelectedKeys,B=r.selectedKeys,F=r.onSelect,H=r.onDeselect,L=r.inlineIndent,G=L===void 0?24:L,J=r.motion,V=r.defaultMotions,X=r.triggerSubMenuAction,Q=X===void 0?"hover":X,ue=r.builtinPlacements,Y=r.itemIcon,fe=r.expandIcon,be=r.overflowedIndicator,de=be===void 0?"...":be,oe=r.overflowedIndicatorPopupClassName,ge=r.getPopupContainer,ne=r.onClick,ce=r.onOpenChange,me=r.onKeyDown,Oe=r.openAnimation,Me=r.openTransitionName,Ne=r._internalRenderMenuItem,je=r._internalRenderSubMenuItem,O=r._internalComponents,ee=xt(r,SL),K=h.useMemo(function(){return[Eb(f,d,ni,O,i),Eb(f,d,ni,{},i)]},[f,d,O]),ie=le(K,2),Ee=ie[0],Se=ie[1],he=h.useState(!1),Ae=le(he,2),_e=Ae[0],$e=Ae[1],ze=h.useRef(),Fe=eL(m),Ie=p==="rtl";process.env.NODE_ENV!=="production"&&yt(!Oe&&!Me,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var Be=mn($,{value:R,postState:function(Ce){return Ce||ni}}),Te=le(Be,2),He=Te[0],Ze=Te[1],ht=function(Ce){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ke(){Ze(Ce),ce==null||ce(Ce)}we?_r.flushSync(ke):ke()},Tt=h.useState(He),Pt=le(Tt,2),an=Pt[0],Ye=Pt[1],We=h.useRef(!1),lt=h.useMemo(function(){return(g==="inline"||g==="vertical")&&y?["vertical",y]:[g,!1]},[g,y]),it=le(lt,2),pt=it[0],Qe=it[1],Ke=pt==="inline",Ue=h.useState(pt),wt=le(Ue,2),$t=wt[0],et=wt[1],qe=h.useState(Qe),ot=le(qe,2),at=ot[0],nt=ot[1];h.useEffect(function(){et(pt),nt(Qe),We.current&&(Ke?Ze(an):ht(ni))},[pt,Qe]);var dt=h.useState(0),Dt=le(dt,2),Nt=Dt[0],Gt=Dt[1],Rt=Nt>=Ee.length-1||$t!=="horizontal"||C;h.useEffect(function(){Ke&&Ye(He)},[He]),h.useEffect(function(){return We.current=!0,function(){We.current=!1}},[]);var Bt=Qz(),Ft=Bt.registerPath,Xt=Bt.unregisterPath,Mn=Bt.refreshOverflowKeys,Yt=Bt.isSubPathKey,sn=Bt.getKeyPath,Ve=Bt.getKeys,rt=Bt.getSubPathKeys,Xe=h.useMemo(function(){return{registerPath:Ft,unregisterPath:Xt}},[Ft,Xt]),De=h.useMemo(function(){return{isSubPathKey:Yt}},[Yt]);h.useEffect(function(){Mn(Rt?ni:Ee.slice(Nt+1).map(function(pe){return pe.key}))},[Nt,Rt]);var ft=mn(I||D&&((n=Ee[0])===null||n===void 0?void 0:n.key),{value:I}),Et=le(ft,2),Ot=Et[0],ln=Et[1],en=Ga(function(pe){ln(pe)}),dn=Ga(function(){ln(void 0)});N.useImperativeHandle(e,function(){return{list:ze.current,focus:function(Ce){var we,ke=Ve(),tt=uh(ke,Fe),bt=tt.elements,Ct=tt.key2element,jt=tt.element2key,zt=zp(ze.current,bt),nn=Ot??(zt[0]?jt.get(zt[0]):(we=Ee.find(function(ti){return!ti.props.disabled}))===null||we===void 0?void 0:we.key),gn=Ct.get(nn);if(nn&&gn){var pn;gn==null||(pn=gn.focus)===null||pn===void 0||pn.call(gn,Ce)}}}});var cn=mn(P||[],{value:B,postState:function(Ce){return Array.isArray(Ce)?Ce:Ce==null?ni:[Ce]}}),tn=le(cn,2),En=tn[0],Rn=tn[1],T=function(Ce){if(A){var we=Ce.key,ke=En.includes(we),tt;k?ke?tt=En.filter(function(Ct){return Ct!==we}):tt=[].concat(Pe(En),[we]):tt=[we],Rn(tt);var bt=q(q({},Ce),{},{selectedKeys:tt});ke?H==null||H(bt):F==null||F(bt)}!k&&He.length&&$t!=="inline"&&ht(ni)},U=Ga(function(pe){ne==null||ne(xc(pe)),T(pe)}),j=Ga(function(pe,Ce){var we=He.filter(function(tt){return tt!==pe});if(Ce)we.push(pe);else if($t!=="inline"){var ke=rt(pe);we=we.filter(function(tt){return!ke.has(tt)})}pa(He,we,!0)||ht(we,!0)}),te=function(Ce,we){var ke=we??!He.includes(Ce);j(Ce,ke)},ae=Xz($t,Ot,Ie,Fe,ze,Ve,sn,ln,te,me);h.useEffect(function(){$e(!0)},[]);var Z=h.useMemo(function(){return{_internalRenderMenuItem:Ne,_internalRenderSubMenuItem:je}},[Ne,je]),xe=$t!=="horizontal"||C?Ee:Ee.map(function(pe,Ce){return h.createElement(Es,{key:pe.key,overflowDisabled:Ce>Nt},pe)}),ye=h.createElement(Xr,Le({id:m,ref:ze,prefixCls:"".concat(i,"-overflow"),component:"ul",itemComponent:pu,className:re(i,"".concat(i,"-root"),"".concat(i,"-").concat($t),l,W(W({},"".concat(i,"-inline-collapsed"),at),"".concat(i,"-rtl"),Ie),a),dir:p,style:s,role:"menu",tabIndex:u,data:xe,renderRawItem:function(Ce){return Ce},renderRawRest:function(Ce){var we=Ce.length,ke=we?Ee.slice(-we):null;return h.createElement(Hs,{eventKey:dh,title:de,disabled:Rt,internalPopupClose:we===0,popupClassName:oe},ke)},maxCount:$t!=="horizontal"||C?Xr.INVALIDATE:Xr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ce){Gt(Ce)},onKeyDown:ae},ee));return h.createElement(jp.Provider,{value:Z},h.createElement(M1.Provider,{value:Fe},h.createElement(Es,{prefixCls:i,rootClassName:a,mode:$t,openKeys:He,rtl:Ie,disabled:b,motion:_e?J:null,defaultMotions:_e?V:null,activeKey:Ot,onActive:en,onInactive:dn,selectedKeys:En,inlineIndent:G,subMenuOpenDelay:S,subMenuCloseDelay:E,forceSubMenuRender:M,builtinPlacements:ue,triggerSubMenuAction:Q,getPopupContainer:ge,itemIcon:Y,expandIcon:fe,onItemClick:U,onOpenChange:j},h.createElement(A1.Provider,{value:De},ye),h.createElement("div",{style:{display:"none"},"aria-hidden":!0},h.createElement(T1.Provider,{value:Xe},Se)))))}),Ws=xL;Ws.Item=pu;Ws.SubMenu=Hs;Ws.ItemGroup=mu;Ws.Divider=Hp;var wL={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"},EL=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:wL}))},z1=h.forwardRef(EL);process.env.NODE_ENV!=="production"&&(z1.displayName="BarsOutlined");const NL=h.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),OL=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:se(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}}},L1=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}},V1=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];hn("Layout",t=>[OL(t)],L1,{deprecatedTokens:V1});const $L=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:v,bodyBg:g}=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:se(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 ${se(f)} ${se(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:`${se(f)} 0 0 ${se(f)}`}},"&-light":{background:p,[`${e}-trigger`]:{color:m,background:v},[`${e}-zero-width-trigger`]:{color:m,background:v,border:`1px solid ${g}`,borderInlineStart:0}}}}},ML=hn(["Layout","Sider"],t=>[$L(t)],L1,{deprecatedTokens:V1});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 Nb={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},IL=t=>!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Wp=h.createContext({}),TL=(()=>{let t=0;return function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t+=1,`${e}${t}`}})(),PL=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:v,onBreakpoint:g}=t,y=RL(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:b}=N.useContext(NL),[C,x]=N.useState("collapsed"in t?t.collapsed:a),[S,w]=N.useState(!1);N.useEffect(()=>{"collapsed"in t&&x(t.collapsed)},[t.collapsed]);const E=(Y,fe)=>{"collapsed"in t||x(Y),v==null||v(Y,fe)},{getPrefixCls:M,direction:$}=N.useContext(At),R=M("layout-sider",n),[I,D,_]=ML(R),A=N.useRef(null);A.current=Y=>{w(Y.matches),g==null||g(Y.matches),C!==Y.matches&&E(Y.matches,"responsive")},N.useEffect(()=>{function Y(be){return A.current(be)}let fe;if(typeof window<"u"){const{matchMedia:be}=window;if(be&&m&&m in Nb){fe=be(`screen and (max-width: ${Nb[m]})`);try{fe.addEventListener("change",Y)}catch{fe.addListener(Y)}Y(fe)}}return()=>{try{fe==null||fe.removeEventListener("change",Y)}catch{fe==null||fe.removeListener(Y)}}},[m]),N.useEffect(()=>{const Y=TL("ant-sider-");return b.addSider(Y),()=>b.removeSider(Y)},[]);const z=()=>{E(!C,"clickTrigger")},k=Tn(y,["collapsed"]),P=C?f:d,B=IL(P)?`${P}px`:String(P),F=parseFloat(String(f||0))===0?h.createElement("span",{onClick:z,className:re(`${R}-zero-width-trigger`,`${R}-zero-width-trigger-${u?"right":"left"}`),style:p},o||h.createElement(z1,null)):null,H=$==="rtl"==!u,J={expanded:H?h.createElement(xs,null):h.createElement(Sc,null),collapsed:H?h.createElement(Sc,null):h.createElement(xs,null)}[C?"collapsed":"expanded"],V=o!==null?F||h.createElement("div",{className:`${R}-trigger`,onClick:z,style:{width:B}},o||J):null,X=Object.assign(Object.assign({},l),{flex:`0 0 ${B}`,maxWidth:B,minWidth:B,width:B}),Q=re(R,`${R}-${s}`,{[`${R}-collapsed`]:!!C,[`${R}-has-trigger`]:c&&o!==null&&!F,[`${R}-below`]:!!S,[`${R}-zero-width`]:parseFloat(B)===0},r,D,_),ue=h.useMemo(()=>({siderCollapsed:C}),[C]);return I(h.createElement(Wp.Provider,{value:ue},h.createElement("aside",Object.assign({className:Q},k,{style:X,ref:e}),h.createElement("div",{className:`${R}-children`},i),c||S&&F?V:null)))});process.env.NODE_ENV!=="production"&&(PL.displayName="Sider");var AL={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"},kL=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:AL}))},qp=h.forwardRef(kL);process.env.NODE_ENV!=="production"&&(qp.displayName="EllipsisOutlined");const wc=N.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var DL=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 F1=t=>{const{prefixCls:e,className:n,dashed:r}=t,o=DL(t,["prefixCls","className","dashed"]),{getPrefixCls:i}=h.useContext(At),a=i("menu",e),s=re({[`${a}-item-divider-dashed`]:!!r},n);return h.createElement(Hp,Object.assign({className:s},o))},H1=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(wc),p=C=>{const x=r==null?void 0:r[0],S=h.createElement("span",{className:re(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!o||h.isValidElement(r)&&r.type==="span")&&r&&C&&c&&typeof x=="string"?h.createElement("div",{className:`${l}-inline-collapsed-noicon`},x.charAt(0)):S},{siderCollapsed:m}=h.useContext(Wp);let v=i;typeof i>"u"?v=c?r:"":i===!1&&(v="");const g={title:v};!m&&!f&&(g.title=null,g.open=!1);const y=gr(r).length;let b=h.createElement(pu,Object.assign({},Tn(t,["title","icon","danger"]),{className:re({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(o?y+1:y)===1},n),title:typeof i=="string"?i:void 0}),Or(o,{className:re(h.isValidElement(o)?(e=o.props)===null||e===void 0?void 0:e.className:"",`${l}-item-icon`)}),p(f));return d||(b=h.createElement(Uo,Object.assign({},g,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),b)),b};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};const Ec=h.createContext(null),BL=h.forwardRef((t,e)=>{const{children:n}=t,r=_L(t,["children"]),o=h.useContext(Ec),i=h.useMemo(()=>Object.assign(Object.assign({},o),r),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=XR(n),s=Qo(e,a?Ti(n):null);return h.createElement(Ec.Provider,{value:i},h.createElement(Ko,{space:!0},a?h.cloneElement(n,{ref:s}):n))}),jL=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:`${se(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,
|
|
397
|
-
> ${e}-item-active,
|
|
398
|
-
> ${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"}}}},zL=t=>{let{componentCls:e,menuArrowOffset:n,calc:r}=t;return{[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
399
|
-
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${se(r(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${se(n)})`}}}}},Ob=t=>Object.assign({},lp(t)),$b=(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:v,itemPaddingInline:g,motionDurationMid:y,itemHoverColor:b,lineType:C,colorSplit:x,itemDisabledColor:S,dangerItemColor:w,dangerItemHoverColor:E,dangerItemSelectedColor:M,dangerItemActiveBg:$,dangerItemSelectedBg:R,popupBg:I,itemHoverBg:D,itemActiveBg:_,menuSubMenuBg:A,horizontalItemSelectedColor:z,horizontalItemSelectedBg:k,horizontalItemBorderRadius:P,horizontalItemHoverBg:B}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},Ob(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({},Ob(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${S} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:b}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:D},"&:active":{backgroundColor:_}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:D},"&:active":{backgroundColor:_}}},[`${n}-item-danger`]:{color:w,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:$}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:M},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:R}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:I},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:I},[`&${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:P,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${se(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:'""'},"&:hover, &-active, &-open":{background:B,"&::after":{borderBottomWidth:u,borderBottomColor:z}},"&-selected":{color:z,backgroundColor:k,"&:hover":{backgroundColor:k},"&::after":{borderBottomWidth:u,borderBottomColor:z}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${se(f)} ${C} ${x}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${se(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${v}`,`opacity ${y} ${v}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:M}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${m}`,`opacity ${y} ${m}`].join(",")}}}}}},Mb=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:se(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${e}-item,
|
|
400
|
-
> ${e}-submenu > ${e}-submenu-title`]:{height:n,lineHeight:se(n)},[`${e}-item-group-list ${e}-submenu-title,
|
|
401
|
-
${e}-submenu-title`]:{paddingInlineEnd:u}}},LL=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:v,collapsedIconSize:g}=t,y={height:r,lineHeight:se(r),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},Mb(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},Mb(t)),{boxShadow:m})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${se(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`]:y,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:y}},{[`${e}-inline-collapsed`]:{width:v,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item,
|
|
402
|
-
> ${e}-item-group > ${e}-item-group-list > ${e}-item,
|
|
403
|
-
> ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
|
|
404
|
-
> ${e}-submenu > ${e}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${se(t.calc(g).div(2).equal())} - ${se(c)})`,textOverflow:"clip",[`
|
|
405
|
-
${e}-submenu-arrow,
|
|
406
|
-
${e}-submenu-expand-icon
|
|
407
|
-
`]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:se(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({},Ss),{paddingInline:p})}}]},Rb=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({},Ai()),[`&${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"}}}},Ib=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(${se(t.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${se(a)})`}}}}},VL=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:v,lineType:g,groupTitleLineHeight:y,groupTitleFontSize:b}=t;return[{"":{[n]:Object.assign(Object.assign({},fc()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fn(t)),fc()),{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:`${se(s)} ${se(l)}`,fontSize:b,lineHeight:y,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:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Rb(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${se(t.calc(r).mul(2).equal())} ${se(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},Rb(t)),Ib(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}}}),Ib(t)),{[`&-inline-collapsed ${n}-submenu-arrow,
|
|
408
|
-
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${se(v)})`},"&::after":{transform:`rotate(45deg) translateX(${se(t.calc(v).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${se(t.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${se(t.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${se(v)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},FL=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:v,colorBgTextHover:g,controlHeightLG:y,lineHeight:b,colorBgElevated:C,marginXXS:x,padding:S,fontSize:w,controlHeightSM:E,fontSizeLG:M,colorTextLightSolid:$,colorErrorHover:R}=t,I=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,D=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:p,_=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,A=new Ht($).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:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:v,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:v,itemSelectedBg:v,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:I,colorActiveBarHeight:m,activeBarHeight:m,colorActiveBarBorderSize:p,activeBarBorderWidth:D,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:_,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:y,groupTitleLineHeight:b,collapsedWidth:y*2,popupBg:C,itemMarginBlock:x,itemPaddingInline:S,horizontalLineHeight:`${y*1.15}px`,iconSize:w,iconMarginInlineEnd:E-w,collapsedIconSize:M,groupTitleFontSize:w,darkItemDisabledColor:new Ht($).setA(.25).toRgbString(),darkItemColor:A,darkDangerItemColor:i,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:$,darkItemSelectedBg:o,darkDangerItemSelectedBg:i,darkItemHoverBg:"transparent",darkGroupTitleColor:A,darkItemHoverColor:$,darkDangerItemHoverColor:R,darkDangerItemSelectedColor:$,darkDangerItemActiveBg:i,itemWidth:I?`calc(100% + ${D}px)`:`calc(100% - ${_*2}px)`}},HL=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return hn("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:m,darkItemHoverBg:v,darkGroupTitleColor:g,darkItemHoverColor:y,darkItemDisabledColor:b,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:S,popupBg:w,darkPopupBg:E}=o,M=o.calc(s).div(7).mul(5).equal(),$=Lt(o,{menuArrowSize:M,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(M).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:w}),R=Lt($,{itemColor:l,itemHoverColor:y,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:E,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:b,dangerItemColor:c,dangerItemHoverColor:C,dangerItemSelectedColor:x,dangerItemActiveBg:S,dangerItemSelectedBg:m,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[VL($),jL($),LL($),$b($,"light"),$b(R,"dark"),zL($),dx($),Sa($,"slide-up"),Sa($,"slide-down"),Ds($,"zoom-big")]},FL,{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)},W1=t=>{var e;const{popupClassName:n,icon:r,title:o,theme:i}=t,a=h.useContext(wc),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=$a();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,Or(r,{className:re(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]=As("Menu");return h.createElement(wc.Provider,{value:f},h.createElement(Hs,Object.assign({},Tn(t,["icon"]),{title:d,popupClassName:re(s,n,`${s}-${i||c}`),popupStyle:Object.assign({zIndex:p},t.popupStyle)})))};var WL=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 Od(t){return t===null||t===!1}const qL={item:H1,submenu:W1,divider:F1},KL=N.forwardRef((t,e)=>{var n;const r=h.useContext(Ec),o=r||{},{getPrefixCls:i,getPopupContainer:a,direction:s,menu:l}=h.useContext(At),c=i(),{prefixCls:u,className:d,style:f,theme:p="light",expandIcon:m,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:g,siderCollapsed:y,rootClassName:b,mode:C,selectable:x,onClick:S,overflowedIndicatorPopupClassName:w}=t,E=WL(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),M=Tn(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const G=on("Menu");process.env.NODE_ENV!=="production"&&G(!("inlineCollapsed"in t&&C!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),G.deprecated("items"in t&&!t.children,"children","items")}(n=o.validator)===null||n===void 0||n.call(o,{mode:C});const $=Wt(function(){var G;S==null||S.apply(void 0,arguments),(G=o.onClick)===null||G===void 0||G.call(o)}),R=o.mode||C,I=x??o.selectable,D=g??y,_={horizontal:{motionName:`${c}-slide-up`},inline:XS(c),other:{motionName:`${c}-zoom-big`}},A=i("menu",u||o.prefixCls),z=xo(A),[k,P,B]=HL(A,z,!r),F=re(`${A}-${p}`,l==null?void 0:l.className,d),H=h.useMemo(()=>{var G,J;if(typeof m=="function"||Od(m))return m||null;if(typeof o.expandIcon=="function"||Od(o.expandIcon))return o.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||Od(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const V=(G=m??(o==null?void 0:o.expandIcon))!==null&&G!==void 0?G:l==null?void 0:l.expandIcon;return Or(V,{className:re(`${A}-submenu-expand-icon`,h.isValidElement(V)?(J=V.props)===null||J===void 0?void 0:J.className:void 0)})},[m,o==null?void 0:o.expandIcon,l==null?void 0:l.expandIcon,A]),L=h.useMemo(()=>({prefixCls:A,inlineCollapsed:D||!1,direction:s,firstLevel:!0,theme:p,mode:R,disableMenuItemTitleTooltip:v}),[A,D,s,v,p]);return k(h.createElement(Ec.Provider,{value:null},h.createElement(wc.Provider,{value:L},h.createElement(Ws,Object.assign({getPopupContainer:a,overflowedIndicator:h.createElement(qp,null),overflowedIndicatorPopupClassName:re(A,`${A}-${p}`,w),mode:R,selectable:I,onClick:$},M,{inlineCollapsed:D,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:F,prefixCls:A,direction:s,defaultMotions:_,expandIcon:H,ref:e,rootClassName:re(b,P,o.rootClassName,B,z),_internalComponents:qL})))))}),Go=N.forwardRef((t,e)=>{const n=N.useRef(null),r=h.useContext(Wp);return N.useImperativeHandle(e,()=>({menu:n.current,focus:o=>{var i;(i=n.current)===null||i===void 0||i.focus(o)}})),h.createElement(KL,Object.assign({ref:n},t,r))});Go.Item=H1;Go.SubMenu=W1;Go.Divider=F1;Go.ItemGroup=mu;process.env.NODE_ENV!=="production"&&(Go.displayName="Menu");const UL=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}}}}}},GL=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:v}=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,
|
|
409
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomLeft,
|
|
410
|
-
&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottom,
|
|
411
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottom,
|
|
412
|
-
&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomRight,
|
|
413
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:pp},[`&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topLeft,
|
|
414
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topLeft,
|
|
415
|
-
&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-top,
|
|
416
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-top,
|
|
417
|
-
&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topRight,
|
|
418
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topRight`]:{animationName:gp},[`&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomLeft,
|
|
419
|
-
&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottom,
|
|
420
|
-
&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:mp},[`&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topLeft,
|
|
421
|
-
&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-top,
|
|
422
|
-
&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:vp}}},_p(t,v,{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({},Fn(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:v,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},Ca(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${se(c)} ${se(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:`${se(c)} ${se(m)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},Ca(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:v,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${se(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.colorTextDescription,fontSize:p,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${se(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:v,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[Sa(t,"slide-up"),Sa(t,"slide-down"),gc(t,"move-up"),gc(t,"move-down"),Ds(t,"zoom-big")]]},XL=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},fu({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),Dp(t)),YL=hn("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:r,componentCls:o}=t,i=Lt(t,{menuCls:`${o}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:r});return[GL(i),UL(i)]},XL,{resetStyle:!1}),qs=t=>{var e;const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,getPopupContainer:c,overlayClassName:u,rootClassName:d,overlayStyle:f,open:p,onOpenChange:m,visible:v,onVisibleChange:g,mouseEnterDelay:y=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:C=!0,placement:x="",overlay:S,transitionName:w}=t,{getPopupContainer:E,getPrefixCls:M,direction:$,dropdown:R}=h.useContext(At),I=on("Dropdown");process.env.NODE_ENV!=="production"&&([["visible","open"],["onVisibleChange","onOpenChange"]].forEach(ne=>{let[ce,me]=ne;I.deprecated(!(ce in t),ce,me)}),I.deprecated(!("overlay"in t),"overlay","menu"));const D=h.useMemo(()=>{const ne=M();return w!==void 0?w:x.includes("top")?`${ne}-slide-down`:`${ne}-slide-up`},[M,x,w]),_=h.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:$==="rtl"?"bottomRight":"bottomLeft",[x,$]);if(process.env.NODE_ENV!=="production"){if(x.includes("Center")){const ne=x.slice(0,x.indexOf("Center"));process.env.NODE_ENV!=="production"&&I(!x.includes("Center"),"deprecated",`You are using '${x}' placement in Dropdown, which is deprecated. Try to use '${ne}' instead.`)}[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(ne=>{let[ce,me]=ne;I.deprecated(!(ce in t),ce,me)})}const A=M("dropdown",o),z=xo(A),[k,P,B]=YL(A,z),[,F]=ar(),H=h.Children.only(Vz(i)?h.createElement("span",null,i):i),L=Or(H,{className:re(`${A}-trigger`,{[`${A}-rtl`]:$==="rtl"},H.props.className),disabled:(e=H.props.disabled)!==null&&e!==void 0?e:s}),G=s?[]:a,J=!!(G!=null&&G.includes("contextMenu")),[V,X]=mn(!1,{value:p??v}),Q=Wt(ne=>{m==null||m(ne,{source:"trigger"}),g==null||g(ne),X(ne)}),ue=re(u,d,P,B,z,R==null?void 0:R.className,{[`${A}-rtl`]:$==="rtl"}),Y=w1({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:C,offset:F.marginXXS,arrowWidth:r?F.sizePopupArrow:0,borderRadius:F.borderRadius}),fe=h.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),X(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),be=()=>{let ne;return n!=null&&n.items?ne=h.createElement(Go,Object.assign({},n)):typeof S=="function"?ne=S():ne=S,l&&(ne=l(ne)),ne=h.Children.only(typeof ne=="string"?h.createElement("span",null,ne):ne),h.createElement(BL,{prefixCls:`${A}-menu`,rootClassName:re(B,z),expandIcon:h.createElement("span",{className:`${A}-menu-submenu-arrow`},$==="rtl"?h.createElement(Sc,{className:`${A}-menu-submenu-arrow-icon`}):h.createElement(xs,{className:`${A}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:fe,validator:ce=>{let{mode:me}=ce;process.env.NODE_ENV!=="production"&&I(!me||me==="vertical","usage",`mode="${me}" is not supported for Dropdown's Menu.`)}},ne)},[de,oe]=As("Dropdown",f==null?void 0:f.zIndex);let ge=h.createElement(Lz,Object.assign({alignPoint:J},Tn(t,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:b,visible:V,builtinPlacements:Y,arrow:!!r,overlayClassName:ue,prefixCls:A,getPopupContainer:c||E,transitionName:D,trigger:G,overlay:be,placement:_,onVisibleChange:Q,overlayStyle:Object.assign(Object.assign(Object.assign({},R==null?void 0:R.style),f),{zIndex:de})}),L);return de&&(ge=h.createElement(Ps.Provider,{value:oe},ge)),k(ge)},JL=wp(qs,"align",void 0,"dropdown",t=>t),QL=t=>h.createElement(JL,Object.assign({},t),h.createElement("span",null));qs._InternalPanelDoNotUseOrYouWillBeFired=QL;process.env.NODE_ENV!=="production"&&(qs.displayName="Dropdown");function Ks(t){return Lt(t,{inputAffixPadding:t.paddingXXS})}const Us=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:v,controlOutline:g,colorErrorOutline:y,colorWarningOutline:b,colorBgContainer:C,inputFontSize:x,inputFontSizeLG:S,inputFontSizeSM:w}=t,E=x||n,M=w||E,$=S||s,R=Math.round((e-E*r)/2*10)/10-o,I=Math.round((i-M*r)/2*10)/10-o,D=Math.ceil((a-$*l)/2*10)/10-o;return{paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(I,0),paddingBlockLG:Math.max(D,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${v}px ${g}`,errorActiveShadow:`0 0 0 ${v}px ${y}`,warningActiveShadow:`0 0 0 ${v}px ${b}`,hoverBg:C,activeBg:C,inputFontSize:E,inputFontSizeLG:$,inputFontSizeSM:M}},ZL=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({},ZL(Lt(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),q1=(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}}),Tb=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},q1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),K1=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},q1(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},Kp(t))}),Tb(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),Tb(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),Pb=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),U1=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},Pb(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),Pb(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},Kp(t))}})}),G1=(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)}},X1=(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}}},Ab=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},X1(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),Y1=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},X1(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},Kp(t))}),Ab(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),Ab(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),kb=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),J1=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary},[`${t.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${se(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${se(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}}}},kb(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),kb(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:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),Q1=(t,e)=>({background:t.colorBgContainer,borderWidth:`${se(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}}),Db=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},Q1(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`}}),Z1=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Q1(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"}}),Db(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),Db(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),ew=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),tw=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=t;return{padding:`${se(e)} ${se(o)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:r}},nw=t=>({padding:`${se(t.paddingBlockSM)} ${se(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),gu=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${se(t.paddingBlock)} ${se(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},ew(t.colorTextPlaceholder)),{"&-lg":Object.assign({},tw(t)),"&-sm":Object.assign({},nw(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),rw=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({},tw(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},nw(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 ${se(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${se(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${se(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:`${se(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${se(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"},fc()),{[`${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},[`
|
|
423
|
-
& > ${e}-affix-wrapper,
|
|
424
|
-
& > ${e}-number-affix-wrapper,
|
|
425
|
-
& > ${n}-picker-range
|
|
426
|
-
`]:{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,
|
|
427
|
-
& > ${n}-select-auto-complete ${e},
|
|
428
|
-
& > ${n}-cascader-picker ${e},
|
|
429
|
-
& > ${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,
|
|
430
|
-
& > ${n}-select:first-child > ${n}-select-selector,
|
|
431
|
-
& > ${n}-select-auto-complete:first-child ${e},
|
|
432
|
-
& > ${n}-cascader-picker:first-child ${e}`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius},[`& > *:last-child,
|
|
433
|
-
& > ${n}-select:last-child > ${n}-select-selector,
|
|
434
|
-
& > ${n}-cascader-picker:last-child ${e},
|
|
435
|
-
& > ${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}}}})}},eV=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({},Fn(t)),gu(t)),K1(t)),Y1(t)),G1(t)),Z1(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"}})}},tV=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.colorTextTertiary},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${se(t.inputAffixPadding)}`}}}},nV=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({},gu(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},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),tV(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}}}}},rV=t=>{const{componentCls:e,borderRadiusLG:n,borderRadiusSM:r}=t;return{[`${e}-group`]:Object.assign(Object.assign(Object.assign({},Fn(t)),rw(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}}},U1(t)),J1(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}}})})}},oV=t=>{const{componentCls:e,antCls:n}=t,r=`${e}-search`;return{[r]:{[e]:{"&:hover, &:focus":{[`+ ${e}-group-addon ${r}-button:not(${n}-btn-primary)`]:{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-primary)`]:{color:t.colorTextDescription,"&:hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd: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,
|
|
436
|
-
> ${e},
|
|
437
|
-
${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},iV=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},ow=hn(["Input","Shared"],t=>{const e=Lt(t,Ks(t));return[eV(e),nV(e)]},Us,{resetFont:!1}),iw=hn(["Input","Component"],t=>{const e=Lt(t,Ks(t));return[rV(e),oV(e),iV(e),_s(e)]},Us,{resetFont:!1}),aV=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:s}=t;return{[e]:Object.assign(Object.assign({},Fn(t)),{borderBlockStart:`${se(o)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${se(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${se(t.dividerHorizontalGutterMargin)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${se(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:`${se(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:`${se(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:`${se(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}}})}},sV=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),lV=hn("Divider",t=>{const e=Lt(t,{dividerHorizontalWithTextGutterMargin:t.margin,dividerHorizontalGutterMargin:t.marginLG,sizePaddingEdgeHorizontal:0});return[aV(e)]},sV,{unitless:{orientationMargin:!0}});var cV=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 aw=t=>{const{getPrefixCls:e,direction:n,className:r,style:o}=br("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:v}=t,g=cV(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),y=e("divider",i),[b,C,x]=lV(y),S=!!d,w=h.useMemo(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),E=w==="start"&&l!=null,M=w==="end"&&l!=null,$=re(y,r,C,x,`${y}-${a}`,{[`${y}-with-text`]:S,[`${y}-with-text-${w}`]:S,[`${y}-dashed`]:!!f,[`${y}-${p}`]:p!=="solid",[`${y}-plain`]:!!m,[`${y}-rtl`]:n==="rtl",[`${y}-no-default-orientation-margin-start`]:E,[`${y}-no-default-orientation-margin-end`]:M},c,u),R=h.useMemo(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),I={marginInlineStart:E?R:void 0,marginInlineEnd:M?R:void 0};if(process.env.NODE_ENV!=="production"){const D=on("Divider");process.env.NODE_ENV!=="production"&&D(!d||a!=="vertical","usage","`children` not working in `vertical` mode.")}return b(h.createElement("div",Object.assign({className:$,style:Object.assign(Object.assign({},o),v)},g,{role:"separator"}),d&&a!=="vertical"&&h.createElement("span",{className:`${y}-inner-text`,style:I},d)))};process.env.NODE_ENV!=="production"&&(aw.displayName="Divider");var _b=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}},Wr=function(e){return e!==void 0?"".concat(e,"px"):void 0};function uV(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=le(f,2),m=p[0],v=p[1],g=function(z){var k,P=o(z),B=(k=n.current)===null||k===void 0?void 0:k.querySelectorAll(".".concat(e,"-item"))[P];return(B==null?void 0:B.offsetParent)&&B},y=h.useState(null),b=le(y,2),C=b[0],x=b[1],S=h.useState(null),w=le(S,2),E=w[0],M=w[1];Jt(function(){if(m!==r){var A=g(m),z=g(r),k=_b(A,u),P=_b(z,u);v(r),x(k),M(P),A&&z?a():s()}},[r]);var $=h.useMemo(function(){if(u){var A;return Wr((A=C==null?void 0:C.top)!==null&&A!==void 0?A:0)}return Wr(l==="rtl"?-(C==null?void 0:C.right):C==null?void 0:C.left)},[u,l,C]),R=h.useMemo(function(){if(u){var A;return Wr((A=E==null?void 0:E.top)!==null&&A!==void 0?A:0)}return Wr(l==="rtl"?-(E==null?void 0:E.right):E==null?void 0:E.left)},[u,l,E]),I=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)"}},D=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)"}},_=function(){x(null),M(null),s()};return!C||!E?null:h.createElement(no,{visible:!0,motionName:i,motionAppear:!0,onAppearStart:I,onAppearActive:D,onVisibleChanged:_},function(A,z){var k=A.className,P=A.style,B=q(q({},P),{},{"--thumb-start-left":$,"--thumb-start-width":Wr(C==null?void 0:C.width),"--thumb-active-left":R,"--thumb-active-width":Wr(E==null?void 0:E.width),"--thumb-start-top":$,"--thumb-start-height":Wr(C==null?void 0:C.height),"--thumb-active-top":R,"--thumb-active-height":Wr(E==null?void 0:E.height)}),F={ref:ir(d,z),style:B,className:re("".concat(e,"-thumb"),k)};return process.env.NODE_ENV==="test"&&(F["data-test-style"]=JSON.stringify(B)),h.createElement("div",F)})}var dV=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function fV(t){if(typeof t.title<"u")return t.title;if(st(t.label)!=="object"){var e;return(e=t.label)===null||e===void 0?void 0:e.toString()}}function hV(t){return t.map(function(e){if(st(e)==="object"&&e!==null){var n=fV(e);return q(q({},e),{},{title:n})}return{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e}})}var pV=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,v=e.onMouseDown,g=function(b){o||u(b,l)};return h.createElement("label",{className:re(r,W({},"".concat(n,"-item-disabled"),o)),onMouseDown:v},h.createElement("input",{name:c,className:"".concat(n,"-item-input"),type:"radio",disabled:o,checked:i,onChange:g,onFocus:d,onBlur:f,onKeyDown:p,onKeyUp:m}),h.createElement("div",{className:"".concat(n,"-item-label"),title:s,"aria-selected":i},a))},sw=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,v=t.className,g=v===void 0?"":v,y=t.motionName,b=y===void 0?"thumb-motion":y,C=xt(t,dV),x=h.useRef(null),S=h.useMemo(function(){return ir(x,e)},[x,e]),w=h.useMemo(function(){return hV(c)},[c]),E=mn((n=w[0])===null||n===void 0?void 0:n.value,{value:f,defaultValue:d}),M=le(E,2),$=M[0],R=M[1],I=h.useState(!1),D=le(I,2),_=D[0],A=D[1],z=function(oe,ge){R(ge),m==null||m(ge)},k=Tn(C,["children"]),P=h.useState(!1),B=le(P,2),F=B[0],H=B[1],L=h.useState(!1),G=le(L,2),J=G[0],V=G[1],X=function(){V(!0)},Q=function(){V(!1)},ue=function(){H(!1)},Y=function(oe){oe.key==="Tab"&&H(!0)},fe=function(oe){var ge=w.findIndex(function(Oe){return Oe.value===$}),ne=w.length,ce=(ge+oe+ne)%ne,me=w[ce];me&&(R(me.value),m==null||m(me.value))},be=function(oe){switch(oe.key){case"ArrowLeft":case"ArrowUp":fe(-1);break;case"ArrowRight":case"ArrowDown":fe(1);break}};return h.createElement("div",Le({role:"radiogroup","aria-label":"segmented control",tabIndex:u?void 0:0},k,{className:re(i,(r={},W(r,"".concat(i,"-rtl"),a==="rtl"),W(r,"".concat(i,"-disabled"),u),W(r,"".concat(i,"-vertical"),s),r),g),ref:S}),h.createElement("div",{className:"".concat(i,"-group")},h.createElement(uV,{vertical:s,prefixCls:i,value:$,containerRef:x,motionName:"".concat(i,"-").concat(b),direction:a,getValueIndex:function(oe){return w.findIndex(function(ge){return ge.value===oe})},onMotionStart:function(){A(!0)},onMotionEnd:function(){A(!1)}}),w.map(function(de){var oe;return h.createElement(pV,Le({},de,{name:p,key:de.value,prefixCls:i,className:re(de.className,"".concat(i,"-item"),(oe={},W(oe,"".concat(i,"-item-selected"),de.value===$&&!_),W(oe,"".concat(i,"-item-focused"),J&&F&&de.value===$),oe)),checked:de.value===$,onChange:z,onFocus:X,onBlur:Q,onKeyDown:be,onKeyUp:Y,onMouseDown:ue,disabled:!!u||!!de.disabled}))})))});process.env.NODE_ENV!=="production"&&(sw.displayName="Segmented");var mV=sw;function Bb(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function jb(t){return{backgroundColor:t.itemSelectedBg,boxShadow:t.boxShadowTertiary}}const gV=Object.assign({overflow:"hidden"},Ss),vV=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({},Fn(t)),{display:"inline-block",padding:t.trackPadding,color:t.itemColor,background:t.trackBg,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`}),Ca(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 ${se(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({},jb(t)),{color:t.itemSelectedColor}),"&-focused":Object.assign({},lp(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:se(n),padding:`0 ${se(t.segmentedPaddingHorizontal)}`},gV),"&-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({},jb(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${se(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:se(r),padding:`0 ${se(t.segmentedPaddingHorizontal)}`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:o,lineHeight:se(o),padding:`0 ${se(t.segmentedPaddingHorizontalSM)}`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),Bb(`&-disabled ${e}-item`,t)),Bb(`${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}}})}},bV=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}},yV=hn("Segmented",t=>{const{lineWidth:e,calc:n}=t,r=Lt(t,{segmentedPaddingHorizontal:n(t.controlPaddingHorizontal).sub(e).equal(),segmentedPaddingHorizontalSM:n(t.controlPaddingHorizontalSM).sub(e).equal()});return[vV(r)]},bV);var zb=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 CV(t){return typeof t=="object"&&!!(t!=null&&t.icon)}const SV=h.forwardRef((t,e)=>{const n=au(),{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=zb(t,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:m,direction:v,className:g,style:y}=br("segmented"),b=m("segmented",r),[C,x,S]=yV(b),w=Vr(l),E=h.useMemo(()=>s.map(R=>{if(CV(R)){const{icon:I,label:D}=R,_=zb(R,["icon","label"]);return Object.assign(Object.assign({},_),{label:h.createElement(h.Fragment,null,h.createElement("span",{className:`${b}-item-icon`},I),D&&h.createElement("span",null,D))})}return R}),[s,b]),M=re(o,i,g,{[`${b}-block`]:a,[`${b}-sm`]:w==="small",[`${b}-lg`]:w==="large",[`${b}-vertical`]:u,[`${b}-shape-${d}`]:d==="round"},x,S),$=Object.assign(Object.assign({},y),c);return C(h.createElement(mV,Object.assign({},p,{name:f,className:M,style:$,options:E,ref:e,prefixCls:b,direction:v,vertical:u})))}),lw=SV;process.env.NODE_ENV!=="production"&&(lw.displayName="Segmented");const cw=N.createContext({}),uw=N.createContext({}),dw=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=()=>{if(r&&n&&!n.cleared){const i=n.toHsb();i.a=0;const a=Xn(i);a.cleared=!0,r(a)}};return N.createElement("div",{className:`${e}-clear`,onClick:o})},fw="hex",hw="rgb",pw="hsb";var xV={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"},wV=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:xV}))},mw=h.forwardRef(wV);process.env.NODE_ENV!=="production"&&(mw.displayName="UpOutlined");function hh(){return typeof BigInt=="function"}function gw(t){return!t&&t!==0&&!Number.isNaN(t)||!String(t).trim()}function bi(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 Up(t){var e=String(t);return!Number.isNaN(Number(e))&&e.includes("e")}function fi(t){var e=String(t);if(Up(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(".")&&Gp(e)?e.length-e.indexOf(".")-1:0}function vu(t){var e=String(t);if(Up(t)){if(t>Number.MAX_SAFE_INTEGER)return String(hh()?BigInt(t).toString():Number.MAX_SAFE_INTEGER);if(t<Number.MIN_SAFE_INTEGER)return String(hh()?BigInt(t).toString():Number.MIN_SAFE_INTEGER);e=t.toFixed(fi(e))}return bi(e).fullStr}function Gp(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 EV=function(){function t(e){if(xn(this,t),W(this,"origin",""),W(this,"negative",void 0),W(this,"integer",void 0),W(this,"decimal",void 0),W(this,"decimalLen",void 0),W(this,"empty",void 0),W(this,"nan",void 0),gw(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}var n=e;if(Up(n)&&(n=Number(n)),n=typeof n=="string"?n:vu(n),Gp(n)){var r=bi(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 wn(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=bi(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()?"":bi("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),t}(),NV=function(){function t(e){if(xn(this,t),W(this,"origin",""),W(this,"number",void 0),W(this,"empty",void 0),gw(e)){this.empty=!0;return}this.origin=String(e),this.number=Number(e)}return wn(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(fi(this.number),fi(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(fi(this.number),fi(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()?"":vu(this.number):this.origin}}]),t}();function Ir(t){return hh()?new EV(t):new NV(t)}function Wl(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="")return"";var o=bi(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=Ir(t).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-u));return Wl(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 OV(t){return!!(t.addonBefore||t.addonAfter)}function $V(t){return!!(t.prefix||t.suffix||t.allowClear)}function Lb(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 Nc(t,e,n,r){if(n){var o=e;if(e.type==="click"){o=Lb(e,t,""),n(o);return}if(t.type!=="file"&&r!==void 0){o=Lb(e,t,r),n(o);return}n(o)}}function Xp(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 Yp=N.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,v=t.readOnly,g=t.focused,y=t.triggerFocus,b=t.allowClear,C=t.value,x=t.handleReset,S=t.hidden,w=t.classes,E=t.classNames,M=t.dataAttrs,$=t.styles,R=t.components,I=t.onClear,D=a??i,_=(R==null?void 0:R.affixWrapper)||"span",A=(R==null?void 0:R.groupWrapper)||"span",z=(R==null?void 0:R.wrapper)||"span",k=(R==null?void 0:R.groupAddon)||"span",P=N.useRef(null),B=function(ce){var me;(me=P.current)!==null&&me!==void 0&&me.contains(ce.target)&&(y==null||y())},F=$V(t),H=N.cloneElement(D,{value:C,className:re((n=D.props)===null||n===void 0?void 0:n.className,!F&&(E==null?void 0:E.variant))||null}),L=N.useRef(null);if(N.useImperativeHandle(e,function(){return{nativeElement:L.current||P.current}}),F){var G=null;if(b){var J=!m&&!v&&C,V="".concat(s,"-clear-icon"),X=st(b)==="object"&&b!==null&&b!==void 0&&b.clearIcon?b.clearIcon:"✖";G=N.createElement("button",{type:"button",tabIndex:-1,onClick:function(ce){x==null||x(ce),I==null||I()},onMouseDown:function(ce){return ce.preventDefault()},className:re(V,W(W({},"".concat(V,"-hidden"),!J),"".concat(V,"-has-suffix"),!!c))},X)}var Q="".concat(s,"-affix-wrapper"),ue=re(Q,W(W(W(W(W({},"".concat(s,"-disabled"),m),"".concat(Q,"-disabled"),m),"".concat(Q,"-focused"),g),"".concat(Q,"-readonly"),v),"".concat(Q,"-input-with-clear-btn"),c&&b&&C),w==null?void 0:w.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),Y=(c||b)&&N.createElement("span",{className:re("".concat(s,"-suffix"),E==null?void 0:E.suffix),style:$==null?void 0:$.suffix},G,c);H=N.createElement(_,Le({className:ue,style:$==null?void 0:$.affixWrapper,onClick:B},M==null?void 0:M.affixWrapper,{ref:P}),l&&N.createElement("span",{className:re("".concat(s,"-prefix"),E==null?void 0:E.prefix),style:$==null?void 0:$.prefix},l),H,Y)}if(OV(t)){var fe="".concat(s,"-group"),be="".concat(fe,"-addon"),de="".concat(fe,"-wrapper"),oe=re("".concat(s,"-wrapper"),fe,w==null?void 0:w.wrapper,E==null?void 0:E.wrapper),ge=re(de,W({},"".concat(de,"-disabled"),m),w==null?void 0:w.group,E==null?void 0:E.groupWrapper);H=N.createElement(A,{className:ge,ref:L},N.createElement(z,{className:oe},u&&N.createElement(k,{className:be},u),H,d&&N.createElement(k,{className:be},d)))}return N.cloneElement(H,{className:re((r=H.props)===null||r===void 0?void 0:r.className,f)||null,style:q(q({},(o=H.props)===null||o===void 0?void 0:o.style),p),hidden:S})}),MV=["show"];function vw(t,e){return h.useMemo(function(){var n={};e&&(n.show=st(e)==="object"&&e.formatter?e.formatter:!!e),n=q(q({},n),t);var r=n,o=r.show,i=xt(r,MV);return q(q({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[t,e])}var RV=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],IV=N.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,v=t.suffix,g=t.showCount,y=t.count,b=t.type,C=b===void 0?"text":b,x=t.classes,S=t.classNames,w=t.styles,E=t.onCompositionStart,M=t.onCompositionEnd,$=xt(t,RV),R=N.useState(!1),I=le(R,2),D=I[0],_=I[1],A=N.useRef(!1),z=N.useRef(!1),k=N.useRef(null),P=N.useRef(null),B=function(ie){k.current&&Xp(k.current,ie)},F=mn(t.defaultValue,{value:t.value}),H=le(F,2),L=H[0],G=H[1],J=L==null?"":String(L),V=N.useState(null),X=le(V,2),Q=X[0],ue=X[1],Y=vw(y,g),fe=Y.max||m,be=Y.strategy(J),de=!!fe&&be>fe;N.useImperativeHandle(e,function(){var K;return{focus:B,blur:function(){var Ee;(Ee=k.current)===null||Ee===void 0||Ee.blur()},setSelectionRange:function(Ee,Se,he){var Ae;(Ae=k.current)===null||Ae===void 0||Ae.setSelectionRange(Ee,Se,he)},select:function(){var Ee;(Ee=k.current)===null||Ee===void 0||Ee.select()},input:k.current,nativeElement:((K=P.current)===null||K===void 0?void 0:K.nativeElement)||k.current}}),N.useEffect(function(){z.current&&(z.current=!1),_(function(K){return K&&d?!1:K})},[d]);var oe=function(ie,Ee,Se){var he=Ee;if(!A.current&&Y.exceedFormatter&&Y.max&&Y.strategy(Ee)>Y.max){if(he=Y.exceedFormatter(Ee,{max:Y.max}),Ee!==he){var Ae,_e;ue([((Ae=k.current)===null||Ae===void 0?void 0:Ae.selectionStart)||0,((_e=k.current)===null||_e===void 0?void 0:_e.selectionEnd)||0])}}else if(Se.source==="compositionEnd")return;G(he),k.current&&Nc(k.current,ie,r,he)};N.useEffect(function(){if(Q){var K;(K=k.current)===null||K===void 0||K.setSelectionRange.apply(K,Pe(Q))}},[Q]);var ge=function(ie){oe(ie,ie.target.value,{source:"change"})},ne=function(ie){A.current=!1,oe(ie,ie.currentTarget.value,{source:"compositionEnd"}),M==null||M(ie)},ce=function(ie){a&&ie.key==="Enter"&&!z.current&&(z.current=!0,a(ie)),s==null||s(ie)},me=function(ie){ie.key==="Enter"&&(z.current=!1),l==null||l(ie)},Oe=function(ie){_(!0),o==null||o(ie)},Me=function(ie){z.current&&(z.current=!1),_(!1),i==null||i(ie)},Ne=function(ie){G(""),B(),k.current&&Nc(k.current,ie,r)},je=de&&"".concat(u,"-out-of-range"),O=function(){var ie=Tn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return N.createElement("input",Le({autoComplete:n},ie,{onChange:ge,onFocus:Oe,onBlur:Me,onKeyDown:ce,onKeyUp:me,className:re(u,W({},"".concat(u,"-disabled"),d),S==null?void 0:S.input),style:w==null?void 0:w.input,ref:k,size:f,type:C,onCompositionStart:function(Se){A.current=!0,E==null||E(Se)},onCompositionEnd:ne}))},ee=function(){var ie=Number(fe)>0;if(v||Y.show){var Ee=Y.showFormatter?Y.showFormatter({value:J,count:be,maxLength:fe}):"".concat(be).concat(ie?" / ".concat(fe):"");return N.createElement(N.Fragment,null,Y.show&&N.createElement("span",{className:re("".concat(u,"-show-count-suffix"),W({},"".concat(u,"-show-count-has-suffix"),!!v),S==null?void 0:S.count),style:q({},w==null?void 0:w.count)},Ee),v)}return null};return N.createElement(Yp,Le({},$,{prefixCls:u,className:re(p,je),handleReset:Ne,value:J,focused:D,triggerFocus:B,suffix:ee(),disabled:d,classes:x,classNames:S,styles:w}),O())});function TV(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 PV(t,e){var n=N.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){yt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(p.message))}}return[r,o]}var AV=function(){var e=N.useState(!1),n=le(e,2),r=n[0],o=n[1];return Jt(function(){o(Ep())},[]),r},kV=200,DV=600;function _V(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,x){C.preventDefault(),u(),c.current(x);function S(){c.current(x),s.current=setTimeout(S,kV)}s.current=setTimeout(S,DV)};h.useEffect(function(){return function(){u(),l.current.forEach(function(b){return kt.cancel(b)})}},[]);var f=AV();if(f)return null;var p="".concat(e,"-handler"),m=re(p,"".concat(p,"-up"),W({},"".concat(p,"-up-disabled"),o)),v=re(p,"".concat(p,"-down"),W({},"".concat(p,"-down-disabled"),i)),g=function(){return l.current.push(kt(u))},y={unselectable:"on",role:"button",onMouseUp:g,onMouseLeave:g};return h.createElement("div",{className:"".concat(p,"-wrap")},h.createElement("span",Le({},y,{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",Le({},y,{onMouseDown:function(C){d(C,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:v}),r||h.createElement("span",{unselectable:"on",className:"".concat(e,"-handler-down-inner")})))}function Vb(t){var e=typeof t=="number"?vu(t):bi(t).fullStr,n=e.includes(".");return n?bi(e.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:t+"0"}const BV=function(){var t=N.useRef(0),e=function(){kt.cancel(t.current)};return N.useEffect(function(){return e},[]),function(n){e(),t.current=kt(function(){n()})}};var jV=["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"],zV=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],Fb=function(e,n){return e||n.isEmpty()?n.toString():n.toNumber()},Hb=function(e){var n=Ir(e);return n.isInvalidate()?null:n},LV=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,v=t.keyboard,g=t.changeOnWheel,y=g===void 0?!1:g,b=t.controls,C=b===void 0?!0:b;t.classNames;var x=t.stringMode,S=t.parser,w=t.formatter,E=t.precision,M=t.decimalSeparator,$=t.onChange,R=t.onInput,I=t.onPressEnter,D=t.onStep,_=t.changeOnBlur,A=_===void 0?!0:_,z=t.domRef,k=xt(t,jV),P="".concat(n,"-input"),B=h.useRef(null),F=h.useState(!1),H=le(F,2),L=H[0],G=H[1],J=h.useRef(!1),V=h.useRef(!1),X=h.useRef(!1),Q=h.useState(function(){return Ir(u??c)}),ue=le(Q,2),Y=ue[0],fe=ue[1];function be(Ye){u===void 0&&fe(Ye)}var de=h.useCallback(function(Ye,We){if(!We)return E>=0?E:Math.max(fi(Ye),fi(l))},[E,l]),oe=h.useCallback(function(Ye){var We=String(Ye);if(S)return S(We);var lt=We;return M&&(lt=lt.replace(M,".")),lt.replace(/[^\w.-]+/g,"")},[S,M]),ge=h.useRef(""),ne=h.useCallback(function(Ye,We){if(w)return w(Ye,{userTyping:We,input:String(ge.current)});var lt=typeof Ye=="number"?vu(Ye):Ye;if(!We){var it=de(lt,We);if(Gp(lt)&&(M||it>=0)){var pt=M||".";lt=Wl(lt,pt,it)}}return lt},[w,de,M]),ce=h.useState(function(){var Ye=c??u;return Y.isInvalidate()&&["string","number"].includes(st(Ye))?Number.isNaN(Ye)?"":Ye:ne(Y.toString(),!1)}),me=le(ce,2),Oe=me[0],Me=me[1];ge.current=Oe;function Ne(Ye,We){Me(ne(Ye.isInvalidate()?Ye.toString(!1):Ye.toString(!We),We))}var je=h.useMemo(function(){return Hb(a)},[a,E]),O=h.useMemo(function(){return Hb(i)},[i,E]),ee=h.useMemo(function(){return!je||!Y||Y.isInvalidate()?!1:je.lessEquals(Y)},[je,Y]),K=h.useMemo(function(){return!O||!Y||Y.isInvalidate()?!1:Y.lessEquals(O)},[O,Y]),ie=PV(B.current,L),Ee=le(ie,2),Se=Ee[0],he=Ee[1],Ae=function(We){return je&&!We.lessEquals(je)?je:O&&!O.lessEquals(We)?O:null},_e=function(We){return!Ae(We)},$e=function(We,lt){var it=We,pt=_e(it)||it.isEmpty();if(!it.isEmpty()&&!lt&&(it=Ae(it)||it,pt=!0),!f&&!d&&pt){var Qe=it.toString(),Ke=de(Qe,lt);return Ke>=0&&(it=Ir(Wl(Qe,".",Ke)),_e(it)||(it=Ir(Wl(Qe,".",Ke,!0)))),it.equals(Y)||(be(it),$==null||$(it.isEmpty()?null:Fb(x,it)),u===void 0&&Ne(it,lt)),it}return Y},ze=BV(),Fe=function Ye(We){if(Se(),ge.current=We,Me(We),!V.current){var lt=oe(We),it=Ir(lt);it.isNaN()||$e(it,!0)}R==null||R(We),ze(function(){var pt=We;S||(pt=We.replace(/。/g,".")),pt!==We&&Ye(pt)})},Ie=function(){V.current=!0},Be=function(){V.current=!1,Fe(B.current.value)},Te=function(We){Fe(We.target.value)},He=function(We){var lt;if(!(We&&ee||!We&&K)){J.current=!1;var it=Ir(X.current?Vb(l):l);We||(it=it.negate());var pt=(Y||Ir(0)).add(it.toString()),Qe=$e(pt,!1);D==null||D(Fb(x,Qe),{offset:X.current?Vb(l):l,type:We?"up":"down"}),(lt=B.current)===null||lt===void 0||lt.focus()}},Ze=function(We){var lt=Ir(oe(Oe)),it;lt.isNaN()?it=$e(Y,We):it=$e(lt,We),u!==void 0?Ne(Y,!1):it.isNaN()||Ne(it,!1)},ht=function(){J.current=!0},Tt=function(We){var lt=We.key,it=We.shiftKey;J.current=!0,X.current=it,lt==="Enter"&&(V.current||(J.current=!1),Ze(!1),I==null||I(We)),v!==!1&&!V.current&&["Up","ArrowUp","Down","ArrowDown"].includes(lt)&&(He(lt==="Up"||lt==="ArrowUp"),We.preventDefault())},Pt=function(){J.current=!1,X.current=!1};h.useEffect(function(){if(y&&L){var Ye=function(it){He(it.deltaY<0),it.preventDefault()},We=B.current;if(We)return We.addEventListener("wheel",Ye,{passive:!1}),function(){return We.removeEventListener("wheel",Ye)}}});var an=function(){A&&Ze(!1),G(!1),J.current=!1};return Za(function(){Y.isInvalidate()||Ne(Y,!1)},[E,w]),Za(function(){var Ye=Ir(u);fe(Ye);var We=Ir(oe(Oe));(!Ye.equals(We)||!J.current||w)&&Ne(Ye,J.current)},[u]),Za(function(){w&&he()},[Oe]),h.createElement("div",{ref:z,className:re(n,r,W(W(W(W(W({},"".concat(n,"-focused"),L),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),f),"".concat(n,"-not-a-number"),Y.isNaN()),"".concat(n,"-out-of-range"),!Y.isInvalidate()&&!_e(Y))),style:o,onFocus:function(){G(!0)},onBlur:an,onKeyDown:Tt,onKeyUp:Pt,onCompositionStart:Ie,onCompositionEnd:Be,onBeforeInput:ht},C&&h.createElement(_V,{prefixCls:n,upNode:p,downNode:m,upDisabled:ee,downDisabled:K,onStep:He}),h.createElement("div",{className:"".concat(P,"-wrap")},h.createElement("input",Le({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":Y.isInvalidate()?null:Y.toString(),step:l},k,{ref:ir(B,e),className:P,value:Oe,onChange:Te,disabled:d,readOnly:f}))))}),bw=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=xt(t,zV),m=h.useRef(null),v=h.useRef(null),g=h.useRef(null),y=function(C){g.current&&Xp(g.current,C)};return h.useImperativeHandle(e,function(){return TV(g.current,{focus:y,nativeElement:m.current.nativeElement||v.current})}),h.createElement(Yp,{className:d,triggerFocus:y,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(LV,Le({prefixCls:i,disabled:n,ref:g,domRef:v,className:f==null?void 0:f.input},p)))});process.env.NODE_ENV!=="production"&&(bw.displayName="InputNumber");const VV=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({},Us(t)),{controlWidth:90,handleWidth:r,handleFontSize:t.fontSize/2,handleVisible:n,handleActiveBg:t.colorFillAlter,handleBg:t.colorBgContainer,filledHandleBg:new Ht(t.colorFillSecondary).onBackground(t.colorBgContainer).toHexString(),handleHoverColor:t.colorPrimary,handleBorderColor:t.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},Wb=(t,e)=>{let{componentCls:n,borderRadiusSM:r,borderRadiusLG:o}=t;const i=e==="lg"?o:r;return{[`&-${e}`]:{[`${n}-handler-wrap`]:{borderStartEndRadius:i,borderEndEndRadius:i},[`${n}-handler-up`]:{borderStartEndRadius:i},[`${n}-handler-down`]:{borderEndEndRadius:i}}}},FV=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,colorTextDescription:m,motionDurationMid:v,handleHoverColor:g,handleOpacity:y,paddingInline:b,paddingBlock:C,handleBg:x,handleActiveBg:S,colorTextDisabled:w,borderRadiusSM:E,borderRadiusLG:M,controlWidth:$,handleBorderColor:R,filledHandleBg:I,lineHeightLG:D,calc:_}=t;return[{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fn(t)),gu(t)),{display:"inline-block",width:$,margin:0,padding:0,borderRadius:o}),K1(t,{[`${e}-handler-wrap`]:{background:x,[`${e}-handler-down`]:{borderBlockStart:`${se(n)} ${r} ${R}`}}})),Y1(t,{[`${e}-handler-wrap`]:{background:I,[`${e}-handler-down`]:{borderBlockStart:`${se(n)} ${r} ${R}`}},"&:focus-within":{[`${e}-handler-wrap`]:{background:x}}})),Z1(t,{[`${e}-handler-wrap`]:{background:x,[`${e}-handler-down`]:{borderBlockStart:`${se(n)} ${r} ${R}`}}})),G1(t)),{"&-rtl":{direction:"rtl",[`${e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:D,borderRadius:M,[`input${e}-input`]:{height:_(s).sub(_(n).mul(2)).equal(),padding:`${se(f)} ${se(p)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:E,[`input${e}-input`]:{height:_(l).sub(_(n).mul(2)).equal(),padding:`${se(d)} ${se(u)}`}},"&-out-of-range":{[`${e}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},Fn(t)),rw(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:M,fontSize:t.fontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:E}}},U1(t)),J1(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({},Fn(t)),{width:"100%",padding:`${se(C)} ${se(b)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${v} linear`,appearance:"textfield",fontSize:"inherit"}),ew(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:y,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${v}`,overflow:"hidden",[`${e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
438
|
-
${e}-handler-up-inner,
|
|
439
|
-
${e}-handler-down-inner
|
|
440
|
-
`]:{marginInlineEnd:0,fontSize:t.handleFontSize}}},[`${e}-handler`]:{height:"50%",overflow:"hidden",color:m,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${se(n)} ${r} ${R}`,transition:`all ${v} linear`,"&:active":{background:S},"&:hover":{height:"60%",[`
|
|
441
|
-
${e}-handler-up-inner,
|
|
442
|
-
${e}-handler-down-inner
|
|
443
|
-
`]:{color:g}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},Ai()),{color:m,transition:`all ${v} linear`,userSelect:"none"})},[`${e}-handler-up`]:{borderStartEndRadius:o},[`${e}-handler-down`]:{borderEndEndRadius:o}},Wb(t,"lg")),Wb(t,"sm")),{"&-disabled, &-readonly":{[`${e}-handler-wrap`]:{display:"none"},[`${e}-input`]:{color:"inherit"}},[`
|
|
444
|
-
${e}-handler-up-disabled,
|
|
445
|
-
${e}-handler-down-disabled
|
|
446
|
-
`]:{cursor:"not-allowed"},[`
|
|
447
|
-
${e}-handler-up-disabled:hover &-handler-up-inner,
|
|
448
|
-
${e}-handler-down-disabled:hover &-handler-down-inner
|
|
449
|
-
`]:{color:w}})}]},HV=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:`${se(n)} 0`}},gu(t)),{position:"relative",display:"inline-flex",alignItems:"center",width:i,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:a,paddingInlineStart:l,[`input${e}-input`]:{padding:`${se(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${e}-input`]:{padding:`${se(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()}})}},WV=hn("InputNumber",t=>{const e=Lt(t,Ks(t));return[FV(e),HV(e),_s(e)]},VV,{unitless:{handleOpacity:!0}});var qV=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 yw=h.forwardRef((t,e)=>{if(process.env.NODE_ENV!=="production"){const Y=on("InputNumber");Y.deprecated(!("bordered"in t),"bordered","variant"),Y(!(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(At),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:v,status:g,controls:y,variant:b}=t,C=qV(t,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),x=n("input-number",c),S=xo(x),[w,E,M]=WV(x,S),{compactSize:$,compactItemClassnames:R}=ei(x,r);let I=h.createElement(mw,{className:`${x}-handler-up-inner`}),D=h.createElement(Pp,{className:`${x}-handler-down-inner`});const _=typeof y=="boolean"?y:void 0;typeof y=="object"&&(I=typeof y.upIcon>"u"?I:h.createElement("span",{className:`${x}-handler-up-inner`},y.upIcon),D=typeof y.downIcon>"u"?D:h.createElement("span",{className:`${x}-handler-down-inner`},y.downIcon));const{hasFeedback:A,status:z,isFormItemInput:k,feedbackIcon:P}=h.useContext($r),B=Fs(z,g),F=Vr(Y=>{var fe;return(fe=s??$)!==null&&fe!==void 0?fe:Y}),H=h.useContext(jr),L=l??H,[G,J]=du("inputNumber",b,m),V=A&&h.createElement(h.Fragment,null,P),X=re({[`${x}-lg`]:F==="large",[`${x}-sm`]:F==="small",[`${x}-rtl`]:r==="rtl",[`${x}-in-form-item`]:k},E),Q=`${x}-group`,ue=h.createElement(bw,Object.assign({ref:o,disabled:L,className:re(M,S,i,a,R),upHandler:I,downHandler:D,prefixCls:x,readOnly:v,controls:_,prefix:f,suffix:V||p,addonBefore:u&&h.createElement(Ko,{form:!0,space:!0},u),addonAfter:d&&h.createElement(Ko,{form:!0,space:!0},d),classNames:{input:X,variant:re({[`${x}-${G}`]:J},Mi(x,B,A)),affixWrapper:re({[`${x}-affix-wrapper-sm`]:F==="small",[`${x}-affix-wrapper-lg`]:F==="large",[`${x}-affix-wrapper-rtl`]:r==="rtl",[`${x}-affix-wrapper-without-controls`]:y===!1||L},E),wrapper:re({[`${Q}-rtl`]:r==="rtl"},E),groupWrapper:re({[`${x}-group-wrapper-sm`]:F==="small",[`${x}-group-wrapper-lg`]:F==="large",[`${x}-group-wrapper-rtl`]:r==="rtl",[`${x}-group-wrapper-${G}`]:J},Mi(`${x}-group-wrapper`,B,A),E)}},C));return w(ue)}),Jp=yw,KV=t=>h.createElement(ro,{theme:{components:{InputNumber:{handleVisible:!0}}}},h.createElement(yw,Object.assign({},t)));process.env.NODE_ENV!=="production"&&(Jp.displayName="InputNumber");Jp._InternalPanelDoNotUseOrYouWillBeFired=KV;const yi=t=>{let{prefixCls:e,min:n=0,max:r=100,value:o,onChange:i,className:a,formatter:s}=t;const l=`${e}-steppers`,[c,u]=N.useState(o);return N.useEffect(()=>{Number.isNaN(o)||u(o)},[o]),N.createElement(Jp,{className:re(l,a),min:n,max:r,value:c,formatter:s,size:"small",onChange:d=>{o||u(d||0),i==null||i(d)}})},UV=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=`${e}-alpha-input`,[i,a]=N.useState(Xn(n||"#000"));N.useEffect(()=>{n&&a(n)},[n]);const s=l=>{const c=i.toHsb();c.a=(l||0)/100;const u=Xn(c);n||a(u),r==null||r(u)};return N.createElement(yi,{value:bp(i),prefixCls:e,formatter:l=>`${l}%`,className:o,onChange:s})},Cw=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:N.createElement(Xc,null)}),e};function Sw(t,e){const n=N.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 N.useEffect(()=>(e&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[]),r}function GV(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var XV=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 Ma=N.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:v,rootClassName:g,onChange:y,classNames:b,variant:C}=t,x=XV(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:Ne}=on("Input");Ne(!("bordered"in t),"bordered","variant")}const{getPrefixCls:S,direction:w,allowClear:E,autoComplete:M,className:$,style:R,classNames:I,styles:D}=br("input"),_=S("input",n),A=N.useRef(null),z=xo(_),[k,P,B]=ow(_,g),[F]=iw(_,z),{compactSize:H,compactItemClassnames:L}=ei(_,w),G=Vr(Ne=>{var je;return(je=i??H)!==null&&je!==void 0?je:Ne}),J=N.useContext(jr),V=a??J,{status:X,hasFeedback:Q,feedbackIcon:ue}=N.useContext($r),Y=Fs(X,o),fe=GV(t)||!!Q,be=N.useRef(fe);if(process.env.NODE_ENV!=="production"){const Ne=on("Input");N.useEffect(()=>{var je;fe&&!be.current&&process.env.NODE_ENV!=="production"&&Ne(document.activeElement===((je=A.current)===null||je===void 0?void 0:je.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"),be.current=fe},[fe])}const de=Sw(A,!0),oe=Ne=>{de(),s==null||s(Ne)},ge=Ne=>{de(),l==null||l(Ne)},ne=Ne=>{de(),y==null||y(Ne)},ce=(Q||c)&&N.createElement(N.Fragment,null,c,Q&&ue),me=Cw(u??E),[Oe,Me]=du("input",C,r);return k(F(N.createElement(IV,Object.assign({ref:ir(e,A),prefixCls:_,autoComplete:M},x,{disabled:V,onBlur:oe,onFocus:ge,style:Object.assign(Object.assign({},R),m),styles:Object.assign(Object.assign({},D),v),suffix:ce,allowClear:me,className:re(p,g,B,z,L,$),onChange:ne,addonBefore:f&&N.createElement(Ko,{form:!0,space:!0},f),addonAfter:d&&N.createElement(Ko,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},b),I),{input:re({[`${_}-sm`]:G==="small",[`${_}-lg`]:G==="large",[`${_}-rtl`]:w==="rtl"},b==null?void 0:b.input,I.input,P),variant:re({[`${_}-${Oe}`]:Me},Mi(_,Y)),affixWrapper:re({[`${_}-affix-wrapper-sm`]:G==="small",[`${_}-affix-wrapper-lg`]:G==="large",[`${_}-affix-wrapper-rtl`]:w==="rtl"},P),wrapper:re({[`${_}-group-rtl`]:w==="rtl"},P),groupWrapper:re({[`${_}-group-wrapper-sm`]:G==="small",[`${_}-group-wrapper-lg`]:G==="large",[`${_}-group-wrapper-rtl`]:w==="rtl",[`${_}-group-wrapper-${Oe}`]:Me},Mi(`${_}-group-wrapper`,Y,Q),P)})}))))});process.env.NODE_ENV!=="production"&&(Ma.displayName="Input");const YV=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,JV=t=>YV.test(`#${t}`),QV=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=`${e}-hex-input`,[i,a]=N.useState(()=>n?Ka(n.toHexString()):void 0);N.useEffect(()=>{n&&a(Ka(n.toHexString()))},[n]);const s=l=>{const c=l.target.value;a(Ka(c)),JV(Ka(c,!0))&&(r==null||r(Xn(c)))};return N.createElement(Ma,{className:o,value:i,prefix:"#",onChange:s,size:"small"})},ZV=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=`${e}-hsb-input`,[i,a]=N.useState(Xn(n||"#000"));N.useEffect(()=>{n&&a(n)},[n]);const s=(l,c)=>{const u=i.toHsb();u[c]=c==="h"?l:(l||0)/100;const d=Xn(u);n||a(d),r==null||r(d)};return N.createElement("div",{className:o},N.createElement(yi,{max:360,min:0,value:Number(i.toHsb().h),prefixCls:e,className:o,formatter:l=>Ll(l||0).toString(),onChange:l=>s(Number(l),"h")}),N.createElement(yi,{max:100,min:0,value:Number(i.toHsb().s)*100,prefixCls:e,className:o,formatter:l=>`${Ll(l||0)}%`,onChange:l=>s(Number(l),"s")}),N.createElement(yi,{max:100,min:0,value:Number(i.toHsb().b)*100,prefixCls:e,className:o,formatter:l=>`${Ll(l||0)}%`,onChange:l=>s(Number(l),"b")}))},eF=t=>{let{prefixCls:e,value:n,onChange:r}=t;const o=`${e}-rgb-input`,[i,a]=N.useState(Xn(n||"#000"));N.useEffect(()=>{n&&a(n)},[n]);const s=(l,c)=>{const u=i.toRgb();u[c]=l||0;const d=Xn(u);n||a(d),r==null||r(d)};return N.createElement("div",{className:o},N.createElement(yi,{max:255,min:0,value:Number(i.toRgb().r),prefixCls:e,className:o,onChange:l=>s(Number(l),"r")}),N.createElement(yi,{max:255,min:0,value:Number(i.toRgb().g),prefixCls:e,className:o,onChange:l=>s(Number(l),"g")}),N.createElement(yi,{max:255,min:0,value:Number(i.toRgb().b),prefixCls:e,className:o,onChange:l=>s(Number(l),"b")}))},tF=[fw,pw,hw].map(t=>({value:t,label:t.toUpperCase()})),nF=t=>{const{prefixCls:e,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:a,disabledFormat:s}=t,[l,c]=mn(fw,{value:n,onChange:i}),u=`${e}-input`,d=p=>{c(p)},f=N.useMemo(()=>{const p={value:r,prefixCls:e,onChange:a};switch(l){case pw:return N.createElement(ZV,Object.assign({},p));case hw:return N.createElement(eF,Object.assign({},p));default:return N.createElement(QV,Object.assign({},p))}},[l,e,r,a]);return N.createElement("div",{className:`${u}-container`},!s&&N.createElement(ur,{value:l,variant:"borderless",getPopupContainer:p=>p,popupMatchSelectWidth:68,placement:"bottomRight",onChange:d,className:`${e}-format-select`,size:"small",options:tF}),N.createElement("div",{className:u},f),!o&&N.createElement(UV,{prefixCls:e,value:r,onChange:a}))};function ph(t,e,n){return(t-e)/(n-e)}function Qp(t,e,n,r){var o=ph(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 ai(t,e){return Array.isArray(t)?t[e]:t}var _i=h.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),xw=h.createContext({}),rF=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],mh=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,v=xt(t,rF),g=h.useContext(_i),y=g.min,b=g.max,C=g.direction,x=g.disabled,S=g.keyboard,w=g.range,E=g.tabIndex,M=g.ariaLabelForHandle,$=g.ariaLabelledByForHandle,R=g.ariaRequired,I=g.ariaValueTextFormatterForHandle,D=g.styles,_=g.classNames,A="".concat(n,"-handle"),z=function(X){x||i(X,o)},k=function(X){p==null||p(X,o)},P=function(X){m(X,o)},B=function(X){if(!x&&S){var Q=null;switch(X.which||X.keyCode){case Je.LEFT:Q=C==="ltr"||C==="btt"?-1:1;break;case Je.RIGHT:Q=C==="ltr"||C==="btt"?1:-1;break;case Je.UP:Q=C!=="ttb"?1:-1;break;case Je.DOWN:Q=C!=="ttb"?-1:1;break;case Je.HOME:Q="min";break;case Je.END:Q="max";break;case Je.PAGE_UP:Q=2;break;case Je.PAGE_DOWN:Q=-2;break;case Je.BACKSPACE:case Je.DELETE:a(o);break}Q!==null&&(X.preventDefault(),d(Q,o))}},F=function(X){switch(X.which||X.keyCode){case Je.LEFT:case Je.RIGHT:case Je.UP:case Je.DOWN:case Je.HOME:case Je.END:case Je.PAGE_UP:case Je.PAGE_DOWN:f==null||f();break}},H=Qp(C,r,y,b),L={};if(o!==null){var G;L={tabIndex:x?null:ai(E,o),role:"slider","aria-valuemin":y,"aria-valuemax":b,"aria-valuenow":r,"aria-disabled":x,"aria-label":ai(M,o),"aria-labelledby":ai($,o),"aria-required":ai(R,o),"aria-valuetext":(G=ai(I,o))===null||G===void 0?void 0:G(r),"aria-orientation":C==="ltr"||C==="rtl"?"horizontal":"vertical",onMouseDown:z,onTouchStart:z,onFocus:k,onMouseEnter:P,onKeyDown:B,onKeyUp:F}}var J=h.createElement("div",Le({ref:e,className:re(A,W(W(W({},"".concat(A,"-").concat(o+1),o!==null&&w),"".concat(A,"-dragging"),c),"".concat(A,"-dragging-delete"),u),_.handle),style:q(q(q({},H),s),D.handle)},L,v));return l&&(J=l(J,{index:o,prefixCls:n,value:r,dragging:c,draggingDelete:u})),J});process.env.NODE_ENV!=="production"&&(mh.displayName="Handle");var oF=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],ww=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=xt(t,oF),p=h.useRef({}),m=h.useState(!1),v=le(m,2),g=v[0],y=v[1],b=h.useState(-1),C=le(b,2),x=C[0],S=C[1],w=function(I){S(I),y(!0)},E=function(I,D){w(D),d==null||d(I)},M=function(I,D){w(D)};h.useImperativeHandle(e,function(){return{focus:function(I){var D;(D=p.current[I])===null||D===void 0||D.focus()},hideHelp:function(){_r.flushSync(function(){y(!1)})}}});var $=q({prefixCls:n,onStartMove:o,onOffsetChange:i,render:s,onFocus:E,onMouseEnter:M},f);return h.createElement(h.Fragment,null,a.map(function(R,I){var D=c===I;return h.createElement(mh,Le({ref:function(A){A?p.current[I]=A:delete p.current[I]},dragging:D,draggingDelete:D&&u,style:ai(r,I),key:I,value:R,valueIndex:I},$))}),l&&g&&h.createElement(mh,Le({key:"a11y"},$,{value:a[x],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});process.env.NODE_ENV!=="production"&&(ww.displayName="Handles");var iF=function(e){var n=e.prefixCls,r=e.style,o=e.children,i=e.value,a=e.onClick,s=h.useContext(_i),l=s.min,c=s.max,u=s.direction,d=s.includedStart,f=s.includedEnd,p=s.included,m="".concat(n,"-text"),v=Qp(u,i,l,c);return h.createElement("span",{className:re(m,W({},"".concat(m,"-active"),p&&d<=i&&i<=f)),style:q(q({},v),r),onMouseDown:function(y){y.stopPropagation()},onClick:function(){a(i)}},o)},aF=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(iF,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},sF=function(e){var n=e.prefixCls,r=e.value,o=e.style,i=e.activeStyle,a=h.useContext(_i),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,v=q(q({},Qp(c,r,s,l)),typeof o=="function"?o(r):o);return m&&(v=q(q({},v),typeof i=="function"?i(r):i)),h.createElement("span",{className:re(p,W({},"".concat(p,"-active"),m)),style:v})},lF=function(e){var n=e.prefixCls,r=e.marks,o=e.dots,i=e.style,a=e.activeStyle,s=h.useContext(_i),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(sF,{prefixCls:n,key:f,value:f,style:i,activeStyle:a})}))},qb=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(_i),u=c.direction,d=c.min,f=c.max,p=c.disabled,m=c.range,v=c.classNames,g="".concat(n,"-track"),y=ph(o,d,f),b=ph(i,d,f),C=function(E){!p&&s&&s(E,-1)},x={};switch(u){case"rtl":x.right="".concat(y*100,"%"),x.width="".concat(b*100-y*100,"%");break;case"btt":x.bottom="".concat(y*100,"%"),x.height="".concat(b*100-y*100,"%");break;case"ttb":x.top="".concat(y*100,"%"),x.height="".concat(b*100-y*100,"%");break;default:x.left="".concat(y*100,"%"),x.width="".concat(b*100-y*100,"%")}var S=l||re(g,W(W({},"".concat(g,"-").concat(a+1),a!==null&&m),"".concat(n,"-track-draggable"),s),v.track);return h.createElement("div",{className:S,style:q(q({},x),r),onMouseDown:C,onTouchStart:C})},cF=function(e){var n=e.prefixCls,r=e.style,o=e.values,i=e.startPoint,a=e.onStartMove,s=h.useContext(_i),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 v=i??u,g=o[0];return[{start:Math.min(v,g),end:Math.max(v,g)}]}for(var y=[],b=0;b<o.length-1;b+=1)y.push({start:o[b],end:o[b+1]});return y},[o,c,i,u]);if(!l)return null;var m=p!=null&&p.length&&(f.tracks||d.tracks)?h.createElement(qb,{index:null,prefixCls:n,start:p[0].start,end:p[p.length-1].end,replaceCls:re(f.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return h.createElement(h.Fragment,null,m,p.map(function(v,g){var y=v.start,b=v.end;return h.createElement(qb,{index:g,prefixCls:n,style:q(q({},ai(r,g)),d.track),start:y,end:b,key:g,onStartMove:a})}))},uF=130;function Kb(t){var e="targetTouches"in t?t.targetTouches[0]:t;return{pageX:e.pageX,pageY:e.pageY}}function dF(t,e,n,r,o,i,a,s,l,c,u){var d=h.useState(null),f=le(d,2),p=f[0],m=f[1],v=h.useState(-1),g=le(v,2),y=g[0],b=g[1],C=h.useState(!1),x=le(C,2),S=x[0],w=x[1],E=h.useState(n),M=le(E,2),$=M[0],R=M[1],I=h.useState(n),D=le(I,2),_=D[0],A=D[1],z=h.useRef(null),k=h.useRef(null),P=h.useRef(null),B=h.useContext(xw),F=B.onDragStart,H=B.onDragChange;Jt(function(){y===-1&&R(n)},[n,y]),h.useEffect(function(){return function(){document.removeEventListener("mousemove",z.current),document.removeEventListener("mouseup",k.current),P.current&&(P.current.removeEventListener("touchmove",z.current),P.current.removeEventListener("touchend",k.current))}},[]);var L=function(Q,ue,Y){ue!==void 0&&m(ue),R(Q);var fe=Q;Y&&(fe=Q.filter(function(be,de){return de!==y})),a(fe),H&&H({rawValues:Q,deleteIndex:Y?y:-1,draggingIndex:y,draggingValue:ue})},G=Wt(function(X,Q,ue){if(X===-1){var Y=_[0],fe=_[_.length-1],be=r-Y,de=o-fe,oe=Q*(o-r);oe=Math.max(oe,be),oe=Math.min(oe,de);var ge=i(Y+oe);oe=ge-Y;var ne=_.map(function(Me){return Me+oe});L(ne)}else{var ce=(o-r)*Q,me=Pe($);me[X]=_[X];var Oe=l(me,ce,X,"dist");L(Oe.values,Oe.value,ue)}}),J=function(Q,ue,Y){Q.stopPropagation();var fe=Y||n,be=fe[ue];b(ue),m(be),A(fe),R(fe),w(!1);var de=Kb(Q),oe=de.pageX,ge=de.pageY,ne=!1;F&&F({rawValues:fe,draggingIndex:ue,draggingValue:be});var ce=function(Me){Me.preventDefault();var Ne=Kb(Me),je=Ne.pageX,O=Ne.pageY,ee=je-oe,K=O-ge,ie=t.current.getBoundingClientRect(),Ee=ie.width,Se=ie.height,he,Ae;switch(e){case"btt":he=-K/Se,Ae=ee;break;case"ttb":he=K/Se,Ae=ee;break;case"rtl":he=-ee/Ee,Ae=K;break;default:he=ee/Ee,Ae=K}ne=c?Math.abs(Ae)>uF&&u<$.length:!1,w(ne),G(ue,he,ne)},me=function Oe(Me){Me.preventDefault(),document.removeEventListener("mouseup",Oe),document.removeEventListener("mousemove",ce),P.current&&(P.current.removeEventListener("touchmove",z.current),P.current.removeEventListener("touchend",k.current)),z.current=null,k.current=null,P.current=null,s(ne),b(-1),w(!1)};document.addEventListener("mouseup",me),document.addEventListener("mousemove",ce),Q.currentTarget.addEventListener("touchend",me),Q.currentTarget.addEventListener("touchmove",ce),z.current=ce,k.current=me,P.current=Q.currentTarget},V=h.useMemo(function(){var X=Pe(n).sort(function(be,de){return be-de}),Q=Pe($).sort(function(be,de){return be-de}),ue={};Q.forEach(function(be){ue[be]=(ue[be]||0)+1}),X.forEach(function(be){ue[be]=(ue[be]||0)-1});var Y=c?1:0,fe=Object.values(ue).reduce(function(be,de){return be+Math.abs(de)},0);return fe<=Y?$:n},[n,$,c]);return[y,p,S,V,J]}function fF(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,v=function(C){return(String(C).split(".")[1]||"").length},g=Math.max(v(n),v(e),v(t)),y=Number(m.toFixed(g));return t<=y&&y<=e?y:null}return null},[n,t,e,a]),l=h.useCallback(function(p){var m=a(p),v=r.map(function(b){return b.value});n!==null&&v.push(s(p)),v.push(t,e);var g=v[0],y=e-t;return v.forEach(function(b){var C=Math.abs(m-b);C<=y&&(g=b,y=C)}),g},[t,e,r,n,a,s]),c=function p(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof v=="number"){var b,C=m[g],x=C+v,S=[];r.forEach(function(R){S.push(R.value)}),S.push(t,e),S.push(s(C));var w=v>0?1:-1;y==="unit"?S.push(s(C+w*n)):S.push(s(x)),S=S.filter(function(R){return R!==null}).filter(function(R){return v<0?R<=C:R>=C}),y==="unit"&&(S=S.filter(function(R){return R!==C}));var E=y==="unit"?C:x;b=S[0];var M=Math.abs(b-E);if(S.forEach(function(R){var I=Math.abs(R-E);I<M&&(b=R,M=I)}),b===void 0)return v<0?t:e;if(y==="dist")return b;if(Math.abs(v)>1){var $=Pe(m);return $[g]=b,p($,v-w,g,y)}return b}else{if(v==="min")return t;if(v==="max")return e}},u=function(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",b=m[g],C=c(m,v,g,y);return{value:C,changed:C!==b}},d=function(m){return i===null&&m===0||typeof i=="number"&&m<i},f=function(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",b=m.map(l),C=b[g],x=c(b,v,g,y);if(b[g]=x,o===!1){var S=i||0;g>0&&b[g-1]!==C&&(b[g]=Math.max(b[g],b[g-1]+S)),g<b.length-1&&b[g+1]!==C&&(b[g]=Math.min(b[g],b[g+1]-S))}else if(typeof i=="number"||i===null){for(var w=g+1;w<b.length;w+=1)for(var E=!0;d(b[w]-b[w-1])&&E;){var M=u(b,1,w);b[w]=M.value,E=M.changed}for(var $=g;$>0;$-=1)for(var R=!0;d(b[$]-b[$-1])&&R;){var I=u(b,-1,$-1);b[$-1]=I.value,R=I.changed}for(var D=b.length-1;D>0;D-=1)for(var _=!0;d(b[D]-b[D-1])&&_;){var A=u(b,-1,D-1);b[D-1]=A.value,_=A.changed}for(var z=0;z<b.length-1;z+=1)for(var k=!0;d(b[z+1]-b[z])&&k;){var P=u(b,1,z+1);b[z+1]=P.value,k=P.changed}}return{value:b[g],values:b}};return[l,f]}function hF(t){return N.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"&&Qr(!e||!n,"`editable` can not work with `draggableTrack`."),[!0,e,!e&&n,r||0,o]},[t])}var Ew=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,v=t.onBlur,g=t.min,y=g===void 0?0:g,b=t.max,C=b===void 0?100:b,x=t.step,S=x===void 0?1:x,w=t.value,E=t.defaultValue,M=t.range,$=t.count,R=t.onChange,I=t.onBeforeChange,D=t.onAfterChange,_=t.onChangeComplete,A=t.allowCross,z=A===void 0?!0:A,k=t.pushable,P=k===void 0?!1:k,B=t.reverse,F=t.vertical,H=t.included,L=H===void 0?!0:H,G=t.startPoint,J=t.trackStyle,V=t.handleStyle,X=t.railStyle,Q=t.dotStyle,ue=t.activeDotStyle,Y=t.marks,fe=t.dots,be=t.handleRender,de=t.activeHandleRender,oe=t.track,ge=t.tabIndex,ne=ge===void 0?0:ge,ce=t.ariaLabelForHandle,me=t.ariaLabelledByForHandle,Oe=t.ariaRequired,Me=t.ariaValueTextFormatterForHandle,Ne=h.useRef(null),je=h.useRef(null),O=h.useMemo(function(){return F?B?"ttb":"btt":B?"rtl":"ltr"},[B,F]),ee=hF(M),K=le(ee,5),ie=K[0],Ee=K[1],Se=K[2],he=K[3],Ae=K[4],_e=h.useMemo(function(){return isFinite(y)?y:0},[y]),$e=h.useMemo(function(){return isFinite(C)?C:100},[C]),ze=h.useMemo(function(){return S!==null&&S<=0?1:S},[S]),Fe=h.useMemo(function(){return typeof P=="boolean"?P?ze:!1:P>=0?P:!1},[P,ze]),Ie=h.useMemo(function(){return Object.keys(Y||{}).map(function(Xe){var De=Y[Xe],ft={value:Number(Xe)};return De&&st(De)==="object"&&!h.isValidElement(De)&&("label"in De||"style"in De)?(ft.style=De.style,ft.label=De.label):ft.label=De,ft}).filter(function(Xe){var De=Xe.label;return De||typeof De=="number"}).sort(function(Xe,De){return Xe.value-De.value})},[Y]),Be=fF(_e,$e,ze,Ie,z,Fe),Te=le(Be,2),He=Te[0],Ze=Te[1],ht=mn(E,{value:w}),Tt=le(ht,2),Pt=Tt[0],an=Tt[1],Ye=h.useMemo(function(){var Xe=Pt==null?[]:Array.isArray(Pt)?Pt:[Pt],De=le(Xe,1),ft=De[0],Et=ft===void 0?_e:ft,Ot=Pt===null?[]:[Et];if(ie){if(Ot=Pe(Xe),$||Pt===void 0){var ln=$>=0?$+1:2;for(Ot=Ot.slice(0,ln);Ot.length<ln;){var en;Ot.push((en=Ot[Ot.length-1])!==null&&en!==void 0?en:_e)}}Ot.sort(function(dn,cn){return dn-cn})}return Ot.forEach(function(dn,cn){Ot[cn]=He(dn)}),Ot},[Pt,ie,_e,$,He]),We=function(De){return ie?De:De[0]},lt=Wt(function(Xe){var De=Pe(Xe).sort(function(ft,Et){return ft-Et});R&&!pa(De,Ye,!0)&&R(We(De)),an(De)}),it=Wt(function(Xe){Xe&&Ne.current.hideHelp();var De=We(Ye);D==null||D(De),yt(!D,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),_==null||_(De)}),pt=function(De){if(!(u||!Ee||Ye.length<=he)){var ft=Pe(Ye);ft.splice(De,1),I==null||I(We(ft)),lt(ft);var Et=Math.max(0,De-1);Ne.current.hideHelp(),Ne.current.focus(Et)}},Qe=dF(je,O,Ye,_e,$e,He,lt,it,Ze,Ee,he),Ke=le(Qe,5),Ue=Ke[0],wt=Ke[1],$t=Ke[2],et=Ke[3],qe=Ke[4],ot=function(De,ft){if(!u){var Et=Pe(Ye),Ot=0,ln=0,en=$e-_e;Ye.forEach(function(Rn,T){var U=Math.abs(De-Rn);U<=en&&(en=U,Ot=T),Rn<De&&(ln=T)});var dn=Ot;Ee&&en!==0&&(!Ae||Ye.length<Ae)?(Et.splice(ln+1,0,De),dn=ln+1):Et[Ot]=De,ie&&!Ye.length&&$===void 0&&Et.push(De);var cn=We(Et);if(I==null||I(cn),lt(Et),ft){var tn,En;(tn=document.activeElement)===null||tn===void 0||(En=tn.blur)===null||En===void 0||En.call(tn),Ne.current.focus(dn),qe(ft,dn,Et)}else D==null||D(cn),yt(!D,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),_==null||_(cn)}},at=function(De){De.preventDefault();var ft=je.current.getBoundingClientRect(),Et=ft.width,Ot=ft.height,ln=ft.left,en=ft.top,dn=ft.bottom,cn=ft.right,tn=De.clientX,En=De.clientY,Rn;switch(O){case"btt":Rn=(dn-En)/Ot;break;case"ttb":Rn=(En-en)/Ot;break;case"rtl":Rn=(cn-tn)/Et;break;default:Rn=(tn-ln)/Et}var T=_e+Rn*($e-_e);ot(He(T),De)},nt=h.useState(null),dt=le(nt,2),Dt=dt[0],Nt=dt[1],Gt=function(De,ft){if(!u){var Et=Ze(Ye,De,ft);I==null||I(We(Ye)),lt(Et.values),Nt(Et.value)}};h.useEffect(function(){if(Dt!==null){var Xe=Ye.indexOf(Dt);Xe>=0&&Ne.current.focus(Xe)}Nt(null)},[Dt]);var Rt=h.useMemo(function(){return Se&&ze===null?(process.env.NODE_ENV!=="production"&&yt(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):Se},[Se,ze]),Bt=Wt(function(Xe,De){qe(Xe,De),I==null||I(We(Ye))}),Ft=Ue!==-1;h.useEffect(function(){if(!Ft){var Xe=Ye.lastIndexOf(wt);Ne.current.focus(Xe)}},[Ft]);var Xt=h.useMemo(function(){return Pe(et).sort(function(Xe,De){return Xe-De})},[et]),Mn=h.useMemo(function(){return ie?[Xt[0],Xt[Xt.length-1]]:[_e,Xt[0]]},[Xt,ie,_e]),Yt=le(Mn,2),sn=Yt[0],Ve=Yt[1];h.useImperativeHandle(e,function(){return{focus:function(){Ne.current.focus(0)},blur:function(){var De,ft=document,Et=ft.activeElement;(De=je.current)!==null&&De!==void 0&&De.contains(Et)&&(Et==null||Et.blur())}}}),h.useEffect(function(){p&&Ne.current.focus(0)},[]);var rt=h.useMemo(function(){return{min:_e,max:$e,direction:O,disabled:u,keyboard:f,step:ze,included:L,includedStart:sn,includedEnd:Ve,range:ie,tabIndex:ne,ariaLabelForHandle:ce,ariaLabelledByForHandle:me,ariaRequired:Oe,ariaValueTextFormatterForHandle:Me,styles:s||{},classNames:a||{}}},[_e,$e,O,u,f,ze,L,sn,Ve,ie,ne,ce,me,Oe,Me,s,a]);return h.createElement(_i.Provider,{value:rt},h.createElement("div",{ref:je,className:re(r,o,W(W(W(W({},"".concat(r,"-disabled"),u),"".concat(r,"-vertical"),F),"".concat(r,"-horizontal"),!F),"".concat(r,"-with-marks"),Ie.length)),style:i,onMouseDown:at,id:l},h.createElement("div",{className:re("".concat(r,"-rail"),a==null?void 0:a.rail),style:q(q({},X),s==null?void 0:s.rail)}),oe!==!1&&h.createElement(cF,{prefixCls:r,style:J,values:Ye,startPoint:G,onStartMove:Rt?Bt:void 0}),h.createElement(lF,{prefixCls:r,marks:Ie,dots:fe,style:Q,activeStyle:ue}),h.createElement(ww,{ref:Ne,prefixCls:r,style:V,values:et,draggingIndex:Ue,draggingDelete:$t,onStartMove:Bt,onOffsetChange:Gt,onFocus:m,onBlur:v,handleRender:be,activeHandleRender:de,onChangeComplete:it,onDelete:Ee?pt:void 0}),h.createElement(aF,{prefixCls:r,marks:Ie,onClick:ot})))});process.env.NODE_ENV!=="production"&&(Ew.displayName="Slider");const Nw=N.createContext({}),gh=h.forwardRef((t,e)=>{const{open:n,draggingDelete:r}=t,o=N.useRef(null),i=n&&!r,a=N.useRef(null);function s(){kt.cancel(a.current),a.current=null}function l(){a.current=kt(()=>{var c;(c=o.current)===null||c===void 0||c.forceAlign(),a.current=null})}return h.useEffect(()=>(i?l():s(),s),[i,t.title]),h.createElement(Uo,Object.assign({ref:ir(o,e)},t,{open:i}))});process.env.NODE_ENV!=="production"&&(gh.displayName="SliderTooltip");const pF=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:v,motionDurationMid:g}=t;return{[e]:Object.assign(Object.assign({},Fn(t)),{position:"relative",height:r,margin:`${se(a)} ${se(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${se(i)} ${se(a)}`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.railBg,borderRadius:t.borderRadiusXS,transition:`background-color ${g}`},[`${e}-track,${e}-tracks`]:{position:"absolute",transition:`background-color ${g}`},[`${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 ${se(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 ${se(m)} ${t.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
|
|
450
|
-
inset-inline-start ${g},
|
|
451
|
-
inset-block-start ${g},
|
|
452
|
-
width ${g},
|
|
453
|
-
height ${g},
|
|
454
|
-
box-shadow ${g},
|
|
455
|
-
outline ${g}
|
|
456
|
-
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(d).sub(u).div(2).add(v).mul(-1).equal(),insetBlockStart:c(d).sub(u).div(2).add(v).mul(-1).equal(),width:c(d).add(c(v).mul(2)).equal(),height:c(d).add(c(v).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${se(v)} ${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:`${se(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`},[`
|
|
457
|
-
${e}-dot
|
|
458
|
-
`]:{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 ${se(m)} ${l}`,insetInlineStart:0,insetBlockStart:0},[`
|
|
459
|
-
${e}-mark-text,
|
|
460
|
-
${e}-dot
|
|
461
|
-
`]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},Ow=(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(),v=e?{borderWidth:`${se(m)} 0`,transform:`translateY(${se(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${se(m)}`,transform:`translateX(${se(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({},v),[`${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()}}},mF=t=>{const{componentCls:e,marginPartWithMark:n}=t;return{[`${e}-horizontal`]:Object.assign(Object.assign({},Ow(t,!0)),{[`&${e}-with-marks`]:{marginBottom:n}})}},gF=t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:Object.assign(Object.assign({},Ow(t,!1)),{height:"100%"})}},vF=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 Ht(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 Ht(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString(),dotBorderColor:t.colorBorderSecondary,dotActiveBorderColor:t.colorPrimaryBorder,trackBgDisabled:t.colorBgContainerDisabled}},bF=hn("Slider",t=>{const e=Lt(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[pF(e),mF(e),gF(e)]},vF);function $d(){const[t,e]=h.useState(!1),n=h.useRef(null),r=()=>{kt.cancel(n.current)},o=i=>{r(),i?e(i):n.current=kt(()=>{e(i)})};return h.useEffect(()=>r,[]),[t,o]}var yF=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 CF(t,e){return t||t===null?t:e||e===null?e:n=>typeof n=="number"?n.toString():""}const $w=N.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:v,styles:g}=t,y=yF(t,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:b}=t,{getPrefixCls:C,direction:x,className:S,style:w,classNames:E,styles:M,getPopupContainer:$}=br("slider"),R=N.useContext(jr),I=s??R,{handleRender:D,direction:_}=N.useContext(Nw),z=(_||x)==="rtl",[k,P]=$d(),[B,F]=$d(),H=Object.assign({},p),{open:L,placement:G,getPopupContainer:J,prefixCls:V,formatter:X}=H,Q=L??u,ue=(k||B)&&Q!==!1,Y=CF(X,c),[fe,be]=$d(),de=ie=>{m==null||m(ie),be(!1)},oe=(ie,Ee)=>ie||(Ee?z?"left":"right":"top"),ge=C("slider",n),[ne,ce,me]=bF(ge),Oe=re(o,S,E.root,v==null?void 0:v.root,i,{[`${ge}-rtl`]:z,[`${ge}-lock`]:fe},ce,me);if(z&&!y.vertical&&(y.reverse=!y.reverse),process.env.NODE_ENV!=="production"){const ie=on("Slider");[["tooltipPrefixCls","prefixCls"],["getTooltipPopupContainer","getPopupContainer"],["tipFormatter","formatter"],["tooltipPlacement","placement"],["tooltipVisible","open"]].forEach(Ee=>{let[Se,he]=Ee;ie.deprecated(!(Se in t),Se,`tooltip.${he}`)})}N.useEffect(()=>{const ie=()=>{kt(()=>{F(!1)},1)};return document.addEventListener("mouseup",ie),()=>{document.removeEventListener("mouseup",ie)}},[]);const Me=r&&!Q,Ne=D||((ie,Ee)=>{const{index:Se}=Ee,he=ie.props;function Ae(Fe,Ie,Be){var Te,He,Ze,ht;Be&&((He=(Te=y)[Fe])===null||He===void 0||He.call(Te,Ie)),(ht=(Ze=he)[Fe])===null||ht===void 0||ht.call(Ze,Ie)}const _e=Object.assign(Object.assign({},he),{onMouseEnter:Fe=>{P(!0),Ae("onMouseEnter",Fe)},onMouseLeave:Fe=>{P(!1),Ae("onMouseLeave",Fe)},onMouseDown:Fe=>{F(!0),be(!0),Ae("onMouseDown",Fe)},onFocus:Fe=>{var Ie;F(!0),(Ie=y.onFocus)===null||Ie===void 0||Ie.call(y,Fe),Ae("onFocus",Fe,!0)},onBlur:Fe=>{var Ie;F(!1),(Ie=y.onBlur)===null||Ie===void 0||Ie.call(y,Fe),Ae("onBlur",Fe,!0)}}),$e=N.cloneElement(ie,_e),ze=(!!Q||ue)&&Y!==null;return Me?$e:N.createElement(gh,Object.assign({},H,{prefixCls:C("tooltip",V??l),title:Y?Y(Ee.value):"",open:ze,placement:oe(G??f,b),key:Se,classNames:{root:`${ge}-tooltip`},getPopupContainer:J||d||$}),$e)}),je=Me?(ie,Ee)=>{const Se=N.cloneElement(ie,{style:Object.assign(Object.assign({},ie.props.style),{visibility:"hidden"})});return N.createElement(gh,Object.assign({},H,{prefixCls:C("tooltip",V??l),title:Y?Y(Ee.value):"",open:Y!==null&&ue,placement:oe(G??f,b),key:"tooltip",classNames:{root:`${ge}-tooltip`},getPopupContainer:J||d||$,draggingDelete:Ee.draggingDelete}),Se)}:void 0,O=Object.assign(Object.assign(Object.assign(Object.assign({},M.root),w),g==null?void 0:g.root),a),ee=Object.assign(Object.assign({},M.tracks),g==null?void 0:g.tracks),K=re(E.tracks,v==null?void 0:v.tracks);return ne(N.createElement(Ew,Object.assign({},y,{classNames:Object.assign({handle:re(E.handle,v==null?void 0:v.handle),rail:re(E.rail,v==null?void 0:v.rail),track:re(E.track,v==null?void 0:v.track)},K?{tracks:K}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},M.handle),g==null?void 0:g.handle),rail:Object.assign(Object.assign({},M.rail),g==null?void 0:g.rail),track:Object.assign(Object.assign({},M.track),g==null?void 0:g.track)},Object.keys(ee).length?{tracks:ee}:{}),step:y.step,range:r,className:Oe,style:O,disabled:I,ref:e,prefixCls:ge,handleRender:Ne,activeHandleRender:je,onChangeComplete:de})))});process.env.NODE_ENV!=="production"&&($w.displayName="Slider");var SF=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 Mw=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=SF(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]),v=h.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),g=Wt(c),y=Wt(u),b=h.useMemo(()=>({onDragStart:g,onDragChange:y}),[]),C=Wt((S,w)=>{const{onFocus:E,style:M,className:$,onKeyDown:R}=S.props,I=Object.assign({},M);return r==="gradient"&&(I.background=hx(n,w.value)),h.cloneElement(S,{onFocus:D=>{l==null||l(w.index),E==null||E(D)},style:I,className:re($,{[`${e}-slider-handle-active`]:s===w.index}),onKeyDown:D=>{(D.key==="Delete"||D.key==="Backspace")&&d&&d(w.index),R==null||R(D)}})}),x=h.useMemo(()=>({direction:"ltr",handleRender:C}),[]);return h.createElement(Nw.Provider,{value:x},h.createElement(xw.Provider,{value:b},h.createElement($w,Object.assign({},p,{className:re(a,`${e}-slider`),tooltip:{open:!1},range:{editable:i,minCount:2},styles:{rail:{background:m},handle:v?{background:v}:{}},classNames:{rail:`${e}-slider-rail`,handle:`${e}-slider-handle`}}))))},xF=t=>{const{value:e,onChange:n,onChangeComplete:r}=t,o=a=>n(a[0]),i=a=>r(a[0]);return h.createElement(Mw,Object.assign({},t,{value:[e],onChange:o,onChangeComplete:i}))};function Ub(t){return Pe(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(y=>({percent:y.percent,color:y.color.toRgbString()})),[l]),d=h.useMemo(()=>u.map(y=>y.percent),[u]),f=h.useRef(u),p=y=>{let{rawValues:b,draggingIndex:C,draggingValue:x}=y;if(b.length>u.length){const S=hx(u,x),w=Pe(u);w.splice(C,0,{percent:x,color:S}),f.current=w}else f.current=u;s(!0),r(new hr(Ub(f.current)),!0)},m=y=>{let{deleteIndex:b,draggingIndex:C,draggingValue:x}=y,S=Pe(f.current);b!==-1?S.splice(b,1):(S[C]=Object.assign(Object.assign({},S[C]),{percent:x}),S=Ub(S)),r(new hr(S),!0)},v=y=>{const b=Pe(u);b.splice(y,1);const C=new hr(b);r(C),o(C)},g=y=>{o(new hr(u)),a>=y.length&&i(y.length-1),s(!1)};return c?h.createElement(Mw,{min:0,max:100,prefixCls:e,className:`${e}-gradient-slider`,colors:u,color:null,value:d,range:!0,onChangeComplete:g,disabled:!1,type:"gradient",activeIndex:a,onActive:i,onDragStart:p,onDragChange:m,onKeyDelete:v}):null},EF=h.memo(wF);var NF=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 OF={slider:xF},Gb=()=>{const t=N.useContext(cw),{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=NF(t,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=N.useMemo(()=>a.cleared?[{percent:0,color:new hr("")},{percent:100,color:new hr("")}]:a.getColors(),[a]),v=!a.isGradient(),[g,y]=N.useState(a);Jt(()=>{var A;v||y((A=m[d])===null||A===void 0?void 0:A.color)},[f,d]);const b=N.useMemo(()=>{var A;return v?a:f?g:(A=m[d])===null||A===void 0?void 0:A.color},[a,d,v,g,f]),[C,x]=N.useState(b),[S,w]=N.useState(0),E=C!=null&&C.equals(b)?b:C;Jt(()=>{x(b)},[S,b==null?void 0:b.toHexString()]);const M=(A,z)=>{let k=Xn(A);if(a.cleared){const B=k.toRgb();if(!B.r&&!B.g&&!B.b&&z){const{type:F,value:H=0}=z;k=new hr({h:F==="hue"?H:0,s:1,b:1,a:F==="alpha"?H/100:1})}else k=Vl(k)}if(e==="single")return k;const P=Pe(m);return P[d]=Object.assign(Object.assign({},P[d]),{color:k}),new hr(P)},$=(A,z,k)=>{const P=M(A,k);x(P.isGradient()?P.getColors()[d].color:P),l(P,z)},R=(A,z)=>{u(M(A,z)),w(k=>k+1)},I=A=>{l(M(A))};let D=null;const _=r.length>1;return(i||_)&&(D=N.createElement("div",{className:`${o}-operation`},_&&N.createElement(lw,{size:"small",options:r,value:e,onChange:n}),N.createElement(dw,Object.assign({prefixCls:o,value:a,onChange:A=>{l(A),c==null||c()}},p)))),N.createElement(N.Fragment,null,D,N.createElement(EF,Object.assign({},t,{colors:m})),N.createElement(lx,{prefixCls:o,value:E==null?void 0:E.toHsb(),disabledAlpha:s,onChange:(A,z)=>{$(A,!0,z)},onChangeComplete:(A,z)=>{R(A,z)},components:OF}),N.createElement(nF,Object.assign({value:b,onChange:I,prefixCls:o,disabledAlpha:s},p)))},Xb=()=>{const{prefixCls:t,value:e,presets:n,onChange:r}=N.useContext(uw);return Array.isArray(n)?N.createElement(ND,{value:e,presets:n,prefixCls:t,onChange:r}):null},Rw=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:v,onFormatChange:g,gradientDragging:y,onGradientDragging:b,disabledFormat:C}=t,x=`${e}-inner`,S=N.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:v,onFormatChange:g,gradientDragging:y,onGradientDragging:b,disabledFormat:C}),[e,o,i,a,s,l,c,u,d,f,p,m,v,g,y,b,C]),w=N.useMemo(()=>({prefixCls:e,value:o,presets:n,onChange:i}),[e,o,n,i]),E=N.createElement("div",{className:`${x}-content`},N.createElement(Gb,null),Array.isArray(n)&&N.createElement(aw,null),N.createElement(Xb,null));return N.createElement(cw.Provider,{value:S},N.createElement(uw.Provider,{value:w},N.createElement("div",{className:x},typeof r=="function"?r(E,{components:{Picker:Gb,Presets:Xb}}):E)))};process.env.NODE_ENV!=="production"&&(Rw.displayName="ColorPickerPanel");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};const MF=N.forwardRef((t,e)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:a,className:s,showText:l,activeIndex:c}=t,u=$F(t,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),d=`${r}-trigger`,f=`${d}-text`,p=`${f}-cell`,[m]=So("ColorPicker"),v=N.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,x)=>{const S=c!==-1&&c!==x;return N.createElement("span",{key:x,className:re(p,S&&`${p}-inactive`)},C.color.toRgbString()," ",C.percent,"%")});const y=n.toHexString().toUpperCase(),b=bp(n);switch(a){case"rgb":return n.toRgbString();case"hsb":return n.toHsbString();default:return b<100?`${y.slice(0,7)},${b}%`:y}},[n,a,l,c]),g=N.useMemo(()=>n.cleared?N.createElement(dw,{prefixCls:r}):N.createElement(fp,{prefixCls:r,color:n.toCssString()}),[n,r]);return N.createElement("div",Object.assign({ref:e,className:re(d,s,{[`${d}-active`]:o,[`${d}-disabled`]:i})},Zr(u)),g,l&&N.createElement("div",{className:f},v))});function RF(t,e,n){const[r]=So("ColorPicker"),[o,i]=mn(t,{value:e}),[a,s]=h.useState("single"),[l,c]=h.useMemo(()=>{const v=(Array.isArray(n)?n:[n]).filter(C=>C);v.length||v.push("single");const g=new Set(v),y=[],b=(C,x)=>{g.has(C)&&y.push({label:x,value:C})};return b("single",r.singleColor),b("gradient",r.gradientColor),[y,g]},[n]),[u,d]=h.useState(null),f=Wt(v=>{d(v),i(v)}),p=h.useMemo(()=>{const v=Xn(o||"");return v.equals(u)?u:v},[o,u]),m=h.useMemo(()=>{var v;return c.has(a)?a:(v=l[0])===null||v===void 0?void 0:v.value},[c,a,l]);return h.useEffect(()=>{s(p.isGradient()?"gradient":"single")},[p]),[p,f,m,s,l]}const Iw=(t,e)=>({backgroundImage:`conic-gradient(${e} 25%, transparent 25% 50%, ${e} 50% 75%, transparent 75% 100%)`,backgroundSize:`${t} ${t}`}),Yb=(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"},Iw("50%",t.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${se(i)} ${a}`,borderRadius:"inherit"}})}},IF=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 ${se(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:se(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 ${se(d)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:se(t.calc(l).sub(t.calc(m).mul(2)).equal())},[`${n}-input-prefix`]:{color:f}}}}}},TF=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:`${se(l)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${s}`}}},PF=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:v}=t;return{[`${e}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:v,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:p},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${se(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:`${se(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:`${se(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}}}},AF=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`]:[Iw(se(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:`${se(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}}}},vh=(t,e,n)=>({borderInlineEndWidth:t.lineWidth,borderColor:e,boxShadow:`0 0 0 ${se(t.controlOutlineWidth)} ${n}`,outline:0}),kF=t=>{const{componentCls:e}=t;return{"&-rtl":{[`${e}-presets-color`]:{"&::after":{direction:"ltr"}},[`${e}-clear`]:{"&::after":{direction:"ltr"}}}}},Jb=(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:`${se(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}})}},DF=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({},vh(t,n,a))},[`&${e}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${e}-trigger-active`]:Object.assign({},vh(t,r,s))}}},_F=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:se(i)}}}},BF=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:v,colorPickerPresetColorSize:g,colorPickerPreviewSize:y,lineWidth:b,colorBorder:C,paddingXXS:x,fontSize:S,colorPrimaryHover:w,controlOutline:E}=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:`${se(f)} 0 ${se(d)}`}},[`${n}-panel`]:Object.assign({},TF(t))},AF(t)),Yb(t,y)),IF(t)),PF(t)),Jb(t,g,{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:`${se(b)} solid ${C}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:t.calc(x).sub(b).equal(),[`${n}-trigger-text`]:{marginInlineStart:d,marginInlineEnd:t.calc(d).sub(t.calc(x).sub(b)).equal(),fontSize:S,color:l,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:s}}},"&:hover":{borderColor:w},[`&${n}-trigger-active`]:Object.assign({},vh(t,o,E)),"&-disabled":{color:s,background:c,cursor:"not-allowed","&:hover":{borderColor:v},[`${n}-trigger-text`]:{color:s}}},Jb(t,m)),Yb(t,m)),DF(t)),_F(t))},kF(t))},_s(t,{focusElCls:`${n}-trigger-active`})]},jF=hn("ColorPicker",t=>{const{colorTextQuaternary:e,marginSM:n}=t,r=8,o=Lt(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[BF(o)]});var zF=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 bu=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:v,style:g,className:y,size:b,rootClassName:C,prefixCls:x,styles:S,disabledAlpha:w=!1,onFormatChange:E,onChange:M,onClear:$,onOpenChange:R,onChangeComplete:I,getPopupContainer:D,autoAdjustOverflow:_=!0,destroyTooltipOnHide:A,disabledFormat:z}=t,k=zF(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","disabledFormat"]),{getPrefixCls:P,direction:B,colorPicker:F}=N.useContext(At),H=N.useContext(jr),L=d??H,[G,J]=mn(!1,{value:u,postState:He=>!L&&He,onChange:R}),[V,X]=mn(o,{value:o,defaultValue:i,onChange:E}),Q=P("color-picker",x),[ue,Y,fe,be,de]=RF(r,n,e),oe=N.useMemo(()=>bp(ue)<100,[ue]),[ge,ne]=N.useState(null),ce=He=>{if(I){let Ze=Xn(He);w&&oe&&(Ze=Vl(He)),I(Ze)}},me=(He,Ze)=>{let ht=Xn(He);w&&oe&&(ht=Vl(ht)),Y(ht),ne(null),M&&M(ht,ht.toCssString()),Ze||ce(ht)},[Oe,Me]=N.useState(0),[Ne,je]=N.useState(!1),O=He=>{if(be(He),He==="single"&&ue.isGradient())Me(0),me(new hr(ue.getColors()[0].color)),ne(ue);else if(He==="gradient"&&!ue.isGradient()){const Ze=oe?Vl(ue):ue;me(new hr(ge||[{percent:0,color:Ze},{percent:100,color:Ze}]))}},{status:ee}=N.useContext($r),{compactSize:K,compactItemClassnames:ie}=ei(Q,B),Ee=Vr(He=>{var Ze;return(Ze=b??K)!==null&&Ze!==void 0?Ze:He}),Se=xo(Q),[he,Ae,_e]=jF(Q,Se),$e={[`${Q}-rtl`]:B},ze=re(C,_e,Se,$e),Fe=re(Mi(Q,ee),{[`${Q}-sm`]:Ee==="small",[`${Q}-lg`]:Ee==="large"},ie,F==null?void 0:F.className,ze,y,Ae),Ie=re(Q,ze);if(process.env.NODE_ENV!=="production"){const He=on("ColorPicker");process.env.NODE_ENV!=="production"&&He(!(w&&oe),"usage","`disabledAlpha` will make the alpha to be 100% when use alpha color.")}const Be={open:G,trigger:c,placement:f,arrow:p,rootClassName:C,getPopupContainer:D,autoAdjustOverflow:_,destroyTooltipOnHide:A},Te=Object.assign(Object.assign({},F==null?void 0:F.style),g);return he(N.createElement(Bp,Object.assign({style:S==null?void 0:S.popup,styles:{body:S==null?void 0:S.popupOverlayInner},onOpenChange:He=>{(!He||!L)&&J(He)},content:N.createElement(Ko,{form:!0},N.createElement(Rw,{mode:fe,onModeChange:O,modeOptions:de,prefixCls:Q,value:ue,allowClear:a,disabled:L,disabledAlpha:w,presets:s,panelRender:m,format:V,onFormatChange:X,onChange:me,onChangeComplete:ce,onClear:$,activeIndex:Oe,onActive:Me,gradientDragging:Ne,onGradientDragging:je,disabledFormat:z})),classNames:{root:Ie}},Be),l||N.createElement(MF,Object.assign({activeIndex:G?Oe:-1,open:G,className:Fe,style:Te,prefixCls:Q,disabled:L,showText:v,format:V},k,{color:ue}))))};process.env.NODE_ENV!=="production"&&(bu.displayName="ColorPicker");const LF=wp(bu,void 0,t=>Object.assign(Object.assign({},t),{placement:"bottom",autoAdjustOverflow:!1}),"color-picker",t=>t);bu._InternalPanelDoNotUseOrYouWillBeFired=LF;function Qb(t){return["small","middle","large"].includes(t)}function Zb(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const Tw=N.createContext({latestIndex:0}),VF=Tw.Provider,FF=t=>{let{className:e,index:n,children:r,split:o,style:i}=t;const{latestIndex:a}=h.useContext(Tw);return r==null?null:h.createElement(h.Fragment,null,h.createElement("div",{className:e,style:i},r),n<a&&o&&h.createElement("span",{className:`${e}-split`},o))};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 WF=h.forwardRef((t,e)=>{var n;const{getPrefixCls:r,direction:o,size:i,className:a,style:s,classNames:l,styles:c}=br("space"),{size:u=i??"small",align:d,className:f,rootClassName:p,children:m,direction:v="horizontal",prefixCls:g,split:y,style:b,wrap:C=!1,classNames:x,styles:S}=t,w=HF(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,M]=Array.isArray(u)?u:[u,u],$=Qb(M),R=Qb(E),I=Zb(M),D=Zb(E),_=gr(m,{keepEmpty:!0}),A=d===void 0&&v==="horizontal"?"center":d,z=r("space",g),[k,P,B]=QS(z),F=re(z,a,P,`${z}-${v}`,{[`${z}-rtl`]:o==="rtl",[`${z}-align-${A}`]:A,[`${z}-gap-row-${M}`]:$,[`${z}-gap-col-${E}`]:R},f,p,B),H=re(`${z}-item`,(n=x==null?void 0:x.item)!==null&&n!==void 0?n:l.item);let L=0;const G=_.map((X,Q)=>{var ue;X!=null&&(L=Q);const Y=(X==null?void 0:X.key)||`${H}-${Q}`;return h.createElement(FF,{className:H,key:Y,index:Q,split:y,style:(ue=S==null?void 0:S.item)!==null&&ue!==void 0?ue:c.item},X)}),J=h.useMemo(()=>({latestIndex:L}),[L]);if(_.length===0)return null;const V={};return C&&(V.flexWrap="wrap"),!R&&D&&(V.columnGap=E),!$&&I&&(V.rowGap=M),k(h.createElement("div",Object.assign({ref:e,className:F,style:Object.assign(Object.assign(Object.assign({},V),s),b)},w),h.createElement(VF,{value:J},G)))}),Zp=WF;Zp.Compact=fk;process.env.NODE_ENV!=="production"&&(Zp.displayName="Space");var qF=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 Pw=t=>{const{getPopupContainer:e,getPrefixCls:n,direction:r}=h.useContext(At),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:p,arrow:m,autoFocus:v,overlay:g,trigger:y,align:b,open:C,onOpenChange:x,placement:S,getPopupContainer:w,href:E,icon:M=h.createElement(qp,null),title:$,buttonsRender:R=Y=>Y,mouseEnterDelay:I,mouseLeaveDelay:D,overlayClassName:_,overlayStyle:A,destroyPopupOnHide:z,dropdownRender:k}=t,P=qF(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),B=n("dropdown",o),F=`${B}-button`,H={menu:p,arrow:m,autoFocus:v,align:b,disabled:s,trigger:s?[]:y,onOpenChange:x,getPopupContainer:w||e,mouseEnterDelay:I,mouseLeaveDelay:D,overlayClassName:_,overlayStyle:A,destroyPopupOnHide:z,dropdownRender:k},{compactSize:L,compactItemClassnames:G}=ei(B,r),J=re(F,G,f);"overlay"in t&&(H.overlay=g),"open"in t&&(H.open=C),"placement"in t?H.placement=S:H.placement=r==="rtl"?"bottomLeft":"bottomRight";const V=h.createElement(vo,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:E,title:$},d),X=h.createElement(vo,{type:i,danger:a,icon:M}),[Q,ue]=R([V,X]);return h.createElement(Zp.Compact,Object.assign({className:J,size:L,block:!0},P),Q,h.createElement(qs,Object.assign({},H),ue))};Pw.__ANT_BUTTON=!0;const yu=qs;yu.Button=Pw;var KF={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"},UF=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:KF}))},Aw=h.forwardRef(UF);process.env.NODE_ENV!=="production"&&(Aw.displayName="EyeOutlined");const GF=t=>{const{getPrefixCls:e,direction:n}=N.useContext(At),{prefixCls:r,className:o}=t,i=e("input-group",r),a=e("input"),[s,l,c]=iw(a),u=re(i,c,{[`${i}-lg`]:t.size==="large",[`${i}-sm`]:t.size==="small",[`${i}-compact`]:t.compact,[`${i}-rtl`]:n==="rtl"},l,o),d=N.useContext($r),f=N.useMemo(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return process.env.NODE_ENV!=="production"&&on("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($r.Provider,{value:f},t.children)))},XF=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},YF=hn(["Input","OTP"],t=>{const e=Lt(t,Ks(t));return[XF(e)]},Us);var JF=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 QF=h.forwardRef((t,e)=>{const{value:n,onChange:r,onActiveChange:o,index:i,mask:a}=t,s=JF(t,["value","onChange","onActiveChange","index","mask"]),l=n&&typeof a=="string"?a:n,c=m=>{r(i,m.target.value)},u=h.useRef(null);h.useImperativeHandle(e,()=>u.current);const d=()=>{kt(()=>{var m;const v=(m=u.current)===null||m===void 0?void 0:m.input;document.activeElement===v&&v&&v.select()})},f=m=>{const{key:v,ctrlKey:g,metaKey:y}=m;v==="ArrowLeft"?o(i-1):v==="ArrowRight"?o(i+1):v==="z"&&(g||y)&&m.preventDefault(),d()},p=m=>{m.key==="Backspace"&&!n&&o(i-1),d()};return h.createElement(Ma,Object.assign({type:a===!0?"password":"text"},s,{ref:u,value:l,onInput:c,onFocus:d,onKeyDown:f,onKeyUp:p,onMouseDown:d,onMouseUp:d}))});var ZF=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 Cl(t){return(t||"").split("")}const eH=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},tH=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:v,onInput:g,inputMode:y}=t,b=ZF(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);if(process.env.NODE_ENV!=="production"){const V=on("Input.OTP");process.env.NODE_ENV!=="production"&&V(!(typeof m=="string"&&m.length>1),"usage","`mask` prop should be a single character.")}const{getPrefixCls:C,direction:x}=h.useContext(At),S=C("otp",n),w=Zr(b,{aria:!0,data:!0,attr:!0}),[E,M,$]=YF(S),R=Vr(V=>o??V),I=h.useContext($r),D=Fs(I.status,f),_=h.useMemo(()=>Object.assign(Object.assign({},I),{status:D,hasFeedback:!1,feedbackIcon:null}),[I,D]),A=h.useRef(null),z=h.useRef({});h.useImperativeHandle(e,()=>({focus:()=>{var V;(V=z.current[0])===null||V===void 0||V.focus()},blur:()=>{var V;for(let X=0;X<r;X+=1)(V=z.current[X])===null||V===void 0||V.blur()},nativeElement:A.current}));const k=V=>l?l(V):V,[P,B]=h.useState(()=>Cl(k(i||"")));h.useEffect(()=>{a!==void 0&&B(Cl(a))},[a]);const F=Wt(V=>{B(V),g&&g(V),s&&V.length===r&&V.every(X=>X)&&V.some((X,Q)=>P[Q]!==X)&&s(V.join(""))}),H=Wt((V,X)=>{let Q=Pe(P);for(let Y=0;Y<V;Y+=1)Q[Y]||(Q[Y]="");X.length<=1?Q[V]=X:Q=Q.slice(0,V).concat(Cl(X)),Q=Q.slice(0,r);for(let Y=Q.length-1;Y>=0&&!Q[Y];Y-=1)Q.pop();const ue=k(Q.map(Y=>Y||" ").join(""));return Q=Cl(ue).map((Y,fe)=>Y===" "&&!Q[fe]?Q[fe]:Y),Q}),L=(V,X)=>{var Q;const ue=H(V,X),Y=Math.min(V+X.length,r-1);Y!==V&&ue[V]!==void 0&&((Q=z.current[Y])===null||Q===void 0||Q.focus()),F(ue)},G=V=>{var X;(X=z.current[V])===null||X===void 0||X.focus()},J={variant:u,disabled:d,status:D,mask:m,type:v,inputMode:y};return E(h.createElement("div",Object.assign({},w,{ref:A,className:re(S,{[`${S}-sm`]:R==="small",[`${S}-lg`]:R==="large",[`${S}-rtl`]:x==="rtl"},$,M)}),h.createElement($r.Provider,{value:_},Array.from({length:r}).map((V,X)=>{const Q=`otp-${X}`,ue=P[X]||"";return h.createElement(h.Fragment,{key:Q},h.createElement(QF,Object.assign({ref:Y=>{z.current[X]=Y},index:X,size:R,htmlSize:1,className:`${S}-input`,onChange:L,value:ue,onActiveChange:G,autoFocus:X===0&&p},J)),X<r-1&&h.createElement(eH,{separator:c,index:X,prefixCls:S}))}))))});var nH={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"},rH=function(e,n){return h.createElement(An,Le({},e,{ref:n,icon:nH}))},kw=h.forwardRef(rH);process.env.NODE_ENV!=="production"&&(kw.displayName="EyeInvisibleOutlined");var oH=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 iH=t=>t?h.createElement(Aw,null):h.createElement(kw,null),aH={click:"onClick",hover:"onMouseOver"},Dw=h.forwardRef((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i=iH}=t,a=h.useContext(jr),s=n??a,l=typeof o=="object"&&o.visible!==void 0,[c,u]=N.useState(()=>l?o.visible:!1),d=N.useRef(null);h.useEffect(()=>{l&&u(o.visible)},[l,o]);const f=Sw(d),p=()=>{var R;if(s)return;c&&f();const I=!c;u(I),typeof o=="object"&&((R=o.onVisibleChange)===null||R===void 0||R.call(o,I))},m=R=>{const I=aH[r]||"",D=i(c),_={[I]:p,className:`${R}-icon`,key:"passwordIcon",onMouseDown:A=>{A.preventDefault()},onMouseUp:A=>{A.preventDefault()}};return h.cloneElement(h.isValidElement(D)?D:h.createElement("span",null,D),_)},{className:v,prefixCls:g,inputPrefixCls:y,size:b}=t,C=oH(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:x}=h.useContext(At),S=x("input",y),w=x("input-password",g),E=o&&m(w),M=re(w,v,{[`${w}-${b}`]:!!b}),$=Object.assign(Object.assign({},Tn(C,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:M,prefixCls:S,suffix:E});return b&&($.size=b),h.createElement(Ma,Object.assign({ref:ir(e,d)},$))});process.env.NODE_ENV!=="production"&&(Dw.displayName="Input.Password");var sH=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 _w=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}=t,v=sH(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:g,direction:y}=h.useContext(At),b=h.useRef(!1),C=g("input-search",n),x=g("input",r),{compactSize:S}=ei(C,y),w=Vr(L=>{var G;return(G=i??S)!==null&&G!==void 0?G:L}),E=h.useRef(null),M=L=>{L!=null&&L.target&&L.type==="click"&&d&&d(L.target.value,L,{source:"clear"}),f==null||f(L)},$=L=>{var G;document.activeElement===((G=E.current)===null||G===void 0?void 0:G.input)&&L.preventDefault()},R=L=>{var G,J;d&&d((J=(G=E.current)===null||G===void 0?void 0:G.input)===null||J===void 0?void 0:J.value,L,{source:"input"})},I=L=>{b.current||c||R(L)},D=typeof s=="boolean"?h.createElement(Ap,null):null,_=`${C}-button`;let A;const z=s||{},k=z.type&&z.type.__ANT_BUTTON===!0;k||z.type==="button"?A=Or(z,Object.assign({onMouseDown:$,onClick:L=>{var G,J;(J=(G=z==null?void 0:z.props)===null||G===void 0?void 0:G.onClick)===null||J===void 0||J.call(G,L),R(L)},key:"enterButton"},k?{className:_,size:w}:{})):A=h.createElement(vo,{className:_,type:s?"primary":void 0,size:w,disabled:u,key:"enterButton",onMouseDown:$,onClick:R,loading:c,icon:D},s),l&&(A=[A,Or(l,{key:"addonAfter"})]);const P=re(C,{[`${C}-rtl`]:y==="rtl",[`${C}-${w}`]:!!w,[`${C}-with-button`]:!!s},o),B=Object.assign(Object.assign({},v),{className:P,prefixCls:x,type:"search"}),F=L=>{b.current=!0,p==null||p(L)},H=L=>{b.current=!1,m==null||m(L)};return h.createElement(Ma,Object.assign({ref:ir(E,e),onPressEnter:I},B,{size:w,onCompositionStart:F,onCompositionEnd:H,addonAfter:A,suffix:a,onChange:M,disabled:u}))});process.env.NODE_ENV!=="production"&&(_w.displayName="Search");var lH=`
|
|
462
|
-
min-height:0 !important;
|
|
463
|
-
max-height:none !important;
|
|
464
|
-
height:0 !important;
|
|
465
|
-
visibility:hidden !important;
|
|
466
|
-
overflow:hidden !important;
|
|
467
|
-
position:absolute !important;
|
|
468
|
-
z-index:-1000 !important;
|
|
469
|
-
top:0 !important;
|
|
470
|
-
right:0 !important;
|
|
471
|
-
pointer-events: none !important;
|
|
472
|
-
`,cH=["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"],Md={},cr;function uH(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&&Md[n])return Md[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=cH.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return e&&n&&(Md[n]=l),l}function dH(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;cr||(cr=document.createElement("textarea"),cr.setAttribute("tab-index","-1"),cr.setAttribute("aria-hidden","true"),cr.setAttribute("name","hiddenTextarea"),document.body.appendChild(cr)),t.getAttribute("wrap")?cr.setAttribute("wrap",t.getAttribute("wrap")):cr.removeAttribute("wrap");var o=uH(t,e),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;cr.setAttribute("style","".concat(l,";").concat(lH)),cr.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,f=cr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=i),n!==null||r!==null){cr.value=" ";var p=cr.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 fH=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Rd=0,Id=1,Td=2,hH=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=xt(n,fH),m=mn(o,{value:i,postState:function(X){return X??""}}),v=le(m,2),g=v[0],y=v[1],b=function(X){y(X.target.value),d==null||d(X)},C=h.useRef();h.useImperativeHandle(e,function(){return{textArea:C.current}});var x=h.useMemo(function(){return a&&st(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),S=le(x,2),w=S[0],E=S[1],M=!!a,$=function(){try{if(document.activeElement===C.current){var X=C.current,Q=X.selectionStart,ue=X.selectionEnd,Y=X.scrollTop;C.current.setSelectionRange(Q,ue),C.current.scrollTop=Y}}catch{}},R=h.useState(Td),I=le(R,2),D=I[0],_=I[1],A=h.useState(),z=le(A,2),k=z[0],P=z[1],B=function(){_(Rd),process.env.NODE_ENV==="test"&&(f==null||f())};Jt(function(){M&&B()},[i,w,E,M]),Jt(function(){if(D===Rd)_(Id);else if(D===Id){var V=dH(C.current,!1,w,E);_(Td),P(V)}else $()},[D]);var F=h.useRef(),H=function(){kt.cancel(F.current)},L=function(X){D===Td&&(s==null||s(X),a&&(H(),F.current=kt(function(){B()})))};h.useEffect(function(){return H},[]);var G=M?k:null,J=q(q({},c),G);return(D===Rd||D===Id)&&(J.overflowY="hidden",J.overflowX="hidden"),h.createElement(Co,{onResize:L,disabled:!(a||s)},h.createElement("textarea",Le({},p,{ref:C,style:J,className:re(r,l,W({},"".concat(r,"-disabled"),u)),disabled:u,value:g,onChange:b})))}),pH=["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"],mH=N.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,v=t.showCount,g=t.count,y=t.className,b=t.style,C=t.disabled,x=t.hidden,S=t.classNames,w=t.styles,E=t.onResize,M=t.onClear,$=t.onPressEnter,R=t.readOnly,I=t.autoSize,D=t.onKeyDown,_=xt(t,pH),A=mn(r,{value:o,defaultValue:r}),z=le(A,2),k=z[0],P=z[1],B=k==null?"":String(k),F=N.useState(!1),H=le(F,2),L=H[0],G=H[1],J=N.useRef(!1),V=N.useState(null),X=le(V,2),Q=X[0],ue=X[1],Y=N.useRef(null),fe=N.useRef(null),be=function(){var Be;return(Be=fe.current)===null||Be===void 0?void 0:Be.textArea},de=function(){be().focus()};N.useImperativeHandle(e,function(){var Ie;return{resizableTextArea:fe.current,focus:de,blur:function(){be().blur()},nativeElement:((Ie=Y.current)===null||Ie===void 0?void 0:Ie.nativeElement)||be()}}),N.useEffect(function(){G(function(Ie){return!C&&Ie})},[C]);var oe=N.useState(null),ge=le(oe,2),ne=ge[0],ce=ge[1];N.useEffect(function(){if(ne){var Ie;(Ie=be()).setSelectionRange.apply(Ie,Pe(ne))}},[ne]);var me=vw(g,v),Oe=(n=me.max)!==null&&n!==void 0?n:c,Me=Number(Oe)>0,Ne=me.strategy(B),je=!!Oe&&Ne>Oe,O=function(Be,Te){var He=Te;!J.current&&me.exceedFormatter&&me.max&&me.strategy(Te)>me.max&&(He=me.exceedFormatter(Te,{max:me.max}),Te!==He&&ce([be().selectionStart||0,be().selectionEnd||0])),P(He),Nc(Be.currentTarget,Be,s,He)},ee=function(Be){J.current=!0,u==null||u(Be)},K=function(Be){J.current=!1,O(Be,Be.currentTarget.value),d==null||d(Be)},ie=function(Be){O(Be,Be.target.value)},Ee=function(Be){Be.key==="Enter"&&$&&$(Be),D==null||D(Be)},Se=function(Be){G(!0),i==null||i(Be)},he=function(Be){G(!1),a==null||a(Be)},Ae=function(Be){P(""),de(),Nc(be(),Be,s)},_e=f,$e;me.show&&(me.showFormatter?$e=me.showFormatter({value:B,count:Ne,maxLength:Oe}):$e="".concat(Ne).concat(Me?" / ".concat(Oe):""),_e=N.createElement(N.Fragment,null,_e,N.createElement("span",{className:re("".concat(m,"-data-count"),S==null?void 0:S.count),style:w==null?void 0:w.count},$e)));var ze=function(Be){var Te;E==null||E(Be),(Te=be())!==null&&Te!==void 0&&Te.style.height&&ue(!0)},Fe=!I&&!v&&!l;return N.createElement(Yp,{ref:Y,value:B,allowClear:l,handleReset:Ae,suffix:_e,prefixCls:m,classNames:q(q({},S),{},{affixWrapper:re(S==null?void 0:S.affixWrapper,W(W({},"".concat(m,"-show-count"),v),"".concat(m,"-textarea-allow-clear"),l))}),disabled:C,focused:L,className:re(y,je&&"".concat(m,"-out-of-range")),style:q(q({},b),Q&&!Fe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof $e=="string"?$e:void 0}},hidden:x,readOnly:R,onClear:M},N.createElement(hH,Le({},_,{autoSize:I,maxLength:c,onKeyDown:Ee,onChange:ie,onFocus:Se,onBlur:he,onCompositionStart:ee,onCompositionEnd:K,className:re(S==null?void 0:S.textarea),style:q(q({},w==null?void 0:w.textarea),{},{resize:b==null?void 0:b.resize}),disabled:C,prefixCls:m,onResize:ze,ref:fe,readOnly:R})))});const gH=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}`]:{height:"100%"},[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
473
|
-
&-allow-clear > ${e},
|
|
474
|
-
&-affix-wrapper${r}-has-feedback ${e}
|
|
475
|
-
`]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},vH=hn(["Input","TextArea"],t=>{const e=Lt(t,Ks(t));return[gH(e)]},Us,{resetFont:!1});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=N.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:v,onMouseDown:g,onResize:y}=t,b=bH(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:me}=on("TextArea");me(!("bordered"in t),"bordered","variant")}const{getPrefixCls:C,direction:x,allowClear:S,autoComplete:w,className:E,style:M,classNames:$,styles:R}=br("textArea"),I=h.useContext(jr),D=a??I,{status:_,hasFeedback:A,feedbackIcon:z}=h.useContext($r),k=Fs(_,s),P=h.useRef(null);h.useImperativeHandle(e,()=>{var me;return{resizableTextArea:(me=P.current)===null||me===void 0?void 0:me.resizableTextArea,focus:Oe=>{var Me,Ne;Xp((Ne=(Me=P.current)===null||Me===void 0?void 0:Me.resizableTextArea)===null||Ne===void 0?void 0:Ne.textArea,Oe)},blur:()=>{var Oe;return(Oe=P.current)===null||Oe===void 0?void 0:Oe.blur()}}});const B=C("input",r),F=xo(B),[H,L,G]=ow(B,u),[J]=vH(B,F),{compactSize:V,compactItemClassnames:X}=ei(B,x),Q=Vr(me=>{var Oe;return(Oe=i??V)!==null&&Oe!==void 0?Oe:me}),[ue,Y]=du("textArea",m,o),fe=Cw(l??S),[be,de]=h.useState(!1),[oe,ge]=h.useState(!1),ne=me=>{de(!0),g==null||g(me);const Oe=()=>{de(!1),document.removeEventListener("mouseup",Oe)};document.addEventListener("mouseup",Oe)},ce=me=>{var Oe,Me;if(y==null||y(me),be&&typeof getComputedStyle=="function"){const Ne=(Me=(Oe=P.current)===null||Oe===void 0?void 0:Oe.nativeElement)===null||Me===void 0?void 0:Me.querySelector("textarea");Ne&&getComputedStyle(Ne).resize==="both"&&ge(!0)}};return H(J(h.createElement(mH,Object.assign({autoComplete:w},b,{style:Object.assign(Object.assign({},M),f),styles:Object.assign(Object.assign({},R),p),disabled:D,allowClear:fe,className:re(G,F,d,u,X,E,oe&&`${B}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),$),{textarea:re({[`${B}-sm`]:Q==="small",[`${B}-lg`]:Q==="large"},L,c==null?void 0:c.textarea,$.textarea,be&&`${B}-mouse-active`),variant:re({[`${B}-${ue}`]:Y},Mi(B,k)),affixWrapper:re(`${B}-textarea-affix-wrapper`,{[`${B}-affix-wrapper-rtl`]:x==="rtl",[`${B}-affix-wrapper-sm`]:Q==="small",[`${B}-affix-wrapper-lg`]:Q==="large",[`${B}-textarea-show-count`]:v||((n=t.count)===null||n===void 0?void 0:n.show)},L)}),prefixCls:B,suffix:A&&h.createElement("span",{className:`${B}-textarea-suffix`},z),showCount:v,ref:P,onResize:ce,onMouseDown:ne}))))}),ho=Ma;ho.Group=GF;ho.Search=_w;ho.TextArea=yH;ho.Password=Dw;ho.OTP=tH;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};const SH=t=>{const{prefixCls:e,className:n,closeIcon:r,closable:o,type:i,title:a,children:s,footer:l}=t,c=CH(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=h.useContext(At),d=u(),f=e||u("modal"),p=xo(d),[m,v,g]=_x(f,p),y=`${f}-confirm`;let b={};return i?b={closable:o??!1,title:"",footer:"",children:h.createElement(jx,Object.assign({},t,{prefixCls:f,confirmPrefixCls:y,rootPrefixCls:d,content:s}))}:b={closable:o??!0,title:a,footer:l!==null&&h.createElement(Px,Object.assign({},t)),children:s},m(h.createElement(Cp,Object.assign({prefixCls:f,className:re(v,`${f}-pure-panel`,i&&y,i&&`${y}-${i}`,n,g,p)},c,{closeIcon:Tx(f,r),closable:o},b)))},xH=Ux(SH);function Bw(t){return Ls(Fx(t))}const Mr=Bx;Mr.useModal=oB;Mr.info=function(e){return Ls(Hx(e))};Mr.success=function(e){return Ls(Wx(e))};Mr.error=function(e){return Ls(qx(e))};Mr.warning=Bw;Mr.warn=Bw;Mr.confirm=function(e){return Ls(Kx(e))};Mr.destroyAll=function(){for(;di.length;){const e=di.pop();e&&e()}};Mr.config=Z_;Mr._InternalPanelDoNotUseOrYouWillBeFired=xH;process.env.NODE_ENV!=="production"&&(Mr.displayName="Modal");/**
|
|
476
|
-
* @license lucide-react v0.484.0 - ISC
|
|
477
|
-
*
|
|
478
|
-
* This source code is licensed under the ISC license.
|
|
479
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
480
|
-
*/const wH=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),EH=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),e0=t=>{const e=EH(t);return e.charAt(0).toUpperCase()+e.slice(1)},jw=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
|
|
481
|
-
* @license lucide-react v0.484.0 - ISC
|
|
482
|
-
*
|
|
483
|
-
* This source code is licensed under the ISC license.
|
|
484
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
485
|
-
*/var NH={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"};/**
|
|
486
|
-
* @license lucide-react v0.484.0 - ISC
|
|
487
|
-
*
|
|
488
|
-
* This source code is licensed under the ISC license.
|
|
489
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
490
|
-
*/const OH=N.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>N.createElement("svg",{ref:l,...NH,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:jw("lucide",o),...s},[...a.map(([c,u])=>N.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
491
|
-
* @license lucide-react v0.484.0 - ISC
|
|
492
|
-
*
|
|
493
|
-
* This source code is licensed under the ISC license.
|
|
494
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
495
|
-
*/const Vt=(t,e)=>{const n=N.forwardRef(({className:r,...o},i)=>N.createElement(OH,{ref:i,iconNode:e,className:jw(`lucide-${wH(e0(t))}`,`lucide-${t}`,r),...o}));return n.displayName=e0(t),n};/**
|
|
496
|
-
* @license lucide-react v0.484.0 - ISC
|
|
497
|
-
*
|
|
498
|
-
* This source code is licensed under the ISC license.
|
|
499
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
500
|
-
*/const $H=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],MH=Vt("align-center",$H);/**
|
|
501
|
-
* @license lucide-react v0.484.0 - ISC
|
|
502
|
-
*
|
|
503
|
-
* This source code is licensed under the ISC license.
|
|
504
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
505
|
-
*/const RH=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],IH=Vt("align-justify",RH);/**
|
|
506
|
-
* @license lucide-react v0.484.0 - ISC
|
|
507
|
-
*
|
|
508
|
-
* This source code is licensed under the ISC license.
|
|
509
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
510
|
-
*/const TH=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],PH=Vt("align-left",TH);/**
|
|
511
|
-
* @license lucide-react v0.484.0 - ISC
|
|
512
|
-
*
|
|
513
|
-
* This source code is licensed under the ISC license.
|
|
514
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
515
|
-
*/const AH=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],kH=Vt("align-right",AH);/**
|
|
516
|
-
* @license lucide-react v0.484.0 - ISC
|
|
517
|
-
*
|
|
518
|
-
* This source code is licensed under the ISC license.
|
|
519
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
520
|
-
*/const DH=[["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"}]],_H=Vt("bold",DH);/**
|
|
521
|
-
* @license lucide-react v0.484.0 - ISC
|
|
522
|
-
*
|
|
523
|
-
* This source code is licensed under the ISC license.
|
|
524
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
525
|
-
*/const BH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],jH=Vt("chevron-down",BH);/**
|
|
526
|
-
* @license lucide-react v0.484.0 - ISC
|
|
527
|
-
*
|
|
528
|
-
* This source code is licensed under the ISC license.
|
|
529
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
530
|
-
*/const zH=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],LH=Vt("code",zH);/**
|
|
531
|
-
* @license lucide-react v0.484.0 - ISC
|
|
532
|
-
*
|
|
533
|
-
* This source code is licensed under the ISC license.
|
|
534
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
535
|
-
*/const VH=[["polyline",{points:"15 10 20 15 15 20",key:"1q7qjw"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],FH=Vt("corner-down-right",VH);/**
|
|
536
|
-
* @license lucide-react v0.484.0 - ISC
|
|
537
|
-
*
|
|
538
|
-
* This source code is licensed under the ISC license.
|
|
539
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
540
|
-
*/const HH=[["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"}]],Pd=Vt("heading-1",HH);/**
|
|
541
|
-
* @license lucide-react v0.484.0 - ISC
|
|
542
|
-
*
|
|
543
|
-
* This source code is licensed under the ISC license.
|
|
544
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
545
|
-
*/const WH=[["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"}]],t0=Vt("heading-2",WH);/**
|
|
546
|
-
* @license lucide-react v0.484.0 - ISC
|
|
547
|
-
*
|
|
548
|
-
* This source code is licensed under the ISC license.
|
|
549
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
550
|
-
*/const qH=[["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"}]],n0=Vt("heading-3",qH);/**
|
|
551
|
-
* @license lucide-react v0.484.0 - ISC
|
|
552
|
-
*
|
|
553
|
-
* This source code is licensed under the ISC license.
|
|
554
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
555
|
-
*/const KH=[["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"}]],r0=Vt("heading-4",KH);/**
|
|
556
|
-
* @license lucide-react v0.484.0 - ISC
|
|
557
|
-
*
|
|
558
|
-
* This source code is licensed under the ISC license.
|
|
559
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
560
|
-
*/const UH=[["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"}]],o0=Vt("heading-5",UH);/**
|
|
561
|
-
* @license lucide-react v0.484.0 - ISC
|
|
562
|
-
*
|
|
563
|
-
* This source code is licensed under the ISC license.
|
|
564
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
565
|
-
*/const GH=[["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"}]],i0=Vt("heading-6",GH);/**
|
|
566
|
-
* @license lucide-react v0.484.0 - ISC
|
|
567
|
-
*
|
|
568
|
-
* This source code is licensed under the ISC license.
|
|
569
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
570
|
-
*/const XH=[["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"}]],YH=Vt("image",XH);/**
|
|
571
|
-
* @license lucide-react v0.484.0 - ISC
|
|
572
|
-
*
|
|
573
|
-
* This source code is licensed under the ISC license.
|
|
574
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
575
|
-
*/const JH=[["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"}]],QH=Vt("italic",JH);/**
|
|
576
|
-
* @license lucide-react v0.484.0 - ISC
|
|
577
|
-
*
|
|
578
|
-
* This source code is licensed under the ISC license.
|
|
579
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
580
|
-
*/const ZH=[["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"}]],e5=Vt("layers",ZH);/**
|
|
581
|
-
* @license lucide-react v0.484.0 - ISC
|
|
582
|
-
*
|
|
583
|
-
* This source code is licensed under the ISC license.
|
|
584
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
585
|
-
*/const t5=[["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"}]],n5=Vt("list-ordered",t5);/**
|
|
586
|
-
* @license lucide-react v0.484.0 - ISC
|
|
587
|
-
*
|
|
588
|
-
* This source code is licensed under the ISC license.
|
|
589
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
590
|
-
*/const r5=[["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"}]],o5=Vt("list",r5);/**
|
|
591
|
-
* @license lucide-react v0.484.0 - ISC
|
|
592
|
-
*
|
|
593
|
-
* This source code is licensed under the ISC license.
|
|
594
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
595
|
-
*/const i5=[["path",{d:"M5 12h14",key:"1ays0h"}]],a5=Vt("minus",i5);/**
|
|
596
|
-
* @license lucide-react v0.484.0 - ISC
|
|
597
|
-
*
|
|
598
|
-
* This source code is licensed under the ISC license.
|
|
599
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
600
|
-
*/const s5=[["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"}]],l5=Vt("paint-bucket",s5);/**
|
|
601
|
-
* @license lucide-react v0.484.0 - ISC
|
|
602
|
-
*
|
|
603
|
-
* This source code is licensed under the ISC license.
|
|
604
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
605
|
-
*/const c5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],u5=Vt("plus",c5);/**
|
|
606
|
-
* @license lucide-react v0.484.0 - ISC
|
|
607
|
-
*
|
|
608
|
-
* This source code is licensed under the ISC license.
|
|
609
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
610
|
-
*/const d5=[["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"}]],f5=Vt("quote",d5);/**
|
|
611
|
-
* @license lucide-react v0.484.0 - ISC
|
|
612
|
-
*
|
|
613
|
-
* This source code is licensed under the ISC license.
|
|
614
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
615
|
-
*/const h5=[["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"}]],p5=Vt("redo",h5);/**
|
|
616
|
-
* @license lucide-react v0.484.0 - ISC
|
|
617
|
-
*
|
|
618
|
-
* This source code is licensed under the ISC license.
|
|
619
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
620
|
-
*/const m5=[["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"}]],g5=Vt("square-check-big",m5);/**
|
|
621
|
-
* @license lucide-react v0.484.0 - ISC
|
|
622
|
-
*
|
|
623
|
-
* This source code is licensed under the ISC license.
|
|
624
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
625
|
-
*/const v5=[["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"}]],b5=Vt("strikethrough",v5);/**
|
|
626
|
-
* @license lucide-react v0.484.0 - ISC
|
|
627
|
-
*
|
|
628
|
-
* This source code is licensed under the ISC license.
|
|
629
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
630
|
-
*/const y5=[["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"}]],C5=Vt("subscript",y5);/**
|
|
631
|
-
* @license lucide-react v0.484.0 - ISC
|
|
632
|
-
*
|
|
633
|
-
* This source code is licensed under the ISC license.
|
|
634
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
635
|
-
*/const S5=[["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"}]],x5=Vt("superscript",S5);/**
|
|
636
|
-
* @license lucide-react v0.484.0 - ISC
|
|
637
|
-
*
|
|
638
|
-
* This source code is licensed under the ISC license.
|
|
639
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
640
|
-
*/const w5=[["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"}]],E5=Vt("table",w5);/**
|
|
641
|
-
* @license lucide-react v0.484.0 - ISC
|
|
642
|
-
*
|
|
643
|
-
* This source code is licensed under the ISC license.
|
|
644
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
645
|
-
*/const N5=[["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"}]],O5=Vt("text-cursor",N5);/**
|
|
646
|
-
* @license lucide-react v0.484.0 - ISC
|
|
647
|
-
*
|
|
648
|
-
* This source code is licensed under the ISC license.
|
|
649
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
650
|
-
*/const $5=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],M5=Vt("underline",$5);/**
|
|
651
|
-
* @license lucide-react v0.484.0 - ISC
|
|
652
|
-
*
|
|
653
|
-
* This source code is licensed under the ISC license.
|
|
654
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
655
|
-
*/const R5=[["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"}]],I5=Vt("undo",R5);/**
|
|
656
|
-
* @license lucide-react v0.484.0 - ISC
|
|
657
|
-
*
|
|
658
|
-
* This source code is licensed under the ISC license.
|
|
659
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
660
|
-
*/const T5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],P5=Vt("x",T5);function Oc({value:t,onChange:e}){return ve.jsxDEV(bu,{value:t,onChange:e,presets:[{label:"Recommended",colors:["#1677ff","#52c41a","#faad14","#ff4d4f","#722ed1","#13c2c2","#ffffff","#000000"]}]},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/color-picker/color-picker.component.tsx",lineNumber:7,columnNumber:9},this)}function A5({editor:t}){const[e,n]=N.useState("#1677ff"),[r,o]=N.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 ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-4",children:[ve.jsxDEV(Uo,{title:"Text Color",children:ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-2",onMouseDown:s,children:[ve.jsxDEV(O5,{size:20,color:"black"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:36,columnNumber:21},this),ve.jsxDEV(Oc,{value:e,onChange:i},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:37,columnNumber:21},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:35,columnNumber:17},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:34,columnNumber:13},this),ve.jsxDEV(Uo,{title:"Highlight Color",children:ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-2",onMouseDown:s,children:[ve.jsxDEV(l5,{size:20,color:"black"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:44,columnNumber:21},this),ve.jsxDEV(Oc,{value:r,onChange:a},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:45,columnNumber:21},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:43,columnNumber:17},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:42,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/color-picker/color-picker.component.tsx",lineNumber:32,columnNumber:9},this)}function k5({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 ve.jsxDEV(Pd,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:27,columnNumber:32},this);case 2:return ve.jsxDEV(t0,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:29,columnNumber:32},this);case 3:return ve.jsxDEV(n0,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:31,columnNumber:32},this);case 4:return ve.jsxDEV(r0,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:33,columnNumber:32},this);case 5:return ve.jsxDEV(o0,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:35,columnNumber:32},this);case 6:return ve.jsxDEV(i0,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:37,columnNumber:32},this)}return ve.jsxDEV(Pd,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:41,columnNumber:16},this)},n=[...Array.from({length:6},(r,o)=>({key:`${o+1}`,label:ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-2",onClick:()=>t.chain().focus().toggleHeading({level:o+1}).run(),children:[N.createElement([Pd,t0,n0,r0,o0,i0][o],{size:16}),ve.jsxDEV("span",{children:["Heading",o+1]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:69,columnNumber:21},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:48,columnNumber:17},this),className:t.isActive("heading",{level:o+1})?"ant-dropdown-menu-item-active":""}))];return ve.jsxDEV(yu,{menu:{items:n},trigger:["hover"],placement:"bottomLeft",children:ve.jsxDEV("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()},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:87,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/heading/heading.component.tsx",lineNumber:82,columnNumber:9},this)}const D5=8,_5=8;function B5({editor:t,buttonClass:e,activeClass:n}){const[r,o]=N.useState({rows:0,cols:0}),[i,a]=N.useState(!1),s=N.useCallback((l,c)=>{t&&(t.chain().focus().insertTable({rows:l,cols:c,withHeaderRow:!0}).run(),a(!1))},[t]);return ve.jsxDEV(yu,{open:i,onOpenChange:l=>a(l),trigger:["hover"],dropdownRender:()=>ve.jsxDEV("div",{className:"ce:w-56 ce:p-4 ce:bg-white ce:border ce:border-gray-300 ce:rounded-lg ce:shadow-xl",children:[ve.jsxDEV("div",{className:"ce:grid ce:grid-cols-8 ce:gap-1",children:Array.from({length:D5}).map((l,c)=>Array.from({length:_5}).map((u,d)=>{const f=c<r.rows&&d<r.cols;return ve.jsxDEV("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)}},`${c}-${d}`,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/table/table.component.tsx",lineNumber:47,columnNumber:41},this)}))},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/table/table.component.tsx",lineNumber:39,columnNumber:21},this),ve.jsxDEV("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"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/table/table.component.tsx",lineNumber:73,columnNumber:21},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/table/table.component.tsx",lineNumber:38,columnNumber:17},this),children:ve.jsxDEV("button",{type:"button",className:`${e} ${i?n:""} ce:transition-all`,onClick:l=>{l.preventDefault(),a(!i)},children:ve.jsxDEV(E5,{className:"ce:w-5 ce:h-5"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/table/table.component.tsx",lineNumber:91,columnNumber:17},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/table/table.component.tsx",lineNumber:81,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/table/table.component.tsx",lineNumber:33,columnNumber:9},this)}function j5({editor:t}){const[e,n]=N.useState(!1);return ve.jsxDEV("div",{className:"ce:relative",children:[ve.jsxDEV("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?ve.jsxDEV(P5,{size:24},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:20,columnNumber:25},this):ve.jsxDEV(e5,{size:24},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:20,columnNumber:43},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:9,columnNumber:13},this),e&&ve.jsxDEV("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:ve.jsxDEV("div",{className:"ce:space-y-2",children:[ve.jsxDEV("h3",{className:"ce:mb-3 ce:font-bold ce:text-center ce:text-gray-700",children:"Custom Extensions"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:26,columnNumber:25},this),ve.jsxDEV("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:[ve.jsxDEV(u5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:54,columnNumber:29},this)," Accordion"]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:30,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:25,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:24,columnNumber:17},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/custom.tsx",lineNumber:8,columnNumber:9},this)}function z5({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)=>ve.jsxDEV(Uo,{title:l,children:ve.jsxDEV("button",{type:"button",onClick:i,disabled:s,className:`
|
|
661
|
-
${e}
|
|
662
|
-
${a?n:""}
|
|
663
|
-
${s?"ce:opacity-50 ce:cursor-not-allowed":""}
|
|
664
|
-
`,children:o},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:47,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:46,columnNumber:9},this);return ve.jsxDEV("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:[ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ve.jsxDEV(_H,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:67,columnNumber:21},this),()=>t.chain().focus().toggleBold().run(),t.isActive("bold"),!1,"Bold"),r(ve.jsxDEV(QH,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:74,columnNumber:21},this),()=>t.chain().focus().toggleItalic().run(),t.isActive("italic"),!1,"Italic"),r(ve.jsxDEV(M5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:81,columnNumber:21},this),()=>t.chain().focus().toggleUnderline().run(),t.isActive("underline"),!1,"Underline"),r(ve.jsxDEV(b5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:88,columnNumber:21},this),()=>t.chain().focus().toggleStrike().run(),t.isActive("strike"),!1,"Strikethrough"),r(ve.jsxDEV(LH,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:95,columnNumber:21},this),()=>t.chain().focus().toggleCode().run(),t.isActive("code"),!1,"Code"),r(ve.jsxDEV(C5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:102,columnNumber:21},this),()=>t.chain().focus().toggleSubscript().run(),t.isActive("subscript"),!1,"Subscript"),r(ve.jsxDEV(x5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:109,columnNumber:21},this),()=>t.chain().focus().toggleSuperscript().run(),t.isActive("superscript"),!1,"Superscript")]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:65,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:117,columnNumber:13},this),ve.jsxDEV(k5,{editor:t},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:120,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:122,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ve.jsxDEV(PH,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:127,columnNumber:21},this),()=>t.chain().focus().setTextAlign("left").run(),t.isActive({textAlign:"left"}),!1,"Align Left"),r(ve.jsxDEV(MH,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:134,columnNumber:21},this),()=>t.chain().focus().setTextAlign("center").run(),t.isActive({textAlign:"center"}),!1,"Align Center"),r(ve.jsxDEV(kH,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:141,columnNumber:21},this),()=>t.chain().focus().setTextAlign("right").run(),t.isActive({textAlign:"right"}),!1,"Align Right"),r(ve.jsxDEV(IH,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:148,columnNumber:21},this),()=>t.chain().focus().setTextAlign("justify").run(),t.isActive({textAlign:"justify"}),!1,"Align Justify")]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:125,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:156,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ve.jsxDEV(o5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:161,columnNumber:21},this),()=>t.chain().focus().toggleBulletList().run(),t.isActive("bulletList"),!1,"Bullet List"),r(ve.jsxDEV(n5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:168,columnNumber:21},this),()=>t.chain().focus().toggleOrderedList().run(),t.isActive("orderedList"),!1,"Ordered List"),r(ve.jsxDEV(g5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:175,columnNumber:21},this),()=>t.chain().focus().toggleTaskList().run(),t.isActive("taskList"),!1,"Task List")]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:159,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:183,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ve.jsxDEV(f5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:188,columnNumber:21},this),()=>t.chain().focus().toggleBlockquote().run(),t.isActive("blockquote"),!1,"Blockquote"),ve.jsxDEV(B5,{editor:t,buttonClass:e,activeClass:n},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:194,columnNumber:17},this),r(ve.jsxDEV(a5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:200,columnNumber:21},this),()=>t.chain().focus().setHorizontalRule().run(),!1,!1,"Horizontal Rule"),r(ve.jsxDEV(FH,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:207,columnNumber:21},this),()=>t.chain().focus().setHardBreak().run(),!1,!1,"Line Break")]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:186,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:215,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:gap-1",children:[r(ve.jsxDEV(I5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:220,columnNumber:21},this),()=>t.chain().focus().undo().run(),!1,!t.can().chain().focus().undo().run()),r(ve.jsxDEV(p5,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:226,columnNumber:21},this),()=>t.chain().focus().redo().run(),!1,!t.can().chain().focus().redo().run())]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:218,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:233,columnNumber:13},this),r(ve.jsxDEV(YH,{size:16},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:236,columnNumber:17},this),()=>{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"),ve.jsxDEV("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:261,columnNumber:13},this),ve.jsxDEV(A5,{editor:t},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:264,columnNumber:13},this),ve.jsxDEV("div",{className:"ce:h-5 ce:w-[1px] ce:bg-gray-300 ce:mx-2"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:266,columnNumber:13},this),ve.jsxDEV(j5,{editor:t},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:267,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/toolbar/index.tsx",lineNumber:63,columnNumber:9},this)}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}`)})},a0=to.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",Zt(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}}}}),V5=Hn.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()}}}),F5=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,H5=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,W5=to.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",Zt(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[Ei({find:F5,type:this.type})]},addPasteRules(){return[Ni({find:H5,type:this.type})]}}),zw=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",Zt(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)}}}),q5=to.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",Zt(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()}}}),K5=to.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",Zt(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 bh,yh;if(typeof WeakMap<"u"){let t=new WeakMap;bh=e=>t.get(e),yh=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;bh=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},yh=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var Cn=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 bh(t)||yh(t,U5(t))}};function U5(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 v=d.child(m),{colspan:g,rowspan:y,colwidth:b}=v.attrs;for(let C=0;C<y;C++){if(C+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:y-C});break}const x=o+C*e;for(let S=0;S<g;S++){r[x+S]==0?r[x+S]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:g-S});const w=b&&b[S];if(w){const E=(x+S)%e*2,M=a[E];M==null||M!=w&&a[E+1]==1?(a[E]=w,a[E+1]=1):M==w&&a[E+1]++}}}o+=g,u+=v.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 Cn(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&&X5(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 X5(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=Y5(l)))[c]=d)}s&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}function Y5(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Yn(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 Ao=new vr("selectingCells");function Ra(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 J5(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 Fr(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 Cu(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=Ra(e.$head)||Q5(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function Q5(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 Ch(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function Z5(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function em(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Lw(t,e,n){const r=t.node(-1),o=Cn.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 Ri(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 Vw(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 e3(t,e,n){const r=Yn(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 un=class so extends vt{constructor(e,n=e){const r=e.node(-1),o=Cn.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 sy(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(Ch(r)&&Ch(o)&&em(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?so.rowSelection(r,o):i&&this.isColSelection()?so.colSelection(r,o):new so(r,o)}return gt.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=Cn.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 v=o.left-p.left,g=p.right-o.right;if(v>0||g>0){let y=m.attrs;if(v>0&&(y=Ri(y,0,v)),g>0&&(y=Ri(y,y.colspan-g,g)),p.left<o.left){if(m=m.type.createAndFill(y),!m)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else m=m.type.create(y,m.content)}if(p.top<o.top||p.bottom>o.bottom){const y={...m.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top<o.top?m=m.type.createAndFill(y):m=m.type.create(y,m.content)}c.push(m)}a.push(e.child(l).copy(Re.from(c)))}const s=this.isColSelection()&&this.isRowSelection()?e:a;return new Ge(Re.from(s),1,1)}replace(e,n=Ge.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?Ge.empty:n)}const i=vt.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Ge(Re.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=Cn.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=Cn.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 so(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Cn.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 so&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=Cn.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 so(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new so(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new so(e.resolve(n),e.resolve(r))}getBookmark(){return new t3(this.$anchorCell.pos,this.$headCell.pos)}};un.prototype.visible=!1;vt.jsonID("cell",un);var t3=class Fw{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Fw(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&&em(n,r)?new un(n,r):vt.near(r,1)}};function n3(t){if(!(t.selection instanceof un))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Zn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),bn.create(t.doc,e)}function r3({$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 o3({$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 i3(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,a;if(r instanceof mt&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")i=un.create(o,r.from);else if(a=="row"){const s=o.resolve(r.from+1);i=un.rowSelection(s,s)}else if(!n){const s=Cn.get(r.node),l=r.from+1,c=l+s.map[s.width*s.height-1];i=un.create(o,l+1,c)}}else r instanceof gt&&r3(r)?i=gt.create(o,r.from):r instanceof gt&&o3(r)&&(i=gt.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var a3=new vr("fix-tables");function Hw(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)?Hw(t.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function Ww(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=s3(t,o,i,n))};return e?e.doc!=t.doc&&Hw(e.doc,t.doc,0,r):t.doc.descendants(r),n}function s3(t,e,n,r){const o=Cn.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,Ri(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 g=0;g<f;g++){const y=Yn(t.schema)[p].createAndFill();y&&m.push(y)}const v=(l==0||a==l-1)&&s==l?c+1:d-1;r.insert(r.mapping.map(v),m)}c=d}return r.setMeta(a3,{fixTables:!0})}function oo(t){const e=t.selection,n=Cu(t),r=n.node(-1),o=n.start(-1),i=Cn.get(r);return{...e instanceof un?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function qw(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;e3(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,Vw(c.attrs,o-e.colCount(l))),a+=c.attrs.rowspan-1}else{const l=i==null?Yn(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 l3(t,e){if(!Fr(t))return!1;if(e){const n=oo(t);e(qw(t.tr,n,n.left))}return!0}function c3(t,e){if(!Fr(t))return!1;if(e){const n=oo(t);e(qw(t.tr,n,n.right))}return!0}function u3(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,Ri(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 d3(t,e){if(!Fr(t))return!1;if(e){const n=oo(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;u3(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=Cn.get(i)}e(r)}return!0}function f3(t,e,n){var r;const o=Yn(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 Kw(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;f3(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?Yn(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,Yn(r.type.schema).row.create(null,s)),t}function h3(t,e){if(!Fr(t))return!1;if(e){const n=oo(t);e(Kw(t.tr,n,n.top))}return!0}function p3(t,e){if(!Fr(t))return!1;if(e){const n=oo(t);e(Kw(t.tr,n,n.bottom))}return!0}function m3(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),v=e.positionAt(o+1,c,n);t.insert(t.mapping.slice(s).map(r+v),m),c+=p.colspan-1}}}}function g3(t,e){if(!Fr(t))return!1;if(e){const n=oo(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;m3(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=Cn.get(n.table)}e(r)}return!0}function s0(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function v3({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 l0(t,e){const n=t.selection;if(!(n instanceof un)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=oo(t),{map:o}=r;if(v3(o,r))return!1;if(e){const i=t.tr,a={};let s=Re.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{s0(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,{...Vw(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=s0(c)?l+1:u;i.replaceWith(d+r.tableStart,u+r.tableStart,s)}i.setSelection(new un(i.doc.resolve(l+r.tableStart))),e(i)}return!0}function c0(t,e){const n=Yn(t.schema);return b3(({node:r})=>n[r.type.spec.tableRole])(t,e)}function b3(t){return(e,n)=>{var r;const o=e.selection;let i,a;if(o instanceof un){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(i=J5(o.$from),!i)return!1;a=(r=Ra(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=oo(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 v=u.left,g=0;v<u.right;v++,g++)v==u.left&&p==u.top||d.insert(f=d.mapping.map(m+u.tableStart,1),t({node:i,row:p,col:v}).createAndFill(l[g]))}d.setNodeMarkup(a,t({node:i,row:u.top,col:u.left}),l[0]),o instanceof un&&d.setSelection(new un(d.doc.resolve(o.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function y3(t,e){return function(n,r){if(!Fr(n))return!1;const o=Cu(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof un?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 C3(t){return function(e,n){if(!Fr(e))return!1;if(n){const r=Yn(e.schema),o=oo(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 u0(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 Ns(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?C3(t):function(n,r){if(!Fr(n))return!1;if(r){const o=Yn(n.schema),i=oo(n),a=n.tr,s=u0("row",i,o),l=u0("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,v=a.doc.nodeAt(m);v&&a.setNodeMarkup(m,f,v.attrs)}),r(a)}return!0}}Ns("row",{useDeprecatedLogic:!0});Ns("column",{useDeprecatedLogic:!0});var S3=Ns("cell",{useDeprecatedLogic:!0});function x3(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 d0(t){return function(e,n){if(!Fr(e))return!1;const r=x3(Cu(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(gt.between(o,Z5(o))).scrollIntoView())}return!0}}function w3(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 Sl(t,e){const n=t.selection;if(!(n instanceof un))return!1;if(e){const r=t.tr,o=Yn(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 Ge(o,0,0))}),r.docChanged&&e(r)}return!0}function E3(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=Sh(Yn(a).row,new Ge(c,u,d)).content),s.push(c)}else if(i=="cell"||i=="header_cell")s.push(n||r?Sh(Yn(a).row,new Ge(e,n,r)).content:e);else return null;return N3(a,s)}function N3(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(Re.empty),n[o]<r){const i=Yn(t).cell.createAndFill(),a=[];for(let s=n[o];s<r;s++)a.push(i);e[o]=e[o].append(Re.from(a))}return{height:e.length,width:r,rows:e}}function Sh(t,e){const n=t.createAndFill();return new ay(n).replace(0,n.content.size,e).doc}function O3({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(Ri(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(Re.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(Re.from(l))}n=i,e=o}return{width:t,height:e,rows:n}}function $3(t,e,n,r,o,i,a){const s=t.doc.type.schema,l=Yn(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 v;p.lastChild==null||p.lastChild.type==l.cell?v=c||(c=l.cell.createAndFill()):v=u||(u=l.header_cell.createAndFill());for(let g=e.width;g<o;g++)m.push(v);t.insert(t.mapping.slice(a).map(f-1+r),m)}if(i>e.height){const d=[];for(let m=0,v=(e.height-1)*e.width;m<Math.max(e.width,o);m++){const g=m>=e.width?!1:n.nodeAt(e.map[v+m]).type==l.header_cell;d.push(g?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const f=l.row.create(null,Re.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 f0(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 h0(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,Ri(f.attrs,a-p,f.attrs.colspan-(a-p))),t.insert(m+f.nodeSize,f.type.createAndFill(Ri(f.attrs,0,a-p))),c+=f.attrs.rowspan-1}}return l}function p0(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=Cn.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=Cn.get(i),f=d.mapping.maps.length}$3(d,a,i,n,c,u,f)&&p(),f0(d,a,i,n,l,c,s,f)&&p(),f0(d,a,i,n,l,c,u,f)&&p(),h0(d,a,i,n,s,u,l,f)&&p(),h0(d,a,i,n,s,u,c,f)&&p();for(let m=s;m<u;m++){const v=a.positionAt(m,l,i),g=a.positionAt(m,c,i);d.replace(d.mapping.slice(f).map(v+n),d.mapping.slice(f).map(g+n),new Ge(o.rows[m-s],0,0))}p(),d.setSelection(new un(d.doc.resolve(n+a.positionAt(s,l,i)),d.doc.resolve(n+a.positionAt(u-1,c-1,i)))),e(d)}var M3=Bh({ArrowLeft:xl("horiz",-1),ArrowRight:xl("horiz",1),ArrowUp:xl("vert",-1),ArrowDown:xl("vert",1),"Shift-ArrowLeft":wl("horiz",-1),"Shift-ArrowRight":wl("horiz",1),"Shift-ArrowUp":wl("vert",-1),"Shift-ArrowDown":wl("vert",1),Backspace:Sl,"Mod-Backspace":Sl,Delete:Sl,"Mod-Delete":Sl});function ql(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function xl(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof un)return ql(n,r,vt.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const a=Uw(o,t,e);if(a==null)return!1;if(t=="horiz")return ql(n,r,vt.near(n.doc.resolve(i.head+e),e));{const s=n.doc.resolve(a),l=Lw(s,t,e);let c;return l?c=vt.near(l,1):e<0?c=vt.near(n.doc.resolve(s.before(-1)),-1):c=vt.near(n.doc.resolve(s.after(-1)),1),ql(n,r,c)}}}function wl(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let a;if(i instanceof un)a=i;else{const l=Uw(o,t,e);if(l==null)return!1;a=new un(n.doc.resolve(l))}const s=Lw(a.$headCell,t,e);return s?ql(n,r,new un(a.$anchorCell,s)):!1}}function R3(t,e){const n=t.state.doc,r=Ra(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new un(r))),!0):!1}function I3(t,e,n){if(!Fr(t.state))return!1;let r=E3(n);const o=t.state.selection;if(o instanceof un){r||(r={width:1,height:1,rows:[Re.from(Sh(Yn(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),s=Cn.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=O3(r,s.right-s.left,s.bottom-s.top),p0(t.state,t.dispatch,a,s,r),!0}else if(r){const i=Cu(t.state),a=i.start(-1);return p0(t.state,t.dispatch,a,Cn.get(i.node(-1)).findCell(i.pos-a),r),!0}else return!1}function T3(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=m0(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof un)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=Ra(t.state.selection.$anchor))!=null&&((n=Ad(t,e))==null?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(l,c){let u=Ad(t,c);const d=Ao.getState(t.state)==null;if(!u||!em(l,u))if(d)u=l;else return;const f=new un(l,u);if(d||!t.state.selection.eq(f)){const p=t.state.tr.setSelection(f);d&&p.setMeta(Ao,l.pos),t.dispatch(p)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",s),Ao.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Ao,-1))}function s(l){const c=l,u=Ao.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(m0(t,c.target)!=r&&(d=Ad(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 Uw(t,e,n){if(!(t.state.selection instanceof gt))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 m0(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Ad(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Ra(t.state.doc.resolve(n.pos)):null}var P3=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")),xh(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,xh(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function xh(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 v=0;v<p;v++,f++){const g=o==f?i:m&&m[v],y=g?g+"px":"";if(s+=g||r,g||(l=!1),c)c.style.width!=y&&(c.style.width=y),c=c.nextSibling;else{const b=document.createElement("col");b.style.width=y,e.appendChild(b)}}}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 fr=new vr("tableColumnResizing");function A3({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=P3,lastColumnResizable:o=!0}={}){const i=new Qn({key:fr,state:{init(a,s){var l,c;const u=(c=(l=i.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,d=Yn(s.schema).table.name;return r&&u&&(u[d]=(f,p)=>new r(f,n,p)),new k3(-1,!1)},apply(a,s){return s.apply(a)}},props:{attributes:a=>{const s=fr.getState(a);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,s)=>{D3(a,s,t,o)},mouseleave:a=>{_3(a)},mousedown:(a,s)=>{B3(a,s,e,n)}},decorations:a=>{const s=fr.getState(a);if(s&&s.activeHandle>-1)return F3(a,s.activeHandle)},nodeViews:{}}});return i}var k3=class Kl{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(fr);if(r&&r.setHandle!=null)return new Kl(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Kl(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return Ch(e.doc.resolve(o))||(o=-1),new Kl(o,n.dragging)}return n}};function D3(t,e,n,r){if(!t.editable)return;const o=fr.getState(t.state);if(o&&!o.dragging){const i=z3(e.target);let a=-1;if(i){const{left:s,right:l}=i.getBoundingClientRect();e.clientX-s<=n?a=g0(t,e,"left",n):l-e.clientX<=n&&(a=g0(t,e,"right",n))}if(a!=o.activeHandle){if(!r&&a!==-1){const s=t.state.doc.resolve(a),l=s.node(-1),c=Cn.get(l),u=s.start(-1);if(c.colCount(s.pos-u)+s.nodeAfter.attrs.colspan-1==c.width-1)return}Gw(t,a)}}}function _3(t){if(!t.editable)return;const e=fr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Gw(t,-1)}function B3(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!=null?o:window,a=fr.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const s=t.state.doc.nodeAt(a.activeHandle),l=j3(t,a.activeHandle,s.attrs);t.dispatch(t.state.tr.setMeta(fr,{setDragging:{startX:e.clientX,startWidth:l}}));function c(d){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",u);const f=fr.getState(t.state);f!=null&&f.dragging&&(L3(t,f.activeHandle,v0(f.dragging,d,n)),t.dispatch(t.state.tr.setMeta(fr,{setDragging:null})))}function u(d){if(!d.which)return c(d);const f=fr.getState(t.state);if(f&&f.dragging){const p=v0(f.dragging,d,n);b0(t,f.activeHandle,p,r)}}return b0(t,a.activeHandle,l,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",u),e.preventDefault(),!0}function j3(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 z3(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function g0(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=Ra(t.state.doc.resolve(a));if(!s)return-1;if(n=="right")return s.pos;const l=Cn.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 v0(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Gw(t,e){t.dispatch(t.state.tr.setMeta(fr,{setHandle:e}))}function L3(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=Cn.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():V3(f.colspan);m[p]=n,l.setNodeMarkup(a+d,null,{...f,colwidth:m})}l.docChanged&&t.dispatch(l)}function b0(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),a=o.start(-1),s=Cn.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&&xh(i,l.firstChild,l,r,s,n)}function V3(t){return Array(t).fill(0)}function F3(t,e){var n;const r=[],o=t.doc.resolve(e),i=o.node(-1);if(!i)return bn.empty;const a=Cn.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=fr.getState(t))!=null&&n.dragging&&r.push(Zn.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),r.push(Zn.widget(f,p))}}return bn.create(t.doc,r)}function H3({allowTableNodeSelection:t=!1}={}){return new Qn({key:Ao,state:{init(){return null},apply(e,n){const r=e.getMeta(Ao);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:n3,handleDOMEvents:{mousedown:T3},createSelectionBetween(e){return Ao.getState(e.state)!=null?e.state.selection:null},handleTripleClick:R3,handleKeyDown:M3,handlePaste:I3},appendTransaction(e,n,r){return i3(r,Ww(r,n),t)}})}function wh(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function y0(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 v=0;v<p;v+=1,f+=1){const g=o===f?i:m&&m[v],y=g?`${g}px`:"";if(s+=g||r,g||(l=!1),c){if(c.style.width!==y){const[b,C]=wh(r,g);c.style.setProperty(b,C)}c=c.nextSibling}else{const b=document.createElement("col"),[C,x]=wh(r,g);b.style.setProperty(C,x),e.appendChild(b)}}}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 W3{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")),y0(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,y0(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function q3(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 v=0;v<p;v+=1,f+=1){const g=n===f?r:m&&m[v];o+=g||e,g||(i=!1);const[y,b]=wh(e,g);a.push(["col",{style:`${y}: ${b}`}])}}const l=i?`${o}px`:"",c=i?"":`${o}px`;return{colgroup:["colgroup",{},...a],tableWidth:l,tableMinWidth:c}}function C0(t,e){return t.createAndFill()}function K3(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 U3(t,e,n,r,o){const i=K3(t),a=[],s=[];for(let c=0;c<n;c+=1){const u=C0(i.cell);if(u&&s.push(u),r){const d=C0(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 G3(t){return t instanceof un}const El=({editor:t})=>{const{selection:e}=t.state;if(!G3(e))return!1;let n=0;const r=fC(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},X3=Sn.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:W3,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}=q3(t,this.options.cellMinWidth);return["table",Zt(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=U3(i.schema,t,e,n);if(o){const s=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(gt.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>l3(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>c3(t,e),deleteColumn:()=>({state:t,dispatch:e})=>d3(t,e),addRowBefore:()=>({state:t,dispatch:e})=>h3(t,e),addRowAfter:()=>({state:t,dispatch:e})=>p3(t,e),deleteRow:()=>({state:t,dispatch:e})=>g3(t,e),deleteTable:()=>({state:t,dispatch:e})=>w3(t,e),mergeCells:()=>({state:t,dispatch:e})=>l0(t,e),splitCell:()=>({state:t,dispatch:e})=>c0(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Ns("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Ns("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>S3(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>l0(t,e)?!0:c0(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>y3(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>d0(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>d0(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&Ww(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=un.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:El,"Mod-Backspace":El,Delete:El,"Mod-Delete":El}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[A3({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],H3({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:Mt(ut(t,"tableRole",e))}}}),Y3=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",Zt(this.options.HTMLAttributes,t),0]}}),J3=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",Zt(this.options.HTMLAttributes,t),0]}}),Q3=Sn.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",Zt(this.options.HTMLAttributes,t),0]}}),Z3=/^\s*(\[([( |x])?\])\s$/,e4=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",Zt(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[fa({find:Z3,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),t4=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",Zt(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()}}}),n4=Hn.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)}},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")}}}),r4=to.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",Zt(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$/,i4=Sn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Zt(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[fa({find:o4,type:this.type})]}}),a4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,s4=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,l4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,c4=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,u4=to.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",Zt(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[Ei({find:a4,type:this.type}),Ei({find:l4,type:this.type})]},addPasteRules(){return[Ni({find:s4,type:this.type}),Ni({find:c4,type:this.type})]}}),d4="listItem",S0="textStyle",x0=/^\s*([-+*])\s$/,f4=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",Zt(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(d4,this.editor.getAttributes(S0)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=fa({find:x0,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=fa({find:x0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(S0),editor:this.editor})),[t]}}),h4=/(^|[^`])`([^`]+)`(?!`)/,p4=/(^|[^`])`([^`]+)`(?!`)/g,m4=to.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Zt(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[Ei({find:h4,type:this.type})]},addPasteRules(){return[Ni({find:p4,type:this.type})]}}),g4=/^```([a-z]+)?[\s\n]$/,v4=/^~~~([a-z]+)?[\s\n]$/,b4=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",Zt(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(`
|
|
665
|
-
|
|
666
|
-
`);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(vt.near(r.resolve(s))),!0)):t.commands.exitCode()}}},addInputRules(){return[tf({find:g4,type:this.type,getAttributes:t=>({language:t[1]})}),tf({find:v4,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Qn({key:new vr("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,`
|
|
667
|
-
`));return a.replaceSelectionWith(this.type.create({language:i},l)),a.selection.$from.parent.type!==this.type&&a.setSelection(gt.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),y4=Sn.create({name:"doc",topNode:!0,content:"block+"});function C4(t={}){return new Qn({view(e){return new S4(e,t)}})}class S4{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;if(n){let s=e.nodeBefore,l=e.nodeAfter;if(s||l){let c=this.editorView.nodeDOM(this.cursorPos-(s?s.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=s?u.bottom:u.top;s&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!r){let s=this.editorView.coordsAtPos(this.cursorPos);r={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.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 i,a;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,a=-pageYOffset;else{let s=o.getBoundingClientRect();i=s.left-o.scrollLeft,a=s.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"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=ty(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){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const x4=Hn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[C4(this.options)]}});class yn extends vt{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return yn.valid(r)?new yn(r):vt.near(r)}content(){return Ge.empty}eq(e){return e instanceof yn&&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 yn(e.resolve(n.pos))}getBookmark(){return new tm(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!w4(e)||!E4(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&&yn.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(yn.valid(l))return l}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!mt.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(yn.valid(s))return s}return null}}}yn.prototype.visible=!1;yn.findFrom=yn.findGapCursorFrom;vt.jsonID("gapcursor",yn);class tm{constructor(e){this.pos=e}map(e){return new tm(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return yn.valid(n)?new yn(n):vt.near(n)}}function w4(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 E4(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 N4(){return new Qn({props:{decorations:R4,createSelectionBetween(t,e,n){return e.pos==n.pos&&yn.valid(n)?new yn(n):null},handleClick:$4,handleKeyDown:O4,handleDOMEvents:{beforeinput:M4}}})}const O4=Bh({ArrowLeft:Nl("horiz",-1),ArrowRight:Nl("horiz",1),ArrowUp:Nl("vert",-1),ArrowDown:Nl("vert",1)});function Nl(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 gt){if(!i.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(e>0?s.after():s.before())}let c=yn.findGapCursorFrom(s,e,l);return c?(o&&o(r.tr.setSelection(new yn(c))),!0):!1}}function $4(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!yn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&mt.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new yn(r))),!0)}function M4(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof yn))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=Re.empty;for(let a=r.length-1;a>=0;a--)o=Re.from(r[a].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new Ge(o,0,0));return i.setSelection(gt.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function R4(t){if(!(t.selection instanceof yn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",bn.create(t.doc,[Zn.widget(t.selection.head,e,{key:"gapcursor"})])}const I4=Hn.create({name:"gapCursor",addProseMirrorPlugins(){return[N4()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Mt(ut(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),T4=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",Zt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
668
|
-
`},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()}}}),P4=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]}`,Zt(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=>tf({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var $c=200,Bn=function(){};Bn.prototype.append=function(e){return e.length?(e=Bn.from(e),!this.length&&e||e.length<$c&&this.leafAppend(e)||this.length<$c&&e.leafPrepend(this)||this.appendInner(e)):this};Bn.prototype.prepend=function(e){return e.length?Bn.from(e).append(this):this};Bn.prototype.appendInner=function(e){return new A4(this,e)};Bn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Bn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Bn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Bn.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)};Bn.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};Bn.from=function(e){return e instanceof Bn?e:e&&e.length?new Xw(e):Bn.empty};var Xw=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<=$c)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=$c)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}(Bn);Bn.empty=new Xw([]);var A4=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}(Bn);const k4=500;class Ar{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 qr(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 qr(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 Ar(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 qr(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>_4&&(s=D4(s,c),a-=c),new Ar(s.append(i),a)}remapping(e,n){let r=new as;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 Ar(this.items.append(e.map(n=>new qr(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 v=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(i.slice(l+1,p));g&&s++,r.push(new qr(m,v,g))}else r.push(new qr(m))},o);let c=[];for(let f=n;f<a;f++)c.push(new qr(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Ar(u,s);return d.emptyItemCount()>k4&&(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 qr(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 Ar(Bn.from(o.reverse()),i)}}Ar.empty=new Ar(Bn.empty,0);function D4(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class qr{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 qr(n.getMap().invert(),n,this.selection)}}}class Io{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const _4=20;function B4(t,e,n,r){let o=n.getMeta(Ci),i;if(o)return o.historyState;n.getMeta(L4)&&(t=new Io(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Ci))return a.getMeta(Ci).redo?new Io(t.done.addTransform(n,void 0,r,Ul(e)),t.undone,w0(n.mapping.maps),t.prevTime,t.prevComposition):new Io(t.done,t.undone.addTransform(n,void 0,r,Ul(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||!j4(n,t.prevRanges)),c=a?kd(t.prevRanges,n.mapping):w0(n.mapping.maps);return new Io(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ul(e)),Ar.empty,c,n.time,s??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Io(t.done.rebased(n,i),t.undone.rebased(n,i),kd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Io(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),kd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function j4(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 w0(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 kd(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 z4(t,e,n){let r=Ul(e),o=Ci.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 Io(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(a).setMeta(Ci,{redo:n,historyState:l})}let Dd=!1,E0=null;function Ul(t){let e=t.plugins;if(E0!=e){Dd=!1,E0=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Dd=!0;break}}return Dd}const Ci=new vr("history"),L4=new vr("closeHistory");function V4(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Qn({key:Ci,state:{init(){return new Io(Ar.empty,Ar.empty,null,0,-1)},apply(e,n,r){return B4(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?Jw:r=="historyRedo"?Qw:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function Yw(t,e){return(n,r)=>{let o=Ci.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=z4(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Jw=Yw(!1,!0),Qw=Yw(!0,!0),F4=Hn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Jw(t,e),redo:()=>({state:t,dispatch:e})=>Qw(t,e)}},addProseMirrorPlugins(){return[V4(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()}}}),H4=Sn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Zt(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}):kM(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(gt.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(mt.create(a.doc,c.pos)):a.setSelection(gt.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(gt.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[dR({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),W4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,q4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,K4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,U4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,G4=to.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",Zt(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[Ei({find:W4,type:this.type}),Ei({find:K4,type:this.type})]},addPasteRules(){return[Ni({find:q4,type:this.type}),Ni({find:U4,type:this.type})]}}),X4="listItem",N0="textStyle",O0=/^(\d+)\.\s$/,Y4=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:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Zt(this.options.HTMLAttributes,n),0]:["ol",Zt(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(X4,this.editor.getAttributes(N0)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=fa({find:O0,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=fa({find:O0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(N0)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),J4=Sn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Q4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Z4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,e6=to.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",Zt(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[Ei({find:Q4,type:this.type})]},addPasteRules(){return[Ni({find:Z4,type:this.type})]}}),t6=Sn.create({name:"text",group:"inline"}),n6=Hn.create({name:"starterKit",addExtensions(){var t,e,n,r,o,i,a,s,l,c,u,d,f,p,m,v,g,y;const b=[];return this.options.bold!==!1&&b.push(u4.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&b.push(i4.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&b.push(f4.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(m4.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(b4.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&b.push(y4.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&b.push(x4.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&b.push(I4.configure((s=this.options)===null||s===void 0?void 0:s.gapcursor)),this.options.hardBreak!==!1&&b.push(T4.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(P4.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&b.push(F4.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&b.push(H4.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(G4.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&b.push(zw.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&b.push(Y4.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&b.push(J4.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&b.push(e6.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&b.push(t6.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}});function Zw({title:t,childrenContent:e,editable:n,childrenEdit:r}){const[o,i]=N.useState(!1),a=n?ve.jsxDEV(Go,{children:ve.jsxDEV(Go.Item,{onClick:()=>i(!0),children:"Edit"},"edit",!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:17,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:16,columnNumber:17},this):null;return ve.jsxDEV("div",{children:[n&&a?ve.jsxDEV(yu,{dropdownRender:()=>a,trigger:["contextMenu"],children:e},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:28,columnNumber:25},this):e,ve.jsxDEV(Mr,{title:`Edit ${t}`,open:o,onOk:()=>i(!1),onCancel:()=>i(!1),children:r},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:36,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:25,columnNumber:9},this)}function r6({node:t,editor:e}){const[n,r]=N.useState(!1),[o,i]=N.useState(t.attrs.bgColor||"#f3f4f6"),[a,s]=N.useState(t.attrs.titleColor||"#000000"),l=d=>{d.preventDefault()},c=d=>{i(d.toHexString())},u=d=>{s(d.toHexString())};return ve.jsxDEV(gC,{className:"accordion-wrapper",children:ve.jsxDEV(Zw,{title:"Accordion",childrenContent:ve.jsxDEV("div",{className:"ce:my-4 ce:transition-all ce:duration-300 ce:border ce:rounded-lg ce:shadow-sm",onContextMenu:l,children:[ve.jsxDEV("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:[ve.jsxDEV("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"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:43,columnNumber:29},this),ve.jsxDEV(jH,{className:`ce:transition-transform ce:duration-300 ${n?"ce:rotate-180":""}`,size:20},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:54,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:38,columnNumber:25},this),ve.jsxDEV("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:ve.jsxDEV("div",{className:"ce:p-4 ce:border-t",children:ve.jsxDEV(AR,{contentEditable:e.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:70,columnNumber:33},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:69,columnNumber:29},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:62,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:34,columnNumber:21},this),editable:e.isEditable,childrenEdit:ve.jsxDEV("div",{className:"ce:px-6 ce:py-4 ce:space-y-6 ce:rounded-lg ce:bg-gray-50",children:[ve.jsxDEV("div",{className:"ce:grid ce:grid-cols-1 ce:gap-6",children:[ve.jsxDEV("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[ve.jsxDEV("label",{className:"ce:font-medium ce:text-gray-700",children:"Background Color"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:82,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[ve.jsxDEV("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:o}},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:86,columnNumber:37},this),ve.jsxDEV(Oc,{value:o,onChange:c},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:90,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:85,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:81,columnNumber:29},this),ve.jsxDEV("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[ve.jsxDEV("label",{className:"ce:font-medium ce:text-gray-700",children:"Title Color"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:98,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[ve.jsxDEV("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:a}},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:102,columnNumber:37},this),ve.jsxDEV(Oc,{value:a,onChange:u},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:106,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:101,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:97,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:80,columnNumber:25},this),ve.jsxDEV("div",{className:"ce:pt-4 ce:border-t ce:border-gray-200",children:ve.jsxDEV("div",{className:"ce:p-3 ce:bg-white ce:border ce:rounded-md",children:[ve.jsxDEV("div",{className:"ce:text-sm ce:text-gray-600",children:"Preview"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:116,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:p-2 ce:mt-2 ce:rounded",style:{backgroundColor:o},children:ve.jsxDEV("span",{style:{color:a,fontWeight:500},children:"Accordion Title"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:123,columnNumber:37},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:119,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:115,columnNumber:29},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:114,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:79,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:31,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:30,columnNumber:9},this)}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",Zt(t)]},addNodeView(){return vC(r6)},addCommands(){return{setAccordion:t=>({chain:e})=>e().insertContent({type:"accordion",attrs:t,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});function i6({node:t,updateAttributes:e,editor:n}){const[r,o]=N.useState({width:t.attrs.width??50,height:t.attrs.height??"auto"}),[i,a]=N.useState({left:t.attrs.marginLeft??"0%",right:t.attrs.marginRight??"0%"}),[s,l]=N.useState(t.attrs.src||""),c=N.useRef(null);N.useEffect(()=>{if(t.attrs.src&&c.current){const f=new Image;f.onload=()=>{t.attrs.width===void 0&&o({width:100,height:"auto"})},f.src=t.attrs.src}},[t.attrs.src,t.attrs.width,t.attrs.height]);const u=()=>{e({src:s,width:r.width,height:r.height,marginLeft:i.left,marginRight:i.right})},d=f=>{f.preventDefault()};return ve.jsxDEV(gC,{className:"image-wrapper ce:w-full",children:ve.jsxDEV(Zw,{title:"Image",childrenContent:ve.jsxDEV("div",{className:"ce:relative ce:w-full ce:max-w-full ce:overflow-hidden",style:{marginLeft:i.left+"%",marginRight:i.right+"%"},onContextMenu:d,children:ve.jsxDEV("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},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:68,columnNumber:25},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:60,columnNumber:21},this),editable:n.isEditable,childrenEdit:ve.jsxDEV("div",{className:"ce:space-y-4",children:[ve.jsxDEV("div",{children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Image URL"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:89,columnNumber:29},this),ve.jsxDEV(ho,{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},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:92,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:88,columnNumber:25},this),ve.jsxDEV("div",{className:"ce:flex ce:gap-4",children:[ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Width (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:103,columnNumber:33},this),ve.jsxDEV(ho,{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},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:106,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:102,columnNumber:29},this),ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Height"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:120,columnNumber:33},this),ve.jsxDEV(ur,{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:[ve.jsxDEV(ur.Option,{value:"auto",children:"Auto"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:134,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"25",children:"25%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:137,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"50",children:"50%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:140,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"75",children:"75%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:143,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"100",children:"100%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:146,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:123,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:119,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:101,columnNumber:25},this),ve.jsxDEV("div",{className:"ce:flex ce:gap-4",children:[ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Left (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:155,columnNumber:33},this),ve.jsxDEV(ho,{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},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:158,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:154,columnNumber:29},this),ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Right (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:174,columnNumber:33},this),ve.jsxDEV(ho,{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},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:177,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:173,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:153,columnNumber:25},this),ve.jsxDEV("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"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:194,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:87,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:57,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:56,columnNumber:9},this)}const a6=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",Zt(t)]},addNodeView(){return vC(i6)},addCommands(){return{setImage:t=>({chain:e})=>e().insertContent({type:"image",attrs:{...t,width:(t==null?void 0:t.width)??50,height:(t==null?void 0:t.height)??"auto"}}).run()}}}),s6=[V5.configure({types:[a0.name,zw.name]}),a0,W5.configure({multicolor:!0}),n6.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),r4,q5,K5,n4.configure({types:["heading","paragraph"]}),t4,e4,X3.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),Q3,J3,Y3.configure({HTMLAttributes:{class:"table-cell"}}),a6,o6];function l6({content:t="",slotBefore:e=!1,className:n="",editorClassName:r="",editable:o=!0,onChange:i}){const a=TR({extensions:s6,content:t,editable:o,onUpdate:({editor:s})=>{i==null||i(s.getHTML())}});return N.useEffect(()=>{a&&t!==a.getHTML()&&a.commands.setContent(t,!1)},[a,t]),a?ve.jsxDEV("div",{className:re(eE["cyber-editor"],n),children:[e&&ve.jsxDEV(z5,{editor:a},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:43,columnNumber:28},this),ve.jsxDEV(SR,{editor:a,className:r},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:44,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:42,columnNumber:9},this):ve.jsxDEV(xE,{full:!0},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:38,columnNumber:16},this)}exports.EditorProvider=l6;
|