@cyberskill/cyber-editor 3.9.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +126 -4
  2. package/dist/CyberEditor.d.ts +2 -0
  3. package/dist/CyberViewer.d.ts +2 -0
  4. package/dist/cyber-editor.cjs.js +703 -0
  5. package/dist/cyber-editor.css +1 -0
  6. package/dist/cyber-editor.es.js +52332 -0
  7. package/dist/index.d.ts +5 -0
  8. package/dist/modules/accordion/accordion-extension.d.ts +2 -0
  9. package/dist/modules/accordion/accordion-extension.type.d.ts +11 -0
  10. package/dist/modules/accordion/accordion-view.component.d.ts +2 -0
  11. package/dist/modules/accordion/accordion-view.type.d.ts +8 -0
  12. package/dist/modules/accordion/index.d.ts +4 -0
  13. package/dist/modules/color-picker/color-picker.component.d.ts +2 -0
  14. package/dist/modules/color-picker/color-picker.type.d.ts +4 -0
  15. package/dist/modules/color-picker/index.d.ts +2 -0
  16. package/dist/modules/heading/heading.component.d.ts +2 -0
  17. package/dist/modules/heading/heading.type.d.ts +4 -0
  18. package/dist/modules/heading/index.d.ts +2 -0
  19. package/dist/modules/image/enhanced-image-view.component.d.ts +2 -0
  20. package/dist/modules/image/enhanced-image.d.ts +27 -0
  21. package/dist/modules/image/image-view.type.d.ts +4 -0
  22. package/dist/modules/image/index.d.ts +2 -0
  23. package/dist/modules/index.d.ts +6 -0
  24. package/dist/modules/table/enhanced-table-cell-view.component.d.ts +2 -0
  25. package/dist/modules/table/enhanced-table-cell.d.ts +1 -0
  26. package/dist/modules/table/enhanced-table-view.component.d.ts +2 -0
  27. package/dist/modules/table/enhanced-table.d.ts +7 -0
  28. package/dist/modules/table/index.d.ts +6 -0
  29. package/dist/modules/table/table.component.d.ts +2 -0
  30. package/dist/modules/table/table.type.d.ts +6 -0
  31. package/dist/modules/toolbar/custom.d.ts +1 -0
  32. package/dist/modules/toolbar/font-family.d.ts +1 -0
  33. package/dist/modules/toolbar/font-size.d.ts +1 -0
  34. package/dist/modules/toolbar/index.d.ts +1 -0
  35. package/dist/modules/toolbar/table-controls.d.ts +1 -0
  36. package/dist/modules/video/index.d.ts +2 -0
  37. package/dist/modules/video/video-view.component.d.ts +16 -0
  38. package/dist/modules/video/video.d.ts +17 -0
  39. package/dist/playground/App.d.ts +1 -0
  40. package/dist/playground/main.d.ts +1 -0
  41. package/dist/shared/components/color-picker/color-picker.component.d.ts +2 -0
  42. package/dist/shared/components/color-picker/color-picker.type.d.ts +5 -0
  43. package/dist/shared/components/color-picker/index.d.ts +2 -0
  44. package/dist/shared/components/index.d.ts +2 -0
  45. package/dist/shared/components/modal-edit/index.d.ts +2 -0
  46. package/dist/shared/components/modal-edit/modal-edit.component.d.ts +2 -0
  47. package/dist/shared/components/modal-edit/modal-edit.type.d.ts +6 -0
  48. package/dist/shared/configs/env.d.ts +2 -0
  49. package/dist/shared/constants/alias.d.ts +4 -0
  50. package/dist/shared/constants/index.d.ts +1 -0
  51. package/dist/shared/providers/editor.d.ts +3 -0
  52. package/dist/shared/providers/index.d.ts +1 -0
  53. package/dist/shared/typescript/index.d.ts +8 -0
  54. package/dist/shared/utils/extensions.d.ts +16 -0
  55. package/dist/shared/utils/index.d.ts +1 -0
  56. package/package.json +60 -66
  57. package/dist/client/_commonjsHelpers-C6fGbg64.js +0 -6
  58. package/dist/client/_commonjsHelpers-DwGv2jUC.cjs +0 -1
  59. package/dist/client/assets/manifest-e1ae6e39.js +0 -1
  60. package/dist/client/chunk-D4RADZKF-CqCYZIAv.js +0 -6257
  61. package/dist/client/chunk-D4RADZKF-sLhgGPy5.cjs +0 -56
  62. package/dist/client/cyber-editor.cjs.js +0 -259
  63. package/dist/client/cyber-editor.cjs2.js +0 -1
  64. package/dist/client/cyber-editor.cjs3.js +0 -1
  65. package/dist/client/cyber-editor.cjs4.js +0 -604
  66. package/dist/client/cyber-editor.cjs5.js +0 -1
  67. package/dist/client/cyber-editor.css +0 -1
  68. package/dist/client/cyber-editor.es.js +0 -25364
  69. package/dist/client/cyber-editor.es2.js +0 -43
  70. package/dist/client/cyber-editor.es3.js +0 -11
  71. package/dist/client/cyber-editor.es4.js +0 -46769
  72. package/dist/client/cyber-editor.es5.js +0 -11
  73. package/dist/client/index-HJNgKdvE.cjs +0 -5
  74. package/dist/client/index-rkLJDvut.js +0 -156
  75. package/dist/client/index.d.ts +0 -23
  76. package/dist/client/index.html +0 -6
  77. package/dist/client/with-props-Ba4118z_.js +0 -27
  78. package/dist/client/with-props-CuGIah2q.cjs +0 -1
  79. /package/dist/{client/assets → assets}/icons/index.ts +0 -0
  80. /package/dist/{client/favicon.svg → favicon.svg} +0 -0
@@ -0,0 +1,703 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),kr=require("react-dom");function yC(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=yC($),CC=yC(kr);var Al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kl={exports:{}},es={};/**
2
+ * @license React
3
+ * react-jsx-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 Hg;function aO(){if(Hg)return es;Hg=1;var e=Symbol.for("react.transitional.element"),t=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:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return es.Fragment=t,es.jsx=n,es.jsxs=n,es}var ts={};/**
10
+ * @license React
11
+ * react-jsx-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 Vg;function sO(){return Vg||(Vg=1,process.env.NODE_ENV!=="production"&&function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===_?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case w:return"Fragment";case S:return"Portal";case N:return"Profiler";case E:return"StrictMode";case k:return"Suspense";case D:return"SuspenseList"}if(typeof z=="object")switch(typeof z.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),z.$$typeof){case M:return(z.displayName||"Context")+".Provider";case O:return(z._context.displayName||"Context")+".Consumer";case I:var ve=z.render;return z=z.displayName,z||(z=ve.displayName||ve.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case A:return ve=z.displayName||null,ve!==null?ve:e(z.type)||"Memo";case L:ve=z._payload,z=z._init;try{return e(z(ve))}catch{}}return null}function t(z){return""+z}function n(z){try{t(z);var ve=!1}catch{ve=!0}if(ve){ve=console;var se=ve.error,pe=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return se.call(ve,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",pe),t(z)}}function r(){}function o(){if(H===0){X=console.log,Y=console.info,le=console.warn,Q=console.error,fe=console.group,ye=console.groupCollapsed,ue=console.groupEnd;var z={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}H++}function i(){if(H--,H===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},z,{value:X}),info:W({},z,{value:Y}),warn:W({},z,{value:le}),error:W({},z,{value:Q}),group:W({},z,{value:fe}),groupCollapsed:W({},z,{value:ye}),groupEnd:W({},z,{value:ue})})}0>H&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a(z){if(ie===void 0)try{throw Error()}catch(se){var ve=se.stack.trim().match(/\n( *(at )?)/);ie=ve&&ve[1]||"",me=-1<se.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<se.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+ie+z+me}function s(z,ve){if(!z||re)return"";var se=ce.get(z);if(se!==void 0)return se;re=!0,se=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var pe=null;pe=V.H,V.H=null,o();try{var $e={DetermineComponentFrameRoot:function(){try{if(ve){var Pe=function(){throw Error()};if(Object.defineProperty(Pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pe,[])}catch(Le){var ze=Le}Reflect.construct(z,[],Pe)}else{try{Pe.call()}catch(Le){ze=Le}z.call(Pe.prototype)}}else{try{throw Error()}catch(Le){ze=Le}(Pe=z())&&typeof Pe.catch=="function"&&Pe.catch(function(){})}}catch(Le){if(Le&&ze&&typeof Le.stack=="string")return[Le.stack,ze.stack]}return[null,null]}};$e.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Me=Object.getOwnPropertyDescriptor($e.DetermineComponentFrameRoot,"name");Me&&Me.configurable&&Object.defineProperty($e.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var we=$e.DetermineComponentFrameRoot(),Be=we[0],Fe=we[1];if(Be&&Fe){var Re=Be.split(`
20
+ `),qe=Fe.split(`
21
+ `);for(we=Me=0;Me<Re.length&&!Re[Me].includes("DetermineComponentFrameRoot");)Me++;for(;we<qe.length&&!qe[we].includes("DetermineComponentFrameRoot");)we++;if(Me===Re.length||we===qe.length)for(Me=Re.length-1,we=qe.length-1;1<=Me&&0<=we&&Re[Me]!==qe[we];)we--;for(;1<=Me&&0<=we;Me--,we--)if(Re[Me]!==qe[we]){if(Me!==1||we!==1)do if(Me--,we--,0>we||Re[Me]!==qe[we]){var Ke=`
22
+ `+Re[Me].replace(" at new "," at ");return z.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",z.displayName)),typeof z=="function"&&ce.set(z,Ke),Ke}while(1<=Me&&0<=we);break}}}finally{re=!1,V.H=pe,i(),Error.prepareStackTrace=se}return Re=(Re=z?z.displayName||z.name:"")?a(Re):"",typeof z=="function"&&ce.set(z,Re),Re}function l(z){if(z==null)return"";if(typeof z=="function"){var ve=z.prototype;return s(z,!(!ve||!ve.isReactComponent))}if(typeof z=="string")return a(z);switch(z){case k:return a("Suspense");case D:return a("SuspenseList")}if(typeof z=="object")switch(z.$$typeof){case I:return z=s(z.render,!1),z;case A:return l(z.type);case L:ve=z._payload,z=z._init;try{return l(z(ve))}catch{}}return""}function c(){var z=V.A;return z===null?null:z.getOwner()}function u(z){if(F.call(z,"key")){var ve=Object.getOwnPropertyDescriptor(z,"key").get;if(ve&&ve.isReactWarning)return!1}return z.key!==void 0}function d(z,ve){function se(){Ee||(Ee=!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)",ve))}se.isReactWarning=!0,Object.defineProperty(z,"key",{get:se,configurable:!0})}function f(){var z=e(this.type);return Oe[z]||(Oe[z]=!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.")),z=this.props.ref,z!==void 0?z:null}function h(z,ve,se,pe,$e,Me){return se=Me.ref,z={$$typeof:x,type:z,key:ve,props:Me,_owner:$e},(se!==void 0?se:null)!==null?Object.defineProperty(z,"ref",{enumerable:!1,get:f}):Object.defineProperty(z,"ref",{enumerable:!1,value:null}),z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(z,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function m(z,ve,se,pe,$e,Me){if(typeof z=="string"||typeof z=="function"||z===w||z===N||z===E||z===k||z===D||z===T||typeof z=="object"&&z!==null&&(z.$$typeof===L||z.$$typeof===A||z.$$typeof===M||z.$$typeof===O||z.$$typeof===I||z.$$typeof===K||z.getModuleId!==void 0)){var we=ve.children;if(we!==void 0)if(pe)if(J(we)){for(pe=0;pe<we.length;pe++)v(we[pe],z);Object.freeze&&Object.freeze(we)}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(we,z)}else we="",(z===void 0||typeof z=="object"&&z!==null&&Object.keys(z).length===0)&&(we+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),z===null?pe="null":J(z)?pe="array":z!==void 0&&z.$$typeof===x?(pe="<"+(e(z.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):pe=typeof z,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",pe,we);if(F.call(ve,"key")){we=e(z);var Be=Object.keys(ve).filter(function(Re){return Re!=="key"});pe=0<Be.length?"{key: someKey, "+Be.join(": ..., ")+": ...}":"{key: someKey}",xe[we+pe]||(Be=0<Be.length?"{"+Be.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} />`,pe,we,Be,we),xe[we+pe]=!0)}if(we=null,se!==void 0&&(n(se),we=""+se),u(ve)&&(n(ve.key),we=""+ve.key),"key"in ve){se={};for(var Fe in ve)Fe!=="key"&&(se[Fe]=ve[Fe])}else se=ve;return we&&d(se,typeof z=="function"?z.displayName||z.name||"Unknown":z),h(z,we,Me,$e,c(),se)}function v(z,ve){if(typeof z=="object"&&z&&z.$$typeof!==he){if(J(z))for(var se=0;se<z.length;se++){var pe=z[se];g(pe)&&y(pe,ve)}else if(g(z))z._store&&(z._store.validated=1);else if(z===null||typeof z!="object"?se=null:(se=R&&z[R]||z["@@iterator"],se=typeof se=="function"?se:null),typeof se=="function"&&se!==z.entries&&(se=se.call(z),se!==z))for(;!(z=se.next()).done;)g(z.value)&&y(z.value,ve)}}function g(z){return typeof z=="object"&&z!==null&&z.$$typeof===x}function y(z,ve){if(z._store&&!z._store.validated&&z.key==null&&(z._store.validated=1,ve=b(ve),!je[ve])){je[ve]=!0;var se="";z&&z._owner!=null&&z._owner!==c()&&(se=null,typeof z._owner.tag=="number"?se=e(z._owner.type):typeof z._owner.name=="string"&&(se=z._owner.name),se=" It was passed a child from "+se+".");var pe=V.getCurrentStack;V.getCurrentStack=function(){var $e=l(z.type);return pe&&($e+=pe()||""),$e},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.',ve,se),V.getCurrentStack=pe}}function b(z){var ve="",se=c();return se&&(se=e(se.type))&&(ve=`
28
+
29
+ Check the render method of \``+se+"`."),ve||(z=e(z))&&(ve=`
30
+
31
+ Check the top-level render call using <`+z+">."),ve}var C=$,x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),M=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),R=Symbol.iterator,_=Symbol.for("react.client.reference"),V=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,W=Object.assign,K=Symbol.for("react.client.reference"),J=Array.isArray,H=0,X,Y,le,Q,fe,ye,ue;r.__reactDisabledLog=!0;var ie,me,re=!1,ce=new(typeof WeakMap=="function"?WeakMap:Map),he=Symbol.for("react.client.reference"),Ee,Oe={},xe={},je={};ts.Fragment=w,ts.jsx=function(z,ve,se,pe,$e){return m(z,ve,se,!1,pe,$e)},ts.jsxs=function(z,ve,se,pe,$e){return m(z,ve,se,!0,pe,$e)}}()),ts}var Wg;function lO(){return Wg||(Wg=1,process.env.NODE_ENV==="production"?kl.exports=aO():kl.exports=sO()),kl.exports}var j=lO(),kd={exports:{}};/*!
32
+ Copyright (c) 2018 Jed Watson.
33
+ Licensed under the MIT License (MIT), see
34
+ http://jedwatson.github.io/classnames
35
+ */var qg;function cO(){return qg||(qg=1,function(e){(function(){var t={}.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)t.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(kd)),kd.exports}var uO=cO();const ee=iO(uO),dO="_fullscreen_giq1a_2",fO="_block_giq1a_3",hO="_container_giq1a_31",pO="_ring_giq1a_39",mO="_message_giq1a_70",jo={fullscreen:dO,block:fO,container:hO,ring:pO,message:mO};function Dl(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Dd={exports:{}};/*!
36
+ localForage -- Offline Storage, Improved
37
+ Version 1.10.0
38
+ https://localforage.github.io/localForage
39
+ (c) 2013-2017 Mozilla, Apache License 2.0
40
+ */var Ug;function gO(){return Ug||(Ug=1,function(e,t){(function(n){e.exports=n()})(function(){return function n(r,o,i){function a(c,u){if(!o[c]){if(!r[c]){var d=typeof Dl=="function"&&Dl;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 h=o[c]={exports:{}};r[c][0].call(h.exports,function(m){var v=r[c][1][m];return a(v||m)},h,h.exports,n,r,o,i)}return o[c].exports}for(var s=typeof Dl=="function"&&Dl,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,h=[];function m(){f=!0;for(var g,y,b=h.length;b;){for(y=h,h=[],g=-1;++g<b;)y[g]();b=h.length}f=!1}r.exports=v;function v(g){h.push(g)===1&&!f&&s()}}).call(this,typeof Al<"u"?Al: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 N=this.state===c?S:w;h(E,N,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){h(this.promise,this.onFulfilled,S)},f.prototype.callRejected=function(S){s.reject(this.promise,S)},f.prototype.otherCallRejected=function(S){h(this.promise,this.onRejected,S)};function h(S,w,E){i(function(){var N;try{N=w(E)}catch(O){return s.reject(S,O)}N===S?s.reject(S,new TypeError("Cannot resolve promise with itself")):s.resolve(S,N)})}s.resolve=function(S,w){var E=g(m,w);if(E.status==="error")return s.reject(S,E.value);var N=E.value;if(N)v(S,N);else{S.state=c,S.outcome=w;for(var O=-1,M=S.queue.length;++O<M;)S.queue[O].callFulfilled(w)}return S},s.reject=function(S,w){S.state=l,S.outcome=w;for(var E=-1,N=S.queue.length;++E<N;)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 N(k){E||(E=!0,s.reject(S,k))}function O(k){E||(E=!0,s.resolve(S,k))}function M(){w(O,N)}var I=g(M);I.status==="error"&&N(I.value)}function g(S,w){var E={};try{E.value=S(w),E.status="success"}catch(N){E.status="error",E.value=N}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,N=!1;if(!E)return this.resolve([]);for(var O=new Array(E),M=0,I=-1,k=new this(a);++I<E;)D(S[I],I);return k;function D(A,L){w.resolve(A).then(T,function(R){N||(N=!0,s.reject(k,R))});function T(R){O[L]=R,++M===E&&!N&&(N=!0,s.resolve(k,O))}}}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,N=!1;if(!E)return this.resolve([]);for(var O=-1,M=new this(a);++O<E;)I(S[O]);return M;function I(k){w.resolve(k).then(function(D){N||(N=!0,s.resolve(M,D))},function(D){N||(N=!0,s.reject(M,D))})}}},{1:1}],3:[function(n,r,o){(function(i){typeof i.Promise!="function"&&(i.Promise=n(2))}).call(this,typeof Al<"u"?Al: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(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P};function a(P,G){if(!(P instanceof G))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 P=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),G=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!P||G)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function u(P,G){P=P||[],G=G||{};try{return new Blob(P,G)}catch(Z){if(Z.name!=="TypeError")throw Z;for(var B=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,te=new B,oe=0;oe<P.length;oe+=1)te.append(P[oe]);return te.getBlob(G.type)}}typeof Promise>"u"&&n(3);var d=Promise;function f(P,G){G&&P.then(function(B){G(null,B)},function(B){G(B)})}function h(P,G,B){typeof G=="function"&&P.then(G),typeof B=="function"&&P.catch(B)}function m(P){return typeof P!="string"&&(console.warn(P+" used as a key, but it is not a string."),P=String(P)),P}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(P){for(var G=P.length,B=new ArrayBuffer(G),te=new Uint8Array(B),oe=0;oe<G;oe++)te[oe]=P.charCodeAt(oe);return B}function E(P){return new d(function(G){var B=P.transaction(g,S),te=u([""]);B.objectStore(g).put(te,"key"),B.onabort=function(oe){oe.preventDefault(),oe.stopPropagation(),G(!1)},B.oncomplete=function(){var oe=navigator.userAgent.match(/Chrome\/(\d+)/),Z=navigator.userAgent.match(/Edge\//);G(Z||!oe||parseInt(oe[1],10)>=43)}}).catch(function(){return!1})}function N(P){return typeof y=="boolean"?d.resolve(y):E(P).then(function(G){return y=G,y})}function O(P){var G=b[P.name],B={};B.promise=new d(function(te,oe){B.resolve=te,B.reject=oe}),G.deferredOperations.push(B),G.dbReady?G.dbReady=G.dbReady.then(function(){return B.promise}):G.dbReady=B.promise}function M(P){var G=b[P.name],B=G.deferredOperations.pop();if(B)return B.resolve(),B.promise}function I(P,G){var B=b[P.name],te=B.deferredOperations.pop();if(te)return te.reject(G),te.promise}function k(P,G){return new d(function(B,te){if(b[P.name]=b[P.name]||K(),P.db)if(G)O(P),P.db.close();else return B(P.db);var oe=[P.name];G&&oe.push(P.version);var Z=l.open.apply(l,oe);G&&(Z.onupgradeneeded=function(Ce){var ge=Z.result;try{ge.createObjectStore(P.storeName),Ce.oldVersion<=1&&ge.createObjectStore(g)}catch(de){if(de.name==="ConstraintError")console.warn('The database "'+P.name+'" has been upgraded from version '+Ce.oldVersion+" to version "+Ce.newVersion+', but the storage "'+P.storeName+'" already exists.');else throw de}}),Z.onerror=function(Ce){Ce.preventDefault(),te(Z.error)},Z.onsuccess=function(){var Ce=Z.result;Ce.onversionchange=function(ge){ge.target.close()},B(Ce),M(P)}})}function D(P){return k(P,!1)}function A(P){return k(P,!0)}function L(P,G){if(!P.db)return!0;var B=!P.db.objectStoreNames.contains(P.storeName),te=P.version<P.db.version,oe=P.version>P.db.version;if(te&&(P.version!==G&&console.warn('The database "'+P.name+`" can't be downgraded from version `+P.db.version+" to version "+P.version+"."),P.version=P.db.version),oe||B){if(B){var Z=P.db.version+1;Z>P.version&&(P.version=Z)}return!0}return!1}function T(P){return new d(function(G,B){var te=new FileReader;te.onerror=B,te.onloadend=function(oe){var Z=btoa(oe.target.result||"");G({__local_forage_encoded_blob:!0,data:Z,type:P.type})},te.readAsBinaryString(P)})}function R(P){var G=w(atob(P.data));return u([G],{type:P.type})}function _(P){return P&&P.__local_forage_encoded_blob}function V(P){var G=this,B=G._initReady().then(function(){var te=b[G._dbInfo.name];if(te&&te.dbReady)return te.dbReady});return h(B,P,P),B}function F(P){O(P);for(var G=b[P.name],B=G.forages,te=0;te<B.length;te++){var oe=B[te];oe._dbInfo.db&&(oe._dbInfo.db.close(),oe._dbInfo.db=null)}return P.db=null,D(P).then(function(Z){return P.db=Z,L(P)?A(P):Z}).then(function(Z){P.db=G.db=Z;for(var Ce=0;Ce<B.length;Ce++)B[Ce]._dbInfo.db=Z}).catch(function(Z){throw I(P,Z),Z})}function W(P,G,B,te){te===void 0&&(te=1);try{var oe=P.db.transaction(P.storeName,G);B(null,oe)}catch(Z){if(te>0&&(!P.db||Z.name==="InvalidStateError"||Z.name==="NotFoundError"))return d.resolve().then(function(){if(!P.db||Z.name==="NotFoundError"&&!P.db.objectStoreNames.contains(P.storeName)&&P.version<=P.db.version)return P.db&&(P.version=P.db.version+1),A(P)}).then(function(){return F(P).then(function(){W(P,G,B,te-1)})}).catch(B);B(Z)}}function K(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function J(P){var G=this,B={db:null};if(P)for(var te in P)B[te]=P[te];var oe=b[B.name];oe||(oe=K(),b[B.name]=oe),oe.forages.push(G),G._initReady||(G._initReady=G.ready,G.ready=V);var Z=[];function Ce(){return d.resolve()}for(var ge=0;ge<oe.forages.length;ge++){var de=oe.forages[ge];de!==G&&Z.push(de._initReady().catch(Ce))}var be=oe.forages.slice(0);return d.all(Z).then(function(){return B.db=oe.db,D(B)}).then(function(Se){return B.db=Se,L(B,G._defaultConfig.version)?A(B):Se}).then(function(Se){B.db=oe.db=Se,G._dbInfo=B;for(var Te=0;Te<be.length;Te++){var nt=be[Te];nt!==G&&(nt._dbInfo.db=B.db,nt._dbInfo.version=B.version)}})}function H(P,G){var B=this;P=m(P);var te=new d(function(oe,Z){B.ready().then(function(){W(B._dbInfo,x,function(Ce,ge){if(Ce)return Z(Ce);try{var de=ge.objectStore(B._dbInfo.storeName),be=de.get(P);be.onsuccess=function(){var Se=be.result;Se===void 0&&(Se=null),_(Se)&&(Se=R(Se)),oe(Se)},be.onerror=function(){Z(be.error)}}catch(Se){Z(Se)}})}).catch(Z)});return f(te,G),te}function X(P,G){var B=this,te=new d(function(oe,Z){B.ready().then(function(){W(B._dbInfo,x,function(Ce,ge){if(Ce)return Z(Ce);try{var de=ge.objectStore(B._dbInfo.storeName),be=de.openCursor(),Se=1;be.onsuccess=function(){var Te=be.result;if(Te){var nt=Te.value;_(nt)&&(nt=R(nt));var yt=P(nt,Te.key,Se++);yt!==void 0?oe(yt):Te.continue()}else oe()},be.onerror=function(){Z(be.error)}}catch(Te){Z(Te)}})}).catch(Z)});return f(te,G),te}function Y(P,G,B){var te=this;P=m(P);var oe=new d(function(Z,Ce){var ge;te.ready().then(function(){return ge=te._dbInfo,C.call(G)==="[object Blob]"?N(ge.db).then(function(de){return de?G:T(G)}):G}).then(function(de){W(te._dbInfo,S,function(be,Se){if(be)return Ce(be);try{var Te=Se.objectStore(te._dbInfo.storeName);de===null&&(de=void 0);var nt=Te.put(de,P);Se.oncomplete=function(){de===void 0&&(de=null),Z(de)},Se.onabort=Se.onerror=function(){var yt=nt.error?nt.error:nt.transaction.error;Ce(yt)}}catch(yt){Ce(yt)}})}).catch(Ce)});return f(oe,B),oe}function le(P,G){var B=this;P=m(P);var te=new d(function(oe,Z){B.ready().then(function(){W(B._dbInfo,S,function(Ce,ge){if(Ce)return Z(Ce);try{var de=ge.objectStore(B._dbInfo.storeName),be=de.delete(P);ge.oncomplete=function(){oe()},ge.onerror=function(){Z(be.error)},ge.onabort=function(){var Se=be.error?be.error:be.transaction.error;Z(Se)}}catch(Se){Z(Se)}})}).catch(Z)});return f(te,G),te}function Q(P){var G=this,B=new d(function(te,oe){G.ready().then(function(){W(G._dbInfo,S,function(Z,Ce){if(Z)return oe(Z);try{var ge=Ce.objectStore(G._dbInfo.storeName),de=ge.clear();Ce.oncomplete=function(){te()},Ce.onabort=Ce.onerror=function(){var be=de.error?de.error:de.transaction.error;oe(be)}}catch(be){oe(be)}})}).catch(oe)});return f(B,P),B}function fe(P){var G=this,B=new d(function(te,oe){G.ready().then(function(){W(G._dbInfo,x,function(Z,Ce){if(Z)return oe(Z);try{var ge=Ce.objectStore(G._dbInfo.storeName),de=ge.count();de.onsuccess=function(){te(de.result)},de.onerror=function(){oe(de.error)}}catch(be){oe(be)}})}).catch(oe)});return f(B,P),B}function ye(P,G){var B=this,te=new d(function(oe,Z){if(P<0){oe(null);return}B.ready().then(function(){W(B._dbInfo,x,function(Ce,ge){if(Ce)return Z(Ce);try{var de=ge.objectStore(B._dbInfo.storeName),be=!1,Se=de.openKeyCursor();Se.onsuccess=function(){var Te=Se.result;if(!Te){oe(null);return}P===0||be?oe(Te.key):(be=!0,Te.advance(P))},Se.onerror=function(){Z(Se.error)}}catch(Te){Z(Te)}})}).catch(Z)});return f(te,G),te}function ue(P){var G=this,B=new d(function(te,oe){G.ready().then(function(){W(G._dbInfo,x,function(Z,Ce){if(Z)return oe(Z);try{var ge=Ce.objectStore(G._dbInfo.storeName),de=ge.openKeyCursor(),be=[];de.onsuccess=function(){var Se=de.result;if(!Se){te(be);return}be.push(Se.key),Se.continue()},de.onerror=function(){oe(de.error)}}catch(Se){oe(Se)}})}).catch(oe)});return f(B,P),B}function ie(P,G){G=v.apply(this,arguments);var B=this.config();P=typeof P!="function"&&P||{},P.name||(P.name=P.name||B.name,P.storeName=P.storeName||B.storeName);var te=this,oe;if(!P.name)oe=d.reject("Invalid arguments");else{var Z=P.name===B.name&&te._dbInfo.db,Ce=Z?d.resolve(te._dbInfo.db):D(P).then(function(ge){var de=b[P.name],be=de.forages;de.db=ge;for(var Se=0;Se<be.length;Se++)be[Se]._dbInfo.db=ge;return ge});P.storeName?oe=Ce.then(function(ge){if(ge.objectStoreNames.contains(P.storeName)){var de=ge.version+1;O(P);var be=b[P.name],Se=be.forages;ge.close();for(var Te=0;Te<Se.length;Te++){var nt=Se[Te];nt._dbInfo.db=null,nt._dbInfo.version=de}var yt=new d(function(St,Ft){var Ht=l.open(P.name,de);Ht.onerror=function(sn){var En=Ht.result;En.close(),Ft(sn)},Ht.onupgradeneeded=function(){var sn=Ht.result;sn.deleteObjectStore(P.storeName)},Ht.onsuccess=function(){var sn=Ht.result;sn.close(),St(sn)}});return yt.then(function(St){be.db=St;for(var Ft=0;Ft<Se.length;Ft++){var Ht=Se[Ft];Ht._dbInfo.db=St,M(Ht._dbInfo)}}).catch(function(St){throw(I(P,St)||d.resolve()).catch(function(){}),St})}}):oe=Ce.then(function(ge){O(P);var de=b[P.name],be=de.forages;ge.close();for(var Se=0;Se<be.length;Se++){var Te=be[Se];Te._dbInfo.db=null}var nt=new d(function(yt,St){var Ft=l.deleteDatabase(P.name);Ft.onerror=function(){var Ht=Ft.result;Ht&&Ht.close(),St(Ft.error)},Ft.onblocked=function(){console.warn('dropInstance blocked for database "'+P.name+'" until all open connections are closed')},Ft.onsuccess=function(){var Ht=Ft.result;Ht&&Ht.close(),yt(Ht)}});return nt.then(function(yt){de.db=yt;for(var St=0;St<be.length;St++){var Ft=be[St];M(Ft._dbInfo)}}).catch(function(yt){throw(I(P,yt)||d.resolve()).catch(function(){}),yt})})}return f(oe,G),oe}var me={_driver:"asyncStorage",_initStorage:J,_support:c(),iterate:X,getItem:H,setItem:Y,removeItem:le,clear:Q,length:fe,key:ye,keys:ue,dropInstance:ie};function re(){return typeof openDatabase=="function"}var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",he="~~local_forage_type~",Ee=/^~~local_forage_type~([^~]+)~/,Oe="__lfsc__:",xe=Oe.length,je="arbf",z="blob",ve="si08",se="ui08",pe="uic8",$e="si16",Me="si32",we="ur16",Be="ui32",Fe="fl32",Re="fl64",qe=xe+je.length,Ke=Object.prototype.toString;function Pe(P){var G=P.length*.75,B=P.length,te,oe=0,Z,Ce,ge,de;P[P.length-1]==="="&&(G--,P[P.length-2]==="="&&G--);var be=new ArrayBuffer(G),Se=new Uint8Array(be);for(te=0;te<B;te+=4)Z=ce.indexOf(P[te]),Ce=ce.indexOf(P[te+1]),ge=ce.indexOf(P[te+2]),de=ce.indexOf(P[te+3]),Se[oe++]=Z<<2|Ce>>4,Se[oe++]=(Ce&15)<<4|ge>>2,Se[oe++]=(ge&3)<<6|de&63;return be}function ze(P){var G=new Uint8Array(P),B="",te;for(te=0;te<G.length;te+=3)B+=ce[G[te]>>2],B+=ce[(G[te]&3)<<4|G[te+1]>>4],B+=ce[(G[te+1]&15)<<2|G[te+2]>>6],B+=ce[G[te+2]&63];return G.length%3===2?B=B.substring(0,B.length-1)+"=":G.length%3===1&&(B=B.substring(0,B.length-2)+"=="),B}function Le(P,G){var B="";if(P&&(B=Ke.call(P)),P&&(B==="[object ArrayBuffer]"||P.buffer&&Ke.call(P.buffer)==="[object ArrayBuffer]")){var te,oe=Oe;P instanceof ArrayBuffer?(te=P,oe+=je):(te=P.buffer,B==="[object Int8Array]"?oe+=ve:B==="[object Uint8Array]"?oe+=se:B==="[object Uint8ClampedArray]"?oe+=pe:B==="[object Int16Array]"?oe+=$e:B==="[object Uint16Array]"?oe+=we:B==="[object Int32Array]"?oe+=Me:B==="[object Uint32Array]"?oe+=Be:B==="[object Float32Array]"?oe+=Fe:B==="[object Float64Array]"?oe+=Re:G(new Error("Failed to get type for BinaryArray"))),G(oe+ze(te))}else if(B==="[object Blob]"){var Z=new FileReader;Z.onload=function(){var Ce=he+P.type+"~"+ze(this.result);G(Oe+z+Ce)},Z.readAsArrayBuffer(P)}else try{G(JSON.stringify(P))}catch(Ce){console.error("Couldn't convert value into a JSON string: ",P),G(null,Ce)}}function He(P){if(P.substring(0,xe)!==Oe)return JSON.parse(P);var G=P.substring(qe),B=P.substring(xe,qe),te;if(B===z&&Ee.test(G)){var oe=G.match(Ee);te=oe[1],G=G.substring(oe[0].length)}var Z=Pe(G);switch(B){case je:return Z;case z:return u([Z],{type:te});case ve:return new Int8Array(Z);case se:return new Uint8Array(Z);case pe:return new Uint8ClampedArray(Z);case $e:return new Int16Array(Z);case we:return new Uint16Array(Z);case Me:return new Int32Array(Z);case Be:return new Uint32Array(Z);case Fe:return new Float32Array(Z);case Re:return new Float64Array(Z);default:throw new Error("Unkown type: "+B)}}var et={serialize:Le,deserialize:He,stringToBuffer:Pe,bufferToString:ze};function pt(P,G,B,te){P.executeSql("CREATE TABLE IF NOT EXISTS "+G.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],B,te)}function _t(P){var G=this,B={db:null};if(P)for(var te in P)B[te]=typeof P[te]!="string"?P[te].toString():P[te];var oe=new d(function(Z,Ce){try{B.db=openDatabase(B.name,String(B.version),B.description,B.size)}catch(ge){return Ce(ge)}B.db.transaction(function(ge){pt(ge,B,function(){G._dbInfo=B,Z()},function(de,be){Ce(be)})},Ce)});return B.serializer=et,oe}function Lt(P,G,B,te,oe,Z){P.executeSql(B,te,oe,function(Ce,ge){ge.code===ge.SYNTAX_ERR?Ce.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[G.storeName],function(de,be){be.rows.length?Z(de,ge):pt(de,G,function(){de.executeSql(B,te,oe,Z)},Z)},Z):Z(Ce,ge)},Z)}function cn(P,G){var B=this;P=m(P);var te=new d(function(oe,Z){B.ready().then(function(){var Ce=B._dbInfo;Ce.db.transaction(function(ge){Lt(ge,Ce,"SELECT * FROM "+Ce.storeName+" WHERE key = ? LIMIT 1",[P],function(de,be){var Se=be.rows.length?be.rows.item(0).value:null;Se&&(Se=Ce.serializer.deserialize(Se)),oe(Se)},function(de,be){Z(be)})})}).catch(Z)});return f(te,G),te}function Je(P,G){var B=this,te=new d(function(oe,Z){B.ready().then(function(){var Ce=B._dbInfo;Ce.db.transaction(function(ge){Lt(ge,Ce,"SELECT * FROM "+Ce.storeName,[],function(de,be){for(var Se=be.rows,Te=Se.length,nt=0;nt<Te;nt++){var yt=Se.item(nt),St=yt.value;if(St&&(St=Ce.serializer.deserialize(St)),St=P(St,yt.key,nt+1),St!==void 0){oe(St);return}}oe()},function(de,be){Z(be)})})}).catch(Z)});return f(te,G),te}function Ve(P,G,B,te){var oe=this;P=m(P);var Z=new d(function(Ce,ge){oe.ready().then(function(){G===void 0&&(G=null);var de=G,be=oe._dbInfo;be.serializer.serialize(G,function(Se,Te){Te?ge(Te):be.db.transaction(function(nt){Lt(nt,be,"INSERT OR REPLACE INTO "+be.storeName+" (key, value) VALUES (?, ?)",[P,Se],function(){Ce(de)},function(yt,St){ge(St)})},function(nt){if(nt.code===nt.QUOTA_ERR){if(te>0){Ce(Ve.apply(oe,[P,de,B,te-1]));return}ge(nt)}})})}).catch(ge)});return f(Z,B),Z}function ct(P,G,B){return Ve.apply(this,[P,G,B,1])}function at(P,G){var B=this;P=m(P);var te=new d(function(oe,Z){B.ready().then(function(){var Ce=B._dbInfo;Ce.db.transaction(function(ge){Lt(ge,Ce,"DELETE FROM "+Ce.storeName+" WHERE key = ?",[P],function(){oe()},function(de,be){Z(be)})})}).catch(Z)});return f(te,G),te}function mt(P){var G=this,B=new d(function(te,oe){G.ready().then(function(){var Z=G._dbInfo;Z.db.transaction(function(Ce){Lt(Ce,Z,"DELETE FROM "+Z.storeName,[],function(){te()},function(ge,de){oe(de)})})}).catch(oe)});return f(B,P),B}function Ze(P){var G=this,B=new d(function(te,oe){G.ready().then(function(){var Z=G._dbInfo;Z.db.transaction(function(Ce){Lt(Ce,Z,"SELECT COUNT(key) as c FROM "+Z.storeName,[],function(ge,de){var be=de.rows.item(0).c;te(be)},function(ge,de){oe(de)})})}).catch(oe)});return f(B,P),B}function Ue(P,G){var B=this,te=new d(function(oe,Z){B.ready().then(function(){var Ce=B._dbInfo;Ce.db.transaction(function(ge){Lt(ge,Ce,"SELECT key FROM "+Ce.storeName+" WHERE id = ? LIMIT 1",[P+1],function(de,be){var Se=be.rows.length?be.rows.item(0).key:null;oe(Se)},function(de,be){Z(be)})})}).catch(Z)});return f(te,G),te}function Ge(P){var G=this,B=new d(function(te,oe){G.ready().then(function(){var Z=G._dbInfo;Z.db.transaction(function(Ce){Lt(Ce,Z,"SELECT key FROM "+Z.storeName,[],function(ge,de){for(var be=[],Se=0;Se<de.rows.length;Se++)be.push(de.rows.item(Se).key);te(be)},function(ge,de){oe(de)})})}).catch(oe)});return f(B,P),B}function Et(P){return new d(function(G,B){P.transaction(function(te){te.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(oe,Z){for(var Ce=[],ge=0;ge<Z.rows.length;ge++)Ce.push(Z.rows.item(ge).name);G({db:P,storeNames:Ce})},function(oe,Z){B(Z)})},function(te){B(te)})})}function Tt(P,G){G=v.apply(this,arguments);var B=this.config();P=typeof P!="function"&&P||{},P.name||(P.name=P.name||B.name,P.storeName=P.storeName||B.storeName);var te=this,oe;return P.name?oe=new d(function(Z){var Ce;P.name===B.name?Ce=te._dbInfo.db:Ce=openDatabase(P.name,"","",0),P.storeName?Z({db:Ce,storeNames:[P.storeName]}):Z(Et(Ce))}).then(function(Z){return new d(function(Ce,ge){Z.db.transaction(function(de){function be(yt){return new d(function(St,Ft){de.executeSql("DROP TABLE IF EXISTS "+yt,[],function(){St()},function(Ht,sn){Ft(sn)})})}for(var Se=[],Te=0,nt=Z.storeNames.length;Te<nt;Te++)Se.push(be(Z.storeNames[Te]));d.all(Se).then(function(){Ce()}).catch(function(yt){ge(yt)})},function(de){ge(de)})})}):oe=d.reject("Invalid arguments"),f(oe,G),oe}var tt={_driver:"webSQLStorage",_initStorage:_t,_support:re(),iterate:Je,getItem:cn,setItem:ct,removeItem:at,clear:mt,length:Ze,key:Ue,keys:Ge,dropInstance:Tt};function We(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function it(P,G){var B=P.name+"/";return P.storeName!==G.storeName&&(B+=P.storeName+"/"),B}function st(){var P="_localforage_support_test";try{return localStorage.setItem(P,!0),localStorage.removeItem(P),!1}catch{return!0}}function rt(){return!st()||localStorage.length>0}function ft(P){var G=this,B={};if(P)for(var te in P)B[te]=P[te];return B.keyPrefix=it(P,G._defaultConfig),rt()?(G._dbInfo=B,B.serializer=et,d.resolve()):d.reject()}function jt(P){var G=this,B=G.ready().then(function(){for(var te=G._dbInfo.keyPrefix,oe=localStorage.length-1;oe>=0;oe--){var Z=localStorage.key(oe);Z.indexOf(te)===0&&localStorage.removeItem(Z)}});return f(B,P),B}function Nt(P,G){var B=this;P=m(P);var te=B.ready().then(function(){var oe=B._dbInfo,Z=localStorage.getItem(oe.keyPrefix+P);return Z&&(Z=oe.serializer.deserialize(Z)),Z});return f(te,G),te}function Jt(P,G){var B=this,te=B.ready().then(function(){for(var oe=B._dbInfo,Z=oe.keyPrefix,Ce=Z.length,ge=localStorage.length,de=1,be=0;be<ge;be++){var Se=localStorage.key(be);if(Se.indexOf(Z)===0){var Te=localStorage.getItem(Se);if(Te&&(Te=oe.serializer.deserialize(Te)),Te=P(Te,Se.substring(Ce),de++),Te!==void 0)return Te}}});return f(te,G),te}function At(P,G){var B=this,te=B.ready().then(function(){var oe=B._dbInfo,Z;try{Z=localStorage.key(P)}catch{Z=null}return Z&&(Z=Z.substring(oe.keyPrefix.length)),Z});return f(te,G),te}function zt(P){var G=this,B=G.ready().then(function(){for(var te=G._dbInfo,oe=localStorage.length,Z=[],Ce=0;Ce<oe;Ce++){var ge=localStorage.key(Ce);ge.indexOf(te.keyPrefix)===0&&Z.push(ge.substring(te.keyPrefix.length))}return Z});return f(B,P),B}function Wt(P){var G=this,B=G.keys().then(function(te){return te.length});return f(B,P),B}function Qt(P,G){var B=this;P=m(P);var te=B.ready().then(function(){var oe=B._dbInfo;localStorage.removeItem(oe.keyPrefix+P)});return f(te,G),te}function jn(P,G,B){var te=this;P=m(P);var oe=te.ready().then(function(){G===void 0&&(G=null);var Z=G;return new d(function(Ce,ge){var de=te._dbInfo;de.serializer.serialize(G,function(be,Se){if(Se)ge(Se);else try{localStorage.setItem(de.keyPrefix+P,be),Ce(Z)}catch(Te){(Te.name==="QuotaExceededError"||Te.name==="NS_ERROR_DOM_QUOTA_REACHED")&&ge(Te),ge(Te)}})})});return f(oe,B),oe}function Zt(P,G){if(G=v.apply(this,arguments),P=typeof P!="function"&&P||{},!P.name){var B=this.config();P.name=P.name||B.name,P.storeName=P.storeName||B.storeName}var te=this,oe;return P.name?oe=new d(function(Z){P.storeName?Z(it(P,te._defaultConfig)):Z(P.name+"/")}).then(function(Z){for(var Ce=localStorage.length-1;Ce>=0;Ce--){var ge=localStorage.key(Ce);ge.indexOf(Z)===0&&localStorage.removeItem(ge)}}):oe=d.reject("Invalid arguments"),f(oe,G),oe}var un={_driver:"localStorageWrapper",_initStorage:ft,_support:We(),iterate:Jt,getItem:Nt,setItem:jn,removeItem:Qt,clear:jt,length:Wt,key:At,keys:zt,dropInstance:Zt},_e=function(G,B){return G===B||typeof G=="number"&&typeof B=="number"&&isNaN(G)&&isNaN(B)},ot=function(G,B){for(var te=G.length,oe=0;oe<te;){if(_e(G[oe],B))return!0;oe++}return!1},Ye=Array.isArray||function(P){return Object.prototype.toString.call(P)==="[object Array]"},Ae={},ht={},Ot={INDEXEDDB:me,WEBSQL:tt,LOCALSTORAGE:un},Mt=[Ot.INDEXEDDB._driver,Ot.WEBSQL._driver,Ot.LOCALSTORAGE._driver],dn=["dropInstance"],on=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(dn),bn={description:"",driver:Mt.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function fn(P,G){P[G]=function(){var B=arguments;return P.ready().then(function(){return P[G].apply(P,B)})}}function an(){for(var P=1;P<arguments.length;P++){var G=arguments[P];if(G)for(var B in G)G.hasOwnProperty(B)&&(Ye(G[B])?arguments[0][B]=G[B].slice():arguments[0][B]=G[B])}return arguments[0]}var Pn=function(){function P(G){a(this,P);for(var B in Ot)if(Ot.hasOwnProperty(B)){var te=Ot[B],oe=te._driver;this[B]=oe,Ae[oe]||this.defineDriver(te)}this._defaultConfig=an({},bn),this._config=an({},this._defaultConfig,G),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return P.prototype.config=function(B){if((typeof B>"u"?"undefined":i(B))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var te in B){if(te==="storeName"&&(B[te]=B[te].replace(/\W/g,"_")),te==="version"&&typeof B[te]!="number")return new Error("Database version must be a number.");this._config[te]=B[te]}return"driver"in B&&B.driver?this.setDriver(this._config.driver):!0}else return typeof B=="string"?this._config[B]:this._config},P.prototype.defineDriver=function(B,te,oe){var Z=new d(function(Ce,ge){try{var de=B._driver,be=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!B._driver){ge(be);return}for(var Se=on.concat("_initStorage"),Te=0,nt=Se.length;Te<nt;Te++){var yt=Se[Te],St=!ot(dn,yt);if((St||B[yt])&&typeof B[yt]!="function"){ge(be);return}}var Ft=function(){for(var En=function(Lo){return function(){var eo=new Error("Method "+Lo+" is not implemented by the current driver"),zr=d.reject(eo);return f(zr,arguments[arguments.length-1]),zr}},xn=0,Ci=dn.length;xn<Ci;xn++){var Zn=dn[xn];B[Zn]||(B[Zn]=En(Zn))}};Ft();var Ht=function(En){Ae[de]&&console.info("Redefining LocalForage driver: "+de),Ae[de]=B,ht[de]=En,Ce()};"_support"in B?B._support&&typeof B._support=="function"?B._support().then(Ht,ge):Ht(!!B._support):Ht(!0)}catch(sn){ge(sn)}});return h(Z,te,oe),Z},P.prototype.driver=function(){return this._driver||null},P.prototype.getDriver=function(B,te,oe){var Z=Ae[B]?d.resolve(Ae[B]):d.reject(new Error("Driver not found."));return h(Z,te,oe),Z},P.prototype.getSerializer=function(B){var te=d.resolve(et);return h(te,B),te},P.prototype.ready=function(B){var te=this,oe=te._driverSet.then(function(){return te._ready===null&&(te._ready=te._initDriver()),te._ready});return h(oe,B,B),oe},P.prototype.setDriver=function(B,te,oe){var Z=this;Ye(B)||(B=[B]);var Ce=this._getSupportedDrivers(B);function ge(){Z._config.driver=Z.driver()}function de(Te){return Z._extend(Te),ge(),Z._ready=Z._initStorage(Z._config),Z._ready}function be(Te){return function(){var nt=0;function yt(){for(;nt<Te.length;){var St=Te[nt];return nt++,Z._dbInfo=null,Z._ready=null,Z.getDriver(St).then(de).catch(yt)}ge();var Ft=new Error("No available storage method found.");return Z._driverSet=d.reject(Ft),Z._driverSet}return yt()}}var Se=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=Se.then(function(){var Te=Ce[0];return Z._dbInfo=null,Z._ready=null,Z.getDriver(Te).then(function(nt){Z._driver=nt._driver,ge(),Z._wrapLibraryMethodsWithReady(),Z._initDriver=be(Ce)})}).catch(function(){ge();var Te=new Error("No available storage method found.");return Z._driverSet=d.reject(Te),Z._driverSet}),h(this._driverSet,te,oe),this._driverSet},P.prototype.supports=function(B){return!!ht[B]},P.prototype._extend=function(B){an(this,B)},P.prototype._getSupportedDrivers=function(B){for(var te=[],oe=0,Z=B.length;oe<Z;oe++){var Ce=B[oe];this.supports(Ce)&&te.push(Ce)}return te},P.prototype._wrapLibraryMethodsWithReady=function(){for(var B=0,te=on.length;B<te;B++)fn(this,on[B])},P.prototype.createInstance=function(B){return new P(B)},P}(),Bn=new Pn;r.exports=Bn},{3:3}]},{},[4])(4)})}(Dd)),Dd.exports}gO();function vO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},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){vO(e,o,n[o])})}return e}function yO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}function CO(e,t){return t=t??{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yO(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function SO(e,t){if(e==null)return{};var n=xO(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}$.createContext(void 0);function wO(e){var t=e.full,n=t===void 0?!1:t,r=e.block,o=r===void 0?!1:r,i=e.className,a=i===void 0?"":i,s=e.message,l=s===void 0?"Loading":s,c=SO(e,["full","block","className","message"]);function u(){return j.jsxs("div",CO(bO({className:jo.container},c),{children:[j.jsx("div",{className:jo.ring}),j.jsx("div",{className:jo.ring}),j.jsx("div",{className:jo.ring}),j.jsx("div",{className:jo.ring}),l&&j.jsx("div",{className:jo.message,children:l})]}))}return n?j.jsx("div",{className:ee(jo.fullscreen,a),children:u()}):o?j.jsx("div",{className:ee(jo.block,a),children:u()}):u()}$.createContext(void 0);function Yn(e){this.content=e}Yn.prototype={constructor:Yn,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return o==-1?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new Yn(i)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Yn(n)},addToStart:function(e,t){return new Yn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Yn(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(i==-1?o.length:i,0,t,n),new Yn(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Yn.from(e),e.size?new Yn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Yn.from(e),e.size?new Yn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Yn.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Yn.from=function(e){if(e instanceof Yn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Yn(t)};function SC(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.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=SC(o.content,i.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function xC(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let a=e.child(--o),s=t.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=xC(a.content,s.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class Ne{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,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>t&&r(l,o+s,i||null,a)!==!1&&l.content.size){let u=s+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),r,o+u)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",a=!0;return this.nodesBetween(t,n,(s,l)=>{let c=s.isText?s.text.slice(Math.max(t,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(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.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<t.content.length;i++)o.push(t.content[i]);return new Ne(o,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],o=0;if(n>t)for(let i=0,a=0;a<n;i++){let s=this.content[i],l=a+s.nodeSize;l>t&&((a<t||l>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=l}return new Ne(r,o)}cutByIndex(t,n){return t==n?Ne.empty:t==0&&n==this.content.length?this:new Ne(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new Ne(o,i)}addToStart(t){return new Ne([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Ne(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.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(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];t(o,r,n),r+=o.nodeSize}}findDiffStart(t,n=0){return SC(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return xC(this,t,n,r)}findIndex(t,n=-1){if(t==0)return _l(0,t);if(t==this.size)return _l(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),a=o+i.nodeSize;if(a>=t)return a==t||n>0?_l(r+1,a):_l(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Ne.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ne(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Ne.empty;let n,r=0;for(let o=0;o<t.length;o++){let i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Ne(n||t,r)}static from(t){if(!t)return Ne.empty;if(t instanceof Ne)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Ne([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ne.empty=new Ne([],0);const _d={index:0,offset:0};function _l(e,t){return _d.index=e,_d.offset=t,_d}function Tc(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Tc(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Tc(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let ln=class Qf{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let o=0;o<t.length;o++){let i=t[o];if(this.eq(i))return t;if(this.type.excludes(i.type))n||(n=t.slice(0,o));else{if(i.type.excludes(this.type))return t;!r&&i.type.rank>this.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Tc(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.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(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Qf.none;if(t instanceof Qf)return[t];let n=t.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};ln.none=[];class Pc extends Error{}class Xe{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=EC(this.content,t+this.openStart,n);return r&&new Xe(r,this.openStart,this.openEnd)}removeBetween(t,n){return new Xe(wC(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Xe.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 Xe(Ne.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new Xe(t,r,o)}}Xe.empty=new Xe(Ne.empty,0,0);function wC(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(o==t||i.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(wC(i.content,t-o-1,n-o-1)))}function EC(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),a=e.maybeChild(o);if(i==t||a.isText)return e.cut(0,t).append(n).append(e.cut(t));let s=EC(a.content,t-i-1,n);return s&&e.replaceChild(o,a.copy(s))}function EO(e,t,n){if(n.openStart>e.depth)throw new Pc("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Pc("Inconsistent open depths");return $C(e,t,n,0)}function $C(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let a=$C(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Di(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=$O(n,e);return Di(i,NC(e,a,s,t,r))}else return Di(i,Ac(e,t,r))}function OC(e,t){if(!t.type.compatibleContent(e.type))throw new Pc("Cannot join "+t.type.name+" onto "+e.type.name)}function Zf(e,t,n){let r=e.node(n);return OC(r,t.node(n)),r}function ki(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Cs(e,t,n,r){let o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(ki(e.nodeAfter,r),i++));for(let s=i;s<a;s++)ki(o.child(s),r);t&&t.depth==n&&t.textOffset&&ki(t.nodeBefore,r)}function Di(e,t){return e.type.checkContent(t),e.copy(t)}function NC(e,t,n,r,o){let i=e.depth>o&&Zf(e,t,o+1),a=r.depth>o&&Zf(n,r,o+1),s=[];return Cs(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(OC(i,a),ki(Di(i,NC(e,t,n,r,o+1)),s)):(i&&ki(Di(i,Ac(e,t,o+1)),s),Cs(t,n,o,s),a&&ki(Di(a,Ac(n,r,o+1)),s)),Cs(r,null,o,s),new Ne(s)}function Ac(e,t,n){let r=[];if(Cs(null,e,n,r),e.depth>n){let o=Zf(e,t,n+1);ki(Di(o,Ac(e,t,n+1)),r)}return Cs(t,null,n,r),new Ne(r)}function $O(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(Ne.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class ks{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,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<t;i++)o+=r.child(i).nodeSize;return o}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return ln.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),o=t.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(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=t.parent.maybeChild(t.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(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new kc(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let a=t;;){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 ks(n,r,i)}static resolveCached(t,n){let r=Kg.get(t);if(r)for(let i=0;i<r.elts.length;i++){let a=r.elts[i];if(a.pos==n)return a}else Kg.set(t,r=new OO);let o=r.elts[r.i]=ks.resolve(t,n);return r.i=(r.i+1)%NO,o}}class OO{constructor(){this.elts=[],this.i=0}}const NO=12,Kg=new WeakMap;class kc{constructor(t,n,r){this.$from=t,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 MO=Object.create(null);let ni=class eh{constructor(t,n,r,o=ln.none){this.type=t,this.attrs=n,this.marks=o,this.content=r||Ne.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,o=0){this.content.nodesBetween(t,n,r,o,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,o){return this.content.textBetween(t,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Tc(this.attrs,n||t.defaultAttrs||MO)&&ln.sameSet(this.marks,r||ln.none)}copy(t=null){return t==this.content?this:new eh(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new eh(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return Xe.empty;let o=this.resolve(t),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 Xe(c,o.depth-a,i.depth-a)}replace(t,n,r){return EO(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(o==t||n.isText)return n;t-=o+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)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(t){return ks.resolveCached(this,t)}resolveNoCache(t){return ks.resolve(this,t)}rangeHasMark(t,n,r){let o=!1;return n>t&&this.nodesBetween(t,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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),MC(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Ne.empty,o=0,i=r.childCount){let a=this.contentMatchAt(t).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(t,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(t).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=ln.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!ln.sameSet(t,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 t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,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(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=Ne.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};ni.prototype.text=void 0;class Dc extends ni{constructor(t,n,r,o){if(super(t,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):MC(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Dc(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Dc(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function MC(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Hi{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new RO(t,n);if(r.next==null)return Hi.empty;let o=RC(r);r.next&&r.err("Unexpected trailing text");let i=_O(DO(o));return LO(i,r),i}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(t.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let o=[this];function i(a,s){let l=a.matchFragment(t,r);if(l&&(!n||l.validEnd))return Ne.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(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){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(t)){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(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o<r.next.length;o++)t.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),t.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return i}).join(`
41
+ `)}}Hi.empty=new Hi(!0);class RO{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function RC(e){let t=[];do t.push(IO(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function IO(e){let t=[];do t.push(TO(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function TO(e){let t=kO(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=PO(e,t);else break;return t}function Gg(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function PO(e,t){let n=Gg(e),r=n;return e.eat(",")&&(e.next!="}"?r=Gg(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function AO(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let a=n[i];a.isInGroup(t)&&o.push(a)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function kO(e){if(e.eat("(")){let t=RC(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=AO(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function DO(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,l){let c={term:l,to:s};return t[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 IC(e,t){return t-e}function Xg(e,t){let n=[];return r(t),n.sort(IC);function r(o){let i=e[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 _O(e){let t=Object.create(null);return n(Xg(e,0));function n(r){let o=[];r.forEach(a=>{e[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]);Xg(e,l).forEach(u=>{c||o.push([s,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=t[r.join(",")]=new Hi(r.indexOf(e.length-1)>-1);for(let a=0;a<o.length;a++){let s=o[a][1].sort(IC);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}function LO(e,t){for(let n=0,r=[e];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&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function TC(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function PC(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(o===void 0){let i=e[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function AC(e,t,n,r){for(let o in t)if(!(o in e))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in e){let i=e[o];i.validate&&i.validate(t[o])}}function kC(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new BO(e,r,t[r]);return n}let Yg=class DC{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=kC(t,r.attrs),this.defaultAttrs=TC(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Hi.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:PC(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ni(this,this.computeAttrs(t),Ne.from(n),ln.setFrom(r))}createChecked(t=null,n,r){return n=Ne.from(n),this.checkContent(n),new ni(this,this.computeAttrs(t),n,ln.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=Ne.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(Ne.empty,!0);return i?new ni(this,t,n.append(i),ln.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){AC(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:ln.none:t}static compile(t,n){let r=Object.create(null);t.forEach((i,a)=>r[i]=new DC(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 jO(e,t,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 ${t} on type ${e}, got ${i}`)}}class BO{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?jO(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Lu{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=kC(t,o.attrs),this.excluded=null;let i=TC(this.attrs);this.instance=i?new ln(this,i):null}create(t=null){return!t&&this.instance?this.instance:new ln(this,PC(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,a)=>r[i]=new Lu(i,o++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){AC(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}let _C=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Yn.from(t.nodes),n.marks=Yn.from(t.marks||{}),this.nodes=Yg.compile(this.spec.nodes,this),this.marks=Lu.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]=Hi.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?Jg(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==""?[]:Jg(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(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof Yg){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new Dc(r,r.defaultAttrs,t,ln.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return ni.fromJSON(this,t)}markFromJSON(t){return ln.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function Jg(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(let s in e.marks){let l=e.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: '"+t[r]+"'")}return n}function zO(e){return e.tag!=null}function FO(e){return e.style!=null}class ri{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(zO(o))this.tags.push(o);else if(FO(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=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new Zg(this,n,!1);return r.addAll(t,ln.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Zg(this,n,!0);return r.addAll(t,ln.none,n.from,n.to),Xe.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(WO(t,i.tag)&&(i.namespace===void 0||t.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(t,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(t)!=0||a.context&&!r.matchesContext(a.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(a.getAttrs){let l=a.getAttrs(n);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(t){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 t.marks){let i=t.marks[o].spec.parseDOM;i&&i.forEach(a=>{r(a=ev(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(a=>{r(a=ev(a)),a.node||a.ignore||a.mark||(a.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new ri(t,ri.schemaRules(t)))}}const LC={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},HO={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},jC={ol:!0,ul:!0},Ds=1,th=2,lc=4;function Qg(e,t,n){return t!=null?(t?Ds:0)|(t==="full"?th:0):e&&e.whitespace=="pre"?Ds|th:n&-5}class Ll{constructor(t,n,r,o,i,a){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=ln.none,this.match=i||(a&lc?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ne.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Ds)){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=Ne.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Ne.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!LC.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Zg{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,a=Qg(null,n.preserveWhitespace,0)|(r?lc:0);o?i=new Ll(o.type,o.attrs,ln.none,!0,n.topMatch||o.type.contentMatch,a):r?i=new Ll(null,null,ln.none,!0,null,a):i=new Ll(t.schema.topNodeType,null,ln.none,!0,null,a),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&th?"full":this.localPreserveWS||(o.options&Ds)>0;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
42
+ `);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=t.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(t)}else this.findInside(t)}addElement(t,n,r){let o=this.localPreserveWS,i=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let a=t.nodeName.toLowerCase(),s;jC.hasOwnProperty(a)&&this.parser.normalizeLists&&VO(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,r));e:if(l?l.ignore:HO.hasOwnProperty(a))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let c,u=this.needsBlock;if(LC.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(!t.firstChild){this.leafFallback(t,n);break e}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,l,c,l.consuming===!1?s:void 0)}this.localPreserveWS=o}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
43
+ `),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.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(t,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(t,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(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}i&&this.sync(s)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let a=r?t.childNodes[r]:t.firstChild,s=o==null?null:t.childNodes[o];a!=s;a=a.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(a,n);this.findAtPoint(t,i)}findPlace(t,n){let r,o;for(let i=this.open;i>=0;i--){let a=this.nodes[i],s=a.findWrapping(t);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(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(t,n);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let i=ln.none;for(let a of r.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):tv(a.type,t.type))&&(i=a.addToSet(i));return o.content.push(t.mark(i)),!0}return!1}enter(t,n,r,o){let i=this.findPlace(t.create(n),r);return i&&(i=this.enterInner(t,n,r,!0,o)),i}enterInner(t,n,r,o=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(t);let s=Qg(t,i,a.options);a.options&lc&&a.content.length==0&&(s|=lc);let l=ln.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):tv(c.type,t))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Ll(t,n,l,o,null,s)),this.open++,r}closeExtra(t=!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(t));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(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Ds)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&t.nodeType==1&&t.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.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 t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.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 VO(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&jC.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function WO(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ev(e){let t={};for(let n in e)t[n]=e[n];return t}function tv(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))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==t||i.indexOf(u)<0&&a(u))return!0}};if(a(o.contentMatch))return!0}}class Yi{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Ld(n).createDocumentFragment());let o=r,i=[];return t.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(t,n){let{dom:r,contentDOM:o}=cc(Ld(n),this.nodes[t.type.name](t),null,t.attrs);if(o){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,o)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let o=t.marks.length-1;o>=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&cc(Ld(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return cc(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Yi(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=nv(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return nv(t.marks)}}function nv(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Ld(e){return e.document||window.document}const rv=new WeakMap;function qO(e){let t=rv.get(e);return t===void 0&&rv.set(e,t=UO(e)),t}function UO(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.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(e),t}function cc(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=qO(r))&&i.indexOf(t)>-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?e.createElementNS(n,o):e.createElement(o),c=t[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<t.length;d++){let f=t[d];if(f===0){if(d<t.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:h,contentDOM:m}=cc(e,f,n,r);if(l.appendChild(h),m){if(s)throw new RangeError("Multiple content holes");s=m}}}return{dom:l,contentDOM:s}}const BC=65535,zC=Math.pow(2,16);function KO(e,t){return e+t*zC}function ov(e){return e&BC}function GO(e){return(e-(e&BC))/zC}const FC=1,HC=2,uc=4,VC=8;class nh{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&VC)>0}get deletedBefore(){return(this.delInfo&(FC|uc))>0}get deletedAfter(){return(this.delInfo&(HC|uc))>0}get deletedAcross(){return(this.delInfo&uc)>0}}class br{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&br.empty)return br.empty}recover(t){let n=0,r=ov(t);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+GO(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,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>t)break;let c=this.ranges[s+i],u=this.ranges[s+a],d=l+c;if(t<=d){let f=c?t==l?-1:t==d?1:n:n,h=l+o+(f<0?0:u);if(r)return h;let m=t==(n<0?l:d)?null:KO(s/3,t-l),v=t==l?HC:t==d?FC:uc;return(n<0?t!=l:t!=d)&&(v|=VC),new nh(h,v,m)}o+=u-c}return r?t+o:new nh(t+o,0,null)}touches(t,n){let r=0,o=ov(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>t)break;let c=this.ranges[s+i],u=l+c;if(t<=u&&s==o*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(t){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];t(s,s+c,l,l+u),i+=u-c}}invert(){return new br(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?br.empty:new br(t<0?[0,-t,0]:[0,0,t])}}br.empty=new br([]);class _s{constructor(t,n,r=0,o=t?t.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new _s(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let o=t.getMirror(n);this.appendMap(t._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new _s;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let o=0;for(let i=this.from;i<this.to;i++){let a=this._maps[i],s=a.mapResult(t,n);if(s.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,t=this._maps[l].recover(s.recover);continue}}o|=s.delInfo,t=s.pos}return r?t:new nh(t,o,null)}}const jd=Object.create(null);class ar{getMap(){return br.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=jd[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in jd)throw new RangeError("Duplicate use of step JSON ID "+t);return jd[t]=n,n.prototype.jsonID=t,n}}class _n{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new _n(t,null)}static fail(t){return new _n(null,t)}static fromReplace(t,n,r,o){try{return _n.ok(t.replace(n,r,o))}catch(i){if(i instanceof Pc)return _n.fail(i.message);throw i}}}function Gp(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(Gp(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return Ne.fromArray(r)}class Jo extends ar{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Xe(Gp(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(t,this.from,this.to,i)}invert(){return new ao(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Jo(n.pos,r.pos,this.mark)}merge(t){return t instanceof Jo&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Jo(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Jo(n.from,n.to,t.markFromJSON(n.mark))}}ar.jsonID("addMark",Jo);class ao extends ar{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new Xe(Gp(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return _n.fromReplace(t,this.from,this.to,r)}invert(){return new Jo(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ao(n.pos,r.pos,this.mark)}merge(t){return t instanceof ao&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ao(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ao(n.from,n.to,t.markFromJSON(n.mark))}}ar.jsonID("removeMark",ao);class Qo extends ar{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.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(t,this.pos,this.pos+1,new Xe(Ne.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.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 Qo(this.pos,n.marks[o]);return new Qo(this.pos,this.mark)}}return new Ma(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Qo(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Qo(n.pos,t.markFromJSON(n.mark))}}ar.jsonID("addNodeMark",Qo);class Ma extends ar{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.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(t,this.pos,this.pos+1,new Xe(Ne.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Qo(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Ma(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ma(n.pos,t.markFromJSON(n.mark))}}ar.jsonID("removeNodeMark",Ma);class qn extends ar{constructor(t,n,r,o=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=o}apply(t){return this.structure&&rh(t,this.from,this.to)?_n.fail("Structure replace would overwrite content"):_n.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new br([this.from,this.to-this.from,this.slice.size])}invert(t){return new qn(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new qn(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof qn)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?Xe.empty:new Xe(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new qn(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?Xe.empty:new Xe(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new qn(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new qn(n.from,n.to,Xe.fromJSON(t,n.slice),!!n.structure)}}ar.jsonID("replace",qn);class Kn extends ar{constructor(t,n,r,o,i,a,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=s}apply(t){if(this.structure&&(rh(t,this.from,this.gapFrom)||rh(t,this.gapTo,this.to)))return _n.fail("Structure gap-replace would overwrite content");let n=t.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(t,this.from,this.to,r):_n.fail("Content does not fit in gap")}getMap(){return new br([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Kn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new Kn(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,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 Kn(n.from,n.to,n.gapFrom,n.gapTo,Xe.fromJSON(t,n.slice),n.insert,!!n.structure)}}ar.jsonID("replaceAround",Kn);function rh(e,t,n){let r=e.resolve(t),o=n-t,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 XO(e,t,n,r){let o=[],i=[],a,s;e.doc.nodesBetween(t,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,t),h=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=h:o.push(a=new ao(f,h,d[v])));s&&s.to==f?s.to=h:i.push(s=new Jo(f,h,r))}}),o.forEach(l=>e.step(l)),i.forEach(l=>e.step(l))}function YO(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(a,s)=>{if(!a.isInline)return;i++;let l=null;if(r instanceof Lu){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 h=0;h<o.length;h++){let m=o[h];m.step==i-1&&d.eq(o[h].style)&&(f=m)}f?(f.to=c,f.step=i):o.push({style:d,from:Math.max(s,t),to:c,step:i})}}}),o.forEach(a=>e.step(new ao(a.from,a.to,a.style)))}function Xp(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),a=[],s=t+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 qn(s,u,Xe.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||e.step(new ao(s,u,c.marks[f]));if(o&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,m;for(;f=h.exec(c.text);)m||(m=new Xe(Ne.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new qn(s+f.index,s+f.index+f[0].length,m))}}s=u}if(!r.validEnd){let l=r.fillBefore(Ne.empty,!0);e.replace(s,s,new Xe(l,0,0))}for(let l=a.length-1;l>=0;l--)e.step(a[l])}function JO(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function qa(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),a=e.$to.indexAfter(r);if(r<e.depth&&o.canReplace(i,a,n))return r;if(r==0||o.type.spec.isolating||!JO(o,i,a))break}return null}function QO(e,t,n){let{$from:r,$to:o,depth:i}=t,a=r.before(i+1),s=o.after(i+1),l=a,c=s,u=Ne.empty,d=0;for(let m=i,v=!1;m>n;m--)v||r.index(m)>0?(v=!0,u=Ne.from(r.node(m).copy(u)),d++):l--;let f=Ne.empty,h=0;for(let m=i,v=!1;m>n;m--)v||o.after(m+1)<o.end(m)?(v=!0,f=Ne.from(o.node(m).copy(f)),h++):c++;e.step(new Kn(l,c,a,s,new Xe(u.append(f),d,h),u.size-d,!0))}function Yp(e,t,n=null,r=e){let o=ZO(e,t),i=o&&eN(r,t);return i?o.map(iv).concat({type:t,attrs:n}).concat(i.map(iv)):null}function iv(e){return{type:e,attrs:null}}function ZO(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function eN(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;let l=(a.length?a[a.length-1]:t).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:a}function tN(e,t,n){let r=Ne.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=Ne.from(n[a].type.create(n[a].attrs,r))}let o=t.start,i=t.end;e.step(new Kn(o,i,o,i,new Xe(r,0,0),n.length,!0))}function nN(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(a,s)=>{let l=typeof o=="function"?o(a):o;if(a.isTextblock&&!a.hasMarkup(r,l)&&rN(e.doc,e.mapping.slice(i).map(s),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!m?c=!1:!h&&m&&(c=!0)}c===!1&&qC(e,a,s,i),Xp(e,e.mapping.slice(i).map(s,1),r,void 0,c===null);let u=e.mapping.slice(i),d=u.map(s,1),f=u.map(s+a.nodeSize,1);return e.step(new Kn(d,f,d+1,f-1,new Xe(Ne.from(r.create(l,null,a.marks)),0,0),1,!0)),c===!0&&WC(e,a,s,i),!1}})}function WC(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let a,s=/\r?\n|\r/g;for(;a=s.exec(o.text);){let l=e.mapping.slice(r).map(n+1+i+a.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function qC(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let a=e.mapping.slice(r).map(n+1+i);e.replaceWith(a,a+1,t.type.schema.text(`
44
+ `))}})}function rN(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function oN(e,t,n,r,o){let i=e.doc.nodeAt(t);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 e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Kn(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Xe(Ne.from(a),0,0),1,!0))}function No(e,t,n=1,r){let o=e.resolve(t),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 h=d.content.cutByIndex(f,d.childCount),m=r&&r[u+1];m&&(h=h.replaceChild(0,m.type.create(m.attrs)));let v=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!v.type.validContent(h))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 iN(e,t,n=1,r){let o=e.doc.resolve(t),i=Ne.empty,a=Ne.empty;for(let s=o.depth,l=o.depth-n,c=n-1;s>l;s--,c--){i=Ne.from(o.node(s).copy(i));let u=r&&r[c];a=Ne.from(u?u.type.create(u.attrs,a):o.node(s).copy(a))}e.step(new qn(t,t,new Xe(i.append(a),n,n),!0))}function hi(e,t){let n=e.resolve(t),r=n.index();return UC(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function aN(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o<t.childCount;o++){let i=t.child(o),a=i.type==r?e.type.schema.nodes.text:i.type;if(n=n.matchType(a),!n||!e.type.allowsMarks(i.marks))return!1}return n.validEnd}function UC(e,t){return!!(e&&t&&!e.isLeaf&&aN(e,t))}function ju(e,t,n=-1){let r=e.resolve(t);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&&UC(i,a)&&r.node(o).canReplace(s,s+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function sN(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-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=e.steps.length;if(r===!1){let u=e.doc.resolve(t+n);qC(e,u.node(),u.before(),s)}a.inlineContent&&Xp(e,t+n-1,a,i.node().contentMatchAt(i.index()),r==null);let l=e.mapping.slice(s),c=l.map(t-n);if(e.step(new qn(c,l.map(t+n,-1),Xe.empty,!0)),r===!0){let u=e.doc.resolve(c);WC(e,u.node(),u.before(),e.steps.length)}return e}function lN(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;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 KC(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;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 Bu(e,t,n=t,r=Xe.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return GC(o,i,r)?new qn(t,n,r):new cN(o,i,r).fit()}function GC(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class cN{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Ne.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=Ne.from(t.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 t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));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 Xe(i,a,s);return t>-1?new Kn(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new qn(r.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<t;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Bd(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(Ne.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:t,openStart:n,openEnd:r}=this.unplaced,o=Bd(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Xe(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Bd(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new Xe(fs(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Xe(fs(t,n,1),n,r)}placeNodes({sliceDepth:t,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-t,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 h=s.size+t-(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(XC(v.mark(f.allowedMarks(v.marks)),c==1?l:0,c==s.childCount?h:-1)))}let m=c==s.childCount;m||(h=-1),this.placed=hs(this.placed,n,Ne.from(u)),this.frontier[n].match=d,m&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,g=s;v<h;v++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=m?t==0?Xe.empty:new Xe(fs(a.content,t-1,1),t-1,h<0?a.openEnd:t-1):new Xe(fs(a.content,t,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!zd(this.$to,this.$to.depth,t.type,t.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(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=zd(t,n,o,r,i);if(a){for(let s=n-1;s>=0;s--){let{match:l,type:c}=this.frontier[s],u=zd(t,s,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:a,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=hs(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=hs(this.placed,this.depth,Ne.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Ne.empty,!0);n.childCount&&(this.placed=hs(this.placed,this.frontier.length,n))}}function fs(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(fs(e.firstChild.content,t-1,n)))}function hs(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(hs(e.lastChild.content,t-1,n)))}function Bd(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function XC(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,XC(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Ne.empty,!0)))),e.copy(r)}function zd(e,t,n,r,o){let i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!uN(n,i.content,a)?s:null}function uN(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function dN(e){return e.spec.defining||e.spec.definingForContent}function fN(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(GC(o,i,r))return e.step(new qn(t,n,r));let a=JC(o,e.doc.resolve(n));a[a.length-1]==0&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let m=o.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;a.indexOf(f)>-1?s=f:o.before(f)==h&&a.splice(1,0,-f)}let l=a.indexOf(s),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let m=f.firstChild;if(c.push(m),h==r.openStart)break;f=m.content}for(let f=u-1;f>=0;f--){let h=c[f],m=dN(h.type);if(m&&!h.sameMarkup(o.node(Math.abs(s)-1)))u=f;else if(m||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),m=c[h];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 e.replace(o.before(g),y?i.after(g):n,new Xe(YC(r.content,0,r.openStart,h),h,r.openEnd))}}let d=e.steps.length;for(let f=a.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let h=a[f];h<0||(t=o.before(h),n=i.after(h))}}function YC(e,t,n,r,o){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(YC(i.content,t+1,n,r,i)))}if(t>r){let i=o.contentMatchAt(0),a=i.fillBefore(e).append(e);e=a.append(i.matchFragment(a).fillBefore(Ne.empty,!0))}return e}function hN(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=lN(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new Xe(Ne.from(r),0,0))}function pN(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=JC(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 e.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 e.delete(r.before(s),o.after(s))}for(let a=1;a<=r.depth&&a<=o.depth;a++)if(t-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 e.delete(r.before(a),n);e.delete(t,n)}function JC(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(i<e.pos-(e.depth-o)||t.end(o)>t.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class xa extends ar{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.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(t,this.pos,this.pos+1,new Xe(Ne.from(o),0,n.isLeaf?0:1))}getMap(){return br.empty}invert(t){return new xa(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new xa(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new xa(n.pos,n.attr,n.value)}}ar.jsonID("attr",xa);class Ls extends ar{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return _n.ok(r)}getMap(){return br.empty}invert(t){return new Ls(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ls(n.attr,n.value)}}ar.jsonID("docAttr",Ls);let Ra=class extends Error{};Ra=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Ra.prototype=Object.create(Error.prototype);Ra.prototype.constructor=Ra;Ra.prototype.name="TransformError";let Jp=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new _s}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Ra(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=Xe.empty){let o=Bu(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new Xe(Ne.from(r),0,0))}delete(t,n){return this.replace(t,n,Xe.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return fN(this,t,n,r),this}replaceRangeWith(t,n,r){return hN(this,t,n,r),this}deleteRange(t,n){return pN(this,t,n),this}lift(t,n){return QO(this,t,n),this}join(t,n=1){return sN(this,t,n),this}wrap(t,n){return tN(this,t,n),this}setBlockType(t,n=t,r,o=null){return nN(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return oN(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new xa(t,n,r)),this}setDocAttribute(t,n){return this.step(new Ls(t,n)),this}addNodeMark(t,n){return this.step(new Qo(t,n)),this}removeNodeMark(t,n){if(!(n instanceof ln)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Ma(t,n)),this}split(t,n=1,r){return iN(this,t,n,r),this}addMark(t,n,r){return XO(this,t,n,r),this}removeMark(t,n,r){return YO(this,t,n,r),this}clearIncompatible(t,n,r){return Xp(this,t,n,r),this}};const Fd=Object.create(null);class bt{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new QC(t.min(n),t.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 t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=Xe.empty){let r=n.content.lastChild,o=null;for(let s=0;s<n.openEnd;s++)o=r,r=r.lastChild;let i=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:l,$to:c}=a[s],u=t.mapping.slice(i);t.replaceRange(u.map(l.pos),u.map(c.pos),s?Xe.empty:n),s==0&&lv(t,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:a,$to:s}=o[i],l=t.mapping.slice(r),c=l.map(a.pos),u=l.map(s.pos);i?t.deleteRange(c,u):(t.replaceRangeWith(c,u,n),lv(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let o=t.parent.inlineContent?new vt(t):ha(t.node(0),t.parent,t.pos,t.index(),n,r);if(o)return o;for(let i=t.depth-1;i>=0;i--){let a=n<0?ha(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):ha(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new xr(t.node(0))}static atStart(t){return ha(t,t,0,0,1)||new xr(t)}static atEnd(t){return ha(t,t,t.content.size,t.childCount,-1)||new xr(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Fd[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Fd)throw new RangeError("Duplicate use of selection JSON ID "+t);return Fd[t]=n,n.prototype.jsonID=t,n}getBookmark(){return vt.between(this.$anchor,this.$head).getBookmark()}}bt.prototype.visible=!0;class QC{constructor(t,n){this.$from=t,this.$to=n}}let av=!1;function sv(e){!av&&!e.parent.inlineContent&&(av=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class vt extends bt{constructor(t,n=t){sv(t),sv(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return bt.near(r);let o=t.resolve(n.map(this.anchor));return new vt(o.parent.inlineContent?o:r,r)}replace(t,n=Xe.empty){if(super.replace(t,n),n==Xe.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof vt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new zu(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new vt(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=bt.findFrom(n,r,!0)||bt.findFrom(n,-r,!0);if(i)n=i.$head;else return bt.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(bt.findFrom(t,-r,!0)||bt.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=o<0&&(t=n))),new vt(t,n)}}bt.jsonID("text",vt);class zu{constructor(t,n){this.anchor=t,this.head=n}map(t){return new zu(t.map(this.anchor),t.map(this.head))}resolve(t){return vt.between(t.resolve(this.anchor),t.resolve(this.head))}}class gt extends bt{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=t.resolve(o);return r?bt.near(i):new gt(i)}content(){return new Xe(Ne.from(this.node),0,0)}eq(t){return t instanceof gt&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Qp(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new gt(t.resolve(n.anchor))}static create(t,n){return new gt(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}gt.prototype.visible=!1;bt.jsonID("node",gt);class Qp{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new zu(r,r):new Qp(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&gt.isSelectable(r)?new gt(n):bt.near(n)}}class xr extends bt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Xe.empty){if(n==Xe.empty){t.delete(0,t.doc.content.size);let r=bt.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new xr(t)}map(t){return new xr(t)}eq(t){return t instanceof xr}getBookmark(){return mN}}bt.jsonID("all",xr);const mN={map(){return this},resolve(e){return new xr(e)}};function ha(e,t,n,r,o,i=!1){if(t.inlineContent)return vt.create(e,n);for(let a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){let s=t.child(a);if(s.isAtom){if(!i&&gt.isSelectable(s))return gt.create(e,n-(o<0?s.nodeSize:0))}else{let l=ha(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}return null}function lv(e,t,n){let r=e.steps.length-1;if(r<t)return;let o=e.steps[r];if(!(o instanceof qn||o instanceof Kn))return;let i=e.mapping.maps[r],a;i.forEach((s,l,c,u)=>{a==null&&(a=u)}),e.setSelection(bt.near(e.doc.resolve(a),n))}const cv=1,uv=2,dv=4;class gN extends Jp{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.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(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|cv)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&cv)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=uv,this}ensureMarks(t){return ln.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&uv)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&-3,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ln.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)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(t,i)),this.selection.empty||this.setSelection(bt.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=dv,this}get scrolledIntoView(){return(this.updated&dv)>0}}function fv(e,t){return!t||!e?e:e.bind(t)}class ps{constructor(t,n,r){this.name=t,this.init=fv(n.init,r),this.apply=fv(n.apply,r)}}const vN=[new ps("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new ps("selection",{init(e,t){return e.selection||bt.atStart(t.doc)},apply(e){return e.selection}}),new ps("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new ps("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class Hd{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=vN.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 ps(r.key,r.spec.state,r))})}}class ga{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,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,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),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",t),!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(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ga(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new gN(this)}static create(t){let n=new Hd(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ga(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}reconfigure(t){let n=new Hd(this.schema,t.plugins),r=n.fields,o=new ga(n);for(let i=0;i<r.length;i++){let a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Hd(t.schema,t.plugins),i=new ga(o);return o.fields.forEach(a=>{if(a.name=="doc")i.doc=ni.fromJSON(t.schema,n.doc);else if(a.name=="selection")i.selection=bt.fromJSON(i.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.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,t,n[s],i);return}}i[a.name]=a.init(t,i)}}),i}}function ZC(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=ZC(o,t,{})),n[r]=o}return n}class Sn{constructor(t){this.spec=t,this.props={},t.props&&ZC(t.props,this,this.props),this.key=t.key?t.key.key:eS("plugin")}getState(t){return t[this.key]}}const Vd=Object.create(null);function eS(e){return e in Vd?e+"$"+ ++Vd[e]:(Vd[e]=0,e+"$")}class kn{constructor(t="key"){this.key=eS(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Jn=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Ia=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let oh=null;const wo=function(e,t,n){let r=oh||(oh=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},bN=function(){oh=null},Vi=function(e,t,n,r){return n&&(hv(e,t,n,r,-1)||hv(e,t,n,r,1))},yN=/^(img|br|input|textarea|hr)$/i;function hv(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Pr(e))){let i=e.parentNode;if(!i||i.nodeType!=1||il(e)||yN.test(e.nodeName)||e.contentEditable=="false")return!1;t=Jn(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?Pr(e):0}else return!1}}function Pr(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function CN(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Pr(e)}else if(e.parentNode&&!il(e))t=Jn(e),e=e.parentNode;else return null}}function SN(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!il(e))t=Jn(e)+1,e=e.parentNode;else return null}}function xN(e,t,n){for(let r=t==0,o=t==Pr(e);r||o;){if(e==n)return!0;let i=Jn(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==Pr(e)}}function il(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Fu=function(e){return e.focusNode&&Vi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function wi(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function wN(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function EN(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Pr(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Pr(r.startContainer),r.startOffset)}}}const co=typeof navigator<"u"?navigator:null,pv=typeof document<"u"?document:null,pi=co&&co.userAgent||"",ih=/Edge\/(\d+)/.exec(pi),tS=/MSIE \d/.exec(pi),ah=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pi),hr=!!(tS||ah||ih),oi=tS?document.documentMode:ah?+ah[1]:ih?+ih[1]:0,Kr=!hr&&/gecko\/(\d+)/i.test(pi);Kr&&+(/Firefox\/(\d+)/.exec(pi)||[0,0])[1];const sh=!hr&&/Chrome\/(\d+)/.exec(pi),nr=!!sh,nS=sh?+sh[1]:0,sr=!hr&&!!co&&/Apple Computer/.test(co.vendor),Ta=sr&&(/Mobile\/\w+/.test(pi)||!!co&&co.maxTouchPoints>2),Tr=Ta||(co?/Mac/.test(co.platform):!1),$N=co?/Win/.test(co.platform):!1,$o=/Android \d/.test(pi),al=!!pv&&"webkitFontSmoothing"in pv.documentElement.style,ON=al?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function NN(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function vo(e,t){return typeof e=="number"?e:e[t]}function MN(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function mv(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let a=n||e.dom;a;){if(a.nodeType!=1){a=Ia(a);continue}let s=a,l=s==i.body,c=l?NN(i):MN(s),u=0,d=0;if(t.top<c.top+vo(r,"top")?d=-(c.top-t.top+vo(o,"top")):t.bottom>c.bottom-vo(r,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+vo(o,"top")-c.top:t.bottom-c.bottom+vo(o,"bottom")),t.left<c.left+vo(r,"left")?u=-(c.left-t.left+vo(o,"left")):t.right>c.right-vo(r,"right")&&(u=t.right-c.right+vo(o,"right")),u||d)if(l)i.defaultView.scrollBy(u,d);else{let h=s.scrollLeft,m=s.scrollTop;d&&(s.scrollTop+=d),u&&(s.scrollLeft+=u);let v=s.scrollLeft-h,g=s.scrollTop-m;t={left:t.left-v,top:t.top-g,right:t.right-v,bottom:t.bottom-g}}let f=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(f))break;a=f=="absolute"?a.offsetParent:Ia(a)}}function RN(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,a=n+1;a<Math.min(innerHeight,t.bottom);a+=5){let s=e.root.elementFromPoint(i,a);if(!s||s==e.dom||!e.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:rS(e.dom)}}function rS(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Ia(r));return t}function IN({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;oS(n,r==0?0:r-t)}function oS(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let na=null;function TN(e){if(e.setActive)return e.setActive();if(na)return e.focus(na);let t=rS(e);e.focus(na==null?{get preventScroll(){return na={preventScroll:!0},!0}}:void 0),na||(na=!1,oS(t,0))}function iS(e,t){let n,r=2e8,o,i=0,a=t.top,s=t.top,l,c;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=wo(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let m=f[h];if(m.top<=a&&m.bottom>=s){a=Math.max(m.bottom,a),s=Math.min(m.top,s);let v=m.left>t.left?m.left-t.left:m.right<t.left?t.left-m.right:0;if(v<r){n=u,r=v,o=v&&n.nodeType==3?{left:m.right<t.left?m.right:m.left,top:t.top}:t,u.nodeType==1&&v&&(i=d+(t.left>=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!l&&m.left<=t.left&&m.right>=t.left&&(l=u,c={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(i=d+1)}}return!n&&l&&(n=l,o=c,r=0),n&&n.nodeType==3?PN(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:iS(n,o)}function PN(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let i=Fo(r,1);if(i.top!=i.bottom&&Zp(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function Zp(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function AN(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function kN(e,t,n){let{node:r,offset:o}=iS(t,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 e.docView.posFromDOM(r,o,i)}function DN(e,t,n,r){let o=-1;for(let i=t,a=!1;i!=e.dom;){let s=e.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:e.docView.posFromDOM(t,n,-1)}function aS(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let a=e.childNodes[i];if(a.nodeType==1){let s=a.getClientRects();for(let l=0;l<s.length;l++){let c=s[l];if(Zp(t,c))return aS(a,t,c)}}if((i=(i+1)%r)==o)break}return e}function _N(e,t){let n=e.dom.ownerDocument,r,o=0,i=EN(n,t.left,t.top);i&&({node:r,offset:o}=i);let a=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=e.dom.getBoundingClientRect();if(!Zp(t,c)||(a=aS(e.dom,t,c),!a))return null}if(sr)for(let c=a;r&&c;c=Ia(c))c.draggable&&(r=void 0);if(a=AN(a,t),r){if(Kr&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&o++}let c;al&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=DN(e,r,o,t))}s==null&&(s=kN(e,a,t));let l=e.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function gv(e){return e.top<e.bottom||e.left<e.right}function Fo(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(gv(r))return r}return Array.prototype.find.call(n,gv)||e.getBoundingClientRect()}const LN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function sS(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),a=al||Kr;if(r.nodeType==3)if(a&&(LN.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=Fo(wo(r,o,o),n);if(Kr&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=Fo(wo(r,o-1,o-1),-1);if(c.top==l.top){let u=Fo(wo(r,o,o+1),-1);if(u.top!=l.top)return ns(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++,ns(Fo(wo(r,l,c),u),u<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Pr(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Wd(l.getBoundingClientRect(),!1)}if(i==null&&o<Pr(r)){let l=r.childNodes[o];if(l.nodeType==1)return Wd(l.getBoundingClientRect(),!0)}return Wd(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==Pr(r))){let l=r.childNodes[o-1],c=l.nodeType==3?wo(l,Pr(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return ns(Fo(c,1),!1)}if(i==null&&o<Pr(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?wo(l,0,a?0:1):l.nodeType==1?l:null:null;if(c)return ns(Fo(c,-1),!0)}return ns(Fo(r.nodeType==3?wo(r):r,-n),n>=0)}function ns(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Wd(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function lS(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function jN(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return lS(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let a=sS(e,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=wo(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 BN=/[\u0590-\u08ac]/;function zN(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return s?!BN.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?i:a:lS(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=e.domSelectionRange(),f=s.caretBidiLevel;s.modify("move",n,"character");let h=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:v}=e.domSelectionRange(),g=m&&!h.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 vv=null,bv=null,yv=!1;function FN(e,t,n){return vv==t&&bv==n?yv:(vv=t,bv=n,yv=n=="up"||n=="down"?jN(e,t,n):zN(e,t,n))}const Ar=0,Cv=1,Ni=2,uo=3;class sl{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Ar,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==t)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(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let i,a;if(t==this.contentDOM)i=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.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(t==this.contentDOM)i=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let o;if(t==this.dom&&this.contentDOM)o=n>Jn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;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(t.nodeType==1?t:t.parentNode):a==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==t&&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(t<i)return o.descAt(t-r-o.border);r=i}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+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>t||a instanceof uS){o=t-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 cS&&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?Jn(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?Jn(i.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,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&&t<=c){let u=a+l.border;if(t>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,u);t=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=Jn(f.dom)+1;break}t-=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=Jn(d.dom);break}n+=d.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=c}return{node:this.contentDOM,from:t,to:n,fromOffset:o,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,o=!1){let i=Math.min(t,n),a=Math.max(t,n);for(let h=0,m=0;h<this.children.length;h++){let v=this.children[h],g=m+v.size;if(i>m&&a<g)return v.setSelection(t-m-v.border,n-m-v.border,r,o);m=g}let s=this.domFromPos(t,t?-1:1),l=n==t?s:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),d=!1;if((Kr||sr)&&t==n){let{node:h,offset:m}=s;if(h.nodeType==3){if(d=!!(m&&h.nodeValue[m-1]==`
45
+ `),d&&m==h.nodeValue.length)for(let v=h,g;v;v=v.parentNode){if(g=v.nextSibling){g.nodeName=="BR"&&(s=l={node:g.parentNode,offset:Jn(g)+1});break}let y=v.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let v=h.childNodes[m-1];d=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(Kr&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||d&&sr)&&Vi(s.node,s.offset,u.anchorNode,u.anchorOffset)&&Vi(l.node,l.offset,u.focusNode,u.focusOffset))return;let f=!1;if((c.extend||t==n)&&!d){c.collapse(s.node,s.offset);try{t!=n&&c.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let m=s;s=l,l=m}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(s.node,s.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],a=r+i.size;if(r==a?t<=a&&n>=r:t<a&&n>r){let s=r+i.border,l=a-i.border;if(t>=s&&n<=l){this.dirty=t==r||n==a?Ni:Cv,t==s&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=uo:i.markDirty(t-s,n-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Ni:uo}r=a}this.dirty=Ni}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Ni:Cv;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class cS extends sl{constructor(t,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(t,[],a,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Ar&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.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 HN extends sl{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Wi extends sl{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return(!a||!a.dom)&&(a=Yi.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Wi(t,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&uo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=uo&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Ar){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ar}}slice(t,n,r){let o=Wi.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=ch(i,n,a,r)),t>0&&(i=ch(i,0,t,r));for(let s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class ii extends sl{constructor(t,n,r,o,i,a,s,l,c){super(t,[],i,a),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=s}static create(t,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}=Yi.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=hS(u,r,n),c?l=new VN(t,n,r,o,u,d||null,f,c,i,a+1):n.isText?new Hu(t,n,r,o,u,f,i):new ii(t,n,r,o,u,d||null,f,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.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)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Ne.empty)}return t}matchesNode(t,n,r){return this.dirty==Ar&&t.eq(this.node)&&_c(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new qN(this,a&&a.node,t);GN(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?ln.none:this.node.child(u).marks,r,t),l.placeWidget(c,t,o)},(c,u,d,f)=>{l.syncToMarks(c.marks,r,t);let h;l.findNodeMatch(c,u,d,f)||s&&t.state.selection.from>o&&t.state.selection.to<o+c.nodeSize&&(h=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(c,u,d,h,t)||l.updateNextNode(c,u,d,t,f,o)||l.addNode(c,u,d,t,o),o+=c.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ni)&&(a&&this.protectLocalComposition(t,a),dS(this.contentDOM,this.children,t),Ta&&XN(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof vt)||r<n||o>n+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let a=i.nodeValue,s=YN(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(t,{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 HN(this,i,n,o);t.input.compositionNodes.push(a),this.children=ch(this.children,r,r+o.length,t,a)}update(t,n,r,o){return this.dirty==uo||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Ar}updateOuterDeco(t){if(_c(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=fS(this.dom,this.nodeDOM,lh(this.outerDeco,this.node,n),lh(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}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 Sv(e,t,n,r,o){hS(r,t,e);let i=new ii(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Hu extends ii{constructor(t,n,r,o,i,a,s){super(t,n,r,o,i,null,a,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==uo||this.dirty!=Ar&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Ar||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Ar,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new Hu(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=uo)}get domAtom(){return!1}isText(t){return this.node.text==t}}class uS extends sl{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Ar&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class VN extends ii{constructor(t,n,r,o,i,a,s,l,c,u){super(t,n,r,o,i,a,s,c,u),this.spec=l}update(t,n,r,o){if(this.dirty==uo)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function dS(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=xv(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof Wi){let l=r?r.previousSibling:e.lastChild;dS(a.contentDOM,a.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=xv(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const Ss=function(e){e&&(this.nodeName=e)};Ss.prototype=Object.create(null);const Mi=[new Ss];function lh(e,t,n){if(e.length==0)return Mi;let r=n?Mi[0]:new Ss,o=[r];for(let i=0;i<e.length;i++){let a=e[i].type.attrs;if(a){a.nodeName&&o.push(r=new Ss(a.nodeName));for(let s in a){let l=a[s];l!=null&&(n&&o.length==1&&o.push(r=new Ss(t.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 fS(e,t,n,r){if(n==Mi&&r==Mi)return t;let o=t;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!=e&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName),l.pmIsDeco=!0,l.appendChild(o),s=Mi[0]),o=l}WN(o,s||Mi[0],a)}return o}function WN(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.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&&e.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&e.classList.add(o[i]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(t.style);)e.style.removeProperty(o[1])}n.style&&(e.style.cssText+=n.style)}}function hS(e,t,n){return fS(e,e,Mi,lh(t,n,e.nodeType!=1))}function _c(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function xv(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class qN{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=UN(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let o=0,i=this.stack.length>>1,a=Math.min(i,t.length);for(;o<a&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=Ar,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.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(t[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,t[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(t,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(t,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(t,n,r)&&!this.preMatch.matched.has(c)){i=s;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(t,n,r,o,i){let a=this.top.children[o];return a.dirty==uo&&a.dom==a.contentDOM&&(a.dirty=Ni),a.update(t,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}t=n}}updateNextNode(t,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 ii){let c=this.preMatch.matched.get(l);if(c!=null&&c!=i)return!1;let u=l.dom,d,f=this.isLocked(u)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=uo&&_c(n,l.outerDeco));if(!f&&l.update(t,n,r,o))return this.destroyBetween(this.index,s),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,t,n,r,o,a)))return this.destroyBetween(this.index,s),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Ni,d.updateChildren(o,a+1),d.dirty=Ar),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,o,i,a){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!_c(r,t.outerDeco)||!o.eq(t.innerDeco))return null;let s=ii.create(this.top,n,r,o,i,a);if(s.contentDOM){s.children=t.children,t.children=[];for(let l of s.children)l.parent=s}return t.destroy(),s}addNode(t,n,r,o,i){let a=ii.create(this.top,t,n,r,o,i);a.contentDOM&&a.updateChildren(o,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(t,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(t)&&(t==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new cS(this.top,t,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Wi;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof Hu)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((sr||nr)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new uS(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function UN(e,t){let n=t,r=n.children.length,o=e.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==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}function KN(e,t){return e.type.side-t.type.side}function GN(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let c=0;c<e.childCount;c++){let u=e.child(c);r(u,o,t.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,h;if(l)h=-1,f=l,l=null;else if(c<e.childCount)h=c,f=e.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,h=-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,t.forChild(i,f),h),i=m}}function XN(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function YN(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let a=e.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<e.childCount;){let c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){if(i>=r&&l.slice(r-t.length-s,r-s)==t)return r-t.length;let c=s<r?l.lastIndexOf(t,r-s-1):-1;if(c>=0&&c+t.length+s>=n)return s+c;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}function ch(e,t,n,r,o){let i=[];for(let a=0,s=0;a<e.length;a++){let l=e[a],c=s,u=s+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function em(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),l,c;if(Fu(n)){for(l=a;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&gt.isSelectable(d)&&o.parent&&!(d.isInline&&xN(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;c=new gt(a==f?s:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=a,f=a;for(let h=0;h<n.rangeCount;h++){let m=n.getRangeAt(h);d=Math.min(d,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[l,a]=f==e.state.selection.anchor?[f,d]:[d,f],s=r.resolve(a)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let d=t=="pointer"||e.state.selection.head<s.pos&&!i?1:-1;c=tm(e,u,s,d)}return c}function pS(e){return e.editable?e.hasFocus():gS(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Mo(e,t=!1){let n=e.state.selection;if(mS(e,n),!!pS(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&nr){let r=e.domSelectionRange(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Vi(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)QN(e);else{let{anchor:r,head:o}=n,i,a;wv&&!(n instanceof vt)&&(n.$from.parent.inlineContent||(i=Ev(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=Ev(e,n.to))),e.docView.setSelection(r,o,e,t),wv&&(i&&$v(i),a&&$v(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&JN(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const wv=sr||nr&&nS<63;function Ev(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(sr&&o&&o.contentEditable=="false")return qd(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return qd(o);if(i)return qd(i)}}function qd(e){return e.contentEditable="true",sr&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function $v(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function JN(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!pS(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function QN(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setStart(r.parentNode,Jn(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&hr&&oi<=11&&(r.disabled=!0,r.disabled=!1)}function mS(e,t){if(t instanceof gt){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ov(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ov(e)}function Ov(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function tm(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||vt.between(t,n,r)}function Nv(e){return e.editable&&!e.hasFocus()?!1:gS(e)}function gS(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function ZN(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Vi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function uh(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&bt.findFrom(i,t)}function Vo(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Mv(e,t,n){let r=e.state.selection;if(r instanceof vt)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return Vo(e,new vt(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=uh(e.state,t);return o&&o instanceof gt?Vo(e,o):!1}else if(!(Tr&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,a;if(!i||i.isText)return!1;let s=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(a=e.docView.descAt(s))&&!a.contentDOM?gt.isSelectable(i)?Vo(e,new gt(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):al?Vo(e,new vt(e.state.doc.resolve(t<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof gt&&r.node.isInline)return Vo(e,new vt(t>0?r.$to:r.$from));{let o=uh(e.state,t);return o?Vo(e,o):!1}}}function Lc(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function xs(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function ra(e,t){return t<0?eM(e):tM(e)}function eM(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=!1;for(Kr&&n.nodeType==1&&r<Lc(n)&&xs(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(xs(s,-1))o=n,i=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(vS(n))break;{let s=n.previousSibling;for(;s&&xs(s,-1);)o=n.parentNode,i=Jn(s),s=s.previousSibling;if(s)n=s,r=Lc(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?dh(e,n,r):o&&dh(e,o,i)}function tM(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Lc(n),i,a;for(;;)if(r<o){if(n.nodeType!=1)break;let s=n.childNodes[r];if(xs(s,1))i=n,a=++r;else break}else{if(vS(n))break;{let s=n.nextSibling;for(;s&&xs(s,1);)i=s.parentNode,a=Jn(s)+1,s=s.nextSibling;if(s)n=s,r=0,o=Lc(n);else{if(n=n.parentNode,n==e.dom)break;r=o=0}}}i&&dh(e,i,a)}function vS(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function nM(e,t){for(;e&&t==e.childNodes.length&&!il(e);)t=Jn(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function rM(e,t){for(;e&&!t&&!il(e);)t=Jn(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function dh(e,t,n){if(t.nodeType!=3){let i,a;(a=nM(t,n))?(t=a,n=0):(i=rM(t,n))&&(t=i,n=i.nodeValue.length)}let r=e.domSelection();if(!r)return;if(Fu(r)){let i=document.createRange();i.setEnd(t,n),i.setStart(t,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&Mo(e)},50)}function Rv(e,t){let n=e.state.doc.resolve(t);if(!(nr||$N)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-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(t<n.end()){let i=e.coordsAtPos(t+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(e.dom).direction=="rtl"?"rtl":"ltr"}function Iv(e,t,n){let r=e.state.selection;if(r instanceof vt&&!r.empty||n.indexOf("s")>-1||Tr&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=uh(e.state,t);if(a&&a instanceof gt)return Vo(e,a)}if(!o.parent.inlineContent){let a=t<0?o:i,s=r instanceof xr?bt.near(a,t):bt.findFrom(a,t);return s?Vo(e,s):!1}return!1}function Tv(e,t){if(!(e.state.selection instanceof vt))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let a=e.state.tr;return t<0?a.delete(n.pos-i.nodeSize,n.pos):a.delete(n.pos,n.pos+i.nodeSize),e.dispatch(a),!0}return!1}function Pv(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function oM(e){if(!sr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;Pv(e,r,"true"),setTimeout(()=>Pv(e,r,"false"),20)}return!1}function iM(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function aM(e,t){let n=t.keyCode,r=iM(t);if(n==8||Tr&&n==72&&r=="c")return Tv(e,-1)||ra(e,-1);if(n==46&&!t.shiftKey||Tr&&n==68&&r=="c")return Tv(e,1)||ra(e,1);if(n==13||n==27)return!0;if(n==37||Tr&&n==66&&r=="c"){let o=n==37?Rv(e,e.state.selection.from)=="ltr"?-1:1:-1;return Mv(e,o,r)||ra(e,o)}else if(n==39||Tr&&n==70&&r=="c"){let o=n==39?Rv(e,e.state.selection.from)=="ltr"?1:-1:1;return Mv(e,o,r)||ra(e,o)}else{if(n==38||Tr&&n==80&&r=="c")return Iv(e,-1,r)||ra(e,-1);if(n==40||Tr&&n==78&&r=="c")return oM(e)||Iv(e,1,r)||ra(e,1);if(r==(Tr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function nm(e,t){e.someProp("transformCopied",h=>{t=h(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let a=e.someProp("clipboardSerializer")||Yi.fromSchema(e.state.schema),s=wS(),l=s.createElement("div");l.appendChild(a.serializeFragment(r,{document:s}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=xS[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let m=s.createElement(u[h]);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=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,`
46
+
47
+ `);return{dom:l,text:f,slice:t}}function bS(e,t,n,r,o){let i=o.parent.type.spec.code,a,s;if(!n&&!t)return null;let l=t&&(r||i||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return t?new Xe(Ne.from(e.state.schema.text(t.replace(/\r\n?/g,`
48
+ `))),0,0):Xe.empty;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)s=d;else{let f=o.marks(),{schema:h}=e.state,m=Yi.fromSchema(h);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(v=>{let g=a.appendChild(document.createElement("p"));v&&g.appendChild(m.serializeNode(h.text(v,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),a=uM(n),al&&dM(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=(e.someProp("clipboardParser")||e.someProp("domParser")||ri.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!sM.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)s=fM(Av(s,+u[1],+u[2]),u[4]);else if(s=Xe.maxOpen(lM(s.content,o),!0),s.openStart||s.openEnd){let d=0,f=0;for(let h=s.content.firstChild;d<s.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=s.content.lastChild;f<s.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);s=Av(s,d,f)}return e.someProp("transformPasted",d=>{s=d(s,e)}),s}const sM=/^(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 lM(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(s=>{if(!a)return;let l=o.findWrapping(s.type),c;if(!l)return a=null;if(c=a.length&&i.length&&CS(l,i,s,a[a.length-1],0))a[a.length-1]=c;else{a.length&&(a[a.length-1]=SS(a[a.length-1],i.length));let u=yS(s,l);a.push(u),o=o.matchType(u.type),i=l}}),a)return Ne.from(a)}return e}function yS(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Ne.from(e));return e}function CS(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=CS(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(Ne.from(yS(n,e,o+1))))}}function SS(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,SS(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Ne.empty,!0);return e.copy(n.append(r))}function fh(e,t,n,r,o,i){let a=t<0?e.firstChild:e.lastChild,s=a.content;return e.childCount>1&&(i=0),o<r-1&&(s=fh(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(Ne.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function Av(e,t,n){return t<e.openStart&&(e=new Xe(fh(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Xe(fh(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const xS={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 kv=null;function wS(){return kv||(kv=document.implementation.createHTMLDocument("title"))}let Ud=null;function cM(e){let t=window.trustedTypes;return t?(Ud||(Ud=t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Ud.createHTML(e)):e}function uM(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=wS().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&xS[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=cM(e),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function dM(e){let t=e.querySelectorAll(nr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function fM(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:o,openStart:i,openEnd:a}=e;for(let s=r.length-2;s>=0;s-=2){let l=n.nodes[r[s]];if(!l||l.hasRequiredAttrs())break;o=Ne.from(l.create(r[s+1],o)),i++,a++}return new Xe(o,i,a)}const lr={},cr={},hM={touchstart:!0,touchmove:!0};class pM{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 mM(e){for(let t in lr){let n=lr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{vM(e,r)&&!rm(e,r)&&(e.editable||!(r.type in cr))&&n(e,r)},hM[t]?{passive:!0}:void 0)}sr&&e.dom.addEventListener("input",()=>null),hh(e)}function Zo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function gM(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function hh(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>rm(e,r))})}function rm(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function vM(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function bM(e,t){!rm(e,t)&&lr[t.type]&&(e.editable||!(t.type in cr))&&lr[t.type](e,t)}cr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!$S(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!($o&&nr&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Ta&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,wi(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||aM(e,n)?n.preventDefault():Zo(e,"key")};cr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};cr.keypress=(e,t)=>{let n=t;if($S(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Tr&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof vt)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function Vu(e){return{left:e.clientX,top:e.clientY}}function yM(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function om(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(e.someProp(t,s=>a>i.depth?s(e,n,i.nodeAfter,i.before(a),o,!0):s(e,n,i.node(a),i.before(a),o,!1)))return!0;return!1}function wa(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function CM(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&gt.isSelectable(r)?(wa(e,new gt(n)),!0):!1}function SM(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof gt&&(r=n.node);let i=e.state.doc.resolve(t);for(let a=i.depth+1;a>0;a--){let s=a>i.depth?i.nodeAfter:i.node(a);if(gt.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?(wa(e,gt.create(e.state.doc,o)),!0):!1}function xM(e,t,n,r,o){return om(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?SM(e,n):CM(e,n))}function wM(e,t,n,r){return om(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function EM(e,t,n,r){return om(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||$M(e,n,r)}function $M(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(wa(e,vt.create(r,0,r.content.size)),!0):!1;let o=r.resolve(t);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)wa(e,vt.create(r,s+1,s+1+a.content.size));else if(gt.isSelectable(a))wa(e,gt.create(r,s));else continue;return!0}}function im(e){return jc(e)}const ES=Tr?"metaKey":"ctrlKey";lr.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=im(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&yM(n,e.input.lastClick)&&!n[ES]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let a=e.posAtCoords(Vu(n));a&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new OM(e,a,n,!!r)):(i=="doubleClick"?wM:EM)(e,a.pos,a.inside,n)?n.preventDefault():Zo(e,"pointer"))};class OM{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[ES],this.allowDefault=r.shiftKey;let i,a;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{let u=t.state.doc.resolve(n.pos);i=u.parent,a=u.depth?u.before():0}const s=o?null:r.target,l=s?t.docView.nearestDesc(s,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof gt&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Kr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Zo(t,"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(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Vu(t))),this.updateAllowDefault(t),this.allowDefault||!n?Zo(this.view,"pointer"):xM(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||sr&&this.mightDrag&&!this.mightDrag.node.isAtom||nr&&!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)?(wa(this.view,bt.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Zo(this.view,"pointer")}move(t){this.updateAllowDefault(t),Zo(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}lr.touchstart=e=>{e.input.lastTouch=Date.now(),im(e),Zo(e,"pointer")};lr.touchmove=e=>{e.input.lastTouch=Date.now(),Zo(e,"pointer")};lr.contextmenu=e=>im(e);function $S(e,t){return e.composing?!0:sr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const NM=$o?5e3:-1;cr.compositionstart=cr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof vt&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),jc(e,!0),e.markCursor=null;else if(jc(e,!t.selection.empty),Kr&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.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=e.domSelection();s&&s.collapse(a,a.nodeValue.length);break}else o=a,i=-1}}e.input.composing=!0}OS(e,NM)};cr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,OS(e,20))};function OS(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>jc(e),t))}function NS(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=RM());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function MM(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=CN(t.focusNode,t.focusOffset),r=SN(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function RM(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function jc(e,t=!1){if(!($o&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),NS(e),t||e.docView&&e.docView.dirty){let n=em(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function IM(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const js=hr&&oi<15||Ta&&ON<604;lr.copy=cr.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=js?null:n.clipboardData,a=r.content(),{dom:s,text:l}=nm(e,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):IM(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function TM(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function PM(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.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=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Bs(e,r.value,null,o,t):Bs(e,r.textContent,r.innerHTML,o,t)},50)}function Bs(e,t,n,r,o){let i=bS(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,i||Xe.empty)))return!0;if(!i)return!1;let a=TM(i),s=a?e.state.tr.replaceSelectionWith(a,r):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function MS(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}cr.paste=(e,t)=>{let n=t;if(e.composing&&!$o)return;let r=js?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Bs(e,MS(r),r.getData("text/html"),o,n)?n.preventDefault():PM(e,n)};class RS{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const IS=Tr?"altKey":"ctrlKey";lr.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Vu(n)),a;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof gt?o.to-1:o.to))){if(r&&r.mightDrag)a=gt.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(a=gt.create(e.state.doc,d.posBefore))}}let s=(a||e.state.selection).content(),{dom:l,text:c,slice:u}=nm(e,s);(!n.dataTransfer.files.length||!nr||nS>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(js?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",js||n.dataTransfer.setData("text/plain",c),e.dragging=new RS(u,!n[IS],a)};lr.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};cr.dragover=cr.dragenter=(e,t)=>t.preventDefault();cr.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(Vu(n));if(!o)return;let i=e.state.doc.resolve(o.pos),a=r&&r.slice;a?e.someProp("transformPasted",m=>{a=m(a,e)}):a=bS(e,MS(n.dataTransfer),js?null:n.dataTransfer.getData("text/html"),!1,i);let s=!!(r&&!n[IS]);if(e.someProp("handleDrop",m=>m(e,n,a||Xe.empty,s))){n.preventDefault();return}if(!a)return;n.preventDefault();let l=a?KC(e.state.doc,i.pos,a):i.pos;l==null&&(l=i.pos);let c=e.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 h=c.doc.resolve(u);if(d&&gt.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new gt(h));else{let m=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((v,g,y,b)=>m=b),c.setSelection(tm(e,h,c.doc.resolve(m)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};lr.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Mo(e)},20))};lr.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};lr.beforeinput=(e,t)=>{if(nr&&$o&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,wi(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in cr)lr[e]=cr[e];function zs(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Bc{constructor(t,n){this.toDOM=t,this.spec=n||_i,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:a}=t.mapResult(n.from+o,this.side<0?-1:1);return a?null:new Un(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Bc&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&zs(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class ai{constructor(t,n){this.attrs=t,this.spec=n||_i}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,a=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new Un(i,a,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof ai&&zs(this.attrs,t.attrs)&&zs(this.spec,t.spec)}static is(t){return t.type instanceof ai}destroy(){}}class am{constructor(t,n){this.attrs=t,this.spec=n||_i}map(t,n,r,o){let i=t.mapResult(n.from+o,1);if(i.deleted)return null;let a=t.mapResult(n.to+o,-1);return a.deleted||a.pos<=i.pos?null:new Un(i.pos-r,a.pos-r,this)}valid(t,n){let{index:r,offset:o}=t.content.findIndex(n.from),i;return o==n.from&&!(i=t.child(r)).isText&&o+i.nodeSize==n.to}eq(t){return this==t||t instanceof am&&zs(this.attrs,t.attrs)&&zs(this.spec,t.spec)}destroy(){}}class Un{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Un(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Un(t,t,new Bc(n,r))}static inline(t,n,r,o){return new Un(t,n,new ai(r,o))}static node(t,n,r,o){return new Un(t,n,new am(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof ai}get widget(){return this.type instanceof Bc}}const pa=[],_i={};class hn{constructor(t,n){this.local=t.length?t:pa,this.children=n.length?n:pa}static create(t,n){return n.length?zc(n,t,0,_i):er}find(t,n,r){let o=[];return this.findInner(t??0,n??1e9,o,0,r),o}findInner(t,n,r,o,i){for(let a=0;a<this.local.length;a++){let s=this.local[a];s.from<=n&&s.to>=t&&(!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]>t){let s=this.children[a]+1;this.children[a+2].findInner(t-s,n-s,r,o+s,i)}}map(t,n,r){return this==er||t.maps.length==0?this:this.mapInner(t,n,0,0,r||_i)}mapInner(t,n,r,o,i){let a;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?AM(this.children,a||[],t,n,r,o,i):a?new hn(a.sort(Li),pa):er}add(t,n){return n.length?this==er?hn.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let o,i=0;t.forEach((s,l)=>{let c=l+r,u;if(u=PS(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,zc(u,s,c+1,_i)),i+=3}});let a=TS(i?AS(n):n,-r);for(let s=0;s<a.length;s++)a[s].type.valid(t,a[s])||a.splice(s--,1);return new hn(a.length?this.local.concat(a).sort(Li):this.local,o||this.children)}remove(t){return t.length==0||this==er?this:this.removeInner(t,0)}removeInner(t,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<t.length;u++)(d=t[u])&&d.from>s&&d.to<l&&(t[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!=er?r[i+2]=c:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,a;i<t.length;i++)if(a=t[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 hn(o,r):er}forChild(t,n){if(this==er)return this;if(n.isLeaf)return hn.empty;let r,o;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=t){this.children[s]==t&&(r=this.children[s+2]);break}let i=t+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 ai){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 hn(o.sort(Li),pa);return r?new Uo([s,r]):s}return r||er}eq(t){if(this==t)return!0;if(!(t instanceof hn)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return sm(this.localsInner(t))}localsInner(t){if(this==er)return pa;if(t.inlineContent||!this.local.some(ai.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof ai||n.push(this.local[r]);return n}forEachSet(t){t(this)}}hn.empty=new hn([],[]);hn.removeOverlap=sm;const er=hn.empty;class Uo{constructor(t){this.members=t}map(t,n){const r=this.members.map(o=>o.map(t,n,_i));return Uo.from(r)}forChild(t,n){if(n.isLeaf)return hn.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(t,n);i!=er&&(i instanceof Uo?r=r.concat(i.members):r.push(i))}return Uo.from(r)}eq(t){if(!(t instanceof Uo)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(t);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?sm(r?n:n.sort(Li)):pa}static from(t){switch(t.length){case 0:return er;case 1:return t[0];default:return new Uo(t.every(n=>n instanceof hn)?t:t.reduce((n,r)=>n.concat(r instanceof hn?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function AM(e,t,n,r,o,i,a){let s=e.slice();for(let c=0,u=i;c<n.maps.length;c++){let d=0;n.maps[c].forEach((f,h,m,v)=>{let g=v-m-(h-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;h>=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(e[c]+i),d=u-o;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(e[c+1]+i,-1),h=f-o,{index:m,offset:v}=r.content.findIndex(d),g=r.maybeChild(m);if(g&&v==d&&v+g.nodeSize==h){let y=s[c+2].mapInner(n,g,u+1,e[c]+i+1,a);y!=er?(s[c]=d,s[c+1]=h,s[c+2]=y):(s[c+1]=-2,l=!0)}else l=!0}if(l){let c=kM(s,e,t,n,o,i,a),u=zc(c,r,0,a);t=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 h=u.children[d];for(;f<s.length&&s[f]<h;)f+=3;s.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new hn(t.sort(Li),s)}function TS(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new Un(o.from+t,o.to+t,o.type))}return n}function kM(e,t,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<e.length;l+=3)e[l+1]==-1&&s(e[l+2],t[l]+i+1);return n}function PS(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let i=0,a;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function AS(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function zc(e,t,n,r){let o=[],i=!1;t.forEach((s,l)=>{let c=PS(e,s,l+n);if(c){i=!0;let u=zc(c,s,n+l+1,r);u!=er&&o.push(l,l+s.nodeSize,u)}});let a=TS(i?AS(e):e,-n).sort(Li);for(let s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new hn(a,o):er}function Li(e,t){return e.from-t.from||e.to-t.to}function sm(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from==r.from){i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Dv(t,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Dv(t,o,r.copy(i.from,r.to)));break}}}return t}function Dv(e,t,n){for(;t<e.length&&Li(n,e[t])>0;)t++;e.splice(t,0,n)}function Kd(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=er&&t.push(r)}),e.cursorWrapper&&t.push(hn.create(e.state.doc,[e.cursorWrapper.deco])),Uo.from(t)}const DM={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},_M=hr&&oi<=11;class LM{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class jM{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new LM,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]);hr&&oi<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),_M&&(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,DM)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[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(Nv(this.view)){if(this.suppressingSelectionUpdates)return Mo(this.view);if(hr&&oi<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Vi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=Ia(i))n.add(i);for(let i=t.anchorNode;i;i=Ia(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 t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Nv(t)&&!this.ignoreSelectionChange(r),i=-1,a=-1,s=!1,l=[];if(t.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(i=i<0?d.from:Math.min(d.from,i),a=a<0?d.to:Math.max(d.to,a),d.typeOver&&(s=!0))}if(Kr&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||FM(t,d)!=h)&&f.remove()}}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&Fu(r)&&(c=em(t))&&c.eq(bt.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Mo(t),this.currentSelection.set(r),t.scrollToSelection()):(i>-1||o)&&(i>-1&&(t.docView.markDirty(i,a),BM(t)),this.handleDOMChange(i,a,s,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Mo(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;u<t.addedNodes.length;u++){let d=t.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let o=t.previousSibling,i=t.nextSibling;if(hr&&oi<=11&&t.addedNodes.length)for(let u=0;u<t.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=t.addedNodes[u];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(i=f)}let a=o&&o.parentNode==t.target?Jn(o)+1:0,s=r.localPosFromDOM(t.target,a,-1),l=i&&i.parentNode==t.target?Jn(i):t.target.childNodes.length,c=r.localPosFromDOM(t.target,l,1);return{from:s,to:c}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let _v=new WeakMap,Lv=!1;function BM(e){if(!_v.has(e)&&(_v.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Kr,Lv)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."),Lv=!0}}function jv(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return Vi(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function zM(e,t){if(t.getComposedRanges){let o=t.getComposedRanges(e.root)[0];if(o)return jv(e,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?jv(e,n):null}function FM(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function HM(e,t,n){let{node:r,fromOffset:o,toOffset:i,from:a,to:s}=e.docView.parseRange(t,n),l=e.domSelectionRange(),c,u=l.anchorNode;if(u&&e.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Fu(l)||c.push({node:l.focusNode,offset:l.focusOffset})),nr&&e.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=e.state.doc,f=e.someProp("domParser")||ri.fromSchema(e.state.schema),h=d.resolve(a),m=null,v=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:i,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:VM,context:h});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 VM(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(sr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||sr&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const WM=/^(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 qM(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let O=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,M=em(e,O);if(M&&!e.state.selection.eq(M)){if(nr&&$o&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",k=>k(e,wi(13,"Enter"))))return;let I=e.state.tr.setSelection(M);O=="pointer"?I.setMeta("pointer",!0):O=="key"&&I.scrollIntoView(),i&&I.setMeta("composition",i),e.dispatch(I)}return}let a=e.state.doc.resolve(t),s=a.sharedDepth(n);t=a.before(s+1),n=e.state.doc.resolve(n).after(s+1);let l=e.state.selection,c=HM(e,t,n),u=e.state.doc,d=u.slice(c.from,c.to),f,h;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,h="end"):(f=e.state.selection.from,h="start"),e.input.lastKeyCode=null;let m=GM(d.content,c.doc.content,c.from,f,h);if(m&&e.input.domChangeCount++,(Ta&&e.input.lastIOSEnter>Date.now()-225||$o)&&o.some(O=>O.nodeType==1&&!WM.test(O.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",O=>O(e,wi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&l instanceof vt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))m={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let O=Bv(e,e.state.doc,c.sel);if(O&&!O.eq(e.state.selection)){let M=e.state.tr.setSelection(O);i&&M.setMeta("composition",i),e.dispatch(M)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof vt&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=c.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),hr&&oi<=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((Ta&&e.input.lastIOSEnter>Date.now()-225&&(!b||o.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!b&&v.pos<c.doc.content.size&&!v.sameParent(g)&&(C=bt.findFrom(c.doc.resolve(v.pos+1),1,!0))&&C.head==g.pos)&&e.someProp("handleKeyDown",O=>O(e,wi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&KM(u,m.start,m.endA,v,g)&&e.someProp("handleKeyDown",O=>O(e,wi(8,"Backspace")))){$o&&nr&&e.domObserver.suppressSelectionUpdates();return}nr&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),$o&&!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(()=>{e.someProp("handleKeyDown",function(O){return O(e,wi(13,"Enter"))})},20));let x=m.start,S=m.endA,w,E,N;if(b){if(v.pos==g.pos)hr&&oi<=11&&v.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Mo(e),20)),w=e.state.tr.delete(x,S),E=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(N=UM(v.parent.content.cut(v.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,m.endA-y.start()))))w=e.state.tr,N.type=="add"?w.addMark(x,S,N.mark):w.removeMark(x,S,N.mark);else if(v.parent.child(v.index()).isText&&v.index()==g.index()-(g.textOffset?0:1)){let O=v.parent.textBetween(v.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",M=>M(e,x,S,O)))return;w=e.state.tr.insertText(O,x,S)}}if(w||(w=e.state.tr.replace(x,S,c.doc.slice(m.start-c.from,m.endB-c.from))),c.sel){let O=Bv(e,w.doc,c.sel);O&&!(nr&&e.composing&&O.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(O.head==x||O.head==w.mapping.map(S)-1)||hr&&O.empty&&O.head==x)&&w.setSelection(O)}E&&w.ensureMarks(E),i&&w.setMeta("composition",i),e.dispatch(w.scrollIntoView())}function Bv(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:tm(e,t.resolve(n.anchor),t.resolve(n.head))}function UM(e,t){let n=e.firstChild.marks,r=t.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<t.childCount;u++)c.push(l(t.child(u)));if(Ne.from(c).eq(e))return{mark:s,type:a}}function KM(e,t,n,r,o){if(n-t<=o.pos-r.pos||Gd(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(!r.parent.isTextblock){let s=i.nodeAfter;return s!=null&&n==t+s.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=e.resolve(Gd(i,!0,!0));return!a.parent.isTextblock||a.pos>n||Gd(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function Gd(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function GM(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let l=Math.max(0,i-Math.min(a,s));r-=a+l-i}if(a<i&&e.size<t.size){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<t.size&&zv(t.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<e.size&&zv(e.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}return{start:i,endA:a,endB:s}}function zv(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class XM{constructor(t,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 pM,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(qv),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Vv(this),Hv(this),this.nodeViews=Wv(this),this.docView=Sv(this.state.doc,Fv(this),Kd(this),this.dom,this),this.domObserver=new jM(this,(r,o,i,a)=>qM(this,r,o,i,a)),this.domObserver.start(),mM(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&hh(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(qv),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,a=!1;t.storedMarks&&this.composing&&(NS(this),a=!0),this.state=t;let s=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=Wv(this);JM(h,this.nodeViews)&&(this.nodeViews=h,i=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&hh(this),this.editable=Vv(this),Hv(this);let l=Kd(this),c=Fv(this),u=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(t.doc,c,l);(d||!t.selection.eq(o.selection))&&(a=!0);let f=u=="preserve"&&a&&this.dom.style.overflowAnchor==null&&RN(this);if(a){this.domObserver.stop();let h=d&&(hr||nr)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&YM(o.selection,t.selection);if(d){let m=nr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=MM(this)),(i||!this.docView.update(t.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Sv(t.doc,c,l,this.dom,this)),m&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&ZN(this))?Mo(this,h):(mS(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&IN(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof gt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&mv(this,n.getBoundingClientRect(),t)}else mv(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.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,t)}}updateDraggedNode(t,n){let r=t.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 RS(t.slice,t.move,o<0?void 0:gt.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],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[t];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[t];if(s!=null&&(o=n?n(s):s))return o}}hasFocus(){if(hr){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&TN(this.dom),Mo(this),this.domObserver.start()}get root(){let t=this._root;if(t==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 t||document}updateRoot(){this._root=null}posAtCoords(t){return _N(this,t)}coordsAtPos(t,n=1){return sS(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return FN(this,n||this.state,t)}pasteHTML(t,n){return Bs(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Bs(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return nm(this,t)}destroy(){this.docView&&(gM(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Kd(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,bN())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return bM(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?sr&&this.root.nodeType===11&&wN(this.dom.ownerDocument)==this.dom&&zM(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Fv(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Un.node(0,e.state.doc.content.size,t)]}function Hv(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Un.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Vv(e){return!e.someProp("editable",t=>t(e.state)===!1)}function YM(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function Wv(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function JM(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function qv(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var li={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:"'"},Fc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},QM=typeof navigator<"u"&&/Mac/.test(navigator.platform),ZM=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Qn=0;Qn<10;Qn++)li[48+Qn]=li[96+Qn]=String(Qn);for(var Qn=1;Qn<=24;Qn++)li[Qn+111]="F"+Qn;for(var Qn=65;Qn<=90;Qn++)li[Qn]=String.fromCharCode(Qn+32),Fc[Qn]=String.fromCharCode(Qn);for(var Xd in li)Fc.hasOwnProperty(Xd)||(Fc[Xd]=li[Xd]);function eR(e){var t=QM&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ZM&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Fc:li)[e.keyCode]||e.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 tR=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function nR(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<t.length-1;s++){let l=t[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))tR?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 rR(e){let t=Object.create(null);for(let n in e)t[nR(n)]=e[n];return t}function Yd(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function oR(e){return new Sn({props:{handleKeyDown:lm(e)}})}function lm(e){let t=rR(e);return function(n,r){let o=eR(r),i,a=t[Yd(o,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=t[Yd(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=li[r.keyCode])&&i!=o){let s=t[Yd(i,r)];if(s&&s(n.state,n.dispatch,n))return!0}}return!1}}const cm=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function kS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const DS=(e,t,n)=>{let r=kS(e,n);if(!r)return!1;let o=um(r);if(!o){let a=r.blockRange(),s=a&&qa(a);return s==null?!1:(t&&t(e.tr.lift(a,s).scrollIntoView()),!0)}let i=o.nodeBefore;if(WS(e,o,t,-1))return!0;if(r.parent.content.size==0&&(Pa(i,"end")||gt.isSelectable(i)))for(let a=r.depth;;a--){let s=Bu(e.doc,r.before(a),r.after(a),Xe.empty);if(s&&s.slice.size<s.to-s.from){if(t){let l=e.tr.step(s);l.setSelection(Pa(i,"end")?bt.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):gt.create(l.doc,o.pos-i.nodeSize)),t(l.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},iR=(e,t,n)=>{let r=kS(e,n);if(!r)return!1;let o=um(r);return o?_S(e,o,t):!1},aR=(e,t,n)=>{let r=jS(e,n);if(!r)return!1;let o=dm(r);return o?_S(e,o,t):!1};function _S(e,t,n){let r=t.nodeBefore,o=r,i=t.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=t.nodeAfter,s=a,l=t.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=Bu(e.doc,i,l,Xe.empty);if(!c||c.from!=i||c instanceof qn&&c.slice.size>=l-i)return!1;if(n){let u=e.tr.step(c);u.setSelection(vt.create(u.doc,i)),n(u.scrollIntoView())}return!0}function Pa(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const LS=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=um(r)}let a=i&&i.nodeBefore;return!a||!gt.isSelectable(a)?!1:(t&&t(e.tr.setSelection(gt.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function um(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function jS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const BS=(e,t,n)=>{let r=jS(e,n);if(!r)return!1;let o=dm(r);if(!o)return!1;let i=o.nodeAfter;if(WS(e,o,t,1))return!0;if(r.parent.content.size==0&&(Pa(i,"start")||gt.isSelectable(i))){let a=Bu(e.doc,r.before(),r.after(),Xe.empty);if(a&&a.slice.size<a.to-a.from){if(t){let s=e.tr.step(a);s.setSelection(Pa(i,"start")?bt.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):gt.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},zS=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=dm(r)}let a=i&&i.nodeAfter;return!a||!gt.isSelectable(a)?!1:(t&&t(e.tr.setSelection(gt.create(e.doc,i.pos)).scrollIntoView()),!0)};function dm(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const sR=(e,t)=>{let n=e.selection,r=n instanceof gt,o;if(r){if(n.node.isTextblock||!hi(e.doc,n.from))return!1;o=n.from}else if(o=ju(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(gt.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},lR=(e,t)=>{let n=e.selection,r;if(n instanceof gt){if(n.node.isTextblock||!hi(e.doc,n.to))return!1;r=n.to}else if(r=ju(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},cR=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&qa(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},FS=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
49
+ `).scrollIntoView()),!0)};function fm(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const uR=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),a=fm(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(t){let s=n.after(),l=e.tr.replaceWith(s,s,a.createAndFill());l.setSelection(bt.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},HS=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof xr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=fm(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(vt.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},VS=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(No(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&qa(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function dR(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof gt&&t.selection.node.isBlock)return!r.parentOffset||!No(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],a,s,l=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){l=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),s=fm(r.node(h-1).contentMatchAt(r.indexAfter(h-1))),i.unshift(l&&s?{type:s}:null),a=h;break}else{if(h==1)return!1;i.unshift(null)}let u=t.tr;(t.selection instanceof vt||t.selection instanceof xr)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=No(u.doc,d,i.length,i);if(f||(i[0]=s?{type:s}:null,f=No(u.doc,d,i.length,i)),u.split(d,i.length,i),!l&&c&&r.node(a).type!=s){let h=u.mapping.map(r.before(a)),m=u.doc.resolve(h);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 fR=dR(),hR=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(gt.create(e.doc,o))),!0)};function pR(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||hi(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function WS(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,a,s,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&pR(e,t,n))return!0;let c=!l&&t.parent.canReplace(t.index(),t.index()+1);if(c&&(a=(s=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&s.matchType(a[0]||i.type).validEnd){if(n){let h=t.pos+i.nodeSize,m=Ne.empty;for(let y=a.length-1;y>=0;y--)m=Ne.from(a[y].create(null,m));m=Ne.from(o.copy(m));let v=e.tr.step(new Kn(t.pos-1,h,t.pos,h,new Xe(m,1,0),a.length,!0)),g=v.doc.resolve(h+2*a.length);g.nodeAfter&&g.nodeAfter.type==o.type&&hi(v.doc,g.pos)&&v.join(g.pos),n(v.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&l?null:bt.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&qa(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(c&&Pa(i,"start",!0)&&Pa(o,"end")){let h=o,m=[];for(;m.push(h),!h.isTextblock;)h=h.lastChild;let v=i,g=1;for(;!v.isTextblock;v=v.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,v.content)){if(n){let y=Ne.empty;for(let C=m.length-1;C>=0;C--)y=Ne.from(m[C].copy(y));let b=e.tr.step(new Kn(t.pos-m.length,t.pos+i.nodeSize,t.pos+g,t.pos+i.nodeSize-g,new Xe(y,m.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function qS(e){return function(t,n){let r=t.selection,o=e<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(t.tr.setSelection(vt.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const mR=qS(-1),gR=qS(1);function vR(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=a&&Yp(a,e,t);return s?(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0):!1}}function Uv(e,t=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(e,t)))if(l.type==e)o=!0;else{let u=n.doc.resolve(c),d=u.index();o=u.parent.canReplaceWith(d,d+1,e)}})}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,e,t)}r(i.scrollIntoView())}return!0}}function hm(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}hm(cm,DS,LS);hm(cm,BS,zS);hm(FS,HS,VS,fR);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function bR(e,t=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 yR(s,a,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function yR(e,t,n,r=null){let o=!1,i=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=a.resolve(t.start-2);i=new kc(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new kc(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let s=Yp(i,n,r,t);return s?(e&&CR(e,t,s,o,n),!0):!1}function CR(e,t,n,r,o){let i=Ne.empty;for(let u=n.length-1;u>=0;u--)i=Ne.from(n[u].type.create(n[u].attrs,i));e.step(new Kn(t.start-(r?2:0),t.end,t.start,t.end,new Xe(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=t.start+n.length-(r?2:0),c=t.parent;for(let u=t.startIndex,d=t.endIndex,f=!0;u<d;u++,f=!1)!f&&No(e.doc,l,s)&&(e.split(l,s),l+=2*s),l+=c.child(u).nodeSize;return e}function SR(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,a=>a.childCount>0&&a.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?xR(t,n,e,i):wR(t,n,i):!0:!1}}function xR(e,t,n,r){let o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Kn(i-1,a,i,a,new Xe(Ne.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new kc(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const s=qa(r);if(s==null)return!1;o.lift(r,s);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return hi(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),t(o.scrollIntoView()),!0}function wR(e,t,n){let r=e.tr,o=n.parent;for(let h=n.end,m=n.endIndex-1,v=n.startIndex;m>v;m--)h-=o.child(m).nodeSize,r.delete(h-1,h+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?Ne.empty:Ne.from(o))))return!1;let d=i.pos,f=d+a.nodeSize;return r.step(new Kn(d-(s?1:0),f+(l?1:0),d+1,f-1,new Xe((s?Ne.empty:Ne.from(o.copy(Ne.empty))).append(l?Ne.empty:Ne.from(o.copy(Ne.empty))),s?0:1,l?0:1),s?0:1)),t(r.scrollIntoView()),!0}function ER(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==e);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!=e)return!1;if(n){let c=l.lastChild&&l.lastChild.type==s.type,u=Ne.from(c?e.create():null),d=new Xe(Ne.from(e.create(null,Ne.from(s.type.create(null,u)))),c?3:1,0),f=i.start,h=i.end;n(t.tr.step(new Kn(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function Wu(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),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 qu{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,a=this.buildProps(i);return Object.fromEntries(Object.entries(t).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(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s=[],l=!!t,c=t||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,h])=>[f,(...v)=>{const g=this.buildProps(c,n),y=h(...v)(g);return s.push(y),d}])),run:u};return d}createCan(t){const{rawCommands:n,state:r}=this,o=!1,i=t||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(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s={tr:t,editor:o,view:a,state:Wu({state:i,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(s)]))}};return s}}class $R{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(o=>o.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(o=>o!==n):delete this.callbacks[t]),this}once(t,n){const r=(...o)=>{this.off(t,r),n.apply(this,o)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}}function ut(e,t,n){return e.config[t]===void 0&&e.parent?ut(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?ut(e.parent,t,n):null}):e.config[t]}function Uu(e){const t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function US(e){const t=[],{nodeExtensions:n,markExtensions:r}=Uu(e),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.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,h])=>{t.push({type:d,name:f,attribute:{...i,...h}})})})})}),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,t.push({type:a.name,name:u,attribute:f})})}),t}function Xn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Kt(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};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(h=>h.trim());c.set(d,f)}),s.forEach(u=>{const[d,f]=u.split(":").map(h=>h.trim());c.set(d,f)}),r[o]=Array.from(c.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[o]=i}),r},{})}function Hc(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Kt(n,r),{})}function KS(e){return typeof e=="function"}function Rt(e,t=void 0,...n){return KS(e)?t?e.bind(t)(...n):e(...n):e}function OR(e={}){return Object.keys(e).length===0&&e.constructor===Object}function NR(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function Kv(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const o=t.reduce((i,a)=>{const s=a.attribute.parseHTML?a.attribute.parseHTML(n):NR(n.getAttribute(a.name));return s==null?i:{...i,[a.name]:s}},{});return{...r,...o}}}}function Gv(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&OR(n)?!1:n!=null))}function MR(e,t){var n;const r=US(e),{nodeExtensions:o,markExtensions:i}=Uu(e),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:t},f=e.reduce((y,b)=>{const C=ut(b,"extendNodeSchema",d);return{...y,...C?C(c):{}}},{}),h=Gv({...f,content:Rt(ut(c,"content",d)),marks:Rt(ut(c,"marks",d)),group:Rt(ut(c,"group",d)),inline:Rt(ut(c,"inline",d)),atom:Rt(ut(c,"atom",d)),selectable:Rt(ut(c,"selectable",d)),draggable:Rt(ut(c,"draggable",d)),code:Rt(ut(c,"code",d)),whitespace:Rt(ut(c,"whitespace",d)),linebreakReplacement:Rt(ut(c,"linebreakReplacement",d)),defining:Rt(ut(c,"defining",d)),isolating:Rt(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=Rt(ut(c,"parseHTML",d));m&&(h.parseDOM=m.map(y=>Kv(y,u)));const v=ut(c,"renderHTML",d);v&&(h.toDOM=y=>v({node:y,HTMLAttributes:Hc(y,u)}));const g=ut(c,"renderText",d);return g&&(h.toText=g),[c.name,h]})),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:t},f=e.reduce((g,y)=>{const b=ut(y,"extendMarkSchema",d);return{...g,...b?b(c):{}}},{}),h=Gv({...f,inclusive:Rt(ut(c,"inclusive",d)),excludes:Rt(ut(c,"excludes",d)),group:Rt(ut(c,"group",d)),spanning:Rt(ut(c,"spanning",d)),code:Rt(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=Rt(ut(c,"parseHTML",d));m&&(h.parseDOM=m.map(g=>Kv(g,u)));const v=ut(c,"renderHTML",d);return v&&(h.toDOM=g=>v({mark:g,HTMLAttributes:Hc(g,u)})),[c.name,h]}));return new _C({topNode:a,nodes:s,marks:l})}function Jd(e,t){return t.nodes[e]||t.marks[e]||null}function Xv(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function pm(e,t){const n=Yi.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const RR=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),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 mm(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class ll{constructor(t){this.find=t.find,this.handler=t.handler}}const IR=(e,t)=>{if(mm(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,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 jl(e){var t;const{editor:n,from:r,to:o,text:i,rules:a,plugin:s}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=RR(c)+i;return a.forEach(f=>{if(u)return;const h=IR(d,f.find);if(!h)return;const m=l.state.tr,v=Wu({state:l.state,transaction:m}),g={from:r-(h[0].length-i.length),to:o},{commands:y,chain:b,can:C}=new qu({editor:n,state:v});f.handler({state:v,range:g,match:h,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 TR(e){const{editor:t,rules:n}=e,r=new Sn({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=pm(Ne.from(u),a.schema);const{from:d}=l,f=d+u.length;jl({editor:t,from:d,to:f,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,a,s){return jl({editor:t,from:i,to:a,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&jl({editor:t,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?jl({editor:t,from:a.pos,to:a.pos,text:`
50
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function PR(e){return Object.prototype.toString.call(e).slice(8,-1)}function Bl(e){return PR(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Ku(e,t){const n={...e};return Bl(e)&&Bl(t)&&Object.keys(t).forEach(r=>{Bl(t[r])&&Bl(e[r])?n[r]=Ku(e[r],t[r]):n[r]=t[r]}),n}let Jr=class ph{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.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=Rt(ut(this,"addOptions",{name:this.name}))),this.storage=Rt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ph(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Ku(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new ph(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Rt(ut(n,"addOptions",{name:n.name})),n.storage=Rt(ut(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,o=t.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),t.view.dispatch(r),!0}return!1}};function AR(e){return typeof e=="number"}class kR{constructor(t){this.find=t.find,this.handler=t.handler}}const DR=(e,t,n)=>{if(mm(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=e,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 _R(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:a,dropEvent:s}=e,{commands:l,chain:c,can:u}=new qu({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(h,m)=>{if(!h.isTextblock||h.type.spec.code)return;const v=Math.max(r,m),g=Math.min(o,m+h.content.size),y=h.textBetween(v-m,g-m,void 0,"");DR(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(h=>h!==null)}let zl=null;const LR=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function jR(e){const{editor:t,rules:n}=e;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:h,pasteEvt:m})=>{const v=u.tr,g=Wu({state:u,transaction:v});if(!(!_R({editor:t,state:g,from:Math.max(d-1,0),to:f.b-1,rule:h,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 Sn({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&&(zl=t)},h=()=>{zl&&(zl=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,s=f,!i){const h=zl;h&&setTimeout(()=>{const m=h.state.selection;m&&h.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(d,f)=>{var h;const m=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return a=f,o=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{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=pm(Ne.from(S),h.schema);const{from:w}=y,E=w+S.length,N=LR(S);return l({rule:u,state:h,from:w,to:{b:E},pasteEvt:N})}const C=f.doc.content.findDiffStart(h.doc.content),x=f.doc.content.findDiffEnd(h.doc.content);if(!(!AR(C)||!x||C===x.b))return l({rule:u,state:h,from:C,to:x,pasteEvt:a})}}))}function BR(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class va{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=va.resolve(t),this.schema=MR(this.extensions,n),this.setupExtensions()}static resolve(t){const n=va.sort(va.flatten(t)),r=BR(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(t){return t.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(t){return t.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((t,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:Jd(n.name,this.schema)},o=ut(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){const{editor:t}=this,n=va.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:t,type:Jd(a.name,this.schema)},l=[],c=ut(a,"addKeyboardShortcuts",s);let u={};if(a.type==="mark"&&ut(a,"exitable",s)&&(u.ArrowRight=()=>Jr.handleExit({editor:t,mark:a})),c){const v=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:t})]));u={...u,...v}}const d=oR(u);l.push(d);const f=ut(a,"addInputRules",s);Xv(a,t.options.enableInputRules)&&f&&r.push(...f());const h=ut(a,"addPasteRules",s);Xv(a,t.options.enablePasteRules)&&h&&o.push(...h());const m=ut(a,"addProseMirrorPlugins",s);if(m){const v=m();l.push(...v)}return l}).flat();return[TR({editor:t,rules:r}),...jR({editor:t,rules:o}),...i]}get attributes(){return US(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=Uu(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:t,type:Xn(r.name,this.schema)},a=ut(r,"addNodeView",i);if(!a)return[];const s=(l,c,u,d,f)=>{const h=Hc(l,o);return a()({node:l,view:c,getPos:u,decorations:d,innerDecorations:f,editor:t,extension:r,HTMLAttributes:h})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:Jd(t.name,this.schema)};t.type==="mark"&&(!((n=Rt(ut(t,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(t.name);const o=ut(t,"onBeforeCreate",r),i=ut(t,"onCreate",r),a=ut(t,"onUpdate",r),s=ut(t,"onSelectionUpdate",r),l=ut(t,"onTransaction",r),c=ut(t,"onFocus",r),u=ut(t,"onBlur",r),d=ut(t,"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 nn{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.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=Rt(ut(this,"addOptions",{name:this.name}))),this.storage=Rt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new nn(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Ku(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new nn({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Rt(ut(n,"addOptions",{name:n.name})),n.storage=Rt(ut(n,"addStorage",{name:n.name,options:n.options})),n}}function GS(e,t,n){const{from:r,to:o}=t,{blockSeparator:i=`
51
+
52
+ `,textSerializers:a={}}=n||{};let s="";return e.nodesBetween(r,o,(l,c,u,d)=>{var f;l.isBlock&&c>r&&(s+=i);const h=a==null?void 0:a[l.type.name];if(h)return u&&(s+=h({node:l,pos:c,parent:u,index:d,range:t})),!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 XS(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const zR=nn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Sn({key:new kn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,a=Math.min(...i.map(u=>u.$from.pos)),s=Math.max(...i.map(u=>u.$to.pos)),l=XS(n);return GS(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),FR=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),HR=(e=!1)=>({commands:t})=>t.setContent("",e),VR=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:a})=>{e.doc.nodesBetween(i.pos,a.pos,(s,l)=>{if(s.type.isText)return;const{doc:c,mapping:u}=t,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+s.nodeSize)),h=d.blockRange(f);if(!h)return;const m=qa(h);if(s.type.isTextblock){const{defaultType:v}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(h.start,v)}(m||m===0)&&t.lift(h,m)})}),!0},WR=e=>t=>e(t),qR=()=>({state:e,dispatch:t})=>HS(e,t),UR=(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const a=r.mapping.map(t);return r.insert(a,i.content),r.setSelection(new vt(r.doc.resolve(a-1))),!0},KR=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){const s=o.before(i),l=o.after(i);e.delete(s,l).scrollIntoView()}return!0}return!1},GR=e=>({tr:t,state:n,dispatch:r})=>{const o=Xn(e,n.schema),i=t.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);t.delete(l,c).scrollIntoView()}return!0}return!1},XR=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},YR=()=>({state:e,dispatch:t})=>cm(e,t),JR=()=>({commands:e})=>e.keyboardShortcut("Enter"),QR=()=>({state:e,dispatch:t})=>uR(e,t);function Vc(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:mm(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function YS(e,t,n={}){return e.find(r=>r.type===t&&Vc(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function Yv(e,t,n={}){return!!YS(e,t,n)}function gm(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===t)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!YS([...o.node.marks],t,n)))return;let a=o.index,s=e.start()+o.offset,l=a+1,c=s+o.node.nodeSize;for(;a>0&&Yv([...e.parent.child(a-1).marks],t,n);)a-=1,s-=e.parent.child(a).nodeSize;for(;l<e.parent.childCount&&Yv([...e.parent.child(l).marks],t,n);)c+=e.parent.child(l).nodeSize,l+=1;return{from:s,to:c}}function mi(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const ZR=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const i=mi(e,r.schema),{doc:a,selection:s}=n,{$from:l,from:c,to:u}=s;if(o){const d=gm(l,i,t);if(d&&d.from<=c&&d.to>=u){const f=vt.create(a,d.from,d.to);n.setSelection(f)}}return!0},eI=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function JS(e){return e instanceof vt}function Ri(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function QS(e,t=null){if(!t)return null;const n=bt.atStart(e),r=bt.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const o=n.from,i=r.to;return t==="all"?vt.create(e,Ri(0,o,i),Ri(e.content.size,o,i)):vt.create(e,Ri(t,o,i),Ri(t,o,i))}function ZS(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Gu(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const tI=(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const a=()=>{(Gu()||ZS())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!JS(n.state.selection))return a(),!0;const s=QS(o.doc,e)||n.state.selection,l=n.state.selection.eq(s);return i&&(l||o.setSelection(s),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},nI=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),rI=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),ex=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&ex(r)}return e};function Fl(e){const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return ex(n)}function Wc(e,t,n){if(e instanceof ni||e instanceof Ne)return e;n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return Ne.fromArray(e.map(s=>t.nodeFromJSON(s)));const a=t.nodeFromJSON(e);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:",e,"Error:",i),Wc("",t,n)}if(o){if(n.errorOnInvalidContent){let a=!1,s="";const l=new _C({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.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?ri.fromSchema(l).parseSlice(Fl(e),n.parseOptions):ri.fromSchema(l).parse(Fl(e),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const i=ri.fromSchema(t);return n.slice?i.parseSlice(Fl(e),n.parseOptions).content:i.parse(Fl(e),n.parseOptions)}return Wc("",t,n)}function oI(e,t,n){const r=e.steps.length-1;if(r<t)return;const o=e.steps[r];if(!(o instanceof qn||o instanceof Kn))return;const i=e.mapping.maps[r];let a=0;i.forEach((s,l,c,u)=>{a===0&&(a=u)}),e.setSelection(bt.near(e.doc.resolve(a),n))}const iI=e=>!("type"in e),aI=(e,t,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=Wc(t,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 e=="number"?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0;if((iI(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 h;if(u){if(Array.isArray(t))h=t.map(m=>m.text||"").join("");else if(t instanceof Ne){let m="";t.forEach(v=>{v.text&&(m+=v.text)}),h=m}else typeof t=="object"&&t&&t.text?h=t.text:h=t;r.insertText(h,l,c)}else h=s,r.replaceWith(l,c,h);n.updateSelection&&oI(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:h}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:h})}return!0},sI=()=>({state:e,dispatch:t})=>sR(e,t),lI=()=>({state:e,dispatch:t})=>lR(e,t),cI=()=>({state:e,dispatch:t})=>DS(e,t),uI=()=>({state:e,dispatch:t})=>BS(e,t),dI=()=>({state:e,dispatch:t,tr:n})=>{try{const r=ju(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},fI=()=>({state:e,dispatch:t,tr:n})=>{try{const r=ju(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},hI=()=>({state:e,dispatch:t})=>iR(e,t),pI=()=>({state:e,dispatch:t})=>aR(e,t);function tx(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function mI(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<t.length-1;s+=1){const l=t[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))Gu()||tx()?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 gI=e=>({editor:t,view:n,tr:r,dispatch:o})=>{const i=mI(e).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=t.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 Fs(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,a=t?Xn(t,e.schema):null,s=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),m=Math.min(o,f+d.nodeSize);s.push({node:d,from:h,to:m})});const l=o-r,c=s.filter(d=>a?a.name===d.node.type.name:!0).filter(d=>Vc(d.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}const vI=(e,t={})=>({state:n,dispatch:r})=>{const o=Xn(e,n.schema);return Fs(n,o,t)?cR(n,r):!1},bI=()=>({state:e,dispatch:t})=>VS(e,t),yI=e=>({state:t,dispatch:n})=>{const r=Xn(e,t.schema);return SR(r)(t,n)},CI=()=>({state:e,dispatch:t})=>FS(e,t);function Xu(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Jv(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}const SI=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=Xu(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(i=Xn(e,r.schema)),s==="mark"&&(a=mi(e,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,Jv(c.attrs,t)),a&&c.marks.length&&c.marks.forEach(d=>{a===d.type&&n.addMark(u,u+c.nodeSize,a.create(Jv(d.attrs,t)))})})}),!0):!1},xI=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),wI=()=>({tr:e,dispatch:t})=>{if(t){const n=new xr(e.doc);e.setSelection(n)}return!0},EI=()=>({state:e,dispatch:t})=>LS(e,t),$I=()=>({state:e,dispatch:t})=>zS(e,t),OI=()=>({state:e,dispatch:t})=>hR(e,t),NI=()=>({state:e,dispatch:t})=>gR(e,t),MI=()=>({state:e,dispatch:t})=>mR(e,t);function mh(e,t,n={},r={}){return Wc(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const RI=(e,t=!1,n={},r={})=>({editor:o,tr:i,dispatch:a,commands:s})=>{var l,c;const{doc:u}=i;if(n.preserveWhitespace!=="full"){const d=mh(e,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",!t),!0}return a&&i.setMeta("preventUpdate",!t),s.insertContentAt({from:0,to:u.content.size},e,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function nx(e,t){const n=mi(t,e.schema),{from:r,to:o,empty:i}=e.selection,a=[];i?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,l=>{a.push(...l.marks)});const s=a.find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function II(e,t){const n=new Jp(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function TI(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function PI(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function rx(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function vm(e){return t=>rx(t.$from,e)}function AI(e,t){const n={from:0,to:e.content.size};return GS(e,n,t)}function kI(e,t){const n=Xn(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,s=>{i.push(s)});const a=i.reverse().find(s=>s.type.name===n.name);return a?{...a.attrs}:{}}function ox(e,t){const n=Xu(typeof t=="string"?t:t.name,e.schema);return n==="node"?kI(e,t):n==="mark"?nx(e,t):{}}function DI(e,t=JSON.stringify){const n={};return e.filter(r=>{const o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function _I(e){const t=DI(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,a)=>a!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function LI(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{const a=[];if(o.ranges.length)o.forEach((s,l)=>{a.push({from:s,to:l})});else{const{from:s,to:l}=n[i];if(s===void 0||l===void 0)return;a.push({from:s,to:l})}a.forEach(({from:s,to:l})=>{const c=t.slice(i).map(s,-1),u=t.slice(i).map(l),d=t.invert().map(c,-1),f=t.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),_I(r)}function bm(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(o=>{const i=n.resolve(e),a=gm(i,o.type);a&&r.push({mark:o,...a})}):n.nodesBetween(e,t,(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 dc(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function gh(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?mi(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>Vc(d.attrs,n,{strict:!1}));let a=0;const s=[];if(o.forEach(({$from:d,$to:f})=>{const h=d.pos,m=f.pos;e.doc.nodesBetween(h,m,(v,g)=>{if(!v.isText&&!v.marks.length)return;const y=Math.max(h,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=>Vc(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 jI(e,t,n={}){if(!t)return Fs(e,null,n)||gh(e,null,n);const r=Xu(t,e.schema);return r==="node"?Fs(e,t,n):r==="mark"?gh(e,t,n):!1}function Qv(e,t){const{nodeExtensions:n}=Uu(t),r=n.find(a=>a.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Rt(ut(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Yu(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(Yu(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function ix(e){return e instanceof gt}function BI(e,t,n){var r;const{selection:o}=t;let i=null;if(JS(o)&&(i=o.$cursor),i){const s=(r=e.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?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(s.pos,l.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const h=!f||f.type.allowsMarkType(n),m=!!n.isInSet(u.marks)||!u.marks.some(v=>v.type.excludes(n));c=h&&m}return!c}),c})}const zI=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:a,ranges:s}=i,l=mi(e,r.schema);if(o)if(a){const c=nx(r,l);n.addStoredMark(l.create({...c,...t}))}else s.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const m=Math.max(h,u),v=Math.min(h+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,...t}))}):n.addMark(m,v,l.create(t))})});return BI(r,n,l)},FI=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),HI=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Xn(e,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:s})=>Uv(i,{...a,...t})(n)?!0:s.clearNodes()).command(({state:s})=>Uv(i,{...a,...t})(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},VI=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=Ri(e,0,r.content.size),i=gt.create(r,o);t.setSelection(i)}return!0},WI=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,a=vt.atStart(r).from,s=vt.atEnd(r).to,l=Ri(o,a,s),c=Ri(i,a,s),u=vt.create(r,l,c);t.setSelection(u)}return!0},qI=e=>({state:t,dispatch:n})=>{const r=Xn(e,t.schema);return ER(r)(t,n)};function Zv(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(o=>t==null?void 0:t.includes(o.type.name));e.tr.ensureMarks(r)}}const UI=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:a}=t,{$from:s,$to:l}=i,c=o.extensionManager.attributes,u=dc(c,s.node().type.name,s.node().attrs);if(i instanceof gt&&i.node.isBlock)return!s.parentOffset||!No(a,s.pos)?!1:(r&&(e&&Zv(n,o.extensionManager.splittableMarks),t.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:TI(s.node(-1).contentMatchAt(s.indexAfter(-1)));let h=d&&f?[{type:f,attrs:u}]:void 0,m=No(t.doc,t.mapping.map(s.pos),1,h);if(!h&&!m&&No(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,h=f?[{type:f,attrs:u}]:void 0),r){if(m&&(i instanceof vt&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,h),f&&!d&&!s.parentOffset&&s.parent.type!==f)){const v=t.mapping.map(s.before()),g=t.doc.resolve(v);s.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&Zv(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return m},KI=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var a;const s=Xn(e,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=Ne.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let N=l.depth-b;N>=l.depth-3;N-=1)y=Ne.from(l.node(N).copy(y));const C=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,x={...dc(f,l.node().type.name,l.node().attrs),...t},S=((a=s.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(x))||void 0;y=y.append(Ne.from(s.createAndFill(null,S)||void 0));const w=l.before(l.depth-(b-1));n.replace(w,l.after(-C),new Xe(y,4-b,0));let E=-1;n.doc.nodesBetween(w,n.doc.content.size,(N,O)=>{if(E>-1)return!1;N.isTextblock&&N.content.size===0&&(E=O+1)}),E>-1&&n.setSelection(vt.near(n.doc.resolve(E))),n.scrollIntoView()}return!0}const h=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,m={...dc(f,d.type.name,d.attrs),...t},v={...dc(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,c.pos);const g=h?[{type:s,attrs:m},{type:h,attrs:v}]:[{type:s,attrs:m}];if(!No(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},Qd=(e,t)=>{const n=vm(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&hi(e.doc,n.pos)&&e.join(n.pos),!0},Zd=(e,t)=>{const n=vm(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&hi(e.doc,r)&&e.join(r),!0},GI=(e,t,n,r={})=>({editor:o,tr:i,state:a,dispatch:s,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,h=Xn(e,a.schema),m=Xn(t,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=vm(w=>Qv(w.type.name,d))(v);if(C.depth>=1&&S&&C.depth-S.depth<=1){if(S.node.type===h)return c.liftListItem(m);if(Qv(S.node.type.name,d)&&h.validContent(S.node.content)&&s)return l().command(()=>(i.setNodeMarkup(S.pos,h),!0)).command(()=>Qd(i,h)).command(()=>Zd(i,h)).run()}return!n||!x||!s?l().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>Qd(i,h)).command(()=>Zd(i,h)).run():l().command(()=>{const w=u().wrapInList(h,r),E=x.filter(N=>f.includes(N.type.name));return i.ensureMarks(E),w?!0:c.clearNodes()}).wrapInList(h,r).command(()=>Qd(i,h)).command(()=>Zd(i,h)).run()},XI=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,a=mi(e,r.schema);return gh(r,a,t)?o.unsetMark(a,{extendEmptyMarkRange:i}):o.setMark(a,t)},YI=(e,t,n={})=>({state:r,commands:o})=>{const i=Xn(e,r.schema),a=Xn(t,r.schema),s=Fs(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})},JI=(e,t={})=>({state:n,commands:r})=>{const o=Xn(e,n.schema);return Fs(n,o,t)?r.lift(o):r.wrapIn(o,t)},QI=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){const a=e.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,e.schema.text(i.text,l))}else a.delete(i.from,i.to)}return!0}}return!1},ZI=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},eT=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:a=!1}=t,{selection:s}=n,l=mi(e,r.schema),{$from:c,empty:u,ranges:d}=s;if(!o)return!0;if(u&&a){let{from:f,to:h}=s;const m=(i=c.marks().find(g=>g.type===l))===null||i===void 0?void 0:i.attrs,v=gm(c,l,m);v&&(f=v.from,h=v.to),n.removeMark(f,h,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},tT=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=Xu(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(i=Xn(e,r.schema)),s==="mark"&&(a=mi(e,r.schema)),o&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;let d,f,h,m;n.selection.empty?r.doc.nodesBetween(c,u,(v,g)=>{i&&i===v.type&&(h=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&&(h=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,...t}),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,...t}))}}))}),f&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...f.attrs,...t}),a&&f.marks.length&&f.marks.forEach(v=>{a===v.type&&n.addMark(h,m,a.create({...v.attrs,...t}))}))}),!0):!1},nT=(e,t={})=>({state:n,dispatch:r})=>{const o=Xn(e,n.schema);return vR(o,t)(n,r)},rT=(e,t={})=>({state:n,dispatch:r})=>{const o=Xn(e,n.schema);return bR(o,t)(n,r)};var oT=Object.freeze({__proto__:null,blur:FR,clearContent:HR,clearNodes:VR,command:WR,createParagraphNear:qR,cut:UR,deleteCurrentNode:KR,deleteNode:GR,deleteRange:XR,deleteSelection:YR,enter:JR,exitCode:QR,extendMarkRange:ZR,first:eI,focus:tI,forEach:nI,insertContent:rI,insertContentAt:aI,joinBackward:cI,joinDown:lI,joinForward:uI,joinItemBackward:dI,joinItemForward:fI,joinTextblockBackward:hI,joinTextblockForward:pI,joinUp:sI,keyboardShortcut:gI,lift:vI,liftEmptyBlock:bI,liftListItem:yI,newlineInCode:CI,resetAttributes:SI,scrollIntoView:xI,selectAll:wI,selectNodeBackward:EI,selectNodeForward:$I,selectParentNode:OI,selectTextblockEnd:NI,selectTextblockStart:MI,setContent:RI,setMark:zI,setMeta:FI,setNode:HI,setNodeSelection:VI,setTextSelection:WI,sinkListItem:qI,splitBlock:UI,splitListItem:KI,toggleList:GI,toggleMark:XI,toggleNode:YI,toggleWrap:JI,undoInputRule:QI,unsetAllMarks:ZI,unsetMark:eT,updateAttributes:tT,wrapIn:nT,wrapInList:rT});const iT=nn.create({name:"commands",addCommands(){return{...oT}}}),aT=nn.create({name:"drop",addProseMirrorPlugins(){return[new Sn({key:new kn("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),sT=nn.create({name:"editable",addProseMirrorPlugins(){return[new Sn({key:new kn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),lT=nn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Sn({key:new kn("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),cT=nn.create({name:"keymap",addKeyboardShortcuts(){const e=()=>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:h}=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:bt.atStart(c).from===f;return!u||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),t=()=>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:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Gu()||tx()?i:o},addProseMirrorPlugins(){return[new Sn({key:new kn("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(v=>v.getMeta("composition")))return;const r=e.some(v=>v.docChanged)&&!t.doc.eq(n.doc),o=e.some(v=>v.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:a,to:s}=t.selection,l=bt.atStart(t.doc).from,c=bt.atEnd(t.doc).to;if(i||!(a===l&&s===c)||!Yu(n.doc))return;const f=n.tr,h=Wu({state:n,transaction:f}),{commands:m}=new qu({editor:this.editor,state:h});if(m.clearNodes(),!!f.steps.length)return f}})]}}),uT=nn.create({name:"paste",addProseMirrorPlugins(){return[new Sn({key:new kn("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),dT=nn.create({name:"tabindex",addProseMirrorPlugins(){return[new Sn({key:new kn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Ei{get name(){return this.node.type.name}constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,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 t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){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},t)}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 t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Ei(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Ei(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Ei(t,this.editor)}get children(){const t=[];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 Ei(s,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),t.push(new Ei(s,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)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(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,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===t&&i.every(l=>n[l]===a.node.attrs[l])&&o.push(a),!(r&&o.length>0)&&(o=o.concat(a.querySelectorAll(t,n,r))))}),o}setAttribute(t){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}}const fT=`.ProseMirror {
53
+ position: relative;
54
+ }
55
+
56
+ .ProseMirror {
57
+ word-wrap: break-word;
58
+ white-space: pre-wrap;
59
+ white-space: break-spaces;
60
+ -webkit-font-variant-ligatures: none;
61
+ font-variant-ligatures: none;
62
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
63
+ }
64
+
65
+ .ProseMirror [contenteditable="false"] {
66
+ white-space: normal;
67
+ }
68
+
69
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
70
+ white-space: pre-wrap;
71
+ }
72
+
73
+ .ProseMirror pre {
74
+ white-space: pre-wrap;
75
+ }
76
+
77
+ img.ProseMirror-separator {
78
+ display: inline !important;
79
+ border: none !important;
80
+ margin: 0 !important;
81
+ width: 0 !important;
82
+ height: 0 !important;
83
+ }
84
+
85
+ .ProseMirror-gapcursor {
86
+ display: none;
87
+ pointer-events: none;
88
+ position: absolute;
89
+ margin: 0;
90
+ }
91
+
92
+ .ProseMirror-gapcursor:after {
93
+ content: "";
94
+ display: block;
95
+ position: absolute;
96
+ top: -2px;
97
+ width: 20px;
98
+ border-top: 1px solid black;
99
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
100
+ }
101
+
102
+ @keyframes ProseMirror-cursor-blink {
103
+ to {
104
+ visibility: hidden;
105
+ }
106
+ }
107
+
108
+ .ProseMirror-hideselection *::selection {
109
+ background: transparent;
110
+ }
111
+
112
+ .ProseMirror-hideselection *::-moz-selection {
113
+ background: transparent;
114
+ }
115
+
116
+ .ProseMirror-hideselection * {
117
+ caret-color: transparent;
118
+ }
119
+
120
+ .ProseMirror-focused .ProseMirror-gapcursor {
121
+ display: block;
122
+ }
123
+
124
+ .tippy-box[data-animation=fade][data-state=hidden] {
125
+ opacity: 0
126
+ }`;function hT(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute("data-tiptap-style",""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}class pT extends $R{constructor(t={}){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(t),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=hT(fT,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),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(t,n){const r=KS(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(t){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(t).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 t,n;const o=[...this.options.enableCoreExtensions?[sT,zR.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),iT,lT,cT,dT,aT,uT].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 va(o,this)}createCommandManager(){this.commandManager=new qu({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let n;try{n=mh(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=mh(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=QS(n,this.options.autofocus);this.view=new XM(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:ga.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(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(a=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(a)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=t.getMeta("focus"),i=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return ox(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return jI(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return pm(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=`
127
+
128
+ `,textSerializers:r={}}=t||{};return AI(this.state.doc,{blockSeparator:n,textSerializers:{...XS(this.schema),...r}})}get isEmpty(){return Yu(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 t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new Ei(n,this)}get $doc(){return this.$pos(0)}}function qi(e){return new ll({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Rt(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,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(bm(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(v=>v===e.type&&v!==h.mark.type)).filter(h=>h.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,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function mT(e){return new ll({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Rt(e.getAttributes,void 0,r)||{},{tr:i}=t,a=n.from;let s=n.to;const l=e.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=e.type.isInline?a:a-1;i.insert(c,e.type.create(o)).delete(i.mapping.map(a),i.mapping.map(s))}i.scrollIntoView()}})}function vh(e){return new ll({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=Rt(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}function Rn(e){return new ll({find:e.find,handler:({state:t,range:n,match:r})=>{let o=e.replace,i=n.from;const a=n.to;if(r[1]){const s=r[0].lastIndexOf(r[1]);o+=r[0].slice(s+r[1].length),i+=s;const l=i-a;l>0&&(o=r[0].slice(s-l,s)+o,i=a)}t.tr.insertText(o,i,a)}})}function Aa(e){return new ll({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=Rt(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),c=l&&Yp(l,e.type,i);if(!c)return null;if(a.wrap(l,c),e.keepMarks&&e.editor){const{selection:d,storedMarks:f}=t,{splittableMarks:h}=e.editor.extensionManager,m=f||d.$to.parentOffset&&d.$from.marks();if(m){const v=m.filter(g=>h.includes(g.type.name));a.ensureMarks(v)}}if(e.keepAttributes){const d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}const u=a.doc.resolve(n.from-1).nodeBefore;u&&u.type===e.type&&hi(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,u))&&a.join(n.from-1)}})}class wn{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.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=Rt(ut(this,"addOptions",{name:this.name}))),this.storage=Rt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new wn(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>Ku(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new wn(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Rt(ut(n,"addOptions",{name:n.name})),n.storage=Rt(ut(n,"addStorage",{name:n.name,options:n.options})),n}}class gT{constructor(t,n,r){this.isDragging=!1,this.component=t,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(t){var n,r,o,i,a,s,l;const{view:c}=this.editor,u=t.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,h=0;if(this.dom!==d){const y=this.dom.getBoundingClientRect(),b=d.getBoundingClientRect(),C=(o=t.offsetX)!==null&&o!==void 0?o:(i=t.nativeEvent)===null||i===void 0?void 0:i.offsetX,x=(a=t.offsetY)!==null&&a!==void 0?a:(s=t.nativeEvent)===null||s===void 0?void 0:s.offsetY;f=b.x-y.x+C,h=b.y-y.y+x}(l=t.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,f,h);const m=this.getPos();if(typeof m!="number")return;const v=gt.create(c.state.doc,m),g=c.state.tr.setSelection(v);c.dispatch(g)}stopEvent(t){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=t.type.startsWith("drag"),a=t.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=gt.isSelectable(this.node),f=t.type==="copy",h=t.type==="paste",m=t.type==="cut",v=t.type==="mousedown";if(!u&&d&&i&&t.target===this.dom&&t.preventDefault(),u&&i&&!c&&t.target===this.dom)return t.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||h||m||v&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(Gu()||ZS())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const n=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:n})}}function ci(e){return new kR({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=Rt(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:a}=t,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(bm(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(g=>g===e.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,e.type.create(i||{})),a.removeStoredMark(e.type)}}})}function vT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bh={exports:{}},ef={};/**
129
+ * @license React
130
+ * use-sync-external-store-shim.production.min.js
131
+ *
132
+ * Copyright (c) Facebook, Inc. and its affiliates.
133
+ *
134
+ * This source code is licensed under the MIT license found in the
135
+ * LICENSE file in the root directory of this source tree.
136
+ */var eb;function bT(){if(eb)return ef;eb=1;var e=$;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var h=f(),m=r({inst:{value:h,getSnapshot:f}}),v=m[0].inst,g=m[1];return i(function(){v.value=h,v.getSnapshot=f,l(v)&&g({inst:v})},[d,h,f]),o(function(){return l(v)&&g({inst:v}),d(function(){l(v)&&g({inst:v})})},[d]),a(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}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 ef.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,ef}var tf={};/**
137
+ * @license React
138
+ * use-sync-external-store-shim.development.js
139
+ *
140
+ * Copyright (c) Facebook, Inc. and its affiliates.
141
+ *
142
+ * This source code is licensed under the MIT license found in the
143
+ * LICENSE file in the root directory of this source tree.
144
+ */var tb;function yT(){return tb||(tb=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 e=$,t=e.__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=t.ReactDebugCurrentFrame,E=w.getStackAddendum();E!==""&&(x+="%s",S=S.concat([E]));var N=S.map(function(O){return String(O)});N.unshift("Warning: "+x),Function.prototype.apply.call(console[C],console,N)}}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=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(C,x,S){u||e.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 N=a({inst:{value:w,getSnapshot:x}}),O=N[0].inst,M=N[1];return l(function(){O.value=w,O.getSnapshot=x,h(O)&&M({inst:O})},[C,w,x]),s(function(){h(O)&&M({inst:O});var I=function(){h(O)&&M({inst:O})};return C(I)},[C]),c(w),w}function h(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=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;tf.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),tf}process.env.NODE_ENV==="production"?bh.exports=bT():bh.exports=yT();var Ju=bh.exports;const CT=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},ST=({contentComponent:e})=>{const t=Ju.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return $.createElement($.Fragment,null,Object.values(t))};function xT(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:kr.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(o=>o())}}}class wT extends $.Component{constructor(t){var n;super(t),this.editorContentRef=$.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=t.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=xT(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,innerRef:n,...r}=this.props;return $.createElement($.Fragment,null,$.createElement("div",{ref:CT(n,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&$.createElement(ST,{contentComponent:t.contentComponent}))}}const ET=$.forwardRef((e,t)=>{const n=$.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return $.createElement(wT,{key:n,innerRef:t,...e})}),$T=$.memo(ET);var OT=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),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"&&t.$$typeof)&&!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n},NT=vT(OT),yh={exports:{}},nf={};/**
145
+ * @license React
146
+ * use-sync-external-store-shim/with-selector.production.min.js
147
+ *
148
+ * Copyright (c) Facebook, Inc. and its affiliates.
149
+ *
150
+ * This source code is licensed under the MIT license found in the
151
+ * LICENSE file in the root directory of this source tree.
152
+ */var nb;function MT(){if(nb)return nf;nb=1;var e=$,t=Ju;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=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return nf.useSyncExternalStoreWithSelector=function(c,u,d,f,h){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),h!==void 0&&v.hasValue){var E=v.value;if(h(E,w))return x=E}return x=w}if(E=x,r(C,w))return E;var N=f(w);return h!==void 0&&h(E,N)?E:(C=w,x=N)}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,h]);var g=o(c,m[0],m[1]);return a(function(){v.hasValue=!0,v.value=g},[g]),l(g),g},nf}var rf={};/**
153
+ * @license React
154
+ * use-sync-external-store-shim/with-selector.development.js
155
+ *
156
+ * Copyright (c) Facebook, Inc. and its affiliates.
157
+ *
158
+ * This source code is licensed under the MIT license found in the
159
+ * LICENSE file in the root directory of this source tree.
160
+ */var rb;function RT(){return rb||(rb=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 e=$,t=Ju;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=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,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,N=function(k){if(!S){S=!0,w=k;var D=h(k);if(m!==void 0&&g.hasValue){var A=g.value;if(m(A,D))return E=A,A}return E=D,D}var L=w,T=E;if(r(L,k))return T;var R=h(k);return m!==void 0&&m(T,R)?T:(w=k,E=R,R)},O=f===void 0?null:f,M=function(){return N(d())},I=O===null?void 0:function(){return N(O())};return[M,I]},[d,f,h,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}rf.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),rf}process.env.NODE_ENV==="production"?yh.exports=MT():yh.exports=RT();var IT=yh.exports;const TT=typeof window<"u"?$.useLayoutEffect:$.useEffect;class PT{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,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(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,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 AT(e){var t;const[n]=$.useState(()=>new PT(e.editor)),r=IT.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!==null&&t!==void 0?t:NT);return TT(()=>n.watch(e.editor),[e.editor,n]),$.useDebugValue(r),r}const ob=process.env.NODE_ENV!=="production",Ch=typeof window>"u",kT=Ch||!!(typeof window<"u"&&window.next);class ym{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,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(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return Ch||kT?(ob&&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&&Ch&&ob)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 t={...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 pT(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,i)=>{var a;return o===((a=n.extensions)===null||a===void 0?void 0:a[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?ym.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}}function DT(e={},t=[]){const n=$.useRef(e);n.current=e;const[r]=$.useState(()=>new ym(n)),o=Ju.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return $.useDebugValue(o),$.useEffect(r.onRender(t)),AT({editor:o,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1?null:e.immediatelyRender&&i===0?0:i+1}),o}const _T=$.createContext({editor:null});_T.Consumer;const ax=$.createContext({onDragStart:void 0}),sx=()=>$.useContext(ax),LT=e=>{const t=e.as||"div",{nodeViewContentRef:n}=sx();return $.createElement(t,{...e,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...e.style}})},Cm=$.forwardRef((e,t)=>{const{onDragStart:n}=sx(),r=e.as||"div";return $.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function jT(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function BT(e){var t;return typeof e=="object"&&((t=e.$$typeof)===null||t===void 0?void 0:t.toString())==="Symbol(react.forward_ref)"}class zT{constructor(t,{editor:n,props:r={},as:o="div",className:i=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,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?kr.flushSync(()=>{this.render()}):this.render()}render(){var t;const n=this.component,r=this.props,o=this.editor;(jT(n)||BT(n))&&(r.ref=i=>{this.ref=i}),this.reactElement=$.createElement(n,{...r}),(t=o==null?void 0:o.contentComponent)===null||t===void 0||t.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t;const n=this.editor;(t=n==null?void 0:n.contentComponent)===null||t===void 0||t.removeRenderer(this.id)}updateAttributes(t){Object.keys(t).forEach(n=>{this.element.setAttribute(n,t[n])})}}class FT extends gT{mount(){const t={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=$.memo(c=>$.createElement(ax.Provider,{value:o},$.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 zT(a,{editor:this.editor,props:t,as:s,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var t;if(this.renderer.element.firstElementChild&&!(!((t=this.renderer.element.firstElementChild)===null||t===void 0)&&t.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:t,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(t<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,n,r){const o=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(t.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=t,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:a,newNode:t,newDecorations:n,oldInnerDecorations:s,innerDecorations:r,updateProps:()=>o({node:t,decorations:n,innerDecorations:r})})}return t===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=t,this.decorations=n,this.innerDecorations=r,o({node:t,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 t={};if(typeof this.options.attrs=="function"){const n=this.editor.extensionManager.attributes,r=Hc(this.node,n);t=this.options.attrs({node:this.node,HTMLAttributes:r})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}}function Sm(e,t){return n=>n.editor.contentComponent?new FT(e,n,t):{}}function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(null,arguments)}function lt(e){"@babel/helpers - typeof";return lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(e)}var HT=Symbol.for("react.element"),VT=Symbol.for("react.transitional.element"),WT=Symbol.for("react.fragment");function lx(e){return e&&lt(e)==="object"&&(e.$$typeof===HT||e.$$typeof===VT)&&e.type===WT}function wr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return $.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(wr(r)):lx(r)&&r.props?n=n.concat(wr(r.props.children,t)):n.push(r))}),n}var Sh={},xm=[],qT=function(t){xm.push(t)};function fo(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var n=xm.reduce(function(r,o){return o(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function UT(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var n=xm.reduce(function(r,o){return o(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function cx(){Sh={}}function ux(e,t,n){!t&&!Sh[n]&&(e(!1,n),Sh[n]=!0)}function Ct(e,t){ux(fo,e,t)}function xh(e,t){ux(UT,e,t)}Ct.preMessage=qT;Ct.resetWarned=cx;Ct.noteOnce=xh;function KT(e,t){if(lt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dx(e){var t=KT(e,"string");return lt(t)=="symbol"?t:t+""}function q(e,t,n){return(t=dx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ib(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ib(Object(n),!0).forEach(function(r){q(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ib(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hs(e){return e instanceof HTMLElement||e instanceof SVGElement}function GT(e){return e&&lt(e)==="object"&&Hs(e.nativeElement)?e.nativeElement:Hs(e)?e:null}function fc(e){var t=GT(e);if(t)return t;if(e instanceof $.Component){var n;return(n=kr.findDOMNode)===null||n===void 0?void 0:n.call(kr,e)}return null}var Hl={exports:{}},Xt={};/**
161
+ * @license React
162
+ * react-is.production.min.js
163
+ *
164
+ * Copyright (c) Facebook, Inc. and its affiliates.
165
+ *
166
+ * This source code is licensed under the MIT license found in the
167
+ * LICENSE file in the root directory of this source tree.
168
+ */var ab;function XT(){if(ab)return Xt;ab=1;var e=Symbol.for("react.element"),t=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"),h=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 e: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 t:return y}}}return Xt.ContextConsumer=a,Xt.ContextProvider=i,Xt.Element=e,Xt.ForwardRef=l,Xt.Fragment=n,Xt.Lazy=f,Xt.Memo=d,Xt.Portal=t,Xt.Profiler=o,Xt.StrictMode=r,Xt.Suspense=c,Xt.SuspenseList=u,Xt.isAsyncMode=function(){return!1},Xt.isConcurrentMode=function(){return!1},Xt.isContextConsumer=function(g){return v(g)===a},Xt.isContextProvider=function(g){return v(g)===i},Xt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Xt.isForwardRef=function(g){return v(g)===l},Xt.isFragment=function(g){return v(g)===n},Xt.isLazy=function(g){return v(g)===f},Xt.isMemo=function(g){return v(g)===d},Xt.isPortal=function(g){return v(g)===t},Xt.isProfiler=function(g){return v(g)===o},Xt.isStrictMode=function(g){return v(g)===r},Xt.isSuspense=function(g){return v(g)===c},Xt.isSuspenseList=function(g){return v(g)===u},Xt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===o||g===r||g===c||g===u||g===h||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)},Xt.typeOf=v,Xt}var Yt={};/**
169
+ * @license React
170
+ * react-is.development.js
171
+ *
172
+ * Copyright (c) Facebook, Inc. and its affiliates.
173
+ *
174
+ * This source code is licensed under the MIT license found in the
175
+ * LICENSE file in the root directory of this source tree.
176
+ */var sb;function YT(){return sb||(sb=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=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"),h=Symbol.for("react.offscreen"),m=!1,v=!1,g=!1,y=!1,b=!1,C;C=Symbol.for("react.module.reference");function x(re){return!!(typeof re=="string"||typeof re=="function"||re===n||re===o||b||re===r||re===c||re===u||y||re===h||m||v||g||typeof re=="object"&&re!==null&&(re.$$typeof===f||re.$$typeof===d||re.$$typeof===i||re.$$typeof===a||re.$$typeof===l||re.$$typeof===C||re.getModuleId!==void 0))}function S(re){if(typeof re=="object"&&re!==null){var ce=re.$$typeof;switch(ce){case e:var he=re.type;switch(he){case n:case o:case r:case c:case u:return he;default:var Ee=he&&he.$$typeof;switch(Ee){case s:case a:case l:case f:case d:case i:return Ee;default:return ce}}case t:return ce}}}var w=a,E=i,N=e,O=l,M=n,I=f,k=d,D=t,A=o,L=r,T=c,R=u,_=!1,V=!1;function F(re){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(re){return V||(V=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function K(re){return S(re)===a}function J(re){return S(re)===i}function H(re){return typeof re=="object"&&re!==null&&re.$$typeof===e}function X(re){return S(re)===l}function Y(re){return S(re)===n}function le(re){return S(re)===f}function Q(re){return S(re)===d}function fe(re){return S(re)===t}function ye(re){return S(re)===o}function ue(re){return S(re)===r}function ie(re){return S(re)===c}function me(re){return S(re)===u}Yt.ContextConsumer=w,Yt.ContextProvider=E,Yt.Element=N,Yt.ForwardRef=O,Yt.Fragment=M,Yt.Lazy=I,Yt.Memo=k,Yt.Portal=D,Yt.Profiler=A,Yt.StrictMode=L,Yt.Suspense=T,Yt.SuspenseList=R,Yt.isAsyncMode=F,Yt.isConcurrentMode=W,Yt.isContextConsumer=K,Yt.isContextProvider=J,Yt.isElement=H,Yt.isForwardRef=X,Yt.isFragment=Y,Yt.isLazy=le,Yt.isMemo=Q,Yt.isPortal=fe,Yt.isProfiler=ye,Yt.isStrictMode=ue,Yt.isSuspense=ie,Yt.isSuspenseList=me,Yt.isValidElementType=x,Yt.typeOf=S}()),Yt}var lb;function JT(){return lb||(lb=1,process.env.NODE_ENV==="production"?Hl.exports=XT():Hl.exports=YT()),Hl.exports}var of=JT();function cl(e,t,n){var r=p.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var QT=Number($.version.split(".")[0]),wm=function(t,n){typeof t=="function"?t(n):lt(t)==="object"&&t&&"current"in t&&(t.current=n)},dr=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.filter(Boolean);return o.length<=1?o[0]:function(i){n.forEach(function(a){wm(a,i)})}},gi=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return cl(function(){return dr.apply(void 0,n)},n,function(o,i){return o.length!==i.length||o.every(function(a,s){return a!==i[s]})})},vi=function(t){var n,r;if(!t)return!1;if(Em(t)&&QT>=19)return!0;var o=of.isMemo(t)?t.type.type:t.type;return!(typeof o=="function"&&!((n=o.prototype)!==null&&n!==void 0&&n.render)&&o.$$typeof!==of.ForwardRef||typeof t=="function"&&!((r=t.prototype)!==null&&r!==void 0&&r.render)&&t.$$typeof!==of.ForwardRef)};function Em(e){return $.isValidElement(e)&&!lx(e)}var ZT=function(t){return Em(t)&&vi(t)},Ji=function(t){if(t&&Em(t)){var n=t;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},wh=p.createContext(null);function eP(e){var t=e.children,n=e.onBatchResize,r=p.useRef(0),o=p.useRef([]),i=p.useContext(wh),a=p.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 p.createElement(wh.Provider,{value:a},t)}var fx=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(o,i){return o[0]===n?(r=i,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},t.prototype.set=function(n,r){var o=e(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,o=e(r,n);~o&&r.splice(o,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.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])}},t}()}(),Eh=typeof window<"u"&&typeof document<"u"&&window.document===document,qc=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")()}(),tP=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(qc):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),nP=2;function rP(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&s()}function a(){tP(i)}function s(){var l=Date.now();if(n){if(l-o<nP)return;r=!0}else n=!0,r=!1,setTimeout(a,t);o=l}return s}var oP=20,iP=["top","right","bottom","left","width","height","size","weight"],aP=typeof MutationObserver<"u",sP=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=rP(this.refresh.bind(this),oP)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Eh||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),aP?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Eh||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,o=iP.some(function(i){return!!~r.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),hx=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},ka=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||qc},px=Qu(0,0,0,0);function Uc(e){return parseFloat(e)||0}function cb(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,o){var i=e["border-"+o+"-width"];return r+Uc(i)},0)}function lP(e){for(var t=["top","right","bottom","left"],n={},r=0,o=t;r<o.length;r++){var i=o[r],a=e["padding-"+i];n[i]=Uc(a)}return n}function cP(e){var t=e.getBBox();return Qu(0,0,t.width,t.height)}function uP(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return px;var r=ka(e).getComputedStyle(e),o=lP(r),i=o.left+o.right,a=o.top+o.bottom,s=Uc(r.width),l=Uc(r.height);if(r.boxSizing==="border-box"&&(Math.round(s+i)!==t&&(s-=cb(r,"left","right")+i),Math.round(l+a)!==n&&(l-=cb(r,"top","bottom")+a)),!fP(e)){var c=Math.round(s+i)-t,u=Math.round(l+a)-n;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return Qu(o.left,o.top,s,l)}var dP=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof ka(e).SVGGraphicsElement}:function(e){return e instanceof ka(e).SVGElement&&typeof e.getBBox=="function"}}();function fP(e){return e===ka(e).document.documentElement}function hP(e){return Eh?dP(e)?cP(e):uP(e):px}function pP(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(i.prototype);return hx(a,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),a}function Qu(e,t,n,r){return{x:e,y:t,width:n,height:r}}var mP=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Qu(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=hP(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),gP=function(){function e(t,n){var r=pP(n);hx(this,{target:t,contentRect:r})}return e}(),vP=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new fx,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ka(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new mP(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof ka(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new gP(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),mx=typeof WeakMap<"u"?new WeakMap:new fx,gx=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=sP.getInstance(),r=new vP(t,n,this);mx.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){gx.prototype[e]=function(){var t;return(t=mx.get(this))[e].apply(t,arguments)}});var bP=function(){return typeof qc.ResizeObserver<"u"?qc.ResizeObserver:gx}(),Oo=new Map;function vx(e){e.forEach(function(t){var n,r=t.target;(n=Oo.get(r))===null||n===void 0||n.forEach(function(o){return o(r)})})}var bx=new bP(vx);process.env.NODE_ENV;process.env.NODE_ENV;function yP(e,t){Oo.has(e)||(Oo.set(e,new Set),bx.observe(e)),Oo.get(e).add(t)}function CP(e,t){Oo.has(e)&&(Oo.get(e).delete(t),Oo.get(e).size||(bx.unobserve(e),Oo.delete(e)))}function In(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ub(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dx(r.key),r)}}function Tn(e,t,n){return t&&ub(e.prototype,t),n&&ub(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vs(e,t){return Vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Vs(e,t)}function Po(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vs(e,t)}function Ws(e){return Ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ws(e)}function $m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($m=function(){return!!e})()}function kt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SP(e,t){if(t&&(lt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kt(e)}function Ao(e){var t=$m();return function(){var n,r=Ws(e);if(t){var o=Ws(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return SP(this,n)}}var xP=function(e){Po(n,e);var t=Ao(n);function n(){return In(this,n),t.apply(this,arguments)}return Tn(n,[{key:"render",value:function(){return this.props.children}}]),n}(p.Component);function wP(e,t){var n=e.children,r=e.disabled,o=p.useRef(null),i=p.useRef(null),a=p.useContext(wh),s=typeof n=="function",l=s?n(o):n,c=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&p.isValidElement(l)&&vi(l),d=u?Ji(l):null,f=gi(d,o),h=function(){var y;return fc(o.current)||(o.current&&lt(o.current)==="object"?fc((y=o.current)===null||y===void 0?void 0:y.nativeElement):null)||fc(i.current)};p.useImperativeHandle(t,function(){return h()});var m=p.useRef(e);m.current=e;var v=p.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,N=g.offsetHeight,O=Math.floor(S),M=Math.floor(w);if(c.current.width!==O||c.current.height!==M||c.current.offsetWidth!==E||c.current.offsetHeight!==N){var I={width:O,height:M,offsetWidth:E,offsetHeight:N};c.current=I;var k=E===Math.round(S)?S:E,D=N===Math.round(w)?w:N,A=U(U({},I),{},{offsetWidth:k,offsetHeight:D});a==null||a(A,g,C),b&&Promise.resolve().then(function(){b(A,g)})}},[]);return p.useEffect(function(){var g=h();return g&&!r&&yP(g,v),function(){return CP(g,v)}},[o.current,r]),p.createElement(xP,{ref:i},u?p.cloneElement(l,{ref:f}):l)}var yx=p.forwardRef(wP);process.env.NODE_ENV!=="production"&&(yx.displayName="SingleObserver");var EP="rc-observer-key";function $P(e,t){var n=e.children,r=typeof n=="function"?[n]:wr(n);return process.env.NODE_ENV!=="production"&&(r.length>1?fo(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&fo(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(o,i){var a=(o==null?void 0:o.key)||"".concat(EP,"-").concat(i);return p.createElement(yx,De({},e,{key:a,ref:i===0?t:void 0}),o)})}var ko=p.forwardRef($P);process.env.NODE_ENV!=="production"&&(ko.displayName="ResizeObserver");ko.Collection=eP;function $h(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function OP(e){if(Array.isArray(e))return $h(e)}function Cx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Om(e,t){if(e){if(typeof e=="string")return $h(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$h(e,t):void 0}}function NP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
177
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ie(e){return OP(e)||Cx(e)||Om(e)||NP()}var Sx=function(t){return+setTimeout(t,16)},xx=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(Sx=function(t){return window.requestAnimationFrame(t)},xx=function(t){return window.cancelAnimationFrame(t)});var db=0,Zu=new Map;function wx(e){Zu.delete(e)}var Dt=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;db+=1;var r=db;function o(i){if(i===0)wx(r),t();else{var a=Sx(function(){o(i-1)});Zu.set(r,a)}}return o(n),r};Dt.cancel=function(e){var t=Zu.get(e);return wx(e),xx(t)};process.env.NODE_ENV!=="production"&&(Dt.ids=function(){return Zu});function Ex(e){if(Array.isArray(e))return e}function MP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);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 $x(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
178
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ae(e,t){return Ex(e)||MP(e,t)||Om(e,t)||$x()}function qs(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function rr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Oh(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var fb="data-rc-order",hb="data-rc-priority",RP="rc-util-key",Nh=new Map;function Ox(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):RP}function ed(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function IP(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Nm(e){return Array.from((Nh.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Nx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!rr())return null;var n=t.csp,r=t.prepend,o=t.priority,i=o===void 0?0:o,a=IP(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(fb,a),s&&i&&l.setAttribute(hb,"".concat(i)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=e;var c=ed(t),u=c.firstChild;if(r){if(s){var d=(t.styles||Nm(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(fb)))return!1;var h=Number(f.getAttribute(hb)||0);return i>=h});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function Mx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ed(t);return(t.styles||Nm(n)).find(function(r){return r.getAttribute(Ox(t))===e})}function Us(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Mx(e,t);if(n){var r=ed(t);r.removeChild(n)}}function TP(e,t){var n=Nh.get(e);if(!n||!Oh(document,n)){var r=Nx("",t),o=r.parentNode;Nh.set(e,o),e.removeChild(r)}}function Ro(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=ed(n),o=Nm(r),i=U(U({},n),{},{styles:o});TP(r,i);var a=Mx(t,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!==e&&(a.innerHTML=e),a}var u=Nx(e,i);return u.setAttribute(Ox(i),t),u}function PP(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wt(e,t){if(e==null)return{};var n,r,o=PP(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Da(e,t){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(Ct(!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&&lt(i)==="object"&&lt(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(e,t)}var AP="%";function Mh(e){return e.join(AP)}var kP=function(){function e(t){In(this,e),q(this,"instanceId",void 0),q(this,"cache",new Map),this.instanceId=t}return Tn(e,[{key:"get",value:function(n){return this.opGet(Mh(n))}},{key:"opGet",value:function(n){return this.cache.get(n)||null}},{key:"update",value:function(n,r){return this.opUpdate(Mh(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)}}]),e}(),_a="data-token-hash",qr="data-css-hash",DP="data-cache-path",ei="__cssinjs_instance__";function _P(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(qr,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(o){o[ei]=o[ei]||e,o[ei]===e&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(qr,"]"))).forEach(function(o){var i=o.getAttribute(qr);if(r[i]){if(o[ei]===e){var a;(a=o.parentNode)===null||a===void 0||a.removeChild(o)}}else r[i]=!0})}return new kP(e)}var ul=p.createContext({hashPriority:"low",cache:_P(),defaultCache:!0});function LP(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Mm=function(){function e(){In(this,e),q(this,"cache",void 0),q(this,"keys",void 0),q(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Tn(e,[{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>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(c,u){var d=ae(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),a=ae(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!LP(r,n)}),this.deleteByPath(this.cache,n)}}]),e}();q(Mm,"MAX_CACHE_SIZE",20);q(Mm,"MAX_CACHE_OFFSET",5);var pb=0,Rx=function(){function e(t){In(this,e),q(this,"derivatives",void 0),q(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=pb,t.length===0&&fo(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),pb+=1}return Tn(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),e}(),af=new Mm;function Rh(e){var t=Array.isArray(e)?e:[e];return af.has(t)||af.set(t,new Rx(t)),af.get(t)}var jP=new WeakMap,sf={};function BP(e,t){for(var n=jP,r=0;r<t.length;r+=1){var o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(sf)||n.set(sf,e()),n.get(sf)}var mb=new WeakMap;function ws(e){var t=mb.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof Rx?t+=r.id:r&&lt(r)==="object"?t+=ws(r):t+=r}),t=qs(t),mb.set(e,t)),t}function gb(e,t){return qs("".concat(t,"_").concat(ws(e)))}var Ih=rr();function ne(e){return typeof e=="number"?"".concat(e,"px"):e}function Kc(e,t,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 e;var a=U(U({},o),{},(r={},q(r,_a,t),q(r,qr,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(e,"</style>")}var hc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(t).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()},zP=function(t,n,r){return Object.keys(t).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(t).map(function(o){var i=ae(o,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},Ix=function(t,n,r){var o={},i={};return Object.entries(t).forEach(function(a){var s,l,c=ae(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,h=hc(u,r==null?void 0:r.prefix);o[h]=typeof d=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),i[u]="var(".concat(h,")")}}),[i,zP(o,n,{scope:r==null?void 0:r.scope})]},vb=process.env.NODE_ENV!=="test"&&rr()?p.useLayoutEffect:p.useEffect,en=function(t,n){var r=p.useRef(!0);vb(function(){return t(r.current)},n),vb(function(){return r.current=!1,function(){r.current=!0}},[])},Es=function(t,n){en(function(r){if(!r)return t()},n)},FP=U({},p),bb=FP.useInsertionEffect,HP=function(t,n,r){p.useMemo(t,r),en(function(){return n(!0)},r)},VP=bb?function(e,t,n){return bb(function(){return e(),t()},n)}:HP,WP=U({},p),qP=WP.useInsertionEffect,UP=function(t){var n=[],r=!1;function o(i){if(r){process.env.NODE_ENV!=="production"&&fo(!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 p.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(i){return i()})}},t),o},KP=function(){return function(t){t()}},GP=typeof qP<"u"?UP:KP;function XP(){return!1}var Th=!1;function YP(){return Th}const JP=process.env.NODE_ENV==="production"?XP:YP;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){var Vl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(Vl&&typeof Vl.webpackHotUpdate=="function"){var QP=Vl.webpackHotUpdate;Vl.webpackHotUpdate=function(){return Th=!0,setTimeout(function(){Th=!1},0),QP.apply(void 0,arguments)}}}function Rm(e,t,n,r,o){var i=p.useContext(ul),a=i.cache,s=[e].concat(Ie(t)),l=Mh(s),c=GP([l]),u=JP(),d=function(v){a.opUpdate(l,function(g){var y=g||[void 0,void 0],b=ae(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(),N=[x,E];return v?v(N):N})};p.useMemo(function(){d()},[l]);var f=a.opGet(l);process.env.NODE_ENV!=="production"&&!f&&(d(),f=a.opGet(l));var h=f[1];return VP(function(){o==null||o(h)},function(m){return d(function(v){var g=ae(v,2),y=g[0],b=g[1];return m&&y===0&&(o==null||o(h)),[y+1,b]}),function(){a.opUpdate(l,function(v){var g=v||[],y=ae(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]),h}var ZP={},e2=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",$i=new Map;function t2(e){$i.set(e,($i.get(e)||0)+1)}function n2(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(_a,'="').concat(e,'"]'));n.forEach(function(r){if(r[ei]===t){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var r2=0;function o2(e,t){$i.set(e,($i.get(e)||0)-1);var n=Array.from($i.keys()),r=n.filter(function(o){var i=$i.get(o)||0;return i<=0});n.length-r.length>r2&&r.forEach(function(o){n2(o,t),$i.delete(o)})}var i2=function(t,n,r,o){var i=r.getDerivativeToken(t),a=U(U({},i),n);return o&&(a=o(a)),a},Tx="token";function a2(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=$.useContext(ul),o=r.cache.instanceId,i=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?ZP:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,h=BP(function(){return Object.assign.apply(Object,[{}].concat(Ie(t)))},t),m=ws(h),v=ws(c),g=f?ws(f):"",y=Rm(Tx,[s,e.id,m,v,g],function(){var b,C=d?d(h,c,e):i2(h,c,e,u),x=U({},C),S="";if(f){var w=Ix(C,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),E=ae(w,2);C=E[0],S=E[1]}var N=gb(C,s);C._tokenKey=N,x._tokenKey=gb(x,s);var O=(b=f==null?void 0:f.key)!==null&&b!==void 0?b:N;C._themeKey=O,t2(O);var M="".concat(e2,"-").concat(qs(N));return C._hashId=M,[C,M,x,S,(f==null?void 0:f.key)||""]},function(b){o2(b[0]._themeKey,o)},function(b){var C=ae(b,4),x=C[0],S=C[3];if(f&&S){var w=Ro(S,qs("css-variables-".concat(x._themeKey)),{mark:qr,prepend:"queue",attachTo:i,priority:-999});w[ei]=o,w.setAttribute(_a,x._themeKey)}});return y}var s2=function(t,n,r){var o=ae(t,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)},h=Kc(a,s,u,f,c);return[d,u,h]},l2={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},Px="comm",Ax="rule",kx="decl",c2="@import",u2="@namespace",d2="@keyframes",f2="@layer",Dx=Math.abs,Im=String.fromCharCode;function _x(e){return e.trim()}function pc(e,t,n){return e.replace(t,n)}function h2(e,t,n){return e.indexOf(t,n)}function Ea(e,t){return e.charCodeAt(t)|0}function La(e,t,n){return e.slice(t,n)}function io(e){return e.length}function p2(e){return e.length}function Wl(e,t){return t.push(e),e}var td=1,ja=1,Lx=0,Dr=0,Dn=0,Ua="";function Tm(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:td,column:ja,length:a,return:"",siblings:s}}function m2(){return Dn}function g2(){return Dn=Dr>0?Ea(Ua,--Dr):0,ja--,Dn===10&&(ja=1,td--),Dn}function Ur(){return Dn=Dr<Lx?Ea(Ua,Dr++):0,ja++,Dn===10&&(ja=1,td++),Dn}function ti(){return Ea(Ua,Dr)}function mc(){return Dr}function nd(e,t){return La(Ua,e,t)}function Ks(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function v2(e){return td=ja=1,Lx=io(Ua=e),Dr=0,[]}function b2(e){return Ua="",e}function lf(e){return _x(nd(Dr-1,Ph(e===91?e+2:e===40?e+1:e)))}function y2(e){for(;(Dn=ti())&&Dn<33;)Ur();return Ks(e)>2||Ks(Dn)>3?"":" "}function C2(e,t){for(;--t&&Ur()&&!(Dn<48||Dn>102||Dn>57&&Dn<65||Dn>70&&Dn<97););return nd(e,mc()+(t<6&&ti()==32&&Ur()==32))}function Ph(e){for(;Ur();)switch(Dn){case e:return Dr;case 34:case 39:e!==34&&e!==39&&Ph(Dn);break;case 40:e===41&&Ph(e);break;case 92:Ur();break}return Dr}function S2(e,t){for(;Ur()&&e+Dn!==57;)if(e+Dn===84&&ti()===47)break;return"/*"+nd(t,Dr-1)+"*"+Im(e===47?e:Ur())}function x2(e){for(;!Ks(ti());)Ur();return nd(e,Dr)}function w2(e){return b2(gc("",null,null,null,[""],e=v2(e),0,[0],e))}function gc(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,h=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=Ur()){case 40:if(m!=108&&Ea(E,d-1)==58){h2(E+=pc(lf(b),"&","&\f"),"&\f",Dx(c?s[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:E+=lf(b);break;case 9:case 10:case 13:case 32:E+=y2(m);break;case 92:E+=C2(mc()-1,7);continue;case 47:switch(ti()){case 42:case 47:Wl(E2(S2(Ur(),mc()),t,n,l),l),(Ks(m||1)==5||Ks(ti()||1)==5)&&io(E)&&La(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*v:s[c++]=io(E)*y;case 125*v:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:y==-1&&(E=pc(E,/\f/g,"")),h>0&&(io(E)-d||v===0&&m===47)&&Wl(h>32?Cb(E+";",r,n,d-1,l):Cb(pc(E," ","")+";",r,n,d-2,l),l);break;case 59:E+=";";default:if(Wl(w=yb(E,t,n,c,u,o,s,C,x=[],S=[],d,i),i),b===123)if(u===0)gc(E,t,w,w,x,i,d,s,S);else{switch(f){case 99:if(Ea(E,3)===110)break;case 108:if(Ea(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?gc(e,w,w,r&&Wl(yb(e,w,w,0,0,o,s,C,o,x=[],d,S),S),o,S,d,s,r?x:S):gc(E,w,w,w,[""],S,0,s,S)}}c=u=h=0,v=y=1,C=E="",d=a;break;case 58:d=1+io(E),h=m;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&g2()==125)continue}switch(E+=Im(b),b*v){case 38:y=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(io(E)-1)*y,y=1;break;case 64:ti()===45&&(E+=lf(Ur())),f=ti(),u=d=io(C=E+=x2(mc())),b++;break;case 45:m===45&&io(E)==2&&(v=0)}}return i}function yb(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,h=o===0?i:[""],m=p2(h),v=0,g=0,y=0;v<r;++v)for(var b=0,C=La(e,f+1,f=Dx(g=a[v])),x=e;b<m;++b)(x=_x(g>0?h[b]+" "+C:pc(C,/&\f/g,h[b])))&&(l[y++]=x);return Tm(e,t,n,o===0?Ax:s,l,c,u,d)}function E2(e,t,n,r){return Tm(e,t,n,Px,Im(m2()),La(e,2,-2),0,r)}function Cb(e,t,n,r,o){return Tm(e,t,n,kx,La(e,0,r),La(e,r+1,-1),r,o)}function Ah(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function $2(e,t,n,r){switch(e.type){case f2:if(e.children.length)break;case c2:case u2:case kx:return e.return=e.return||e.value;case Px:return"";case d2:return e.return=e.value+"{"+Ah(e.children,r)+"}";case Ax:if(!io(e.value=e.props.join(",")))return""}return io(n=Ah(e.children,r))?e.return=e.value+"{"+n+"}":""}function jx(e,t){var n=t.path,r=t.parentSelectors;Ct(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(e).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var O2=function(t,n,r){if(t==="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)!=="'"))&&jx("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},N2=function(t,n,r){t==="animation"&&r.hashId&&n!=="none"&&jx("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},Sb="data-ant-cssinjs-cache-path",Bx="_FILE_STYLE__",ji,zx=!0;function M2(){if(!ji&&(ji={},rr())){var e=document.createElement("div");e.className=Sb,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var i=o.split(":"),a=ae(i,2),s=a[0],l=a[1];ji[s]=l});var n=document.querySelector("style[".concat(Sb,"]"));if(n){var r;zx=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function R2(e){return M2(),!!ji[e]}function I2(e){var t=ji[e],n=null;if(t&&rr())if(zx)n=Bx;else{var r=document.querySelector("style[".concat(qr,'="').concat(ji[e],'"]'));r?n=r.innerHTML:delete ji[e]}return[n,t]}var Fx="_skip_check_",Hx="_multi_value_";function vc(e){var t=Ah(w2(e),$2);return t.replace(/\{%%%\:[^;];}/g,";")}function T2(e){return lt(e)==="object"&&e&&(Fx in e||Hx in e)}function xb(e,t,n){if(!t)return e;var r=".".concat(t),o=n==="low"?":where(".concat(r,")"):r,i=e.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(Ie(l.slice(1))).join(" ")});return i.join(",")}var P2=function e(t){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,h=n.linters,m=h===void 0?[]:h,v="",g={};function y(x){var S=x.getName(s);if(!g[S]){var w=e(x.style,n,{root:!1,parentSelectors:a}),E=ae(w,1),N=E[0];g[S]="@keyframes ".concat(x.getName(s)).concat(N)}}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(t)?t:[t]);return C.forEach(function(x){var S=typeof x=="string"&&!o?{}:x;if(typeof S=="string")v+="".concat(S,`
179
+ `);else if(S._keyframe)y(S);else{var w=f.reduce(function(E,N){var O;return(N==null||(O=N.visit)===null||O===void 0?void 0:O.call(N,E))||E},S);Object.keys(w).forEach(function(E){var N=w[E];if(lt(N)==="object"&&N&&(E!=="animationName"||!N._keyframe)&&!T2(N)){var O=!1,M=E.trim(),I=!1;(o||i)&&s?M.startsWith("@")?O=!0:M==="&"?M=xb("",s,u):M=xb(E,s,u):o&&!s&&(M==="&"||M==="")&&(M="",I=!0);var k=e(N,n,{root:I,injectHash:O,parentSelectors:[].concat(Ie(a),[M])}),D=ae(k,2),A=D[0],L=D[1];g=U(U({},g),L),v+="".concat(M).concat(A)}else{let _=function(V,F){process.env.NODE_ENV!=="production"&&(lt(N)!=="object"||!(N!=null&&N[Fx]))&&[O2,N2].concat(Ie(m)).forEach(function(J){return J(V,F,{path:c,hashId:s,parentSelectors:a})});var W=V.replace(/[A-Z]/g,function(J){return"-".concat(J.toLowerCase())}),K=F;!l2[V]&&typeof K=="number"&&K!==0&&(K="".concat(K,"px")),V==="animationName"&&F!==null&&F!==void 0&&F._keyframe&&(y(F),K=F.getName(s)),v+="".concat(W,":").concat(K,";")};var T,R=(T=N==null?void 0:N.value)!==null&&T!==void 0?T:N;lt(N)==="object"&&N!==null&&N!==void 0&&N[Hx]&&Array.isArray(R)?R.forEach(function(V){_(E,V)}):_(E,R)}})}}),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(`
180
+ `))):v="{".concat(v,"}"),[v,g]};function Vx(e,t){return qs("".concat(e.join("%")).concat(t))}function A2(){return null}var Wx="style";function kh(e,t){var n=e.token,r=e.path,o=e.hashId,i=e.layer,a=e.nonce,s=e.clientOnly,l=e.order,c=l===void 0?0:l,u=p.useContext(ul),d=u.autoClear,f=u.mock,h=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,Ie(r));var E=Ih;process.env.NODE_ENV!=="production"&&f!==void 0&&(E=f==="client");var N=Rm(Wx,w,function(){var D=w.join("|");if(R2(D)){var A=I2(D),L=ae(A,2),T=L[0],R=L[1];if(T)return[T,S,R,{},s,c]}var _=t(),V=P2(_,{hashId:o,hashPriority:m,layer:x?i:void 0,path:r.join("-"),transformers:y,linters:b}),F=ae(V,2),W=F[0],K=F[1],J=vc(W),H=Vx(w,J);return[J,S,H,K,s,c]},function(D,A){var L=ae(D,3),T=L[2];(A||d)&&Ih&&Us(T,{mark:qr})},function(D){var A=ae(D,4),L=A[0];A[1];var T=A[2],R=A[3];if(E&&L!==Bx){var _={mark:qr,prepend:x?!1:"queue",attachTo:v,priority:c},V=typeof a=="function"?a():a;V&&(_.csp={nonce:V});var F=[],W=[];Object.keys(R).forEach(function(J){J.startsWith("@layer")?F.push(J):W.push(J)}),F.forEach(function(J){Ro(vc(R[J]),"_layer-".concat(J),U(U({},_),{},{prepend:!0}))});var K=Ro(L,T,_);K[ei]=C.instanceId,K.setAttribute(_a,S),process.env.NODE_ENV!=="production"&&K.setAttribute(DP,w.join("|")),W.forEach(function(J){Ro(vc(R[J]),"_effect-".concat(J),_)})}}),O=ae(N,3),M=O[0],I=O[1],k=O[2];return function(D){var A;if(!g||E||!h)A=p.createElement(A2,null);else{var L;A=p.createElement("style",De({},(L={},q(L,_a,I),q(L,qr,k),L),{dangerouslySetInnerHTML:{__html:M}}))}return p.createElement(p.Fragment,null,A,D)}}var k2=function(t,n,r){var o=ae(t,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 h=i,m={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=Kc(i,a,s,m,f),l&&Object.keys(l).forEach(function(v){if(!n[v]){n[v]=!0;var g=vc(l[v]),y=Kc(g,a,"_effect-".concat(v),m,f);v.startsWith("@layer")?h=y+h:h+=y}}),[u,s,h]},qx="cssVar",D2=function(t,n){var r=t.key,o=t.prefix,i=t.unitless,a=t.ignore,s=t.token,l=t.scope,c=l===void 0?"":l,u=$.useContext(ul),d=u.cache.instanceId,f=u.container,h=s._tokenKey,m=[].concat(Ie(t.path),[r,c,h]),v=Rm(qx,m,function(){var g=n(),y=Ix(g,r,{prefix:o,unitless:i,ignore:a,scope:c}),b=ae(y,2),C=b[0],x=b[1],S=Vx(m,x);return[C,x,S,r]},function(g){var y=ae(g,3),b=y[2];Ih&&Us(b,{mark:qr})},function(g){var y=ae(g,3),b=y[1],C=y[2];if(b){var x=Ro(b,C,{mark:qr,prepend:"queue",attachTo:f,priority:-999});x[ei]=d,x.setAttribute(_a,r)}});return v},_2=function(t,n,r){var o=ae(t,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=Kc(i,s,a,d,c);return[u,a,f]},rs;rs={},q(rs,Wx,k2),q(rs,Tx,s2),q(rs,qx,_2);var Gt=function(){function e(t,n){In(this,e),q(this,"name",void 0),q(this,"style",void 0),q(this,"_keyframe",!0),this.name=t,this.style=n}return Tn(e,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),e}();function oa(e){return e.notSplit=!0,e}oa(["borderTop","borderBottom"]),oa(["borderTop"]),oa(["borderBottom"]),oa(["borderLeft","borderRight"]),oa(["borderLeft"]),oa(["borderRight"]);var Pm=$.createContext({});function Ux(e){return Ex(e)||Cx(e)||Om(e)||$x()}function so(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function Kx(e,t,n,r){if(!t.length)return n;var o=Ux(t),i=o[0],a=o.slice(1),s;return!e&&typeof i=="number"?s=[]:Array.isArray(e)?s=Ie(e):s=U({},e),r&&n===void 0&&a.length===1?delete s[i][a[0]]:s[i]=Kx(s[i],a,n,r),s}function Hr(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!so(e,t.slice(0,-1))?e:Kx(e,t,n,r)}function L2(e){return lt(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function wb(e){return Array.isArray(e)?[]:{}}var j2=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function ba(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=wb(t[0]);return t.forEach(function(o){function i(a,s){var l=new Set(s),c=so(o,a),u=Array.isArray(c);if(u||L2(c)){if(!l.has(c)){l.add(c);var d=so(r,a);u?r=Hr(r,a,[]):(!d||lt(d)!=="object")&&(r=Hr(r,a,wb(c))),j2(c).forEach(function(f){i([].concat(Ie(a),[f]),l)})}}else r=Hr(r,a,c)}i([])}),r}function Gx(){}let Co=null;function B2(){Co=null,cx()}let Do=Gx;process.env.NODE_ENV!=="production"&&(Do=(e,t,n)=>{Ct(e,`[antd: ${t}] ${n}`),process.env.NODE_ENV==="test"&&B2()});const Xx=p.createContext({}),rn=process.env.NODE_ENV!=="production"?e=>{const{strict:t}=p.useContext(Xx),n=(r,o,i)=>{if(!r)if(t===!1&&o==="deprecated"){const a=Co;Co||(Co={}),Co[e]=Co[e]||[],Co[e].includes(i||"")||Co[e].push(i||""),a||console.warn("[antd] There exists deprecated usage in your code:",Co)}else process.env.NODE_ENV!=="production"&&Do(r,e,i)};return n.deprecated=(r,o,i,a)=>{n(r,"deprecated",`\`${o}\` is deprecated. Please use \`${i}\` instead.${a?` ${a}`:""}`)},n}:()=>{const e=()=>{};return e.deprecated=Gx,e},z2=$.createContext(void 0);var F2={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"},H2={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},V2=U(U({},H2),{},{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 Yx={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Eb={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"]},V2),timePickerLocale:Object.assign({},Yx)},mr="${label} is not a valid ${type}",Ui={locale:"en",Pagination:F2,DatePicker:Eb,TimePicker:Yx,Calendar:Eb,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:mr,method:mr,array:mr,object:mr,number:mr,date:mr,boolean:mr,integer:mr,float:mr,regexp:mr,email:mr,url:mr,hex:mr},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 bc=Object.assign({},Ui.Modal),yc=[];const $b=()=>yc.reduce((e,t)=>Object.assign(Object.assign({},e),t),Ui.Modal);function W2(e){if(e){const t=Object.assign({},e);return yc.push(t),bc=$b(),()=>{yc=yc.filter(n=>n!==t),bc=$b()}}bc=Object.assign({},Ui.Modal)}function Jx(){return bc}const Am=$.createContext(void 0),_o=(e,t)=>{const n=p.useContext(Am),r=p.useMemo(()=>{var i;const a=t||Ui[e],s=(i=n==null?void 0:n[e])!==null&&i!==void 0?i:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[e,t,n]),o=p.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?Ui.locale:i},[n]);return[r,o]},Qx="internalMark",Zx=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;if(process.env.NODE_ENV!=="production"){const i=rn("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===Qx,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}p.useEffect(()=>W2(t==null?void 0:t.Modal),[t]);const o=p.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return p.createElement(Am.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(Zx.displayName="LocaleProvider");const e1={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"},Gs=Object.assign(Object.assign({},e1),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
181
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
182
+ 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Wn=Math.round;function cf(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const Ob=(e,t,n)=>n===0?e:e/100;function is(e,t){const n=t||255;return e>n?n:e<0?0:e}class qt{constructor(t){q(this,"isValid",!0),q(this,"r",0),q(this,"g",0),q(this,"b",0),q(this,"a",1),q(this,"_h",void 0),q(this,"_s",void 0),q(this,"_l",void 0),q(this,"_v",void 0),q(this,"_max",void 0),q(this,"_min",void 0),q(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.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(t instanceof qt)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=is(t.r),this.g=is(t.g),this.b=is(t.b),this.a=typeof t.a=="number"?is(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Wn(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=s=>(r[s]-this[s])*o+this[s],a={r:Wn(i("r")),g:Wn(i("g")),b:Wn(i("b")),a:Wn(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Wn((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Wn(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Wn(this.getSaturation()*100),r=Wn(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${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(t,n,r){const o=this.clone();return o[t]=is(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.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:t,s:n,l:r,a:o}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const f=Wn(r*255);this.r=f,this.g=f,this.b=f}let i=0,a=0,s=0;const l=t/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,a=u):l>=1&&l<2?(i=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(i=u,s=c):l>=5&&l<6&&(i=c,s=u);const d=r-c/2;this.r=Wn((i+d)*255),this.g=Wn((a+d)*255),this.b=Wn((s+d)*255)}fromHsv({h:t,s:n,v:r,a:o}){this._h=t%360,this._s=n,this._v=r,this.a=typeof o=="number"?o:1;const i=Wn(r*255);if(this.r=i,this.g=i,this.b=i,n<=0)return;const a=t/60,s=Math.floor(a),l=a-s,c=Wn(r*(1-n)*255),u=Wn(r*(1-n*l)*255),d=Wn(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(t){const n=cf(t,Ob);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=cf(t,Ob);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=cf(t,(r,o)=>o.includes("%")?Wn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var ql=2,Nb=.16,q2=.05,U2=.05,K2=.15,t1=5,n1=4,G2=[{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 Mb(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-ql*t:Math.round(e.h)+ql*t:r=n?Math.round(e.h)+ql*t:Math.round(e.h)-ql*t,r<0?r+=360:r>=360&&(r-=360),r}function Rb(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Nb*t:t===n1?r=e.s+Nb:r=e.s+q2*t,r>1&&(r=1),n&&t===t1&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Ib(e,t,n){var r;return n?r=e.v+U2*t:r=e.v-K2*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Xs(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new qt(e),o=r.toHsv(),i=t1;i>0;i-=1){var a=new qt({h:Mb(o,i,!0),s:Rb(o,i,!0),v:Ib(o,i,!0)});n.push(a)}n.push(r);for(var s=1;s<=n1;s+=1){var l=new qt({h:Mb(o,s),s:Rb(o,s),v:Ib(o,s)});n.push(l)}return t.theme==="dark"?G2.map(function(c){var u=c.index,d=c.amount;return new qt(t.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var uf={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"},Dh=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Dh.primary=Dh[5];var _h=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];_h.primary=_h[5];var Lh=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Lh.primary=Lh[5];var jh=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];jh.primary=jh[5];var Bh=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Bh.primary=Bh[5];var zh=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];zh.primary=zh[5];var Fh=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Fh.primary=Fh[5];var Hh=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Hh.primary=Hh[5];var Gc=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Gc.primary=Gc[5];var Vh=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Vh.primary=Vh[5];var Wh=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Wh.primary=Wh[5];var qh=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];qh.primary=qh[5];var Uh=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Uh.primary=Uh[5];var df={red:Dh,volcano:_h,orange:Lh,gold:jh,yellow:Bh,lime:zh,green:Fh,cyan:Hh,blue:Gc,geekblue:Vh,purple:Wh,magenta:qh,grey:Uh};function X2(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:i,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=n(l),f=n(o),h=n(i),m=n(a),v=n(s),g=r(c,u),y=e.colorLink||e.colorInfo,b=n(y),C=new qt(m[1]).mix(new qt(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:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[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 qt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const Y2=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function J2(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1},Y2(r))}const Q2=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Cc(e){return(e+8)/e}function Z2(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.pow(Math.E,o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Cc(n)}))}const eA=e=>{const t=Z2(e),n=t.map(u=>u.size),r=t.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 tA(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Or=(e,t)=>new qt(e).setA(t).toRgbString(),as=(e,t)=>new qt(e).darken(t).toHexString(),nA=e=>{const t=Xs(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},rA=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Or(r,.88),colorTextSecondary:Or(r,.65),colorTextTertiary:Or(r,.45),colorTextQuaternary:Or(r,.25),colorFill:Or(r,.15),colorFillSecondary:Or(r,.06),colorFillTertiary:Or(r,.04),colorFillQuaternary:Or(r,.02),colorBgSolid:Or(r,1),colorBgSolidHover:Or(r,.75),colorBgSolidActive:Or(r,.95),colorBgLayout:as(n,4),colorBgContainer:as(n,0),colorBgElevated:as(n,0),colorBgSpotlight:Or(r,.85),colorBgBlur:"transparent",colorBorder:as(n,15),colorBorderSecondary:as(n,6)}};function oA(e){uf.pink=uf.magenta,df.pink=df.magenta;const t=Object.keys(e1).map(n=>{const r=e[n]===uf[n]?df[n]:Xs(e[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({},e),t),X2(e,{generateColorPalettes:nA,generateNeutralColorPalettes:rA})),eA(e.fontSize)),tA(e)),Q2(e)),J2(e))}const r1=Rh(oA),Kh={token:Gs,override:{override:Gs},hashed:!0},o1=$.createContext(Kh),Ys="ant",rd="anticon",iA=["outlined","borderless","filled","underlined"],aA=(e,t)=>t||(e?`${Ys}-${e}`:Ys),It=p.createContext({getPrefixCls:aA,iconPrefixCls:rd}),{Consumer:n9}=It,Tb={};function $r(e){const t=p.useContext(It),{getPrefixCls:n,direction:r,getPopupContainer:o}=t,i=t[e];return Object.assign(Object.assign({classNames:Tb,styles:Tb},i),{getPrefixCls:n,direction:r,getPopupContainer:o})}const sA=`-ant-${Date.now()}-${Math.random()}`;function lA(e,t){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 qt(a),c=Xs(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(t.primaryColor){o(t.primaryColor,"primary");const a=new qt(t.primaryColor),s=Xs(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 qt(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 t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`
183
+ :root {
184
+ ${Object.keys(n).map(a=>`--${e}-${a}: ${n[a]};`).join(`
185
+ `)}
186
+ }
187
+ `.trim()}function cA(e,t){const n=lA(e,t);rr()?Ro(n,`${sA}-dynamic-theme`):process.env.NODE_ENV!=="production"&&Do(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const _r=p.createContext(!1),i1=e=>{let{children:t,disabled:n}=e;const r=p.useContext(_r);return p.createElement(_r.Provider,{value:n??r},t)},Ba=p.createContext(void 0),uA=e=>{let{children:t,size:n}=e;const r=p.useContext(Ba);return p.createElement(Ba.Provider,{value:n||r},t)};function dA(){const e=$.useContext(_r),t=$.useContext(Ba);return{componentDisabled:e,componentSize:t}}var a1=Tn(function e(){In(this,e)}),s1="CALC_UNIT",fA=new RegExp(s1,"g");function ff(e){return typeof e=="number"?"".concat(e).concat(s1):e}var hA=function(e){Po(n,e);var t=Ao(n);function n(r,o){var i;In(this,n),i=t.call(this),q(kt(i),"result",""),q(kt(i),"unitlessCssVar",void 0),q(kt(i),"lowPriority",void 0);var a=lt(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=ff(r):a==="string"&&(i.result=r),i}return Tn(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(ff(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(ff(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(fA,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(a1),pA=function(e){Po(n,e);var t=Ao(n);function n(r){var o;return In(this,n),o=t.call(this),q(kt(o),"result",0),r instanceof n?o.result=r.result:typeof r=="number"&&(o.result=r),o}return Tn(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}(a1),mA=function(t,n){var r=t==="css"?hA:pA;return function(o){return new r(o,n)}},Pb=function(t,n){return"".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Ut(e){var t=p.useRef();t.current=e;var n=p.useCallback(function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(i))},[]);return n}function za(e){var t=p.useRef(!1),n=p.useState(e),r=ae(n,2),o=r[0],i=r[1];p.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function a(s,l){l&&t.current||i(s)}return[o,a]}function hf(e){return e!==void 0}function gn(e,t){var n=t||{},r=n.defaultValue,o=n.value,i=n.onChange,a=n.postState,s=za(function(){return hf(o)?o:hf(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),l=ae(s,2),c=l[0],u=l[1],d=o!==void 0?o:c,f=a?a(d):d,h=Ut(i),m=za([d]),v=ae(m,2),g=v[0],y=v[1];Es(function(){var C=g[0];c!==C&&h(c,C)},[g]),Es(function(){hf(o)||u(o)},[o]);var b=Ut(function(C,x){u(C,x),y([d],x)});return[f,b]}function Ab(e,t,n,r){var o=U({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=ae(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&Ct(!(o!=null&&o[c]),"Component Token `".concat(String(c),"` of ").concat(String(e)," 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=U(U({},n),o);return Object.keys(a).forEach(function(s){a[s]===t[s]&&delete a[s]}),a}var l1=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Gh=!0;function Vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!l1)return Object.assign.apply(Object,[{}].concat(t));Gh=!1;var r={};return t.forEach(function(o){if(lt(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),Gh=!0,r}var kb={};function gA(){}var vA=function(t){var n,r=t,o=gA;return l1&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,s){if(Gh){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;kb[a]={global:Array.from(n),component:U(U({},(l=kb[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function Db(e,t,n){if(typeof n=="function"){var r;return n(Vt(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function bA(e){return e==="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 ne(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 ne(i)}).join(","),")")}}}var yA=1e3*60*10,CA=function(){function e(){In(this,e),q(this,"map",new Map),q(this,"objectIDMap",new WeakMap),q(this,"nextID",0),q(this,"lastAccessBeat",new Map),q(this,"accessBeat",0)}return Tn(e,[{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&&lt(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(lt(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>yA&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),_b=new CA;function SA(e,t){return $.useMemo(function(){var n=_b.get(t);if(n)return n;var r=e();return _b.set(t,r),r},t)}var xA=function(){return{}};function wA(e){var t=e.useCSP,n=t===void 0?xA:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(f,h,m,v){var g=Array.isArray(f)?f[0]:f;function y(N){return"".concat(String(g)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var b=(v==null?void 0:v.unitless)||{},C=typeof s=="function"?s(f):{},x=U(U({},C),{},q({},y("zIndexPopup"),!0));Object.keys(b).forEach(function(N){x[y(N)]=b[N]});var S=U(U({},v),{},{unitless:x,prefixToken:y}),w=u(f,h,m,S),E=c(g,m,S);return function(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,M=w(N,O),I=ae(M,2),k=I[1],D=E(O),A=ae(D,2),L=A[0],T=A[1];return[L,k,T]}}function c(f,h,m){var v=m.unitless,g=m.injectStyle,y=g===void 0?!0:g,b=m.prefixToken,C=m.ignore,x=function(E){var N=E.rootCls,O=E.cssVar,M=O===void 0?{}:O,I=r(),k=I.realToken;return D2({path:[f],prefix:M.prefix,key:M.key,unitless:v,ignore:C,token:k,scope:N},function(){var D=Db(f,k,h),A=Ab(f,k,D,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(D).forEach(function(L){A[b(L)]=A[L],delete A[L]}),A}),null},S=function(E){var N=r(),O=N.cssVar;return[function(M){return y&&O?$.createElement($.Fragment,null,$.createElement(x,{rootCls:E,cssVar:O,component:f}),M):M},O==null?void 0:O.key]};return S}function u(f,h,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(f)?f:[f,f],y=ae(g,1),b=y[0],C=g.join("-"),x=e.layer||{name:"antd"};return function(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:S,E=r(),N=E.theme,O=E.realToken,M=E.hashId,I=E.token,k=E.cssVar,D=o(),A=D.rootPrefixCls,L=D.iconPrefixCls,T=n(),R=k?"css":"js",_=SA(function(){var H=new Set;return k&&Object.keys(v.unitless||{}).forEach(function(X){H.add(hc(X,k.prefix)),H.add(hc(X,Pb(b,k.prefix)))}),mA(R,H)},[R,b,k==null?void 0:k.prefix]),V=bA(R),F=V.max,W=V.min,K={theme:N,token:I,hashId:M,nonce:function(){return T.nonce},clientOnly:v.clientOnly,layer:x,order:v.order||-999};typeof i=="function"&&kh(U(U({},K),{},{clientOnly:!1,path:["Shared",A]}),function(){return i(I,{prefix:{rootPrefixCls:A,iconPrefixCls:L},csp:T})});var J=kh(U(U({},K),{},{path:[C,S,L]}),function(){if(v.injectStyle===!1)return[];var H=vA(I),X=H.token,Y=H.flush,le=Db(b,O,m),Q=".".concat(S),fe=Ab(b,O,le,{deprecatedTokens:v.deprecatedTokens});k&&le&&lt(le)==="object"&&Object.keys(le).forEach(function(me){le[me]="var(".concat(hc(me,Pb(b,k.prefix)),")")});var ye=Vt(X,{componentCls:Q,prefixCls:S,iconCls:".".concat(L),antCls:".".concat(A),calc:_,max:F,min:W},k?le:fe),ue=h(ye,{hashId:M,prefixCls:S,rootPrefixCls:A,iconPrefixCls:L});Y(b,fe);var ie=typeof a=="function"?a(ye,S,w,v.resetFont):null;return[v.resetStyle===!1?null:ie,ue]});return[J,M]}}function d(f,h,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(f,h,m,U({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 ui=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],EA="5.24.5";function pf(e){return e>=0&&e<=255}function ms(e,t){const{r:n,g:r,b:o,a:i}=new qt(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new qt(t).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(pf(u)&&pf(d)&&pf(f))return new qt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new qt({r:n,g:r,b:o,a:1}).toRgbString()}var $A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function c1(e){const{override:t}=e,n=$A(e,["override"]),r=Object.assign({},t);Object.keys(Gs).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:ms(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:ms(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:ms(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:ms(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:`
188
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
189
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
190
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
191
+ `,boxShadowSecondary:`
192
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
193
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
194
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
195
+ `,boxShadowTertiary:`
196
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
197
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
198
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
199
+ `,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:`
200
+ 0 1px 2px -2px ${new qt("rgba(0, 0, 0, 0.16)").toRgbString()},
201
+ 0 3px 6px 0 ${new qt("rgba(0, 0, 0, 0.12)").toRgbString()},
202
+ 0 5px 12px 4px ${new qt("rgba(0, 0, 0, 0.09)").toRgbString()}
203
+ `,boxShadowDrawerRight:`
204
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
205
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
206
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
207
+ `,boxShadowDrawerLeft:`
208
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
209
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
210
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
211
+ `,boxShadowDrawerUp:`
212
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
213
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
214
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
215
+ `,boxShadowDrawerDown:`
216
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
217
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
218
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
219
+ `,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 Lb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const u1={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},OA={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},NA={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},d1=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o}=t,i=Lb(t,["override"]);let a=Object.assign(Object.assign({},r),{override:o});return a=c1(a),i&&Object.entries(i).forEach(s=>{let[l,c]=s;const{theme:u}=c,d=Lb(c,["theme"]);let f=d;u&&(f=d1(Object.assign(Object.assign({},a),d),{override:d},u)),a[l]=f}),a};function pr(){const{token:e,hashed:t,theme:n,override:r,cssVar:o}=$.useContext(o1),i=`${EA}-${t||""}`,a=n||r1,[s,l,c]=a2(a,[Gs,e],{salt:i,override:r,getComputedToken:d1,formatToken:c1,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:u1,ignore:OA,preserve:NA}});return[a,c,t?l:"",s,o]}const Js={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Ln=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},Qi=()=>({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"}}),Xc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),MA=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),RA=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},s),a),{[o]:a})}},dl=(e,t)=>({outline:`${ne(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),Fa=(e,t)=>({"&:focus-visible":Object.assign({},dl(e,t))}),f1=e=>({[`.${e}`]:Object.assign(Object.assign({},Qi()),{[`.${e} .${e}-icon`]:{display:"block"}})}),{genStyleHooks:vn,genComponentStyleHook:IA,genSubStyleComponent:h1}=wA({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=$.useContext(It);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o]=pr();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o}},useCSP:()=>{const{csp:e}=$.useContext(It);return e??{}},getResetStyles:(e,t)=>{var n;const r=MA(e);return[r,{"&":r},f1((n=t==null?void 0:t.prefix.iconPrefixCls)!==null&&n!==void 0?n:rd)]},getCommonStyle:RA,getCompUnitless:()=>u1});function TA(e,t){return ui.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s}))},{})}const PA=(e,t)=>{const[n,r]=pr();return kh({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>[f1(e)])},AA=Object.assign({},p),{useId:jb}=AA,kA=()=>"",DA=typeof jb>"u"?kA:jb;function _A(e,t,n){var r,o;const i=rn("ConfigProvider"),a=e||{},s=a.inherit===!1||!t?Object.assign(Object.assign({},Kh),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:Kh.hashed,cssVar:t==null?void 0:t.cssVar}):t,l=DA();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 cl(()=>{var c,u;if(!e)return t;const d=Object.assign({},s.components);Object.keys(e.components||{}).forEach(m=>{d[m]=Object.assign(Object.assign({},d[m]),e.components[m])});const f=`css-var-${l.replace(/:/g,"")}`,h=((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:h})},[a,s],(c,u)=>c.some((d,f)=>{const h=u[f];return!Da(d,h,!0)}))}var LA=["children"],p1=p.createContext({});function jA(e){var t=e.children,n=wt(e,LA);return p.createElement(p1.Provider,{value:n},t)}var BA=function(e){Po(n,e);var t=Ao(n);function n(){return In(this,n),t.apply(this,arguments)}return Tn(n,[{key:"render",value:function(){return this.props.children}}]),n}(p.Component);function zA(e){var t=p.useReducer(function(s){return s+1},0),n=ae(t,2),r=n[1],o=p.useRef(e),i=Ut(function(){return o.current}),a=Ut(function(s){o.current=typeof s=="function"?s(o.current):s,r()});return[i,a]}var Ho="none",Ul="appear",Kl="enter",Gl="leave",Bb="none",Vr="prepare",ya="start",Ca="active",km="end",m1="prepared";function zb(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function FA(e,t){var n={animationend:zb("Animation","AnimationEnd"),transitionend:zb("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var HA=FA(rr(),typeof window<"u"?window:{}),g1={};if(rr()){var VA=document.createElement("div");g1=VA.style}var Xl={};function v1(e){if(Xl[e])return Xl[e];var t=HA[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in g1)return Xl[e]=t[i],Xl[e]}return""}var b1=v1("animationend"),y1=v1("transitionend"),C1=!!(b1&&y1),Fb=b1||"animationend",Hb=y1||"transitionend";function Vb(e,t){if(!e)return null;if(lt(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const WA=function(e){var t=$.useRef();function n(o){o&&(o.removeEventListener(Hb,e),o.removeEventListener(Fb,e))}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(Hb,e),o.addEventListener(Fb,e),t.current=o)}return p.useEffect(function(){return function(){n(t.current)}},[]),[r,n]};var S1=rr()?$.useLayoutEffect:$.useEffect;const qA=function(){var e=p.useRef(null);function t(){Dt.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var i=Dt(function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)});e.current=i}return p.useEffect(function(){return function(){t()}},[]),[n,t]};var UA=[Vr,ya,Ca,km],KA=[Vr,m1],x1=!1,GA=!0;function w1(e){return e===Ca||e===km}const XA=function(e,t,n){var r=za(Bb),o=ae(r,2),i=o[0],a=o[1],s=qA(),l=ae(s,2),c=l[0],u=l[1];function d(){a(Vr,!0)}var f=t?KA:UA;return S1(function(){if(i!==Bb&&i!==km){var h=f.indexOf(i),m=f[h+1],v=n(i);v===x1?a(m,!0):m&&c(function(g){function y(){g.isCanceled()||a(m,!0)}v===!0?y():Promise.resolve(v).then(y)})}},[e,i]),p.useEffect(function(){return function(){u()}},[]),[d,i]};function YA(e,t,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,h=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,N=r.onVisibleChanged,O=za(),M=ae(O,2),I=M[0],k=M[1],D=zA(Ho),A=ae(D,2),L=A[0],T=A[1],R=za(null),_=ae(R,2),V=_[0],F=_[1],W=L(),K=$.useRef(!1),J=$.useRef(null);function H(){return n()}var X=$.useRef(!1);function Y(){T(Ho),F(null,!0)}var le=Ut(function(z){var ve=L();if(ve!==Ho){var se=H();if(!(z&&!z.deadline&&z.target!==se)){var pe=X.current,$e;ve===Ul&&pe?$e=S==null?void 0:S(se,z):ve===Kl&&pe?$e=w==null?void 0:w(se,z):ve===Gl&&pe&&($e=E==null?void 0:E(se,z)),pe&&$e!==!1&&Y()}}}),Q=WA(le),fe=ae(Q,1),ye=fe[0],ue=function(ve){switch(ve){case Ul:return q(q(q({},Vr,f),ya,v),Ca,b);case Kl:return q(q(q({},Vr,h),ya,g),Ca,C);case Gl:return q(q(q({},Vr,m),ya,y),Ca,x);default:return{}}},ie=p.useMemo(function(){return ue(W)},[W]),me=XA(W,!e,function(z){if(z===Vr){var ve=ie[Vr];return ve?ve(H()):x1}if(he in ie){var se;F(((se=ie[he])===null||se===void 0?void 0:se.call(ie,H(),null))||null)}return he===Ca&&W!==Ho&&(ye(H()),u>0&&(clearTimeout(J.current),J.current=setTimeout(function(){le({deadline:!0})},u))),he===m1&&Y(),GA}),re=ae(me,2),ce=re[0],he=re[1],Ee=w1(he);X.current=Ee;var Oe=$.useRef(null);S1(function(){if(!(K.current&&Oe.current===t)){k(t);var z=K.current;K.current=!0;var ve;!z&&t&&s&&(ve=Ul),z&&t&&i&&(ve=Kl),(z&&!t&&c||!z&&d&&!t&&c)&&(ve=Gl);var se=ue(ve);ve&&(e||se[Vr])?(T(ve),ce()):T(Ho),Oe.current=t}},[t]),$.useEffect(function(){(W===Ul&&!s||W===Kl&&!i||W===Gl&&!c)&&T(Ho)},[s,i,c]),$.useEffect(function(){return function(){K.current=!1,clearTimeout(J.current)}},[]);var xe=p.useRef(!1);$.useEffect(function(){I&&(xe.current=!0),I!==void 0&&W===Ho&&((xe.current||I)&&(N==null||N(I)),xe.current=!0)},[I,W]);var je=V;return ie[Vr]&&he===ya&&(je=U({transition:"none"},je)),[W,he,je,I??t]}function JA(e){var t=e;lt(e)==="object"&&(t=e.transitionSupport);function n(o,i){return!!(o.motionName&&t&&i!==!1)}var r=p.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,h=o.leavedClassName,m=o.eventProps,v=p.useContext(p1),g=v.motion,y=n(o,g),b=$.useRef(),C=$.useRef();function x(){try{return b.current instanceof HTMLElement?b.current:fc(C.current)}catch{return null}}var S=YA(y,s,x,o),w=ae(S,4),E=w[0],N=w[1],O=w[2],M=w[3],I=p.useRef(M);M&&(I.current=!0);var k=p.useCallback(function(_){b.current=_,wm(i,_)},[i]),D,A=U(U({},m),{},{visible:s});if(!d)D=null;else if(E===Ho)M?D=d(U({},A),k):!c&&I.current&&h?D=d(U(U({},A),{},{className:h}),k):u||!c&&!h?D=d(U(U({},A),{},{style:{display:"none"}}),k):D=null;else{var L;N===Vr?L="prepare":w1(N)?L="active":N===ya&&(L="start");var T=Vb(f,"".concat(E,"-").concat(L));D=d(U(U({},A),{},{className:ee(Vb(f,E),q(q({},T,T&&L),f,typeof f=="string")),style:O}),k)}if(p.isValidElement(D)&&vi(D)){var R=Ji(D);R||(D=p.cloneElement(D,{ref:k}))}return p.createElement(BA,{ref:C},D)});return r.displayName="CSSMotion",r}const po=JA(C1);var Xh="add",Yh="keep",Jh="remove",mf="removed";function QA(e){var t;return e&&lt(e)==="object"&&"key"in e?t=e:t={key:e},U(U({},t),{},{key:String(t.key)})}function Qh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(QA)}function ZA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=t.length,i=Qh(e),a=Qh(t);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(h){return U(U({},h),{},{status:Xh})})),r=d),n.push(U(U({},f),{},{status:Yh})),r+=1,u=!0;break}}u||n.push(U(U({},c),{},{status:Jh}))}),r<o&&(n=n.concat(a.slice(r).map(function(c){return U(U({},c),{},{status:Xh})})));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!==Jh}),n.forEach(function(u){u.key===c&&(u.status=Yh)})}),n}var ek=["component","children","onVisibleChanged","onAllRemoved"],tk=["status"],nk=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function rk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:po,n=function(r){Po(i,r);var o=Ao(i);function i(){var a;In(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)),q(kt(a),"state",{keyEntities:[]}),q(kt(a),"removeKey",function(u){a.setState(function(d){var f=d.keyEntities.map(function(h){return h.key!==u?h:U(U({},h),{},{status:mf})});return{keyEntities:f}},function(){var d=a.state.keyEntities,f=d.filter(function(h){var m=h.status;return m!==mf}).length;f===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return Tn(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 h=wt(c,ek),m=u||p.Fragment,v={};return nk.forEach(function(g){v[g]=h[g],delete h[g]}),delete h.keys,p.createElement(m,h,l.map(function(g,y){var b=g.status,C=wt(g,tk),x=b===Xh||b===Yh;return p.createElement(t,De({},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(U(U({},S),{},{index:y}),w)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=Qh(c),f=ZA(u,d);return{keyEntities:f.filter(function(h){var m=u.find(function(v){var g=v.key;return h.key===g});return!(m&&m.status===mf&&h.status===Jh)})}}}]),i}(p.Component);return q(n,"defaultProps",{component:"div"}),n}rk(C1);function ok(e){const{children:t}=e,[,n]=pr(),{motion:r}=n,o=p.useRef(!1);return o.current=o.current||r===!1,o.current?p.createElement(jA,{motion:r},t):t}const E1=p.memo(e=>{let{dropdownMatchSelectWidth:t}=e;return rn("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(E1.displayName="PropWarning");const ik=process.env.NODE_ENV!=="production"?E1:()=>null;var ak=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let Zh=!1;const sk=process.env.NODE_ENV!=="production"?e=>{process.env.NODE_ENV!=="production"&&Do(!Zh,e,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,lk=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Yc,$1,O1,N1;function Sc(){return Yc||Ys}function ck(){return $1||rd}function uk(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const dk=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;t!==void 0&&(Yc=t),n!==void 0&&($1=n),"holderRender"in e&&(N1=o),r&&(uk(r)?(process.env.NODE_ENV!=="production"&&Do(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),cA(Sc(),r)):O1=r)},fk=()=>({getPrefixCls:(e,t)=>t||(e?`${Sc()}-${e}`:Sc()),getIconPrefixCls:ck,getRootPrefixCls:()=>Yc||Sc(),getTheme:()=>O1,holderRender:N1}),hk=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,anchor:i,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:m,popupOverflow:v,legacyLocale:g,parentContext:y,iconPrefixCls:b,theme:C,componentDisabled:x,segmented:S,statistic:w,spin:E,calendar:N,carousel:O,cascader:M,collapse:I,typography:k,checkbox:D,descriptions:A,divider:L,drawer:T,skeleton:R,steps:_,image:V,layout:F,list:W,mentions:K,modal:J,progress:H,result:X,slider:Y,breadcrumb:le,menu:Q,pagination:fe,input:ye,textArea:ue,empty:ie,badge:me,radio:re,rate:ce,switch:he,transfer:Ee,avatar:Oe,message:xe,tag:je,table:z,card:ve,tabs:se,timeline:pe,timePicker:$e,upload:Me,notification:we,tree:Be,colorPicker:Fe,datePicker:Re,rangePicker:qe,flex:Ke,wave:Pe,dropdown:ze,warning:Le,tour:He,tooltip:et,popover:pt,popconfirm:_t,floatButtonGroup:Lt,variant:cn,inputNumber:Je,treeSelect:Ve}=e,ct=p.useCallback((rt,ft)=>{const{prefixCls:jt}=e;if(ft)return ft;const Nt=jt||y.getPrefixCls("");return rt?`${Nt}-${rt}`:Nt},[y.getPrefixCls,e.prefixCls]),at=b||y.iconPrefixCls||rd,mt=n||y.csp;PA(at,mt);const Ze=_A(C,y.theme,{prefixCls:ct("")});process.env.NODE_ENV!=="production"&&(Zh=Zh||!!Ze);const Ue={csp:mt,autoInsertSpaceInButton:r,alert:o,anchor:i,locale:s||g,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:m??h,popupOverflow:v,getPrefixCls:ct,iconPrefixCls:at,theme:Ze,segmented:S,statistic:w,spin:E,calendar:N,carousel:O,cascader:M,collapse:I,typography:k,checkbox:D,descriptions:A,divider:L,drawer:T,skeleton:R,steps:_,image:V,input:ye,textArea:ue,layout:F,list:W,mentions:K,modal:J,progress:H,result:X,slider:Y,breadcrumb:le,menu:Q,pagination:fe,empty:ie,badge:me,radio:re,rate:ce,switch:he,transfer:Ee,avatar:Oe,message:xe,tag:je,table:z,card:ve,tabs:se,timeline:pe,timePicker:$e,upload:Me,notification:we,tree:Be,colorPicker:Fe,datePicker:Re,rangePicker:qe,flex:Ke,wave:Pe,dropdown:ze,warning:Le,tour:He,tooltip:et,popover:pt,popconfirm:_t,floatButtonGroup:Lt,variant:cn,inputNumber:Je,treeSelect:Ve};process.env.NODE_ENV!=="production"&&rn("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Ge=Object.assign({},y);Object.keys(Ue).forEach(rt=>{Ue[rt]!==void 0&&(Ge[rt]=Ue[rt])}),lk.forEach(rt=>{const ft=e[rt];ft&&(Ge[rt]=ft)}),typeof r<"u"&&(Ge.button=Object.assign({autoInsertSpace:r},Ge.button));const Et=cl(()=>Ge,Ge,(rt,ft)=>{const jt=Object.keys(rt),Nt=Object.keys(ft);return jt.length!==Nt.length||jt.some(Jt=>rt[Jt]!==ft[Jt])}),{layer:Tt}=p.useContext(ul),tt=p.useMemo(()=>({prefixCls:at,csp:mt,layer:Tt?"antd":void 0}),[at,mt,Tt]);let We=p.createElement(p.Fragment,null,p.createElement(ik,{dropdownMatchSelectWidth:h}),t);const it=p.useMemo(()=>{var rt,ft,jt,Nt;return ba(((rt=Ui.Form)===null||rt===void 0?void 0:rt.defaultValidateMessages)||{},((jt=(ft=Et.locale)===null||ft===void 0?void 0:ft.Form)===null||jt===void 0?void 0:jt.defaultValidateMessages)||{},((Nt=Et.form)===null||Nt===void 0?void 0:Nt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[Et,a==null?void 0:a.validateMessages]);Object.keys(it).length>0&&(We=p.createElement(z2.Provider,{value:it},We)),s&&(We=p.createElement(Zx,{locale:s,_ANT_MARK__:Qx},We)),We=p.createElement(Pm.Provider,{value:tt},We),l&&(We=p.createElement(uA,{size:l},We)),We=p.createElement(ok,null,We);const st=p.useMemo(()=>{const rt=Ze||{},{algorithm:ft,token:jt,components:Nt,cssVar:Jt}=rt,At=ak(rt,["algorithm","token","components","cssVar"]),zt=ft&&(!Array.isArray(ft)||ft.length>0)?Rh(ft):r1,Wt={};Object.entries(Nt||{}).forEach(jn=>{let[Zt,un]=jn;const _e=Object.assign({},un);"algorithm"in _e&&(_e.algorithm===!0?_e.theme=zt:(Array.isArray(_e.algorithm)||typeof _e.algorithm=="function")&&(_e.theme=Rh(_e.algorithm)),delete _e.algorithm),Wt[Zt]=_e});const Qt=Object.assign(Object.assign({},Gs),jt);return Object.assign(Object.assign({},At),{theme:zt,token:Qt,components:Wt,override:Object.assign({override:Qt},Wt),cssVar:Jt})},[Ze]);return C&&(We=p.createElement(o1.Provider,{value:st},We)),Et.warning&&(We=p.createElement(Xx.Provider,{value:Et.warning},We)),x!==void 0&&(We=p.createElement(i1,{disabled:x},We)),p.createElement(It.Provider,{value:Et},We)},mo=e=>{const t=p.useContext(It),n=p.useContext(Am);return p.createElement(hk,Object.assign({parentContext:t,legacyLocale:n},e))};mo.ConfigContext=It;mo.SizeContext=Ba;mo.config=dk;mo.useConfig=dA;Object.defineProperty(mo,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&Do(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Ba)});process.env.NODE_ENV!=="production"&&(mo.displayName="ConfigProvider");var pk={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 M1(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function mk(e){return M1(e)instanceof ShadowRoot}function Jc(e){return mk(e)?M1(e):null}function gk(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function vk(e,t){Ct(e,"[@ant-design/icons] ".concat(t))}function Wb(e){return lt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(lt(e.icon)==="object"||typeof e.icon=="function")}function qb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[gk(n)]=r}return t},{})}function ep(e,t,n){return n?$.createElement(e.tag,U(U({key:t},qb(e.attrs)),n),(e.children||[]).map(function(r,o){return ep(r,"".concat(t,"-").concat(e.tag,"-").concat(o))})):$.createElement(e.tag,U({key:t},qb(e.attrs)),(e.children||[]).map(function(r,o){return ep(r,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function R1(e){return Xs(e)[0]}function I1(e){return e?Array.isArray(e)?e:[e]:[]}var bk=`
220
+ .anticon {
221
+ display: inline-flex;
222
+ align-items: center;
223
+ color: inherit;
224
+ font-style: normal;
225
+ line-height: 0;
226
+ text-align: center;
227
+ text-transform: none;
228
+ vertical-align: -0.125em;
229
+ text-rendering: optimizeLegibility;
230
+ -webkit-font-smoothing: antialiased;
231
+ -moz-osx-font-smoothing: grayscale;
232
+ }
233
+
234
+ .anticon > * {
235
+ line-height: 1;
236
+ }
237
+
238
+ .anticon svg {
239
+ display: inline-block;
240
+ }
241
+
242
+ .anticon::before {
243
+ display: none;
244
+ }
245
+
246
+ .anticon .anticon-icon {
247
+ display: block;
248
+ }
249
+
250
+ .anticon[tabindex] {
251
+ cursor: pointer;
252
+ }
253
+
254
+ .anticon-spin::before,
255
+ .anticon-spin {
256
+ display: inline-block;
257
+ -webkit-animation: loadingCircle 1s infinite linear;
258
+ animation: loadingCircle 1s infinite linear;
259
+ }
260
+
261
+ @-webkit-keyframes loadingCircle {
262
+ 100% {
263
+ -webkit-transform: rotate(360deg);
264
+ transform: rotate(360deg);
265
+ }
266
+ }
267
+
268
+ @keyframes loadingCircle {
269
+ 100% {
270
+ -webkit-transform: rotate(360deg);
271
+ transform: rotate(360deg);
272
+ }
273
+ }
274
+ `,yk=function(t){var n=$.useContext(Pm),r=n.csp,o=n.prefixCls,i=n.layer,a=bk;o&&(a=a.replace(/anticon/g,o)),i&&(a="@layer ".concat(i,` {
275
+ `).concat(a,`
276
+ }`)),$.useEffect(function(){var s=t.current,l=Jc(s);Ro(a,"@ant-design-icons",{prepend:!i,csp:r,attachTo:l})},[])},Ck=["icon","className","onClick","style","primaryColor","secondaryColor"],$s={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Sk(e){var t=e.primaryColor,n=e.secondaryColor;$s.primaryColor=t,$s.secondaryColor=n||R1(t),$s.calculated=!!n}function xk(){return U({},$s)}var Ka=function(t){var n=t.icon,r=t.className,o=t.onClick,i=t.style,a=t.primaryColor,s=t.secondaryColor,l=wt(t,Ck),c=p.useRef(),u=$s;if(a&&(u={primaryColor:a,secondaryColor:s||R1(a)}),yk(c),vk(Wb(n),"icon should be icon definiton, but got ".concat(n)),!Wb(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=U(U({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),ep(d.icon,"svg-".concat(d.name),U(U({className:r,onClick:o,style:i,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};Ka.displayName="IconReact";Ka.getTwoToneColors=xk;Ka.setTwoToneColors=Sk;function T1(e){var t=I1(e),n=ae(t,2),r=n[0],o=n[1];return Ka.setTwoToneColors({primaryColor:r,secondaryColor:o})}function wk(){var e=Ka.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Ek=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];T1(Gc.primary);var Vn=p.forwardRef(function(e,t){var n=e.className,r=e.icon,o=e.spin,i=e.rotate,a=e.tabIndex,s=e.onClick,l=e.twoToneColor,c=wt(e,Ek),u=p.useContext(Pm),d=u.prefixCls,f=d===void 0?"anticon":d,h=u.rootClassName,m=ee(h,f,q(q({},"".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=I1(l),b=ae(y,2),C=b[0],x=b[1];return p.createElement("span",De({role:"img","aria-label":r.name},c,{ref:t,tabIndex:v,onClick:s,className:m}),p.createElement(Ka,{icon:r,primaryColor:C,secondaryColor:x,style:g}))});Vn.displayName="AntdIcon";Vn.getTwoToneColor=wk;Vn.setTwoToneColor=T1;var $k=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:pk}))},P1=p.forwardRef($k);process.env.NODE_ENV!=="production"&&(P1.displayName="CheckCircleFilled");var Ok={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"},Nk=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:Ok}))},od=p.forwardRef(Nk);process.env.NODE_ENV!=="production"&&(od.displayName="CloseCircleFilled");var Mk={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"},Rk=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:Mk}))},fl=p.forwardRef(Rk);process.env.NODE_ENV!=="production"&&(fl.displayName="CloseOutlined");var Ik={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"},Tk=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:Ik}))},A1=p.forwardRef(Tk);process.env.NODE_ENV!=="production"&&(A1.displayName="ExclamationCircleFilled");var Pk={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"},Ak=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:Pk}))},k1=p.forwardRef(Ak);process.env.NODE_ENV!=="production"&&(k1.displayName="InfoCircleFilled");var kk=`accept acceptCharset accessKey action allowFullScreen allowTransparency
277
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
278
+ charSet checked classID className colSpan cols content contentEditable contextMenu
279
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
280
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
281
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
282
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
283
+ mediaGroup method min minLength multiple muted name noValidate nonce open
284
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
285
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
286
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
287
+ summary tabIndex target title type useMap value width wmode wrap`,Dk=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
288
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
289
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
290
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
291
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
292
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
293
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,_k="".concat(kk," ").concat(Dk).split(/[\s\n]+/),Lk="aria-",jk="data-";function Ub(e,t){return e.indexOf(t)===0}function Gr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=U({},t);var r={};return Object.keys(e).forEach(function(o){(n.aria&&(o==="role"||Ub(o,Lk))||n.data&&Ub(o,jk)||n.attr&&_k.includes(o))&&(r[o]=e[o])}),r}function D1(e){return e&&$.isValidElement(e)&&e.type===$.Fragment}const Bk=(e,t,n)=>$.isValidElement(e)?$.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function Lr(e,t){return Bk(e,e,t)}const Qr=e=>{const[,,,,t]=pr();return t?`${e}-css-var`:""};var Qe={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},zk={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"},Fk=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:zk}))},Dm=p.forwardRef(Fk);process.env.NODE_ENV!=="production"&&(Dm.displayName="LoadingOutlined");const hl=$.createContext(void 0);process.env.NODE_ENV!=="production"&&(hl.displayName="zIndexContext");const Eo=100,Hk=10,_1=Eo*Hk,Vk=_1+Eo,L1={Modal:Eo,Drawer:Eo,Popover:Eo,Popconfirm:Eo,Tooltip:Eo,Tour:Eo,FloatButton:Eo},Wk={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function qk(e){return e in L1}const pl=(e,t)=>{const[,n]=pr(),r=$.useContext(hl),o=qk(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+L1[e]:a+=Wk[e],i=[r===void 0?t:a,a]}if(process.env.NODE_ENV!=="production"){const a=rn(e),s=n.zIndexPopupBase+Vk,l=i[0]||0;process.env.NODE_ENV!=="production"&&a(t!==void 0||l<=s,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i};function Uk(){const[e,t]=p.useState([]),n=p.useCallback(r=>(t(o=>[].concat(Ie(o),[r])),()=>{t(o=>o.filter(i=>i!==r))}),[]);return[e,n]}function ur(){ur=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(T,R,_){T[R]=_.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(T,R,_){return Object.defineProperty(T,R,{value:_,enumerable:!0,configurable:!0,writable:!0}),T[R]}try{c({},"")}catch{c=function(_,V,F){return _[V]=F}}function u(T,R,_,V){var F=R&&R.prototype instanceof y?R:y,W=Object.create(F.prototype),K=new A(V||[]);return o(W,"_invoke",{value:M(T,_,K)}),W}function d(T,R,_){try{return{type:"normal",arg:T.call(R,_)}}catch(V){return{type:"throw",arg:V}}}t.wrap=u;var f="suspendedStart",h="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(L([])));w&&w!==n&&r.call(w,a)&&(x=w);var E=C.prototype=y.prototype=Object.create(x);function N(T){["next","throw","return"].forEach(function(R){c(T,R,function(_){return this._invoke(R,_)})})}function O(T,R){function _(F,W,K,J){var H=d(T[F],T,W);if(H.type!=="throw"){var X=H.arg,Y=X.value;return Y&&lt(Y)=="object"&&r.call(Y,"__await")?R.resolve(Y.__await).then(function(le){_("next",le,K,J)},function(le){_("throw",le,K,J)}):R.resolve(Y).then(function(le){X.value=le,K(X)},function(le){return _("throw",le,K,J)})}J(H.arg)}var V;o(this,"_invoke",{value:function(W,K){function J(){return new R(function(H,X){_(W,K,H,X)})}return V=V?V.then(J,J):J()}})}function M(T,R,_){var V=f;return function(F,W){if(V===m)throw Error("Generator is already running");if(V===v){if(F==="throw")throw W;return{value:e,done:!0}}for(_.method=F,_.arg=W;;){var K=_.delegate;if(K){var J=I(K,_);if(J){if(J===g)continue;return J}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(V===f)throw V=v,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);V=m;var H=d(T,R,_);if(H.type==="normal"){if(V=_.done?v:h,H.arg===g)continue;return{value:H.arg,done:_.done}}H.type==="throw"&&(V=v,_.method="throw",_.arg=H.arg)}}}function I(T,R){var _=R.method,V=T.iterator[_];if(V===e)return R.delegate=null,_==="throw"&&T.iterator.return&&(R.method="return",R.arg=e,I(T,R),R.method==="throw")||_!=="return"&&(R.method="throw",R.arg=new TypeError("The iterator does not provide a '"+_+"' method")),g;var F=d(V,T.iterator,R.arg);if(F.type==="throw")return R.method="throw",R.arg=F.arg,R.delegate=null,g;var W=F.arg;return W?W.done?(R[T.resultName]=W.value,R.next=T.nextLoc,R.method!=="return"&&(R.method="next",R.arg=e),R.delegate=null,g):W:(R.method="throw",R.arg=new TypeError("iterator result is not an object"),R.delegate=null,g)}function k(T){var R={tryLoc:T[0]};1 in T&&(R.catchLoc=T[1]),2 in T&&(R.finallyLoc=T[2],R.afterLoc=T[3]),this.tryEntries.push(R)}function D(T){var R=T.completion||{};R.type="normal",delete R.arg,T.completion=R}function A(T){this.tryEntries=[{tryLoc:"root"}],T.forEach(k,this),this.reset(!0)}function L(T){if(T||T===""){var R=T[a];if(R)return R.call(T);if(typeof T.next=="function")return T;if(!isNaN(T.length)){var _=-1,V=function F(){for(;++_<T.length;)if(r.call(T,_))return F.value=T[_],F.done=!1,F;return F.value=e,F.done=!0,F};return V.next=V}}throw new TypeError(lt(T)+" 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"),t.isGeneratorFunction=function(T){var R=typeof T=="function"&&T.constructor;return!!R&&(R===b||(R.displayName||R.name)==="GeneratorFunction")},t.mark=function(T){return Object.setPrototypeOf?Object.setPrototypeOf(T,C):(T.__proto__=C,c(T,l,"GeneratorFunction")),T.prototype=Object.create(E),T},t.awrap=function(T){return{__await:T}},N(O.prototype),c(O.prototype,s,function(){return this}),t.AsyncIterator=O,t.async=function(T,R,_,V,F){F===void 0&&(F=Promise);var W=new O(u(T,R,_,V),F);return t.isGeneratorFunction(R)?W:W.next().then(function(K){return K.done?K.value:W.next()})},N(E),c(E,l,"Generator"),c(E,a,function(){return this}),c(E,"toString",function(){return"[object Generator]"}),t.keys=function(T){var R=Object(T),_=[];for(var V in R)_.push(V);return _.reverse(),function F(){for(;_.length;){var W=_.pop();if(W in R)return F.value=W,F.done=!1,F}return F.done=!0,F}},t.values=L,A.prototype={constructor:A,reset:function(R){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!R)for(var _ in this)_.charAt(0)==="t"&&r.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=e)},stop:function(){this.done=!0;var R=this.tryEntries[0].completion;if(R.type==="throw")throw R.arg;return this.rval},dispatchException:function(R){if(this.done)throw R;var _=this;function V(X,Y){return K.type="throw",K.arg=R,_.next=X,Y&&(_.method="next",_.arg=e),!!Y}for(var F=this.tryEntries.length-1;F>=0;--F){var W=this.tryEntries[F],K=W.completion;if(W.tryLoc==="root")return V("end");if(W.tryLoc<=this.prev){var J=r.call(W,"catchLoc"),H=r.call(W,"finallyLoc");if(J&&H){if(this.prev<W.catchLoc)return V(W.catchLoc,!0);if(this.prev<W.finallyLoc)return V(W.finallyLoc)}else if(J){if(this.prev<W.catchLoc)return V(W.catchLoc,!0)}else{if(!H)throw Error("try statement without catch or finally");if(this.prev<W.finallyLoc)return V(W.finallyLoc)}}}},abrupt:function(R,_){for(var V=this.tryEntries.length-1;V>=0;--V){var F=this.tryEntries[V];if(F.tryLoc<=this.prev&&r.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var W=F;break}}W&&(R==="break"||R==="continue")&&W.tryLoc<=_&&_<=W.finallyLoc&&(W=null);var K=W?W.completion:{};return K.type=R,K.arg=_,W?(this.method="next",this.next=W.finallyLoc,g):this.complete(K)},complete:function(R,_){if(R.type==="throw")throw R.arg;return R.type==="break"||R.type==="continue"?this.next=R.arg:R.type==="return"?(this.rval=this.arg=R.arg,this.method="return",this.next="end"):R.type==="normal"&&_&&(this.next=_),g},finish:function(R){for(var _=this.tryEntries.length-1;_>=0;--_){var V=this.tryEntries[_];if(V.finallyLoc===R)return this.complete(V.completion,V.afterLoc),D(V),g}},catch:function(R){for(var _=this.tryEntries.length-1;_>=0;--_){var V=this.tryEntries[_];if(V.tryLoc===R){var F=V.completion;if(F.type==="throw"){var W=F.arg;D(V)}return W}}throw Error("illegal catch attempt")},delegateYield:function(R,_,V){return this.delegate={iterator:L(R),resultName:_,nextLoc:V},this.method==="next"&&(this.arg=e),g}},t}function Kb(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,o)}function Zi(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(l){Kb(i,r,o,a,s,"next",l)}function s(l){Kb(i,r,o,a,s,"throw",l)}a(void 0)})}}var ml=U({},CC),Kk=ml.version,gf=ml.render,Gk=ml.unmountComponentAtNode,id;try{var Xk=Number((Kk||"").split(".")[0]);Xk>=18&&(id=ml.createRoot)}catch{}function Gb(e){var t=ml.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&lt(t)==="object"&&(t.usingClientEntryPoint=e)}var Qc="__rc_react_root__";function Yk(e,t){Gb(!0);var n=t[Qc]||id(t);Gb(!1),n.render(e),t[Qc]=n}function Jk(e,t){gf==null||gf(e,t)}function Qk(e,t){if(id){Yk(e,t);return}Jk(e,t)}function Zk(e){return tp.apply(this,arguments)}function tp(){return tp=Zi(ur().mark(function e(t){return ur().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var o;(o=t[Qc])===null||o===void 0||o.unmount(),delete t[Qc]}));case 1:case"end":return r.stop()}},e)})),tp.apply(this,arguments)}function eD(e){Gk(e)}function tD(e){return np.apply(this,arguments)}function np(){return np=Zi(ur().mark(function e(t){return ur().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(id===void 0){r.next=2;break}return r.abrupt("return",Zk(t));case 2:eD(t);case 3:case"end":return r.stop()}},e)})),np.apply(this,arguments)}const nD=(e,t)=>{if(process.env.NODE_ENV!=="production"){const n=parseInt(p.version.split(".")[0],10),r=Object.keys(CC);process.env.NODE_ENV!=="production"&&Do(n<19||r.includes("createRoot"),"compatible","antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.")}return Qk(e,t),()=>tD(t)};let rD=nD;function j1(){return rD}const vf=()=>({height:0,opacity:0}),Xb=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},oD=e=>({height:e?e.offsetHeight:0}),bf=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",B1=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ys}-motion-collapse`,onAppearStart:vf,onEnterStart:vf,onAppearActive:Xb,onEnterActive:Xb,onLeaveStart:oD,onLeaveActive:vf,onAppearEnd:bf,onEnterEnd:bf,onLeaveEnd:bf,motionDeadline:500}},Ki=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function Fn(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}const _m=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1},iD=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{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 ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},aD=IA("Wave",e=>[iD(e)]),Lm=`${Ys}-wave-target`;function yf(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function sD(e){const{borderTopColor:t,borderColor:n,backgroundColor:r}=getComputedStyle(e);return yf(t)?t:yf(n)?n:yf(r)?r:null}function Cf(e){return Number.isNaN(e)?0:e}const lD=e=>{const{className:t,target:n,component:r,registerUnmount:o}=e,i=p.useRef(null),a=p.useRef(null);p.useEffect(()=>{a.current=o()},[]);const[s,l]=p.useState(null),[c,u]=p.useState([]),[d,f]=p.useState(0),[h,m]=p.useState(0),[v,g]=p.useState(0),[y,b]=p.useState(0),[C,x]=p.useState(!1),S={left:d,top:h,width:v,height:y,borderRadius:c.map(N=>`${N}px`).join(" ")};s&&(S["--wave-color"]=s);function w(){const N=getComputedStyle(n);l(sD(n));const O=N.position==="static",{borderLeftWidth:M,borderTopWidth:I}=N;f(O?n.offsetLeft:Cf(-parseFloat(M))),m(O?n.offsetTop:Cf(-parseFloat(I))),g(n.offsetWidth),b(n.offsetHeight);const{borderTopLeftRadius:k,borderTopRightRadius:D,borderBottomLeftRadius:A,borderBottomRightRadius:L}=N;u([k,D,L,A].map(T=>Cf(parseFloat(T))))}if(p.useEffect(()=>{if(n){const N=Dt(()=>{w(),x(!0)});let O;return typeof ResizeObserver<"u"&&(O=new ResizeObserver(w),O.observe(n)),()=>{Dt.cancel(N),O==null||O.disconnect()}}},[]),!C)return null;const E=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(Lm));return p.createElement(po,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,O)=>{var M,I;if(O.deadline||O.propertyName==="opacity"){const k=(M=i.current)===null||M===void 0?void 0:M.parentElement;(I=a.current)===null||I===void 0||I.call(a).then(()=>{k==null||k.remove()})}return!1}},(N,O)=>{let{className:M}=N;return p.createElement("div",{ref:dr(i,O),className:ee(t,M,{"wave-quick":E}),style:S})})},cD=(e,t)=>{var n;const{component:r}=t;if(r==="Checkbox"&&!(!((n=e.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",e==null||e.insertBefore(o,e==null?void 0:e.firstChild);const i=j1();let a=null;function s(){return a}a=i(p.createElement(lD,Object.assign({},t,{target:e,registerUnmount:s})),o)},uD=(e,t,n)=>{const{wave:r}=p.useContext(It),[,o,i]=pr(),a=Ut(c=>{const u=e.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${Lm}`)||u,{showEffect:f}=r||{};(f||cD)(d,{className:t,token:o,component:n,event:c,hashId:i})}),s=p.useRef(null);return c=>{Dt.cancel(s.current),s.current=Dt(()=>{a(c)})}},jm=e=>{const{children:t,disabled:n,component:r}=e,{getPrefixCls:o}=$.useContext(It),i=$.useRef(null),a=o("wave"),[,s]=aD(a),l=uD(i,ee(a,s),r);if($.useEffect(()=>{const u=i.current;if(!u||u.nodeType!==1||n)return;const d=f=>{!_m(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]),!$.isValidElement(t))return t??null;const c=vi(t)?dr(Ji(t),i):i;return Lr(t,{ref:c})};process.env.NODE_ENV!=="production"&&(jm.displayName="Wave");const jr=e=>{const t=$.useContext(Ba);return $.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},dD=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},fD=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},hD=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},z1=vn("Space",e=>{const t=Vt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[fD(t),hD(t),dD(t)]},()=>({}),{resetStyle:!1});var F1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const ad=p.createContext(null),bi=(e,t)=>{const n=p.useContext(ad),r=p.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return ee(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},pD=e=>{const{children:t}=e;return p.createElement(ad.Provider,{value:null},t)},mD=e=>{const{children:t}=e,n=F1(e,["children"]);return p.createElement(ad.Provider,{value:p.useMemo(()=>n,[n])},t)},gD=e=>{const{getPrefixCls:t,direction:n}=p.useContext(It),{size:r,direction:o,block:i,prefixCls:a,className:s,rootClassName:l,children:c}=e,u=F1(e,["size","direction","block","prefixCls","className","rootClassName","children"]),d=jr(C=>r??C),f=t("space-compact",a),[h,m]=z1(f),v=ee(f,m,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:i,[`${f}-vertical`]:o==="vertical"},s,l),g=p.useContext(ad),y=wr(c),b=p.useMemo(()=>y.map((C,x)=>{const S=(C==null?void 0:C.key)||`${f}-item-${x}`;return p.createElement(mD,{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:h(p.createElement("div",Object.assign({className:v},u),b))};var vD=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const H1=p.createContext(void 0),bD=e=>{const{getPrefixCls:t,direction:n}=p.useContext(It),{prefixCls:r,size:o,className:i}=e,a=vD(e,["prefixCls","size","className"]),s=t("btn-group",r),[,,l]=pr(),c=p.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=rn("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=ee(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return p.createElement(H1.Provider,{value:o},p.createElement("div",Object.assign({},a,{className:u})))},Yb=/^[\u4E00-\u9FA5]{2}$/,rp=Yb.test.bind(Yb);function V1(e){return e==="danger"?{danger:!0}:{type:e}}function Jb(e){return typeof e=="string"}function Yl(e){return e==="text"||e==="link"}function yD(e,t){if(e==null)return;const n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&Jb(e.type)&&rp(e.props.children)?Lr(e,{children:e.props.children.split("").join(n)}):Jb(e)?rp(e)?$.createElement("span",null,e.split("").join(n)):$.createElement("span",null,e):D1(e)?$.createElement("span",null,e):e}function CD(e,t){let n=!1;const r=[];return $.Children.forEach(e,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}),$.Children.map(r,o=>yD(o,t))}["default","primary","danger"].concat(Ie(ui));const op=$.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=ee(`${i}-icon`,n);return $.createElement("span",{ref:t,className:a,style:r},o)}),Qb=$.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=ee(`${n}-loading-icon`,r);return $.createElement(op,{prefixCls:n,className:a,style:o,ref:t},$.createElement(Dm,{className:i}))}),Sf=()=>({width:0,opacity:0,transform:"scale(0)"}),xf=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),SD=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,s=!!n;return r?$.createElement(Qb,{prefixCls:t,className:o,style:i}):$.createElement(po,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Sf,onAppearActive:xf,onEnterStart:Sf,onEnterActive:xf,onLeaveStart:xf,onLeaveActive:Sf},(l,c)=>{let{className:u,style:d}=l;const f=Object.assign(Object.assign({},i),d);return $.createElement(Qb,{prefixCls:t,className:ee(o,u),style:f,ref:c})})},Zb=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),xD=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},Zb(`${t}-primary`,o),Zb(`${t}-danger`,i)]}};var wD=["b"],ED=["v"],wf=function(t){return Math.round(Number(t||0))},$D=function(t){if(t instanceof qt)return t;if(t&&lt(t)==="object"&&"h"in t&&"b"in t){var n=t,r=n.b,o=wt(n,wD);return U(U({},o),{},{v:r})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},Xr=function(e){Po(n,e);var t=Ao(n);function n(r){return In(this,n),t.call(this,$D(r))}return Tn(n,[{key:"toHsbString",value:function(){var o=this.toHsb(),i=wf(o.s*100),a=wf(o.b*100),s=wf(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=wt(o,ED);return U(U({},a),{},{b:i,a:this.a})}}]),n}(qt),OD="rc-color-picker",$a=function(t){return t instanceof Xr?t:new Xr(t)},ND=$a("#1677ff"),W1=function(t){var n=t.offset,r=t.targetRef,o=t.containerRef,i=t.color,a=t.type,s=o.current.getBoundingClientRect(),l=s.width,c=s.height,u=r.current.getBoundingClientRect(),d=u.width,f=u.height,h=d/2,m=f/2,v=(n.x+h)/l,g=1-(n.y+m)/c,y=i.toHsb(),b=v,C=(n.x+h)/l*360;if(a)switch(a){case"hue":return $a(U(U({},y),{},{h:C<=0?0:C}));case"alpha":return $a(U(U({},y),{},{a:b<=0?0:b}))}return $a({h:y.h,s:v<=0?0:v,b:g>=1?1:g,a:y.a})},q1=function(t,n){var r=t.toHsb();switch(n){case"hue":return{x:r.h/360*100,y:50};case"alpha":return{x:t.a*100,y:50};default:return{x:r.s*100,y:(1-r.b)*100}}},Bm=function(t){var n=t.color,r=t.prefixCls,o=t.className,i=t.style,a=t.onClick,s="".concat(r,"-color-block");return $.createElement("div",{className:ee(s,o),style:i,onClick:a},$.createElement("div",{className:"".concat(s,"-inner"),style:{background:n}}))};function MD(e){var t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:t.pageX-n,pageY:t.pageY-r}}function U1(e){var t=e.targetRef,n=e.containerRef,r=e.direction,o=e.onDragChange,i=e.onDragChangeComplete,a=e.calculate,s=e.color,l=e.disabledDrag,c=$.useState({x:0,y:0}),u=ae(c,2),d=u[0],f=u[1],h=$.useRef(null),m=$.useRef(null);$.useEffect(function(){f(a())},[s]),$.useEffect(function(){return function(){document.removeEventListener("mousemove",h.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",h.current),document.removeEventListener("touchend",m.current),h.current=null,m.current=null}},[]);var v=function(x){var S=MD(x),w=S.pageX,E=S.pageY,N=n.current.getBoundingClientRect(),O=N.x,M=N.y,I=N.width,k=N.height,D=t.current.getBoundingClientRect(),A=D.width,L=D.height,T=A/2,R=L/2,_=Math.max(0,Math.min(w-O,I))-T,V=Math.max(0,Math.min(E-M,k))-R,F={x:_,y:r==="x"?d.y:V};if(A===0&&L===0||A!==L)return!1;o==null||o(F)},g=function(x){x.preventDefault(),v(x)},y=function(x){x.preventDefault(),document.removeEventListener("mousemove",h.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",h.current),document.removeEventListener("touchend",m.current),h.current=null,m.current=null,i==null||i()},b=function(x){document.removeEventListener("mousemove",h.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),h.current=g,m.current=y)};return[d,b]}var K1=function(t){var n=t.size,r=n===void 0?"default":n,o=t.color,i=t.prefixCls;return $.createElement("div",{className:ee("".concat(i,"-handler"),q({},"".concat(i,"-handler-sm"),r==="small")),style:{backgroundColor:o}})},G1=function(t){var n=t.children,r=t.style,o=t.prefixCls;return $.createElement("div",{className:"".concat(o,"-palette"),style:U({position:"relative"},r)},n)},X1=$.forwardRef(function(e,t){var n=e.children,r=e.x,o=e.y;return $.createElement("div",{ref:t,style:{position:"absolute",left:"".concat(r,"%"),top:"".concat(o,"%"),zIndex:1,transform:"translate(-50%, -50%)"}},n)}),RD=function(t){var n=t.color,r=t.onChange,o=t.prefixCls,i=t.onChangeComplete,a=t.disabled,s=$.useRef(),l=$.useRef(),c=$.useRef(n),u=Ut(function(v){var g=W1({offset:v,targetRef:l,containerRef:s,color:n});c.current=g,r(g)}),d=U1({color:n,containerRef:s,targetRef:l,calculate:function(){return q1(n)},onDragChange:u,onDragChangeComplete:function(){return i==null?void 0:i(c.current)},disabledDrag:a}),f=ae(d,2),h=f[0],m=f[1];return $.createElement("div",{ref:s,className:"".concat(o,"-select"),onMouseDown:m,onTouchStart:m},$.createElement(G1,{prefixCls:o},$.createElement(X1,{x:h.x,y:h.y,ref:l},$.createElement(K1,{color:n.toRgbString(),prefixCls:o})),$.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))"}})))},ID=function(t,n){var r=gn(t,{value:n}),o=ae(r,2),i=o[0],a=o[1],s=$.useMemo(function(){return $a(i)},[i]);return[s,a]},TD=function(t){var n=t.colors,r=t.children,o=t.direction,i=o===void 0?"to right":o,a=t.type,s=t.prefixCls,l=$.useMemo(function(){return n.map(function(c,u){var d=$a(c);return a==="alpha"&&u===n.length-1&&(d=new Xr(d.setA(1))),d.toRgbString()}).join(",")},[n,a]);return $.createElement("div",{className:"".concat(s,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(i,", ").concat(l,")")}},r)},PD=function(t){var n=t.prefixCls,r=t.colors,o=t.disabled,i=t.onChange,a=t.onChangeComplete,s=t.color,l=t.type,c=$.useRef(),u=$.useRef(),d=$.useRef(s),f=function(S){return l==="hue"?S.getHue():S.a*100},h=Ut(function(x){var S=W1({offset:x,targetRef:u,containerRef:c,color:s,type:l});d.current=S,i(f(S))}),m=U1({color:s,targetRef:u,containerRef:c,calculate:function(){return q1(s,l)},onDragChange:h,onDragChangeComplete:function(){a(f(d.current))},direction:"x",disabledDrag:o}),v=ae(m,2),g=v[0],y=v[1],b=$.useMemo(function(){if(l==="hue"){var x=s.toHsb();x.s=1,x.b=1,x.a=1;var S=new Xr(x);return S}return s},[s,l]),C=$.useMemo(function(){return r.map(function(x){return"".concat(x.color," ").concat(x.percent,"%")})},[r]);return $.createElement("div",{ref:c,className:ee("".concat(n,"-slider"),"".concat(n,"-slider-").concat(l)),onMouseDown:y,onTouchStart:y},$.createElement(G1,{prefixCls:n},$.createElement(X1,{x:g.x,y:g.y,ref:u},$.createElement(K1,{size:"small",color:b.toHexString(),prefixCls:n})),$.createElement(TD,{colors:C,type:l,prefixCls:n})))};function AD(e){return p.useMemo(function(){var t=e||{},n=t.slider;return[n||PD]},[e])}var kD=[{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}],Y1=$.forwardRef(function(e,t){var n=e.value,r=e.defaultValue,o=e.prefixCls,i=o===void 0?OD:o,a=e.onChange,s=e.onChangeComplete,l=e.className,c=e.style,u=e.panelRender,d=e.disabledAlpha,f=d===void 0?!1:d,h=e.disabled,m=h===void 0?!1:h,v=e.components,g=AD(v),y=ae(g,1),b=y[0],C=ID(r||ND,n),x=ae(C,2),S=x[0],w=x[1],E=$.useMemo(function(){return S.setA(1).toRgbString()},[S]),N=function(V,F){n||w(V),a==null||a(V,F)},O=function(V){return new Xr(S.setHue(V))},M=function(V){return new Xr(S.setA(V/100))},I=function(V){N(O(V),{type:"hue",value:V})},k=function(V){N(M(V),{type:"alpha",value:V})},D=function(V){s&&s(O(V))},A=function(V){s&&s(M(V))},L=ee("".concat(i,"-panel"),l,q({},"".concat(i,"-panel-disabled"),m)),T={prefixCls:i,disabled:m,color:S},R=$.createElement($.Fragment,null,$.createElement(RD,De({onChange:N},T,{onChangeComplete:s})),$.createElement("div",{className:"".concat(i,"-slider-container")},$.createElement("div",{className:ee("".concat(i,"-slider-group"),q({},"".concat(i,"-slider-group-disabled-alpha"),f))},$.createElement(b,De({},T,{type:"hue",colors:kD,min:0,max:359,value:S.getHue(),onChange:I,onChangeComplete:D})),!f&&$.createElement(b,De({},T,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:E}],min:0,max:100,value:S.a*100,onChange:k,onChangeComplete:A}))),$.createElement(Bm,{color:S.toRgbString(),prefixCls:i})));return $.createElement("div",{className:L,style:c,ref:t},typeof u=="function"?u(R):R)});process.env.NODE_ENV!=="production"&&(Y1.displayName="ColorPicker");const gs=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",DD=(e,t)=>e?gs(e,t):"";let Cr=function(){function e(t){In(this,e);var n;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(n=t.colors)===null||n===void 0?void 0:n.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const r=Array.isArray(t);r&&t.length?(this.colors=t.map(o=>{let{color:i,percent:a}=o;return{color:new e(i),percent:a}}),this.metaColor=new Xr(this.colors[0].color.metaColor)):this.metaColor=new Xr(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Tn(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return DD(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 _D={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"},LD=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:_D}))},Qs=p.forwardRef(LD);process.env.NODE_ENV!=="production"&&(Qs.displayName="RightOutlined");var J1=$.forwardRef(function(e,t){var n=e.prefixCls,r=e.forceRender,o=e.className,i=e.style,a=e.children,s=e.isActive,l=e.role,c=e.classNames,u=e.styles,d=$.useState(s||r),f=ae(d,2),h=f[0],m=f[1];return $.useEffect(function(){(r||s)&&m(!0)},[r,s]),h?$.createElement("div",{ref:t,className:ee("".concat(n,"-content"),q(q({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),o),style:i,role:l},$.createElement("div",{className:ee("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});J1.displayName="PanelContent";var jD=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],Q1=$.forwardRef(function(e,t){var n=e.showArrow,r=n===void 0?!0:n,o=e.headerClass,i=e.isActive,a=e.onItemClick,s=e.forceRender,l=e.className,c=e.classNames,u=c===void 0?{}:c,d=e.styles,f=d===void 0?{}:d,h=e.prefixCls,m=e.collapsible,v=e.accordion,g=e.panelKey,y=e.extra,b=e.header,C=e.expandIcon,x=e.openMotion,S=e.destroyInactivePanel,w=e.children,E=wt(e,jD),N=m==="disabled",O=y!=null&&typeof y!="boolean",M=q(q(q({onClick:function(){a==null||a(g)},onKeyDown:function(R){(R.key==="Enter"||R.keyCode===Qe.ENTER||R.which===Qe.ENTER)&&(a==null||a(g))},role:v?"tab":"button"},"aria-expanded",i),"aria-disabled",N),"tabIndex",N?-1:0),I=typeof C=="function"?C(e):$.createElement("i",{className:"arrow"}),k=I&&$.createElement("div",De({className:"".concat(h,"-expand-icon")},["header","icon"].includes(m)?M:{}),I),D=ee("".concat(h,"-item"),q(q({},"".concat(h,"-item-active"),i),"".concat(h,"-item-disabled"),N),l),A=ee(o,"".concat(h,"-header"),q({},"".concat(h,"-collapsible-").concat(m),!!m),u.header),L=U({className:A,style:f.header},["header","icon"].includes(m)?{}:M);return $.createElement("div",De({},E,{ref:t,className:D}),$.createElement("div",L,r&&k,$.createElement("span",De({className:"".concat(h,"-header-text")},m==="header"?M:{}),b),O&&$.createElement("div",{className:"".concat(h,"-extra")},y)),$.createElement(po,De({visible:i,leavedClassName:"".concat(h,"-content-hidden")},x,{forceRender:s,removeOnLeave:S}),function(T,R){var _=T.className,V=T.style;return $.createElement(J1,{ref:R,prefixCls:h,className:_,classNames:u,style:V,styles:f,isActive:i,forceRender:s,role:v?"tabpanel":void 0},w)}))}),BD=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],zD=function(t,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 t.map(function(d,f){var h=d.children,m=d.label,v=d.key,g=d.collapsible,y=d.onItemClick,b=d.destroyInactivePanel,C=wt(d,BD),x=String(v??f),S=g??i,w=b??a,E=function(M){S!=="disabled"&&(s(M),y==null||y(M))},N=!1;return o?N=l[0]===x:N=l.indexOf(x)>-1,$.createElement(Q1,De({},C,{prefixCls:r,key:x,panelKey:x,isActive:N,accordion:o,openMotion:c,expandIcon:u,header:m,collapsible:S,onItemClick:E,destroyInactivePanel:w}),h)})},FD=function(t,n,r){if(!t)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=t.key||String(n),h=t.props,m=h.header,v=h.headerClass,g=h.destroyInactivePanel,y=h.collapsible,b=h.onItemClick,C=!1;i?C=c[0]===f:C=c.indexOf(f)>-1;var x=y??a,S=function(N){x!=="disabled"&&(l(N),b==null||b(N))},w={key:f,panelKey:f,header:m,headerClass:v,isActive:C,prefixCls:o,destroyInactivePanel:g??s,openMotion:u,accordion:i,children:t.props.children,onItemClick:S,expandIcon:d,collapsible:x};return typeof t.type=="string"?t:(Object.keys(w).forEach(function(E){typeof w[E]>"u"&&delete w[E]}),$.cloneElement(t,w))};function HD(e,t,n){return Array.isArray(e)?zD(e,n):wr(t).map(function(r,o){return FD(r,o,n)})}function VD(e){var t=e;if(!Array.isArray(t)){var n=lt(t);t=n==="number"||n==="string"?[t]:[]}return t.map(function(r){return String(r)})}var WD=$.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-collapse":n,o=e.destroyInactivePanel,i=o===void 0?!1:o,a=e.style,s=e.accordion,l=e.className,c=e.children,u=e.collapsible,d=e.openMotion,f=e.expandIcon,h=e.activeKey,m=e.defaultActiveKey,v=e.onChange,g=e.items,y=ee(r,l),b=gn([],{value:h,onChange:function(O){return v==null?void 0:v(O)},defaultValue:m,postState:VD}),C=ae(b,2),x=C[0],S=C[1],w=function(O){return S(function(){if(s)return x[0]===O?[]:[O];var M=x.indexOf(O),I=M>-1;return I?x.filter(function(k){return k!==O}):[].concat(Ie(x),[O])})};Ct(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var E=HD(g,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:i,onItemClick:w,activeKey:x});return $.createElement("div",De({ref:t,className:y,style:a,role:s?"tablist":void 0},Gr(e,{aria:!0,data:!0})),E)});const zm=Object.assign(WD,{Panel:Q1});zm.Panel;const qD=p.forwardRef((e,t)=>{process.env.NODE_ENV!=="production"&&rn("Collapse.Panel").deprecated(!("disabled"in e),"disabled",'collapsible="disabled"');const{getPrefixCls:n}=p.useContext(It),{prefixCls:r,className:o,showArrow:i=!0}=e,a=n("collapse",r),s=ee({[`${a}-no-arrow`]:!i},o);return p.createElement(zm.Panel,Object.assign({ref:t},e,{prefixCls:a,className:s}))}),Z1=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
294
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
295
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),UD=e=>({animationDuration:e,animationFillMode:"both"}),KD=e=>({animationDuration:e,animationFillMode:"both"}),sd=function(e,t,n,r){const i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
296
+ ${i}${e}-enter,
297
+ ${i}${e}-appear
298
+ `]:Object.assign(Object.assign({},UD(r)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},KD(r)),{animationPlayState:"paused"}),[`
299
+ ${i}${e}-enter${e}-enter-active,
300
+ ${i}${e}-appear${e}-appear-active
301
+ `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},GD=new Gt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),XD=new Gt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),YD=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return[sd(r,GD,XD,e.motionDurationMid,t),{[`
302
+ ${o}${r}-enter,
303
+ ${o}${r}-appear
304
+ `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},JD=new Gt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),QD=new Gt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),ZD=new Gt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),e_=new Gt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),t_=new Gt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),n_=new Gt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),r_=new Gt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),o_=new Gt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),i_={"move-up":{inKeyframes:r_,outKeyframes:o_},"move-down":{inKeyframes:JD,outKeyframes:QD},"move-left":{inKeyframes:ZD,outKeyframes:e_},"move-right":{inKeyframes:t_,outKeyframes:n_}},Zc=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=i_[t];return[sd(r,o,i,e.motionDurationMid),{[`
305
+ ${r}-enter,
306
+ ${r}-appear
307
+ `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Fm=new Gt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Hm=new Gt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Vm=new Gt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Wm=new Gt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),a_=new Gt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),s_=new Gt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),l_=new Gt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),c_=new Gt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),u_={"slide-up":{inKeyframes:Fm,outKeyframes:Hm},"slide-down":{inKeyframes:Vm,outKeyframes:Wm},"slide-left":{inKeyframes:a_,outKeyframes:s_},"slide-right":{inKeyframes:l_,outKeyframes:c_}},Ha=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=u_[t];return[sd(r,o,i,e.motionDurationMid),{[`
308
+ ${r}-enter,
309
+ ${r}-appear
310
+ `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},d_=new Gt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),f_=new Gt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),e0=new Gt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),t0=new Gt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),h_=new Gt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),p_=new Gt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),m_=new Gt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),g_=new Gt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),v_=new Gt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),b_=new Gt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),y_=new Gt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),C_=new Gt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),S_={zoom:{inKeyframes:d_,outKeyframes:f_},"zoom-big":{inKeyframes:e0,outKeyframes:t0},"zoom-big-fast":{inKeyframes:e0,outKeyframes:t0},"zoom-left":{inKeyframes:m_,outKeyframes:g_},"zoom-right":{inKeyframes:v_,outKeyframes:b_},"zoom-up":{inKeyframes:h_,outKeyframes:p_},"zoom-down":{inKeyframes:y_,outKeyframes:C_}},gl=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=S_[t];return[sd(r,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
311
+ ${r}-enter,
312
+ ${r}-appear
313
+ `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},x_=e=>{const{componentCls:t,contentBg:n,padding:r,headerBg:o,headerPadding:i,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:h,colorTextDisabled:m,fontSizeLG:v,lineHeight:g,lineHeightLG:y,marginSM:b,paddingSM:C,paddingLG:x,paddingXS:S,motionDurationSlow:w,fontSizeIcon:E,contentPadding:N,fontHeight:O,fontHeightLG:M}=e,I=`${ne(c)} ${u} ${d}`;return{[t]:Object.assign(Object.assign({},Ln(e)),{backgroundColor:o,border:I,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:I,"&:first-child":{[`
314
+ &,
315
+ & > ${t}-header`]:{borderRadius:`${ne(l)} ${ne(l)} 0 0`}},"&:last-child":{[`
316
+ &,
317
+ & > ${t}-header`]:{borderRadius:`0 0 ${ne(l)} ${ne(l)}`}},[`> ${t}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:h,lineHeight:g,cursor:"pointer",transition:`all ${w}, visibility 0s`},Fa(e)),{[`> ${t}-header-text`]:{flex:"auto"},[`${t}-expand-icon`]:{height:O,display:"flex",alignItems:"center",paddingInlineEnd:b},[`${t}-arrow`]:Object.assign(Object.assign({},Qi()),{fontSize:E,transition:`transform ${w}`,svg:{transition:`transform ${w}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}}),[`${t}-collapsible-header`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-content`]:{color:f,backgroundColor:n,borderTop:I,[`& > ${t}-content-box`]:{padding:N},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:a,paddingInlineStart:S,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(C).sub(S).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:C}}},"&-large":{[`> ${t}-item`]:{fontSize:v,lineHeight:y,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:M,marginInlineStart:e.calc(x).sub(r).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:x}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-content`]:{borderRadius:`0 0 ${ne(l)} ${ne(l)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:b}}}}})}},w_=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},E_=e=>{const{componentCls:t,headerBg:n,paddingXXS:r,colorBorder:o}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${o}`},[`
318
+ > ${t}-item:last-child,
319
+ > ${t}-item:last-child ${t}-header
320
+ `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:r}}}},$_=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},O_=e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer}),N_=vn("Collapse",e=>{const t=Vt(e,{collapseHeaderPaddingSM:`${ne(e.paddingXS)} ${ne(e.paddingSM)}`,collapseHeaderPaddingLG:`${ne(e.padding)} ${ne(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[x_(t),E_(t),$_(t),w_(t),Z1(t)]},O_),ew=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:a}=$r("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:h,expandIconPosition:m="start",children:v,expandIcon:g}=e,y=jr(D=>{var A;return(A=h??D)!==null&&A!==void 0?A:"middle"}),b=n("collapse",s),C=n(),[x,S,w]=N_(b);if(process.env.NODE_ENV!=="production"){const D=rn("Collapse");process.env.NODE_ENV!=="production"&&D(m!=="left"&&m!=="right","deprecated","`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.")}const E=p.useMemo(()=>m==="left"?"start":m==="right"?"end":m,[m]),N=g??o,O=p.useCallback(function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const A=typeof N=="function"?N(D):p.createElement(Qs,{rotate:D.isActive?r==="rtl"?-90:90:void 0,"aria-label":D.isActive?"expanded":"collapsed"});return Lr(A,()=>{var L;return{className:ee((L=A==null?void 0:A.props)===null||L===void 0?void 0:L.className,`${b}-arrow`)}})},[N,b]),M=ee(`${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({},B1(C)),{motionAppear:!1,leavedClassName:`${b}-content-hidden`}),k=p.useMemo(()=>v?wr(v).map((D,A)=>{var L,T;const R=D.props;if(R!=null&&R.disabled){const _=(L=D.key)!==null&&L!==void 0?L:String(A),V=Object.assign(Object.assign({},Fn(D.props,["disabled"])),{key:_,collapsible:(T=R.collapsible)!==null&&T!==void 0?T:"disabled"});return Lr(D,V)}return D}):null,[v]);return x(p.createElement(zm,Object.assign({ref:t,openMotion:I},Fn(e,["rootClassName"]),{expandIcon:O,prefixCls:b,className:M,style:Object.assign(Object.assign({},a),u)}),k))});process.env.NODE_ENV!=="production"&&(ew.displayName="Collapse");const M_=Object.assign(ew,{Panel:qD}),or=e=>e instanceof Cr?e:new Cr(e),xc=e=>Math.round(Number(e||0)),qm=e=>xc(e.toHsb().a*100),wc=(e,t)=>{const n=e.toRgb();if(!n.r&&!n.g&&!n.b){const r=e.toHsb();return r.a=1,or(r)}return n.a=1,or(n)},tw=(e,t)=>{const n=[{percent:0,color:e[0].color}].concat(Ie(e),[{percent:100,color:e[e.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<=t&&t<=i){const l=i-o;if(l===0)return a;const c=(t-o)/l*100,u=new Xr(a),d=new Xr(s);return u.mix(d,c).toRgbString()}}return""},Ef=e=>e.map(t=>(t.colors=t.colors.map(or),t)),nw=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new Xr(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},n0=(e,t)=>{var n;return`panel-${(n=e.key)!==null&&n!==void 0?n:t}`},R_=e=>{let{prefixCls:t,presets:n,value:r,onChange:o}=e;const[i]=_o("ColorPicker"),[,a]=pr(),[s]=gn(Ef(n),{value:Ef(n),postState:Ef}),l=`${t}-presets`,c=$.useMemo(()=>s.reduce((f,h,m)=>{const{defaultOpen:v=!0}=h;return v&&f.push(n0(h,m)),f},[]),[s]),u=f=>{o==null||o(f)},d=s.map((f,h)=>{var m;return{key:n0(f,h),label:$.createElement("div",{className:`${l}-label`},f==null?void 0:f.label),children:$.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)=>$.createElement(Bm,{key:`preset-${g}-${v.toHexString()}`,color:or(v).toRgbString(),prefixCls:t,className:ee(`${l}-color`,{[`${l}-color-checked`]:v.toHexString()===(r==null?void 0:r.toHexString()),[`${l}-color-bright`]:nw(v,a.colorBgElevated)}),onClick:()=>u(v)})):$.createElement("span",{className:`${l}-empty`},i.presetEmpty))}});return $.createElement("div",{className:l},$.createElement(M_,{defaultActiveKey:c,ghost:!0,items:d}))},rw=e=>{const{paddingInline:t,onlyIconSize:n}=e;return Vt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},ow=e=>{var t,n,r,o,i,a;const s=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,l=(n=e.contentFontSizeSM)!==null&&n!==void 0?n:e.fontSize,c=(r=e.contentFontSizeLG)!==null&&r!==void 0?r:e.fontSizeLG,u=(o=e.contentLineHeight)!==null&&o!==void 0?o:Cc(s),d=(i=e.contentLineHeightSM)!==null&&i!==void 0?i:Cc(l),f=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:Cc(c),h=nw(new Cr(e.colorBgSolid),"#fff")?"#000":"#fff",m=ui.reduce((v,g)=>Object.assign(Object.assign({},v),{[`${g}ShadowColor`]:`0 ${ne(e.controlOutlineWidth)} 0 ${ms(e[`${g}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},m),{fontWeight:400,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:h,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((e.controlHeight-s*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*d)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-c*f)/2-e.lineWidth,0)})},I_=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,marginXS:s,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:e.marginXS,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${ne(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Qi(),"> a":{color:"currentColor"},"&:not(:disabled)":Fa(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"},[`&${t}-round`]:{width:"auto"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-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",[`${t}-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()}}}}}},iw=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),T_=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),P_=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),A_=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),ld=(e,t,n,r,o,i,a,s)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},iw(e,Object.assign({background:t},a),Object.assign({background:t},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),k_=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},A_(e))}),D_=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),cd=(e,t,n,r)=>{const i=r&&["link","text"].includes(r)?D_:k_;return Object.assign(Object.assign({},i(e)),iw(e.componentCls,t,n))},ud=(e,t,n,r,o)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:n},cd(e,r,o))}),dd=(e,t,n,r,o)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:n},cd(e,r,o))}),fd=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),hd=(e,t,n,r)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},cd(e,n,r))}),ho=(e,t,n,r,o)=>({[`&${e.componentCls}-variant-${n}`]:Object.assign({color:t,boxShadow:"none"},cd(e,r,o,n))}),__=e=>{const{componentCls:t}=e;return ui.reduce((n,r)=>{const o=e[`${r}6`],i=e[`${r}1`],a=e[`${r}5`],s=e[`${r}2`],l=e[`${r}3`],c=e[`${r}7`];return Object.assign(Object.assign({},n),{[`&${t}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:o,boxShadow:e[`${r}ShadowColor`]},ud(e,e.colorTextLightSolid,o,{background:a},{background:c})),dd(e,o,e.colorBgContainer,{color:a,borderColor:a,background:e.colorBgContainer},{color:c,borderColor:c,background:e.colorBgContainer})),fd(e)),hd(e,i,{background:s},{background:l})),ho(e,o,"link",{color:a},{color:c})),ho(e,o,"text",{color:a,background:i},{color:c,background:l}))})},{})},L_=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},ud(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),fd(e)),hd(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),ld(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),ho(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),j_=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},dd(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),fd(e)),hd(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),ho(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),ho(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),ld(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),B_=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},ud(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),dd(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),fd(e)),hd(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),ho(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),ho(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),ld(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),z_=e=>Object.assign(Object.assign({},ho(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),ld(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),F_=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:L_(e),[`${t}-color-primary`]:j_(e),[`${t}-color-dangerous`]:B_(e),[`${t}-color-link`]:z_(e)},__(e))},H_=e=>Object.assign(Object.assign(Object.assign(Object.assign({},dd(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),ho(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),ud(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),ho(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Um=function(e){let t=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}=e;return[{[t]:{fontSize:o,height:r,padding:`${ne(l)} ${ne(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:T_(e)},{[`${n}${n}-round${t}`]:P_(e)}]},V_=e=>{const t=Vt(e,{fontSize:e.contentFontSize});return Um(t,e.componentCls)},W_=e=>{const t=Vt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Um(t,`${e.componentCls}-sm`)},q_=e=>{const t=Vt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Um(t,`${e.componentCls}-lg`)},U_=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},K_=vn("Button",e=>{const t=rw(e);return[I_(t),V_(t),W_(t),q_(t),U_(t),F_(t),H_(t),xD(t)]},ow,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function G_(e,t,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(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function X_(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function vl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=e,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},G_(e,r,t)),X_(n,r,t))}}function Y_(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function J_(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Q_(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},Y_(e,t)),J_(e.componentCls,t))}}const Z_=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:r,calc:o}=e,i=o(r).mul(-1).equal(),a=s=>{const l=`${t}-compact${s?"-vertical":""}-item${t}-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))},eL=h1(["Button","compact"],e=>{const t=rw(e);return[vl(t),Q_(t),Z_(t)]},ow);var tL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function nL(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const rL={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},oL=$.forwardRef((e,t)=>{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:h,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:N,autoFocus:O}=e,M=tL(e,["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",[k,D]=$.useMemo(()=>{if(a&&s)return[a,s];const Le=rL[I]||[];return c?["danger",Le[1]]:Le},[l,a,s,c]),L=k==="danger"?"dangerous":k,{getPrefixCls:T,direction:R,autoInsertSpace:_,className:V,style:F,classNames:W,styles:K}=$r("button"),J=(n=N??_)!==null&&n!==void 0?n:!0,H=T("btn",i),[X,Y,le]=K_(H),Q=$.useContext(_r),fe=h??Q,ye=$.useContext(H1),ue=$.useMemo(()=>nL(o),[o]),[ie,me]=$.useState(ue.loading),[re,ce]=$.useState(!1),he=$.useRef(null),Ee=gi(t,he),Oe=$.Children.count(g)===1&&!y&&!Yl(D),xe=$.useRef(!0);$.useEffect(()=>(xe.current=!1,()=>{xe.current=!0}),[]),$.useEffect(()=>{let Le=null;ue.delay>0?Le=setTimeout(()=>{Le=null,me(!0)},ue.delay):me(ue.loading);function He(){Le&&(clearTimeout(Le),Le=null)}return He},[ue]),$.useEffect(()=>{if(!he.current||!J)return;const Le=he.current.textContent||"";Oe&&rp(Le)?re||ce(!0):re&&ce(!1)}),$.useEffect(()=>{O&&he.current&&he.current.focus()},[]);const je=$.useCallback(Le=>{var He;if(ie||fe){Le.preventDefault();return}(He=e.onClick)===null||He===void 0||He.call(e,("href"in e,Le))},[e.onClick,ie,fe]);if(process.env.NODE_ENV!=="production"){const Le=rn("Button");process.env.NODE_ENV!=="production"&&Le(!(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"&&Le(!(C&&Yl(D)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:z,compactItemClassnames:ve}=bi(H,R),se={large:"lg",small:"sm",middle:void 0},pe=jr(Le=>{var He,et;return(et=(He=d??z)!==null&&He!==void 0?He:ye)!==null&&et!==void 0?et:Le}),$e=pe&&(r=se[pe])!==null&&r!==void 0?r:"",Me=ie?"loading":y,we=Fn(M,["navigate"]),Be=ee(H,Y,le,{[`${H}-${u}`]:u!=="default"&&u,[`${H}-${I}`]:I,[`${H}-dangerous`]:c,[`${H}-color-${L}`]:L,[`${H}-variant-${D}`]:D,[`${H}-${$e}`]:$e,[`${H}-icon-only`]:!g&&g!==0&&!!Me,[`${H}-background-ghost`]:C&&!Yl(D),[`${H}-loading`]:ie,[`${H}-two-chinese-chars`]:re&&J&&!ie,[`${H}-block`]:x,[`${H}-rtl`]:R==="rtl",[`${H}-icon-end`]:b==="end"},ve,m,v,V),Fe=Object.assign(Object.assign({},F),E),Re=ee(w==null?void 0:w.icon,W.icon),qe=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),K.icon||{}),Ke=y&&!ie?$.createElement(op,{prefixCls:H,className:Re,style:qe},y):o&&typeof o=="object"&&o.icon?$.createElement(op,{prefixCls:H,className:Re,style:qe},o.icon):$.createElement(SD,{existIcon:!!y,prefixCls:H,loading:ie,mount:xe.current}),Pe=g||g===0?CD(g,Oe&&J):null;if(we.href!==void 0)return X($.createElement("a",Object.assign({},we,{className:ee(Be,{[`${H}-disabled`]:fe}),href:fe?void 0:we.href,style:Fe,onClick:je,ref:Ee,tabIndex:fe?-1:0}),Ke,Pe));let ze=$.createElement("button",Object.assign({},M,{type:S,className:Be,style:Fe,onClick:je,disabled:fe,ref:Ee}),Ke,Pe,ve&&$.createElement(eL,{prefixCls:H}));return Yl(D)||(ze=$.createElement(jm,{component:"Button",disabled:ie},ze)),X(ze)}),Io=oL;Io.Group=bD;Io.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(Io.displayName="Button");function $f(e){return!!(e!=null&&e.then)}const aw=e=>{const{type:t,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=e,d=p.useRef(!1),f=p.useRef(null),[h,m]=za(!1),v=function(){i==null||i.apply(void 0,arguments)};p.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=>{$f(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&&!$f(C)){d.current=!1,v(b);return}}else if(u.length)C=u(i),d.current=!1;else if(C=u(),!$f(C)){v();return}g(C)};return p.createElement(Io,Object.assign({},V1(t),{onClick:y,loading:h,prefixCls:r},o,{ref:f}),n)},bl=$.createContext({}),{Provider:sw}=bl,r0=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:s,onConfirm:l}=$.useContext(bl);return o?$.createElement(aw,{isSilent:r,actionFn:s,close:function(){a==null||a.apply(void 0,arguments),l==null||l(!1)},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},n):null},o0=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:s,onOk:l}=$.useContext(bl);return $.createElement(aw,{isSilent:n,type:a||"primary",actionFn:l,close:function(){t==null||t.apply(void 0,arguments),s==null||s(!0)},autoFocus:e==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)};var lw=p.createContext(null),i0=[];function iL(e,t){var n=p.useState(function(){if(!rr())return null;var m=document.createElement("div");return process.env.NODE_ENV!=="production"&&t&&m.setAttribute("data-debug",t),m}),r=ae(n,1),o=r[0],i=p.useRef(!1),a=p.useContext(lw),s=p.useState(i0),l=ae(s,2),c=l[0],u=l[1],d=a||(i.current?void 0:function(m){u(function(v){var g=[m].concat(Ie(v));return g})});function f(){o.parentElement||document.body.appendChild(o),i.current=!0}function h(){var m;(m=o.parentElement)===null||m===void 0||m.removeChild(o),i.current=!1}return en(function(){return e?a?a(f):f():h(),h},[e]),en(function(){c.length&&(c.forEach(function(m){return m()}),u(i0))},[c]),[o,d]}function aL(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;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(e){var a=getComputedStyle(e);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(e,"::-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,";"):"";Ro(`
321
+ #`.concat(t,`::-webkit-scrollbar {
322
+ `).concat(u,`
323
+ `).concat(d,`
324
+ }`),t)}catch(m){console.error(m),o=l,i=c}}document.body.appendChild(n);var f=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,h=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Us(t),{width:f,height:h}}function sL(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:aL(e)}function lL(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var cL="rc-util-locker-".concat(Date.now()),a0=0;function uL(e){var t=!!e,n=p.useState(function(){return a0+=1,"".concat(cL,"_").concat(a0)}),r=ae(n,1),o=r[0];en(function(){if(t){var i=sL(document.body).width,a=lL();Ro(`
325
+ html body {
326
+ overflow-y: hidden;
327
+ `.concat(a?"width: calc(100% - ".concat(i,"px);"):"",`
328
+ }`),o)}else Us(o);return function(){Us(o)}},[t,o])}var dL=!1;function fL(e){return dL}var s0=function(t){return t===!1?!1:!rr()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},pd=p.forwardRef(function(e,t){var n=e.open,r=e.autoLock,o=e.getContainer,i=e.debug,a=e.autoDestroy,s=a===void 0?!0:a,l=e.children,c=p.useState(n),u=ae(c,2),d=u[0],f=u[1],h=d||n;process.env.NODE_ENV!=="production"&&Ct(rr()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),p.useEffect(function(){(s||n)&&f(n)},[n,s]);var m=p.useState(function(){return s0(o)}),v=ae(m,2),g=v[0],y=v[1];p.useEffect(function(){var k=s0(o);y(k??null)});var b=iL(h&&!g,i),C=ae(b,2),x=C[0],S=C[1],w=g??x;uL(r&&n&&rr()&&(w===x||w===document.body));var E=null;if(l&&vi(l)&&t){var N=l;E=N.ref}var O=gi(E,t);if(!h||!rr()||g===void 0)return null;var M=w===!1||fL(),I=l;return t&&(I=p.cloneElement(l,{ref:O})),p.createElement(lw.Provider,{value:S},M?I:kr.createPortal(I,w))});process.env.NODE_ENV!=="production"&&(pd.displayName="Portal");var cw=p.createContext({});function hL(){var e=U({},p);return e.useId}var l0=0,c0=hL();const yl=c0?function(t){var n=c0();return t||(process.env.NODE_ENV==="test"?"test-id":n)}:function(t){var n=p.useState("ssr-id"),r=ae(n,2),o=r[0],i=r[1];return p.useEffect(function(){var a=l0;l0+=1,i("rc_unique_".concat(a))},[]),t||(process.env.NODE_ENV==="test"?"test-id":o)};function u0(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function d0(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var o=e.document;n=o.documentElement[r],typeof n!="number"&&(n=o.body[r])}return n}function pL(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=d0(o),n.top+=d0(o,!0),n}const mL=p.memo(function(e){var t=e.children;return t},function(e,t){var n=t.shouldUpdate;return!n});var gL={width:0,height:0,overflow:"hidden",outline:"none"},vL={outline:"none"},Km=$.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,o=e.style,i=e.title,a=e.ariaId,s=e.footer,l=e.closable,c=e.closeIcon,u=e.onClose,d=e.children,f=e.bodyStyle,h=e.bodyProps,m=e.modalRender,v=e.onMouseDown,g=e.onMouseUp,y=e.holderRef,b=e.visible,C=e.forceRender,x=e.width,S=e.height,w=e.classNames,E=e.styles,N=$.useContext(cw),O=N.panel,M=gi(y,O),I=$.useRef(),k=$.useRef();$.useImperativeHandle(t,function(){return{focus:function(){var K;(K=I.current)===null||K===void 0||K.focus({preventScroll:!0})},changeActive:function(K){var J=document,H=J.activeElement;K&&H===k.current?I.current.focus({preventScroll:!0}):!K&&H===I.current&&k.current.focus({preventScroll:!0})}}});var D={};x!==void 0&&(D.width=x),S!==void 0&&(D.height=S);var A=s?$.createElement("div",{className:ee("".concat(n,"-footer"),w==null?void 0:w.footer),style:U({},E==null?void 0:E.footer)},s):null,L=i?$.createElement("div",{className:ee("".concat(n,"-header"),w==null?void 0:w.header),style:U({},E==null?void 0:E.header)},$.createElement("div",{className:"".concat(n,"-title"),id:a},i)):null,T=$.useMemo(function(){return lt(l)==="object"&&l!==null?l:l?{closeIcon:c??$.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),R=Gr(T,!0),_=lt(l)==="object"&&l.disabled,V=l?$.createElement("button",De({type:"button",onClick:u,"aria-label":"Close"},R,{className:"".concat(n,"-close"),disabled:_}),T.closeIcon):null,F=$.createElement("div",{className:ee("".concat(n,"-content"),w==null?void 0:w.content),style:E==null?void 0:E.content},V,L,$.createElement("div",De({className:ee("".concat(n,"-body"),w==null?void 0:w.body),style:U(U({},f),E==null?void 0:E.body)},h),d),A);return $.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:M,style:U(U({},o),D),className:ee(n,r),onMouseDown:v,onMouseUp:g},$.createElement("div",{ref:I,tabIndex:0,style:vL},$.createElement(mL,{shouldUpdate:b||C},m?m(F):F)),$.createElement("div",{tabIndex:0,ref:k,style:gL}))});process.env.NODE_ENV!=="production"&&(Km.displayName="Panel");var uw=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,o=e.style,i=e.className,a=e.visible,s=e.forceRender,l=e.destroyOnClose,c=e.motionName,u=e.ariaId,d=e.onVisibleChanged,f=e.mousePosition,h=$.useRef(),m=p.useState(),v=ae(m,2),g=v[0],y=v[1],b={};g&&(b.transformOrigin=g);function C(){var x=pL(h.current);y(f&&(f.x||f.y)?"".concat(f.x-x.left,"px ").concat(f.y-x.top,"px"):"")}return p.createElement(po,{visible:a,onVisibleChanged:d,onAppearPrepare:C,onEnterPrepare:C,forceRender:s,motionName:c,removeOnLeave:l,ref:h},function(x,S){var w=x.className,E=x.style;return p.createElement(Km,De({},e,{ref:t,title:r,ariaId:u,prefixCls:n,holderRef:S,style:U(U(U({},E),o),b),className:ee(i,w)}))})});uw.displayName="Content";var bL=function(t){var n=t.prefixCls,r=t.style,o=t.visible,i=t.maskProps,a=t.motionName,s=t.className;return p.createElement(po,{key:"mask",visible:o,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return p.createElement("div",De({ref:c,style:U(U({},d),r),className:ee("".concat(n,"-mask"),u,s)},i))})},yL=function(t){var n=t.prefixCls,r=n===void 0?"rc-dialog":n,o=t.zIndex,i=t.visible,a=i===void 0?!1:i,s=t.keyboard,l=s===void 0?!0:s,c=t.focusTriggerAfterClose,u=c===void 0?!0:c,d=t.wrapStyle,f=t.wrapClassName,h=t.wrapProps,m=t.onClose,v=t.afterOpenChange,g=t.afterClose,y=t.transitionName,b=t.animation,C=t.closable,x=C===void 0?!0:C,S=t.mask,w=S===void 0?!0:S,E=t.maskTransitionName,N=t.maskAnimation,O=t.maskClosable,M=O===void 0?!0:O,I=t.maskStyle,k=t.maskProps,D=t.rootClassName,A=t.classNames,L=t.styles;process.env.NODE_ENV!=="production"&&(["wrapStyle","bodyStyle","maskStyle"].forEach(function(ce){fo(!(ce in t),"".concat(ce," is deprecated, please use styles instead."))}),"wrapClassName"in t&&fo(!1,"wrapClassName is deprecated, please use classNames instead."));var T=$.useRef(),R=$.useRef(),_=$.useRef(),V=p.useState(a),F=ae(V,2),W=F[0],K=F[1],J=yl();function H(){Oh(R.current,document.activeElement)||(T.current=document.activeElement)}function X(){if(!Oh(R.current,document.activeElement)){var ce;(ce=_.current)===null||ce===void 0||ce.focus()}}function Y(ce){if(ce)X();else{if(K(!1),w&&T.current&&u){try{T.current.focus({preventScroll:!0})}catch{}T.current=null}W&&(g==null||g())}v==null||v(ce)}function le(ce){m==null||m(ce)}var Q=$.useRef(!1),fe=$.useRef(),ye=function(){clearTimeout(fe.current),Q.current=!0},ue=function(){fe.current=setTimeout(function(){Q.current=!1})},ie=null;M&&(ie=function(he){Q.current?Q.current=!1:R.current===he.target&&le(he)});function me(ce){if(l&&ce.keyCode===Qe.ESC){ce.stopPropagation(),le(ce);return}a&&ce.keyCode===Qe.TAB&&_.current.changeActive(!ce.shiftKey)}$.useEffect(function(){a&&(K(!0),H())},[a]),$.useEffect(function(){return function(){clearTimeout(fe.current)}},[]);var re=U(U(U({zIndex:o},d),L==null?void 0:L.wrapper),{},{display:W?null:"none"});return p.createElement("div",De({className:ee("".concat(r,"-root"),D)},Gr(t,{data:!0})),p.createElement(bL,{prefixCls:r,visible:w&&a,motionName:u0(r,E,N),style:U(U({zIndex:o},I),L==null?void 0:L.mask),maskProps:k,className:A==null?void 0:A.mask}),p.createElement("div",De({tabIndex:-1,onKeyDown:me,className:ee("".concat(r,"-wrap"),f,A==null?void 0:A.wrapper),ref:R,onClick:ie,style:re},h),p.createElement(uw,De({},t,{onMouseDown:ye,onMouseUp:ue,ref:_,closable:x,ariaId:J,prefixCls:r,visible:a&&W,onClose:le,onVisibleChanged:Y,motionName:u0(r,y,b)}))))},dw=function(t){var n=t.visible,r=t.getContainer,o=t.forceRender,i=t.destroyOnClose,a=i===void 0?!1:i,s=t.afterClose,l=t.panelRef,c=p.useState(n),u=ae(c,2),d=u[0],f=u[1],h=p.useMemo(function(){return{panel:l}},[l]);return p.useEffect(function(){n&&f(!0)},[n]),!o&&a&&!d?null:p.createElement(cw.Provider,{value:h},p.createElement(pd,{open:n||o||d,autoDestroy:!1,getContainer:r,autoLock:n||d},p.createElement(yL,De({},t,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};dw.displayName="Dialog";var Ii="RC_FORM_INTERNAL_HOOKS",tn=function(){Ct(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Va=p.createContext({getFieldValue:tn,getFieldsValue:tn,getFieldError:tn,getFieldWarning:tn,getFieldsError:tn,isFieldsTouched:tn,isFieldTouched:tn,isFieldValidating:tn,isFieldsValidating:tn,resetFields:tn,setFields:tn,setFieldValue:tn,setFieldsValue:tn,validateFields:tn,submit:tn,getInternalHooks:function(){return tn(),{dispatch:tn,initEntityValue:tn,registerField:tn,useSubscribe:tn,setInitialValues:tn,destroyForm:tn,setCallbacks:tn,registerWatch:tn,getFields:tn,setValidateMessages:tn,setPreserve:tn,getInitialValue:tn}}}),eu=p.createContext(null);function ip(e){return e==null?[]:Array.isArray(e)?e:[e]}function CL(e){return e&&!!e._init}function ap(){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 t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var sp=ap();function SL(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function xL(e,t,n){if($m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Vs(o,n.prototype),o}function lp(e){var t=typeof Map=="function"?new Map:void 0;return lp=function(r){if(r===null||!SL(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,o)}function o(){return xL(r,arguments,Ws(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Vs(o,r)},lp(e)}var wL=/%[sdj%]/g,fw=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(fw=function(t,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function cp(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function Sr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var a=e.replace(wL,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 e}function EL(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Hn(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||EL(t)&&typeof e=="string"&&!e)}function $L(e,t,n){var r=[],o=0,i=e.length;function a(s){r.push.apply(r,Ie(s||[])),o++,o===i&&n(r)}e.forEach(function(s){t(s,a)})}function f0(e,t,n){var r=0,o=e.length;function i(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<o?t(e[s],i):n([])}i([])}function OL(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,Ie(e[n]||[]))}),t}var h0=function(e){Po(n,e);var t=Ao(n);function n(r,o){var i;return In(this,n),i=t.call(this,"Async Validation Error"),q(kt(i),"errors",void 0),q(kt(i),"fields",void 0),i.errors=r,i.fields=o,i}return Tn(n)}(lp(Error));function NL(e,t,n,r,o){if(t.first){var i=new Promise(function(f,h){var m=function(y){return r(y),y.length?h(new h0(y,cp(y))):f(o)},v=OL(e);f0(v,n,m)});return i.catch(function(f){return f}),i}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,u=[],d=new Promise(function(f,h){var m=function(g){if(u.push.apply(u,g),c++,c===l)return r(u),u.length?h(new h0(u,cp(u))):f(o)};s.length||(r(u),f(o)),s.forEach(function(v){var g=e[v];a.indexOf(v)!==-1?f0(g,n,m):$L(g,n,m)})});return d.catch(function(f){return f}),d}function ML(e){return!!(e&&e.message!==void 0)}function RL(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function p0(e,t){return function(n){var r;return e.fullFields?r=RL(t,e.fullFields):r=t[n.field||e.fullField],ML(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function m0(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];lt(r)==="object"&&lt(e[n])==="object"?e[n]=U(U({},e[n]),r):e[n]=r}}return e}var ia="enum",IL=function(t,n,r,o,i){t[ia]=Array.isArray(t[ia])?t[ia]:[],t[ia].indexOf(n)===-1&&o.push(Sr(i.messages[ia],t.fullField,t[ia].join(", ")))},TL=function(t,n,r,o,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||o.push(Sr(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||o.push(Sr(i.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},PL=function(t,n,r,o,i){var a=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",h=typeof n=="string",m=Array.isArray(n);if(f?d="number":h?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),h&&(u=n.replace(c,"_").length),a?u!==t.len&&o.push(Sr(i.messages[d].len,t.fullField,t.len)):s&&!l&&u<t.min?o.push(Sr(i.messages[d].min,t.fullField,t.min)):l&&!s&&u>t.max?o.push(Sr(i.messages[d].max,t.fullField,t.max)):s&&l&&(u<t.min||u>t.max)&&o.push(Sr(i.messages[d].range,t.fullField,t.min,t.max))},hw=function(t,n,r,o,i,a){t.required&&(!r.hasOwnProperty(t.field)||Hn(n,a||t.type))&&o.push(Sr(i.messages.required,t.fullField))},Jl;const AL=function(){if(Jl)return Jl;var e="[a-fA-F\\d:]",t=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\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(t(w)).concat(n).concat(t(w),")|(?:").concat(t(w)).concat(a).concat(t(w),")"),"g")};u.v4=function(S){return S&&S.exact?l:new RegExp("".concat(t(S)).concat(n).concat(t(S)),"g")},u.v6=function(S){return S&&S.exact?c:new RegExp("".concat(t(S)).concat(a).concat(t(S)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",h=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(h,"|").concat(m,"|").concat(v).concat(g).concat(y,")").concat(b).concat(C);return Jl=new RegExp("(?:^".concat(x,"$)"),"i"),Jl};var g0={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},vs={integer:function(t){return vs.number(t)&&parseInt(t,10)===t},float:function(t){return vs.number(t)&&!vs.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return lt(t)==="object"&&!vs.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(g0.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(AL())},hex:function(t){return typeof t=="string"&&!!t.match(g0.hex)}},kL=function(t,n,r,o,i){if(t.required&&n===void 0){hw(t,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;a.indexOf(s)>-1?vs[s](n)||o.push(Sr(i.messages.types[s],t.fullField,t.type)):s&&lt(n)!==t.type&&o.push(Sr(i.messages.types[s],t.fullField,t.type))},DL=function(t,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(Sr(i.messages.whitespace,t.fullField))};const Bt={required:hw,whitespace:DL,type:kL,range:PL,enum:IL,pattern:TL};var _L=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i)}r(a)},LL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return r();Bt.required(t,n,o,a,i,"array"),n!=null&&(Bt.type(t,n,o,a,i),Bt.range(t,n,o,a,i))}r(a)},jL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i),n!==void 0&&Bt.type(t,n,o,a,i)}r(a)},BL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n,"date")&&!t.required)return r();if(Bt.required(t,n,o,a,i),!Hn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Bt.type(t,l,o,a,i),l&&Bt.range(t,l.getTime(),o,a,i)}}r(a)},zL="enum",FL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i),n!==void 0&&Bt[zL](t,n,o,a,i)}r(a)},HL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i),n!==void 0&&(Bt.type(t,n,o,a,i),Bt.range(t,n,o,a,i))}r(a)},VL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i),n!==void 0&&(Bt.type(t,n,o,a,i),Bt.range(t,n,o,a,i))}r(a)},WL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i),n!==void 0&&Bt.type(t,n,o,a,i)}r(a)},qL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i),n!==void 0&&(Bt.type(t,n,o,a,i),Bt.range(t,n,o,a,i))}r(a)},UL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i),n!==void 0&&Bt.type(t,n,o,a,i)}r(a)},KL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n,"string")&&!t.required)return r();Bt.required(t,n,o,a,i),Hn(n,"string")||Bt.pattern(t,n,o,a,i)}r(a)},GL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n)&&!t.required)return r();Bt.required(t,n,o,a,i),Hn(n)||Bt.type(t,n,o,a,i)}r(a)},XL=function(t,n,r,o,i){var a=[],s=Array.isArray(n)?"array":lt(n);Bt.required(t,n,o,a,i,s),r(a)},YL=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Hn(n,"string")&&!t.required)return r();Bt.required(t,n,o,a,i,"string"),Hn(n,"string")||(Bt.type(t,n,o,a,i),Bt.range(t,n,o,a,i),Bt.pattern(t,n,o,a,i),t.whitespace===!0&&Bt.whitespace(t,n,o,a,i))}r(a)},Of=function(t,n,r,o,i){var a=t.type,s=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Hn(n,a)&&!t.required)return r();Bt.required(t,n,o,s,i,a),Hn(n,a)||Bt.type(t,n,o,s,i)}r(s)};const Os={string:YL,method:WL,number:qL,boolean:jL,regexp:GL,integer:VL,float:HL,array:LL,object:UL,enum:FL,pattern:KL,date:BL,url:Of,hex:Of,email:Of,required:XL,any:_L};var Cl=function(){function e(t){In(this,e),q(this,"rules",null),q(this,"_messages",sp),this.define(t)}return Tn(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(lt(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=m0(ap(),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,Ie(C))}else v.push(C)}for(var b=0;b<m.length;b++)y(m[b]);v.length?(g=cp(v),l(v,g)):l(null,a)}if(s.messages){var u=this.messages();u===sp&&(u=ap()),m0(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=U({},a)),g=a[m]=b.transform(g),g!=null&&(b.type=b.type||(Array.isArray(g)?"array":lt(g)))),typeof b=="function"?b={validator:b}:b=U({},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 h={};return NL(d,s,function(m,v){var g=m.rule,y=(g.type==="object"||g.type==="array")&&(lt(g.fields)==="object"||lt(g.defaultField)==="object");y=y&&(g.required||!g.required&&m.value),g.field=m.field;function b(E,N){return U(U({},N),{},{fullField:"".concat(g.fullField,".").concat(E),fullFields:g.fullFields?[].concat(Ie(g.fullFields),[E]):[E]})}function C(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=Array.isArray(E)?E:[E];!s.suppressWarning&&N.length&&e.warning("async-validator:",N),N.length&&g.message!==void 0&&(N=[].concat(g.message));var O=N.map(p0(g,a));if(s.first&&O.length)return h[g.field]=1,v(O);if(!y)v(O);else{if(g.required&&!m.value)return g.message!==void 0?O=[].concat(g.message).map(p0(g,a)):s.error&&(O=[s.error(g,Sr(s.messages.required,g.field))]),v(O);var M={};g.defaultField&&Object.keys(m.value).map(function(D){M[D]=g.defaultField}),M=U(U({},M),m.rule.fields);var I={};Object.keys(M).forEach(function(D){var A=M[D],L=Array.isArray(A)?A:[A];I[D]=L.map(b.bind(null,D))});var k=new e(I);k.messages(s.messages),m.rule.options&&(m.rule.options.messages=s.messages,m.rule.options.error=s.error),k.validate(m.value,m.rule.options||s,function(D){var A=[];O&&O.length&&A.push.apply(A,Ie(O)),D&&D.length&&A.push.apply(A,Ie(D)),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&&!Os.hasOwnProperty(n.type))throw new Error(Sr("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"?Os.required:Os[this.getType(n)]||void 0}}]),e}();q(Cl,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Os[t]=n});q(Cl,"warning",fw);q(Cl,"messages",sp);q(Cl,"validators",Os);var gr="'${name}' is not a valid ${type}",pw={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:gr,method:gr,array:gr,object:gr,number:gr,date:gr,boolean:gr,integer:gr,float:gr,regexp:gr,email:gr,url:gr,hex:gr},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}"}},v0=Cl;function JL(e,t){return e.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return t[r]})}var b0="CODE_LOGIC_ERROR";function up(e,t,n,r,o){return dp.apply(this,arguments)}function dp(){return dp=Zi(ur().mark(function e(t,n,r,o,i){var a,s,l,c,u,d,f,h,m;return ur().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return a=U({},r),delete a.ruleIndex,v0.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(b0)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new v0(q({},t,[a])),u=ba(pw,o.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(q({},t,n),U({},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===b0?u.default:C;return p.isValidElement(x)?p.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 up("".concat(t,".").concat(b),y,l,o,i)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(y,b){return[].concat(Ie(y),Ie(b))},[]));case 23:return h=U(U({},r),{},{name:t,enum:(r.enum||[]).join(", ")},i),m=d.map(function(y){return typeof y=="string"?JL(y,h):y}),g.abrupt("return",m);case 26:case"end":return g.stop()}},e,null,[[10,15]])})),dp.apply(this,arguments)}function QL(e,t,n,r,o,i){var a=e.join("."),s=n.map(function(u,d){var f=u.validator,h=U(U({},u),{},{ruleIndex:d});return f&&(h.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(){Ct(!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",Ct(y,"`callback` is deprecated. Please return a promise instead."),y&&C.then(function(){g()}).catch(function(x){g(x||" ")})}),h}).sort(function(u,d){var f=u.warningOnly,h=u.ruleIndex,m=d.warningOnly,v=d.ruleIndex;return!!f==!!m?h-v:f?1:-1}),l;if(o===!0)l=new Promise(function(){var u=Zi(ur().mark(function d(f,h){var m,v,g;return ur().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,up(a,t,v,r,i);case 5:if(g=b.sent,!g.length){b.next=9;break}return h([{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 up(a,t,u,r,i).then(function(d){return{errors:d,rule:u}})});l=(o?ej(c):ZL(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function ZL(e){return fp.apply(this,arguments)}function fp(){return fp=Zi(ur().mark(function e(t){return ur().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(o){var i,a=(i=[]).concat.apply(i,Ie(o));return a}));case 1:case"end":return r.stop()}},e)})),fp.apply(this,arguments)}function ej(e){return hp.apply(this,arguments)}function hp(){return hp=Zi(ur().mark(function e(t){var n;return ur().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=0,o.abrupt("return",new Promise(function(i){t.forEach(function(a){a.then(function(s){s.errors.length&&i([s]),n+=1,n===t.length&&i([])})})}));case 2:case"end":return o.stop()}},e)})),hp.apply(this,arguments)}function An(e){return ip(e)}function y0(e,t){var n={};return t.forEach(function(r){var o=so(e,r);n=Hr(n,r,o)}),n}function Oa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(r){return mw(t,r,n)})}function mw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!n&&e.length!==t.length?!1:t.every(function(r,o){return e[o]===r})}function tj(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||lt(e)!=="object"||lt(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),o=new Set([].concat(n,r));return Ie(o).every(function(i){var a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function nj(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&lt(t.target)==="object"&&e in t.target?t.target[e]:t}function C0(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],i=t-n;return i>0?[].concat(Ie(e.slice(0,n)),[o],Ie(e.slice(n,t)),Ie(e.slice(t+1,r))):i<0?[].concat(Ie(e.slice(0,t)),Ie(e.slice(t+1,n+1)),[o],Ie(e.slice(n+1,r))):e}var rj=["name"],Nr=[];function Nf(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}var Gm=function(e){Po(n,e);var t=Ao(n);function n(r){var o;if(In(this,n),o=t.call(this,r),q(kt(o),"state",{resetCount:0}),q(kt(o),"cancelRegisterFunc",null),q(kt(o),"mounted",!1),q(kt(o),"touched",!1),q(kt(o),"dirty",!1),q(kt(o),"validatePromise",void 0),q(kt(o),"prevValidating",void 0),q(kt(o),"errors",Nr),q(kt(o),"warnings",Nr),q(kt(o),"cancelRegister",function(){var l=o.props,c=l.preserve,u=l.isListField,d=l.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(u,c,An(d)),o.cancelRegisterFunc=null}),q(kt(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(Ie(f),Ie(c)):[]}),q(kt(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})}),q(kt(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),q(kt(o),"metaCache",null),q(kt(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=U(U({},o.getMeta()),{},{destroy:l});Da(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),q(kt(o),"onStoreChange",function(l,c,u){var d=o.props,f=d.shouldUpdate,h=d.dependencies,m=h===void 0?[]:h,v=d.onReset,g=u.store,y=o.getNamePath(),b=o.getValue(l),C=o.getValue(g),x=c&&Oa(c,y);switch(u.type==="valueUpdate"&&u.source==="external"&&!Da(b,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Nr,o.warnings=Nr,o.triggerMetaEvent()),u.type){case"reset":if(!c||x){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Nr,o.warnings=Nr,o.triggerMetaEvent(),v==null||v(),o.refresh();return}break;case"remove":{if(f&&Nf(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||Nr),"warnings"in S&&(o.warnings=S.warnings||Nr),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in S&&Oa(c,y,!0)){o.reRender();return}if(f&&!y.length&&Nf(f,l,g,b,C,u)){o.reRender();return}break}case"dependenciesUpdate":{var w=m.map(An);if(w.some(function(E){return Oa(u.relatedFields,E)})){o.reRender();return}break}default:if(x||(!m.length||y.length||f)&&Nf(f,l,g,b,C,u)){o.reRender();return}break}f===!0&&o.reRender()}),q(kt(o),"validateRules",function(l){var c=o.getNamePath(),u=o.getValue(),d=l||{},f=d.triggerName,h=d.validateOnly,m=h===void 0?!1:h,v=Promise.resolve().then(Zi(ur().mark(function g(){var y,b,C,x,S,w,E;return ur().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(o.mounted){O.next=2;break}return O.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(M){return M}).filter(function(M){var I=M.validateTrigger;if(!I)return!0;var k=ip(I);return k.includes(f)})),!(S&&f)){O.next=10;break}return O.next=8,new Promise(function(M){setTimeout(M,S)});case 8:if(o.validatePromise===v){O.next=10;break}return O.abrupt("return",[]);case 10:return E=QL(c,u,w,l,C,x),E.catch(function(M){return M}).then(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nr;if(o.validatePromise===v){var I;o.validatePromise=null;var k=[],D=[];(I=M.forEach)===null||I===void 0||I.call(M,function(A){var L=A.rule.warningOnly,T=A.errors,R=T===void 0?Nr:T;L?D.push.apply(D,Ie(R)):k.push.apply(k,Ie(R))}),o.errors=k,o.warnings=D,o.triggerMetaEvent(),o.reRender()}}),O.abrupt("return",E);case 13:case"end":return O.stop()}},g)})));return m||(o.validatePromise=v,o.dirty=!0,o.errors=Nr,o.warnings=Nr,o.triggerMetaEvent(),o.reRender()),v}),q(kt(o),"isFieldValidating",function(){return!!o.validatePromise}),q(kt(o),"isFieldTouched",function(){return o.touched}),q(kt(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var l=o.props.fieldContext,c=l.getInternalHooks(Ii),u=c.getInitialValue;return u(o.getNamePath())!==void 0}),q(kt(o),"getErrors",function(){return o.errors}),q(kt(o),"getWarnings",function(){return o.warnings}),q(kt(o),"isListField",function(){return o.props.isListField}),q(kt(o),"isList",function(){return o.props.isList}),q(kt(o),"isPreserve",function(){return o.props.preserve}),q(kt(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}),q(kt(o),"getOnlyChild",function(l){if(typeof l=="function"){var c=o.getMeta();return U(U({},o.getOnlyChild(l(o.getControlled(),c,o.props.fieldContext))),{},{isFunction:!0})}var u=wr(l);return u.length!==1||!p.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),q(kt(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return so(l||c(!0),u)}),q(kt(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,h=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(Ii),E=w.dispatch,N=o.getValue(),O=g||function(A){return q({},v,A)},M=l[d],I=u!==void 0?O(N):{};process.env.NODE_ENV!=="production"&&I&&Object.keys(I).forEach(function(A){Ct(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 k=U(U({},l),I);k[d]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var A,L=arguments.length,T=new Array(L),R=0;R<L;R++)T[R]=arguments[R];h?A=h.apply(void 0,T):A=nj.apply(void 0,[v].concat(T)),m&&(A=m(A,N,S(!0))),A!==N&&E({type:"updateValue",namePath:C,value:A}),M&&M.apply(void 0,T)};var D=ip(b||[]);return D.forEach(function(A){var L=k[A];k[A]=function(){L&&L.apply(void 0,arguments);var T=o.props.rules;T&&T.length&&E({type:"validateField",namePath:C,triggerName:A})}}),k}),r.fieldContext){var i=r.fieldContext.getInternalHooks,a=i(Ii),s=a.initEntityValue;s(kt(o))}return o}return Tn(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(Ii),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:p.isValidElement(s)?c=p.cloneElement(s,this.getControlled(s.props)):(Ct(!s,"`children` of Field is not validate ReactElement."),c=s),p.createElement(p.Fragment,{key:o},c)}}]),n}(p.Component);q(Gm,"contextType",Va);q(Gm,"defaultProps",{trigger:"onChange",valuePropName:"value"});function gw(e){var t,n=e.name,r=wt(e,rj),o=p.useContext(Va),i=p.useContext(eu),a=n!==void 0?An(n):void 0,s=(t=r.isListField)!==null&&t!==void 0?t:!!i,l="keep";return s||(l="_".concat((a||[]).join("_"))),process.env.NODE_ENV!=="production"&&r.preserve===!1&&s&&a.length<=1&&Ct(!1,"`preserve` should not apply on Form.List fields."),p.createElement(Gm,De({key:l,name:a,isListField:s},r,{fieldContext:o}))}function oj(e){var t=e.name,n=e.initialValue,r=e.children,o=e.rules,i=e.validateTrigger,a=e.isListField,s=p.useContext(Va),l=p.useContext(eu),c=p.useRef({keys:[],id:0}),u=c.current,d=p.useMemo(function(){var v=An(s.prefixName)||[];return[].concat(Ie(v),Ie(An(t)))},[s.prefixName,t]),f=p.useMemo(function(){return U(U({},s),{},{prefixName:d})},[s,d]),h=p.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 Ct(!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 p.createElement(eu.Provider,{value:h},p.createElement(Va.Provider,{value:f},p.createElement(gw,{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 O=x(d||[]);return O||[]},w={add:function(O,M){var I=S();M>=0&&M<=I.length?(u.keys=[].concat(Ie(u.keys.slice(0,M)),[u.id],Ie(u.keys.slice(M))),C([].concat(Ie(I.slice(0,M)),[O],Ie(I.slice(M))))):(process.env.NODE_ENV!=="production"&&(M<0||M>I.length)&&Ct(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(Ie(u.keys),[u.id]),C([].concat(Ie(I),[O]))),u.id+=1},remove:function(O){var M=S(),I=new Set(Array.isArray(O)?O:[O]);I.size<=0||(u.keys=u.keys.filter(function(k,D){return!I.has(D)}),C(M.filter(function(k,D){return!I.has(D)})))},move:function(O,M){if(O!==M){var I=S();O<0||O>=I.length||M<0||M>=I.length||(u.keys=C0(u.keys,O,M),C(C0(I,O,M)))}}},E=b||[];return Array.isArray(E)||(E=[],process.env.NODE_ENV!=="production"&&Ct(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),r(E.map(function(N,O){var M=u.keys[O];return M===void 0&&(u.keys[O]=u.id,M=u.keys[O],u.id+=1),{name:O,key:M,isListField:!0}}),w,g)})))}function ij(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(o,i){e.forEach(function(a,s){a.catch(function(l){return t=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(t&&i(r),o(r))})})}):Promise.resolve([])}var vw="__@field_split__";function Mf(e){return e.map(function(t){return"".concat(lt(t),":").concat(t)}).join(vw)}var aa=function(){function e(){In(this,e),q(this,"kvs",new Map)}return Tn(e,[{key:"set",value:function(n,r){this.kvs.set(Mf(n),r)}},{key:"get",value:function(n){return this.kvs.get(Mf(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(Mf(n))}},{key:"map",value:function(n){return Ie(this.kvs.entries()).map(function(r){var o=ae(r,2),i=o[0],a=o[1],s=i.split(vw);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=ae(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}}]),e}(),aj=["name"],sj=Tn(function e(t){var n=this;In(this,e),q(this,"formHooked",!1),q(this,"forceRootUpdate",void 0),q(this,"subscribable",!0),q(this,"store",{}),q(this,"fieldEntities",[]),q(this,"initialValues",{}),q(this,"callbacks",{}),q(this,"validateMessages",null),q(this,"preserve",null),q(this,"lastValidatePromise",null),q(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}}),q(this,"getInternalHooks",function(r){return r===Ii?(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}):(Ct(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),q(this,"useSubscribe",function(r){n.subscribable=r}),q(this,"prevWithoutPreserves",null),q(this,"setInitialValues",function(r,o){if(n.initialValues=r||{},o){var i,a=ba(r,n.store);(i=n.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=Hr(a,l,so(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),q(this,"destroyForm",function(r){if(r)n.updateStore({});else{var o=new aa;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||o.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=o}}),q(this,"getInitialValue",function(r){var o=so(n.initialValues,r);return r.length?ba(o):o}),q(this,"setCallbacks",function(r){n.callbacks=r}),q(this,"setValidateMessages",function(r){n.validateMessages=r}),q(this,"setPreserve",function(r){n.preserve=r}),q(this,"watchList",[]),q(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(o){return o!==r})}}),q(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)})}}),q(this,"timeoutId",null),q(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||Ct(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),q(this,"updateStore",function(r){n.store=r}),q(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}),q(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new aa;return n.getFieldEntities(r).forEach(function(i){var a=i.getNamePath();o.set(a,i)}),o}),q(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var o=n.getFieldsMap(!0);return r.map(function(i){var a=An(i);return o.get(a)||{INVALIDATE_NAME_PATH:An(i)}})}),q(this,"getFieldsValue",function(r,o){n.warningUnhooked();var i,a,s;if(r===!0||Array.isArray(r)?(i=r,a=o):r&&lt(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,h="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(h);else{var g="getMeta"in u?u.getMeta():null;a(g)&&c.push(h)}}),y0(n.store,c.map(An))}),q(this,"getFieldValue",function(r){n.warningUnhooked();var o=An(r);return so(n.store,o)}),q(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:An(r[a]),errors:[],warnings:[]}})}),q(this,"getFieldError",function(r){n.warningUnhooked();var o=An(r),i=n.getFieldsError([o])[0];return i.errors}),q(this,"getFieldWarning",function(r){n.warningUnhooked();var o=An(r),i=n.getFieldsError([o])[0];return i.warnings}),q(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(An),c=!1):(l=null,c=a):(l=a.map(An),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 aa;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(Ie(b),[v])})})});var h=function(g){return g.some(d)},m=f.map(function(v){var g=v.value;return g});return c?m.every(h):m.some(h)}),q(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),q(this,"isFieldsValidating",function(r){n.warningUnhooked();var o=n.getFieldEntities();if(!r)return o.some(function(a){return a.isFieldValidating()});var i=r.map(An);return o.some(function(a){var s=a.getNamePath();return Oa(i,s)&&a.isFieldValidating()})}),q(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),q(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=new aa,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(),h=n.getInitialValue(f);if(h!==void 0)Ct(!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)Ct(!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(Hr(n.store,f,Ie(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,Ie(Ie(c).map(function(d){return d.entity})))}})):s=i,a(s)}),q(this,"resetFields",function(r){n.warningUnhooked();var o=n.store;if(!r){n.updateStore(ba(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(o,null,{type:"reset"}),n.notifyWatch();return}var i=r.map(An);i.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(Hr(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:i}),n.notifyObservers(o,i,{type:"reset"}),n.notifyWatch(i)}),q(this,"setFields",function(r){n.warningUnhooked();var o=n.store,i=[];r.forEach(function(a){var s=a.name,l=wt(a,aj),c=An(s);i.push(c),"value"in l&&n.updateStore(Hr(n.store,c,l.value)),n.notifyObservers(o,[c],{type:"setField",data:a})}),n.notifyWatch(i)}),q(this,"getFields",function(){var r=n.getFieldEntities(!0),o=r.map(function(i){var a=i.getNamePath(),s=i.getMeta(),l=U(U({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return o}),q(this,"initEntityValue",function(r){var o=r.props.initialValue;if(o!==void 0){var i=r.getNamePath(),a=so(n.store,i);a===void 0&&n.updateStore(Hr(n.store,i,o))}}),q(this,"isMergedPreserve",function(r){var o=r!==void 0?r:n.preserve;return o??!0}),q(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!mw(d.getNamePath(),o)})){var u=n.store;n.updateStore(Hr(u,o,c,!0)),n.notifyObservers(u,[o],{type:"remove"}),n.triggerDependenciesUpdate(u,o)}}n.notifyWatch([o])}}),q(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}}}),q(this,"notifyObservers",function(r,o,i){if(n.subscribable){var a=U(U({},i),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,o,a)})}else n.forceRootUpdate()}),q(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(Ie(i))}),i}),q(this,"updateValue",function(r,o){var i=An(r),a=n.store;n.updateStore(Hr(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=y0(n.store,[i]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([i].concat(Ie(s)))}),q(this,"setFieldsValue",function(r){n.warningUnhooked();var o=n.store;if(r){var i=ba(n.store,r);n.updateStore(i)}n.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),q(this,"setFieldValue",function(r,o){n.setFields([{name:r,value:o,errors:[],warnings:[]}])}),q(this,"getDependencyChildrenFields",function(r){var o=new Set,i=[],a=new aa;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=An(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}),q(this,"triggerOnFieldsChange",function(r,o){var i=n.callbacks.onFieldsChange;if(i){var a=n.getFields();if(o){var s=new aa;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 Oa(r,u)});l.length&&i(l,a)}}),q(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(An):[],c=[],u=String(Date.now()),d=new Set,f=a||{},h=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||Oa(l,C,h)){var x=b.validateRules(U({validateMessages:U(U({},pw),n.validateMessages)},a));c.push(x.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(S){var w,E=[],N=[];return(w=S.forEach)===null||w===void 0||w.call(S,function(O){var M=O.rule.warningOnly,I=O.errors;M?N.push.apply(N,Ie(I)):E.push.apply(E,Ie(I))}),E.length?Promise.reject({name:C,errors:E,warnings:N}):{name:C,errors:E,warnings:N}}))}}});var v=ij(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}),q(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=t});function bw(e){var t=p.useRef(),n=p.useState({}),r=ae(n,2),o=r[1];if(!t.current)if(e)t.current=e;else{var i=function(){o({})},a=new sj(i);t.current=a.getForm()}return[t.current]}var pp=p.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),lj=function(t){var n=t.validateMessages,r=t.onFormChange,o=t.onFormFinish,i=t.children,a=p.useContext(pp),s=p.useRef({});return p.createElement(pp.Provider,{value:U(U({},a),{},{validateMessages:U(U({},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=U(U({},s.current),{},q({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=U({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},i)},cj=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],uj=function(t,n){var r=t.name,o=t.initialValues,i=t.fields,a=t.form,s=t.preserve,l=t.children,c=t.component,u=c===void 0?"form":c,d=t.validateMessages,f=t.validateTrigger,h=f===void 0?"onChange":f,m=t.onValuesChange,v=t.onFieldsChange,g=t.onFinish,y=t.onFinishFailed,b=t.clearOnDestroy,C=wt(t,cj),x=p.useRef(null),S=p.useContext(pp),w=bw(a),E=ae(w,1),N=E[0],O=N.getInternalHooks(Ii),M=O.useSubscribe,I=O.setInitialValues,k=O.setCallbacks,D=O.setValidateMessages,A=O.setPreserve,L=O.destroyForm;p.useImperativeHandle(n,function(){return U(U({},N),{},{nativeElement:x.current})}),p.useEffect(function(){return S.registerForm(r,N),function(){S.unregisterForm(r)}},[S,N,r]),D(U(U({},S.validateMessages),d)),k({onValuesChange:m,onFieldsChange:function(H){if(S.triggerFormChange(r,H),v){for(var X=arguments.length,Y=new Array(X>1?X-1:0),le=1;le<X;le++)Y[le-1]=arguments[le];v.apply(void 0,[H].concat(Y))}},onFinish:function(H){S.triggerFormFinish(r,H),g&&g(H)},onFinishFailed:y}),A(s);var T=p.useRef(null);I(o,!T.current),T.current||(T.current=!0),p.useEffect(function(){return function(){return L(b)}},[]);var R,_=typeof l=="function";if(_){var V=N.getFieldsValue(!0);R=l(V,N)}else R=l;M(!_);var F=p.useRef();p.useEffect(function(){tj(F.current||[],i||[])||N.setFields(i||[]),F.current=i},[i,N]);var W=p.useMemo(function(){return U(U({},N),{},{validateTrigger:h})},[N,h]),K=p.createElement(eu.Provider,{value:null},p.createElement(Va.Provider,{value:W},R));return u===!1?K:p.createElement(u,De({},C,{ref:x,onSubmit:function(H){H.preventDefault(),H.stopPropagation(),N.submit()},onReset:function(H){var X;H.preventDefault(),N.resetFields(),(X=C.onReset)===null||X===void 0||X.call(C,H)}}),K)};function S0(e){try{return JSON.stringify(e)}catch{return Math.random()}}var dj=process.env.NODE_ENV!=="production"?function(e){var t=e.join("__RC_FIELD_FORM_SPLIT__"),n=$.useRef(t);Ct(n.current===t,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")}:function(){};function fj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=o===void 0?{}:o,a=CL(i)?{form:i}:i,s=a.form,l=$.useState(),c=ae(l,2),u=c[0],d=c[1],f=$.useMemo(function(){return S0(u)},[u]),h=$.useRef(f);h.current=f;var m=$.useContext(Va),v=s||m,g=v&&v._init;process.env.NODE_ENV!=="production"&&Ct(t.length===2?s?g:!0:g,"useWatch requires a form instance since it can not auto detect from context.");var y=An(r),b=$.useRef(y);return b.current=y,dj(y),$.useEffect(function(){if(g){var C=v.getFieldsValue,x=v.getInternalHooks,S=x(Ii),w=S.registerWatch,E=function(I,k){var D=a.preserve?k:I;return typeof r=="function"?r(D):so(D,b.current)},N=w(function(M,I){var k=E(M,I),D=S0(k);h.current!==D&&(h.current=D,d(k))}),O=E(C(),C(!0));return u!==O&&d(O),N}},[g]),u}var hj=p.forwardRef(uj),Sl=hj;Sl.FormProvider=lj;Sl.Field=gw;Sl.List=oj;Sl.useForm=bw;Sl.useWatch=fj;const Er=p.createContext({});process.env.NODE_ENV!=="production"&&(Er.displayName="FormItemInputContext");const pj=e=>{let{children:t,status:n,override:r}=e;const o=p.useContext(Er),i=p.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 p.createElement(Er.Provider,{value:i},t)},mj=p.createContext(void 0),di=e=>{const{space:t,form:n,children:r}=e;if(r==null)return null;let o=r;return n&&(o=$.createElement(pj,{override:!0,status:!0},o)),t&&(o=$.createElement(pD,null,o)),o};function x0(e){if(e)return{closable:e.closable,closeIcon:e.closeIcon}}function w0(e){const{closable:t,closeIcon:n}=e||{};return $.useMemo(()=>{if(!t&&(t===!1||n===!1||n===null))return!1;if(t===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return t&&typeof t=="object"&&(r=Object.assign(Object.assign({},r),t)),r},[t,n])}function E0(){const e={};for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(o=>{o&&Object.keys(o).forEach(i=>{o[i]!==void 0&&(e[i]=o[i])})}),e}const gj={};function vj(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gj;const r=w0(e),o=w0(t),i=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,a=$.useMemo(()=>Object.assign({closeIcon:$.createElement(fl,null)},n),[n]),s=$.useMemo(()=>r===!1?!1:r?E0(a,o,r):o===!1?!1:o?E0(a,o):a.closable?a:!1,[r,o,a]);return $.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=Gr(s,!0);Object.keys(d).length&&(u=$.isValidElement(u)?$.cloneElement(u,d):$.createElement("span",Object.assign({},d),u))}return[!0,u,i]},[s,a])}const bj=()=>rr()&&window.document.documentElement,md=e=>{const{prefixCls:t,className:n,style:r,size:o,shape:i}=e,a=ee({[`${t}-lg`]:o==="large",[`${t}-sm`]:o==="small"}),s=ee({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),l=p.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return p.createElement("span",{className:ee(t,a,s,n),style:Object.assign(Object.assign({},l),r)})},yj=new Gt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),gd=e=>({height:e,lineHeight:ne(e)}),Na=e=>Object.assign({width:e},gd(e)),Cj=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:yj,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Rf=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},gd(e)),Sj=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},Na(r)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Na(o)),[`${t}${t}-sm`]:Object.assign({},Na(i))}},xj=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=e;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Rf(t,s)),[`${r}-lg`]:Object.assign({},Rf(o,s)),[`${r}-sm`]:Object.assign({},Rf(i,s))}},$0=e=>Object.assign({width:e},gd(e)),wj=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:o,calc:i}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:o},$0(i(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},$0(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},If=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Tf=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},gd(e)),Ej=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},Tf(r,s))},If(e,r,n)),{[`${n}-lg`]:Object.assign({},Tf(o,s))}),If(e,o,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Tf(i,s))}),If(e,i,`${n}-sm`))},$j=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:h,borderRadius:m,titleHeight:v,blockRadius:g,paragraphLiHeight:y,controlHeightXS:b,paragraphMarginTop:C}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},Na(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},Na(c)),[`${n}-sm`]:Object.assign({},Na(u))},[`${t}-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 ${t}-content`]:{[`${r}, ${o} > li`]:{borderRadius:m}}},[`${t}-with-avatar ${t}-content`]:{[r]:{marginBlockStart:h,[`+ ${o}`]:{marginBlockStart:C}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Ej(e)),Sj(e)),xj(e)),wj(e)),[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[`
329
+ ${r},
330
+ ${o} > li,
331
+ ${n},
332
+ ${i},
333
+ ${a},
334
+ ${s}
335
+ `]:Object.assign({},Cj(e))}}},Oj=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,o=n;return{color:r,colorGradientEnd:o,gradientFromColor:r,gradientToColor:o,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},Ga=vn("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=Vt(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[$j(r)]},Oj,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Nj=e=>{const{prefixCls:t,className:n,rootClassName:r,active:o,shape:i="circle",size:a="default"}=e,{getPrefixCls:s}=p.useContext(It),l=s("skeleton",t),[c,u,d]=Ga(l),f=Fn(e,["prefixCls","className"]),h=ee(l,`${l}-element`,{[`${l}-active`]:o},n,r,u,d);return c(p.createElement("div",{className:h},p.createElement(md,Object.assign({prefixCls:`${l}-avatar`,shape:i,size:a},f))))},Mj=e=>{const{prefixCls:t,className:n,rootClassName:r,active:o,block:i=!1,size:a="default"}=e,{getPrefixCls:s}=p.useContext(It),l=s("skeleton",t),[c,u,d]=Ga(l),f=Fn(e,["prefixCls"]),h=ee(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(p.createElement("div",{className:h},p.createElement(md,Object.assign({prefixCls:`${l}-button`,size:a},f))))},Rj="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",Ij=e=>{const{prefixCls:t,className:n,rootClassName:r,style:o,active:i}=e,{getPrefixCls:a}=p.useContext(It),s=a("skeleton",t),[l,c,u]=Ga(s),d=ee(s,`${s}-element`,{[`${s}-active`]:i},n,r,c,u);return l(p.createElement("div",{className:d},p.createElement("div",{className:ee(`${s}-image`,n),style:o},p.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},p.createElement("title",null,"Image placeholder"),p.createElement("path",{d:Rj,className:`${s}-image-path`})))))},Tj=e=>{const{prefixCls:t,className:n,rootClassName:r,active:o,block:i,size:a="default"}=e,{getPrefixCls:s}=p.useContext(It),l=s("skeleton",t),[c,u,d]=Ga(l),f=Fn(e,["prefixCls"]),h=ee(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(p.createElement("div",{className:h},p.createElement(md,Object.assign({prefixCls:`${l}-input`,size:a},f))))},Pj=e=>{const{prefixCls:t,className:n,rootClassName:r,style:o,active:i,children:a}=e,{getPrefixCls:s}=p.useContext(It),l=s("skeleton",t),[c,u,d]=Ga(l),f=ee(l,`${l}-element`,{[`${l}-active`]:i},u,n,r,d);return c(p.createElement("div",{className:f},p.createElement("div",{className:ee(`${l}-image`,n),style:o},a)))},Aj=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},kj=e=>{const{prefixCls:t,className:n,style:r,rows:o=0}=e,i=Array.from({length:o}).map((a,s)=>p.createElement("li",{key:s,style:{width:Aj(s,e)}}));return p.createElement("ul",{className:ee(t,n),style:r},i)},Dj=e=>{let{prefixCls:t,className:n,width:r,style:o}=e;return p.createElement("h3",{className:ee(t,n),style:Object.assign({width:r},o)})};function Pf(e){return e&&typeof e=="object"?e:{}}function _j(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Lj(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function jj(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const ea=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:o,style:i,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=e,{getPrefixCls:f,direction:h,className:m,style:v}=$r("skeleton"),g=f("skeleton",t),[y,b,C]=Ga(g);if(n||!("loading"in e)){const x=!!s,S=!!l,w=!!c;let E;if(x){const M=Object.assign(Object.assign({prefixCls:`${g}-avatar`},_j(S,w)),Pf(s));E=p.createElement("div",{className:`${g}-header`},p.createElement(md,Object.assign({},M)))}let N;if(S||w){let M;if(S){const k=Object.assign(Object.assign({prefixCls:`${g}-title`},Lj(x,w)),Pf(l));M=p.createElement(Dj,Object.assign({},k))}let I;if(w){const k=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},jj(x,S)),Pf(c));I=p.createElement(kj,Object.assign({},k))}N=p.createElement("div",{className:`${g}-content`},M,I)}const O=ee(g,{[`${g}-with-avatar`]:x,[`${g}-active`]:u,[`${g}-rtl`]:h==="rtl",[`${g}-round`]:d},m,r,o,b,C);return y(p.createElement("div",{className:O,style:Object.assign(Object.assign({},v),i)},E,N))}return a??null};ea.Button=Mj;ea.Avatar=Nj;ea.Input=Tj;ea.Image=Ij;ea.Node=Pj;process.env.NODE_ENV!=="production"&&(ea.displayName="Skeleton");function O0(){}const Bj=p.createContext({add:O0,remove:O0});function zj(e){const t=p.useContext(Bj),n=p.useRef(null);return Ut(o=>{if(o){const i=e?o.querySelector(e):o;t.add(i),n.current=i}else t.remove(n.current)})}const N0=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=$.useContext(bl);return $.createElement(Io,Object.assign({onClick:n},e),t)},M0=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:o}=$.useContext(bl);return $.createElement(Io,Object.assign({},V1(n),{loading:e,onClick:o},t),r)};function yw(e,t){return $.createElement("span",{className:`${e}-close-x`},t||$.createElement(fl,{className:`${e}-close-icon`}))}const Cw=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=e,[u]=_o("Modal",Jx()),d=t||(u==null?void 0:u.okText),f=r||(u==null?void 0:u.cancelText),h={confirmLoading:o,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:i,onCancel:a},m=$.useMemo(()=>h,Ie(Object.values(h)));let v;return typeof c=="function"||typeof c>"u"?(v=$.createElement($.Fragment,null,$.createElement(N0,null),$.createElement(M0,null)),typeof c=="function"&&(v=c(v,{OkBtn:M0,CancelBtn:N0})),v=$.createElement(sw,{value:m},v)):v=c,$.createElement(i1,{disabled:!1},v)},Fj=e=>{const{componentCls:t}=e;return{[t]:{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"}}}},Hj=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},Vj=(e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:o}=e,i={};for(let a=o;a>=0;a--)a===0?(i[`${r}${t}-${a}`]={display:"none"},i[`${r}-push-${a}`]={insetInlineStart:"auto"},i[`${r}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${t}-push-${a}`]={insetInlineStart:"auto"},i[`${r}${t}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${t}-offset-${a}`]={marginInlineStart:0},i[`${r}${t}-order-${a}`]={order:0}):(i[`${r}${t}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/o*100}%`,maxWidth:`${a/o*100}%`}],i[`${r}${t}-push-${a}`]={insetInlineStart:`${a/o*100}%`},i[`${r}${t}-pull-${a}`]={insetInlineEnd:`${a/o*100}%`},i[`${r}${t}-offset-${a}`]={marginInlineStart:`${a/o*100}%`},i[`${r}${t}-order-${a}`]={order:a});return i[`${r}${t}-flex`]={flex:`var(--${n}${t}-flex)`},i},mp=(e,t)=>Vj(e,t),Wj=(e,t,n)=>({[`@media (min-width: ${ne(t)})`]:Object.assign({},mp(e,n))}),qj=()=>({}),Uj=()=>({});vn("Grid",Fj,qj);const Sw=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin});vn("Grid",e=>{const t=Vt(e,{gridColumns:24}),n=Sw(t);return delete n.xs,[Hj(t),mp(t,""),mp(t,"-xs"),Object.keys(n).map(r=>Wj(t,n[r],`-${r}`)).reduce((r,o)=>Object.assign(Object.assign({},r),o),{})]},Uj);function R0(e){return{position:e,inset:0}}const Kj=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},R0("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},R0("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:YD(e)}]},Gj=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${ne(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},Ln(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${ne(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:ne(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},Fa(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${ne(e.borderRadiusLG)} ${ne(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${ne(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,
336
+ ${t}-body,
337
+ ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},Xj=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},Yj=e=>{const{componentCls:t}=e,n=Sw(e);delete n.xs;const r=Object.keys(n).map(o=>({[`@media (min-width: ${ne(n[o])})`]:{width:`var(--${t.replace(".","")}-${o}-width)`}}));return{[`${t}-root`]:{[t]:[{width:`var(--${t.replace(".","")}-xs-width)`}].concat(Ie(r))}}},xw=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return Vt(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},ww=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${ne(e.paddingMD)} ${ne(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${ne(e.padding)} ${ne(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${ne(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${ne(e.paddingXS)} ${ne(e.padding)}`:0,footerBorderTop:e.wireframe?`${ne(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${ne(e.borderRadiusLG)} ${ne(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${ne(e.padding*2)} ${ne(e.padding*2)} ${ne(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),Ew=vn("Modal",e=>{const t=xw(e);return[Gj(t),Xj(t),Kj(t),gl(t,"zoom"),Yj(t)]},ww,{unitless:{titleLineHeight:!0}});var Jj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let gp;const Qj=e=>{gp={x:e.pageX,y:e.pageY},setTimeout(()=>{gp=null},100)};bj()&&document.documentElement.addEventListener("click",Qj,!0);const $w=e=>{var t;const{getPopupContainer:n,getPrefixCls:r,direction:o,modal:i}=p.useContext(It),a=Y=>{const{onCancel:le}=e;le==null||le(Y)},s=Y=>{const{onOk:le}=e;le==null||le(Y)};if(process.env.NODE_ENV!=="production"){const Y=rn("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(le=>{let[Q,fe]=le;Y.deprecated(!(Q in e),Q,fe)})}const{prefixCls:l,className:c,rootClassName:u,open:d,wrapClassName:f,centered:h,getContainer:m,focusTriggerAfterClose:v=!0,style:g,visible:y,width:b=520,footer:C,classNames:x,styles:S,children:w,loading:E}=e,N=Jj(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading"]),O=r("modal",l),M=r(),I=Qr(O),[k,D,A]=Ew(O,I),L=ee(f,{[`${O}-centered`]:h??(i==null?void 0:i.centered),[`${O}-wrap-rtl`]:o==="rtl"}),T=C!==null&&!E?p.createElement(Cw,Object.assign({},e,{onOk:s,onCancel:a})):null,[R,_,V]=vj(x0(e),x0(i),{closable:!0,closeIcon:p.createElement(fl,{className:`${O}-close-icon`}),closeIconRender:Y=>yw(O,Y)}),F=zj(`.${O}-content`),[W,K]=pl("Modal",N.zIndex),[J,H]=p.useMemo(()=>b&&typeof b=="object"?[void 0,b]:[b,void 0],[b]),X=p.useMemo(()=>{const Y={};return H&&Object.keys(H).forEach(le=>{const Q=H[le];Q!==void 0&&(Y[`--${O}-${le}-width`]=typeof Q=="number"?`${Q}px`:Q)}),Y},[H]);return k(p.createElement(di,{form:!0,space:!0},p.createElement(hl.Provider,{value:K},p.createElement(dw,Object.assign({width:J},N,{zIndex:W,getContainer:m===void 0?n:m,prefixCls:O,rootClassName:ee(D,u,A,I),footer:T,visible:d??y,mousePosition:(t=N.mousePosition)!==null&&t!==void 0?t:gp,onClose:a,closable:R&&{disabled:V,closeIcon:_},closeIcon:_,focusTriggerAfterClose:v,transitionName:Ki(M,"zoom",e.transitionName),maskTransitionName:Ki(M,"fade",e.maskTransitionName),className:ee(D,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:ee(L,x==null?void 0:x.wrapper)}),styles:Object.assign(Object.assign({},i==null?void 0:i.styles),S),panelRef:F}),E?p.createElement(ea,{active:!0,title:!1,paragraph:{rows:4},className:`${O}-body-skeleton`}):w))))},Zj=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},Xc()),[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(o).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${ne(e.marginSM)})`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${ne(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:e.colorText,fontSize:i,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls},
338
+ ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},eB=h1(["Modal","confirm"],e=>{const t=xw(e);return[Zj(t)]},ww,{order:-1e3});var tB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function Ow(e){const{prefixCls:t,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:s,footer:l,locale:c}=e,u=tB(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const E=rn("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=p.createElement(k1,null);break;case"success":d=p.createElement(P1,null);break;case"error":d=p.createElement(od,null);break;default:d=p.createElement(A1,null)}const f=s??a==="confirm",h=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[m]=_o("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:h,cancelTextLocale:y,okTextLocale:g,mergedOkCancel:f},u),C=p.useMemo(()=>b,Ie(Object.values(b))),x=p.createElement(p.Fragment,null,p.createElement(r0,null),p.createElement(o0,null)),S=e.title!==void 0&&e.title!==null,w=`${i}-body`;return p.createElement("div",{className:`${i}-body-wrapper`},p.createElement("div",{className:ee(w,{[`${w}-has-title`]:S})},d,p.createElement("div",{className:`${i}-paragraph`},S&&p.createElement("span",{className:`${i}-title`},e.title),p.createElement("div",{className:`${i}-content`},e.content))),l===void 0||typeof l=="function"?p.createElement(sw,{value:C},p.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(x,{OkBtn:o0,CancelBtn:r0}):x)):l,p.createElement(eB,{prefixCls:t}))}const Nw=e=>{const{close:t,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=e;if(process.env.NODE_ENV!=="production"){const x=rn("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(S=>{let[w,E]=S;x.deprecated(!(w in e),w,E)})}const f=`${i}-confirm`,h=e.width||416,m=e.style||{},v=e.mask===void 0?!0:e.mask,g=e.maskClosable===void 0?!1:e.maskClosable,y=ee(f,`${f}-${e.type}`,{[`${f}-rtl`]:o==="rtl"},e.className),[,b]=pr(),C=p.useMemo(()=>n!==void 0?n:b.zIndexPopupBase+_1,[n,b]);return p.createElement($w,Object.assign({},e,{className:y,wrapClassName:ee({[`${f}-centered`]:!!e.centered},a),onCancel:()=>{t==null||t({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:Ki(s||"","zoom",e.transitionName),maskTransitionName:Ki(s||"","fade",e.maskTransitionName),mask:v,maskClosable:g,style:m,styles:Object.assign({body:l,mask:r},d),width:h,zIndex:C,closable:c}),p.createElement(Ow,Object.assign({},e,{confirmPrefixCls:f})))},Xm=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:o}=e;return p.createElement(mo,{prefixCls:t,iconPrefixCls:n,direction:r,theme:o},p.createElement(Nw,Object.assign({},e)))};process.env.NODE_ENV!=="production"&&(Nw.displayName="ConfirmDialog",Xm.displayName="ConfirmDialogWrapper");const Ti=[];let Mw="";function Rw(){return Mw}const nB=e=>{var t,n;const{prefixCls:r,getContainer:o,direction:i}=e,a=Jx(),s=$.useContext(It),l=Rw()||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"&&Do(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),$.createElement(Xm,Object.assign({},e,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:i??s.direction,locale:(n=(t=s.locale)===null||t===void 0?void 0:t.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function xl(e){const t=fk();process.env.NODE_ENV!=="production"&&!t.holderRender&&sk("Modal");const n=document.createDocumentFragment();let r=Object.assign(Object.assign({},e),{close:l,open:!0}),o,i;function a(){for(var u,d=arguments.length,f=new Array(d),h=0;h<d;h++)f[h]=arguments[h];if(f.some(g=>g==null?void 0:g.triggerCancel)){var v;(u=e.onCancel)===null||u===void 0||(v=u).call.apply(v,[e,()=>{}].concat(Ie(f.slice(1))))}for(let g=0;g<Ti.length;g++)if(Ti[g]===l){Ti.splice(g,1);break}i()}function s(u){clearTimeout(o),o=setTimeout(()=>{const d=t.getPrefixCls(void 0,Rw()),f=t.getIconPrefixCls(),h=t.getTheme(),m=$.createElement(nB,Object.assign({},u));i=j1()($.createElement(mo,{prefixCls:d,iconPrefixCls:f,theme:h},t.holderRender?t.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 e.afterClose=="function"&&e.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),Ti.push(l),{destroy:l,update:c}}function Iw(e){return Object.assign(Object.assign({},e),{type:"warning"})}function Tw(e){return Object.assign(Object.assign({},e),{type:"info"})}function Pw(e){return Object.assign(Object.assign({},e),{type:"success"})}function Aw(e){return Object.assign(Object.assign({},e),{type:"error"})}function kw(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function rB(e){let{rootPrefixCls:t}=e;process.env.NODE_ENV!=="production"&&Do(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),Mw=t}var oB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const iB=(e,t)=>{var n,{afterClose:r,config:o}=e,i=oB(e,["afterClose","config"]);const[a,s]=p.useState(!0),[l,c]=p.useState(o),{direction:u,getPrefixCls:d}=p.useContext(It),f=d("modal"),h=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(N=>N==null?void 0:N.triggerCancel)){var E;(b=l.onCancel)===null||b===void 0||(E=b).call.apply(E,[l,()=>{}].concat(Ie(x.slice(1))))}};p.useImperativeHandle(t,()=>({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]=_o("Modal",Ui.Modal);return p.createElement(Xm,Object.assign({prefixCls:f,rootPrefixCls:h},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))},aB=p.forwardRef(iB);let I0=0;const sB=p.memo(p.forwardRef((e,t)=>{const[n,r]=Uk();return p.useImperativeHandle(t,()=>({patchElement:r}),[]),p.createElement(p.Fragment,null,n)}));function lB(){const e=p.useRef(null),[t,n]=p.useState([]);p.useEffect(()=>{t.length&&(Ie(t).forEach(a=>{a()}),n([]))},[t]);const r=p.useCallback(i=>function(s){var l;I0+=1;const c=p.createRef();let u;const d=new Promise(g=>{u=g});let f=!1,h;const m=p.createElement(aB,{key:`modal-${I0}`,config:i(s),ref:c,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:g=>{u(g)}});return h=(l=e.current)===null||l===void 0?void 0:l.patchElement(m),h&&Ti.push(h),{destroy:()=>{function g(){var y;(y=c.current)===null||y===void 0||y.destroy()}c.current?g():n(y=>[].concat(Ie(y),[g]))},update:g=>{function y(){var b;(b=c.current)===null||b===void 0||b.update(g)}c.current?y():n(b=>[].concat(Ie(b),[y]))},then:g=>(f=!0,d.then(g))}},[]);return[p.useMemo(()=>({info:r(Tw),success:r(Pw),error:r(Aw),warning:r(Iw),confirm:r(kw)}),[]),p.createElement(sB,{key:"modal-holder",ref:e})]}function Dw(e){return t=>p.createElement(mo,{theme:{token:{motion:!1,zIndexPopupBase:0}}},p.createElement(e,Object.assign({},t)))}const Ym=(e,t,n,r,o)=>Dw(a=>{const{prefixCls:s,style:l}=a,c=p.useRef(null),[u,d]=p.useState(0),[f,h]=p.useState(0),[m,v]=gn(!1,{value:a.open}),{getPrefixCls:g}=p.useContext(It),y=g(r||"select",s);p.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(w=>{const E=w[0].target;d(E.offsetHeight+8),h(E.offsetWidth)}),S=setInterval(()=>{var w;const E=o?`.${o(y)}`:`.${y}-dropdown`,N=(w=c.current)===null||w===void 0?void 0:w.querySelector(E);N&&(clearInterval(S),x.observe(N))},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)),t&&Object.assign(b,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const C={paddingBottom:u,position:"relative",minWidth:f};return p.createElement("div",{ref:c,style:C},p.createElement(e,Object.assign({},b)))}),Jm=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))};var vd=function(t){var n=t.className,r=t.customizeIcon,o=t.customizeIconProps,i=t.children,a=t.onMouseDown,s=t.onClick,l=typeof r=="function"?r(o):r;return p.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:p.createElement("span",{className:ee(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},cB=function(t,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=$.useMemo(function(){if(lt(o)==="object")return o.clearIcon;if(i)return i},[o,i]),u=$.useMemo(function(){return!!(!a&&o&&(r.length||s)&&!(l==="combobox"&&s===""))},[o,a,r.length,s,l]);return{allowClear:u,clearIcon:$.createElement(vd,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},_w=p.createContext(null);function uB(){return p.useContext(_w)}function dB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=p.useState(!1),n=ae(t,2),r=n[0],o=n[1],i=p.useRef(null),a=function(){window.clearTimeout(i.current)};p.useEffect(function(){return a},[]);var s=function(c,u){a(),i.current=window.setTimeout(function(){o(c),u&&u()},e)};return[r,s,a]}function Lw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=p.useRef(null),n=p.useRef(null);p.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function fB(e,t,n,r){var o=p.useRef(null);o.current={open:t,triggerOpen:n,customizedTrigger:r},p.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&&e().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 hB(e){return e&&![Qe.ESC,Qe.SHIFT,Qe.BACKSPACE,Qe.TAB,Qe.WIN_KEY,Qe.ALT,Qe.META,Qe.WIN_KEY_RIGHT,Qe.CTRL,Qe.SEMICOLON,Qe.EQUALS,Qe.CAPS_LOCK,Qe.CONTEXT_MENU,Qe.F1,Qe.F2,Qe.F3,Qe.F4,Qe.F5,Qe.F6,Qe.F7,Qe.F8,Qe.F9,Qe.F10,Qe.F11,Qe.F12].includes(e)}var pB=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],sa=void 0;function mB(e,t){var n=e.prefixCls,r=e.invalidate,o=e.item,i=e.renderItem,a=e.responsive,s=e.responsiveDisabled,l=e.registerSize,c=e.itemKey,u=e.className,d=e.style,f=e.children,h=e.display,m=e.order,v=e.component,g=v===void 0?"div":v,y=wt(e,pB),b=a&&!h;function C(N){l(c,N)}p.useEffect(function(){return function(){C(null)}},[]);var x=i&&o!==sa?i(o,{index:m}):f,S;r||(S={opacity:b?0:1,height:b?0:sa,overflowY:b?"hidden":sa,order:a?m:sa,pointerEvents:b?"none":sa,position:b?"absolute":sa});var w={};b&&(w["aria-hidden"]=!0);var E=p.createElement(g,De({className:ee(!r&&n,u),style:U(U({},S),d)},w,y,{ref:t}),x);return a&&(E=p.createElement(ko,{onResize:function(O){var M=O.offsetWidth;C(M)},disabled:s},E)),E}var Ns=p.forwardRef(mB);Ns.displayName="Item";function gB(e){if(typeof MessageChannel>"u")Dt(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function vB(){var e=p.useRef(null),t=function(r){e.current||(e.current=[],gB(function(){kr.unstable_batchedUpdates(function(){e.current.forEach(function(o){o()}),e.current=null})})),e.current.push(r)};return t}function ss(e,t){var n=p.useState(t),r=ae(n,2),o=r[0],i=r[1],a=Ut(function(s){e(function(){i(s)})});return[o,a]}var tu=$.createContext(null),bB=["component"],yB=["className"],CB=["className"],SB=function(t,n){var r=p.useContext(tu);if(!r){var o=t.component,i=o===void 0?"div":o,a=wt(t,bB);return p.createElement(i,De({},a,{ref:n}))}var s=r.className,l=wt(r,yB),c=t.className,u=wt(t,CB);return p.createElement(tu.Provider,{value:null},p.createElement(Ns,De({ref:n,className:ee(s,c)},l,u)))},jw=p.forwardRef(SB);jw.displayName="RawItem";var xB=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Bw="responsive",zw="invalidate";function wB(e){return"+ ".concat(e.length," ...")}function EB(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,o=e.data,i=o===void 0?[]:o,a=e.renderItem,s=e.renderRawItem,l=e.itemKey,c=e.itemWidth,u=c===void 0?10:c,d=e.ssr,f=e.style,h=e.className,m=e.maxCount,v=e.renderRest,g=e.renderRawRest,y=e.suffix,b=e.component,C=b===void 0?"div":b,x=e.itemComponent,S=e.onVisibleChange,w=wt(e,xB),E=d==="full",N=vB(),O=ss(N,null),M=ae(O,2),I=M[0],k=M[1],D=I||0,A=ss(N,new Map),L=ae(A,2),T=L[0],R=L[1],_=ss(N,0),V=ae(_,2),F=V[0],W=V[1],K=ss(N,0),J=ae(K,2),H=J[0],X=J[1],Y=ss(N,0),le=ae(Y,2),Q=le[0],fe=le[1],ye=$.useState(null),ue=ae(ye,2),ie=ue[0],me=ue[1],re=$.useState(null),ce=ae(re,2),he=ce[0],Ee=ce[1],Oe=p.useMemo(function(){return he===null&&E?Number.MAX_SAFE_INTEGER:he||0},[he,I]),xe=$.useState(!1),je=ae(xe,2),z=je[0],ve=je[1],se="".concat(r,"-item"),pe=Math.max(F,H),$e=m===Bw,Me=i.length&&$e,we=m===zw,Be=Me||typeof m=="number"&&i.length>m,Fe=$.useMemo(function(){var Ze=i;return Me?I===null&&E?Ze=i:Ze=i.slice(0,Math.min(i.length,D/u)):typeof m=="number"&&(Ze=i.slice(0,m)),Ze},[i,u,I,m,Me]),Re=$.useMemo(function(){return Me?i.slice(Oe+1):i.slice(Fe.length)},[i,Fe,Me,Oe]),qe=$.useCallback(function(Ze,Ue){var Ge;return typeof l=="function"?l(Ze):(Ge=l&&(Ze==null?void 0:Ze[l]))!==null&&Ge!==void 0?Ge:Ue},[l]),Ke=$.useCallback(a||function(Ze){return Ze},[a]);function Pe(Ze,Ue,Ge){he===Ze&&(Ue===void 0||Ue===ie)||(Ee(Ze),Ge||(ve(Ze<i.length-1),S==null||S(Ze)),Ue!==void 0&&me(Ue))}function ze(Ze,Ue){k(Ue.clientWidth)}function Le(Ze,Ue){R(function(Ge){var Et=new Map(Ge);return Ue===null?Et.delete(Ze):Et.set(Ze,Ue),Et})}function He(Ze,Ue){X(Ue),W(H)}function et(Ze,Ue){fe(Ue)}function pt(Ze){return T.get(qe(Fe[Ze],Ze))}en(function(){if(D&&typeof pe=="number"&&Fe){var Ze=Q,Ue=Fe.length,Ge=Ue-1;if(!Ue){Pe(0,null);return}for(var Et=0;Et<Ue;Et+=1){var Tt=pt(Et);if(E&&(Tt=Tt||0),Tt===void 0){Pe(Et-1,void 0,!0);break}if(Ze+=Tt,Ge===0&&Ze<=D||Et===Ge-1&&Ze+pt(Ge)<=D){Pe(Ge,null);break}else if(Ze+pe>D){Pe(Et-1,Ze-Tt-Q+H);break}}y&&pt(0)+Q>D&&me(null)}},[D,T,H,Q,qe,Fe]);var _t=z&&!!Re.length,Lt={};ie!==null&&Me&&(Lt={position:"absolute",left:ie,top:0});var cn={prefixCls:se,responsive:Me,component:x,invalidate:we},Je=s?function(Ze,Ue){var Ge=qe(Ze,Ue);return p.createElement(tu.Provider,{key:Ge,value:U(U({},cn),{},{order:Ue,item:Ze,itemKey:Ge,registerSize:Le,display:Ue<=Oe})},s(Ze,Ue))}:function(Ze,Ue){var Ge=qe(Ze,Ue);return p.createElement(Ns,De({},cn,{order:Ue,key:Ge,item:Ze,renderItem:Ke,itemKey:Ge,registerSize:Le,display:Ue<=Oe}))},Ve={order:_t?Oe:Number.MAX_SAFE_INTEGER,className:"".concat(se,"-rest"),registerSize:He,display:_t},ct=v||wB,at=g?p.createElement(tu.Provider,{value:U(U({},cn),Ve)},g(Re)):p.createElement(Ns,De({},cn,Ve),typeof ct=="function"?ct(Re):ct),mt=p.createElement(C,De({className:ee(!we&&r,h),style:f,ref:t},w),Fe.map(Je),Be?at:null,y&&p.createElement(Ns,De({},cn,{responsive:$e,responsiveDisabled:!Me,order:Oe,className:"".concat(se,"-suffix"),registerSize:et,display:!0,style:Lt}),y));return $e?p.createElement(ko,{onResize:ze,disabled:!Me},mt):mt}var lo=p.forwardRef(EB);lo.displayName="Overflow";lo.Item=jw;lo.RESPONSIVE=Bw;lo.INVALIDATE=zw;var $B=function(t,n){var r,o=t.prefixCls,i=t.id,a=t.inputElement,s=t.disabled,l=t.tabIndex,c=t.autoFocus,u=t.autoComplete,d=t.editable,f=t.activeDescendantId,h=t.value,m=t.maxLength,v=t.onKeyDown,g=t.onMouseDown,y=t.onChange,b=t.onPaste,C=t.onCompositionStart,x=t.onCompositionEnd,S=t.onBlur,w=t.open,E=t.attrs,N=a||p.createElement("input",null),O=N,M=O.ref,I=O.props,k=I.onKeyDown,D=I.onChange,A=I.onMouseDown,L=I.onCompositionStart,T=I.onCompositionEnd,R=I.onBlur,_=I.style;return fo(!("maxLength"in N.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),N=p.cloneElement(N,U(U(U({type:"search"},I),{},{id:i,ref:dr(n,M),disabled:s,tabIndex:l,autoComplete:u||"off",autoFocus:c,className:ee("".concat(o,"-selection-search-input"),(r=N)===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?h:"",maxLength:m,readOnly:!d,unselectable:d?null:"on",style:U(U({},_),{},{opacity:d?null:0}),onKeyDown:function(F){v(F),k&&k(F)},onMouseDown:function(F){g(F),A&&A(F)},onChange:function(F){y(F),D&&D(F)},onCompositionStart:function(F){C(F),L&&L(F)},onCompositionEnd:function(F){x(F),T&&T(F)},onPaste:b,onBlur:function(F){S(F),R&&R(F)}})),N},Qm=p.forwardRef($B);process.env.NODE_ENV!=="production"&&(Qm.displayName="Input");function Zm(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var OB=typeof window<"u"&&window.document&&window.document.documentElement,NB=process.env.NODE_ENV!=="test"&&OB;function MB(e){return e!=null}function RB(e){return!e&&e!==0}function T0(e){return["string","number"].includes(lt(e))}function Fw(e){var t=void 0;return e&&(T0(e.title)?t=e.title.toString():T0(e.label)&&(t=e.label.toString())),t}function IB(e,t){NB?p.useLayoutEffect(e,t):p.useEffect(e,t)}function TB(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var P0=function(t){t.preventDefault(),t.stopPropagation()},PB=function(t){var n=t.id,r=t.prefixCls,o=t.values,i=t.open,a=t.searchValue,s=t.autoClearSearchValue,l=t.inputRef,c=t.placeholder,u=t.disabled,d=t.mode,f=t.showSearch,h=t.autoFocus,m=t.autoComplete,v=t.activeDescendantId,g=t.tabIndex,y=t.removeIcon,b=t.maxTagCount,C=t.maxTagTextLength,x=t.maxTagPlaceholder,S=x===void 0?function(re){return"+ ".concat(re.length," ...")}:x,w=t.tagRender,E=t.onToggleOpen,N=t.onRemove,O=t.onInputChange,M=t.onInputPaste,I=t.onInputKeyDown,k=t.onInputMouseDown,D=t.onInputCompositionStart,A=t.onInputCompositionEnd,L=t.onInputBlur,T=p.useRef(null),R=$.useState(0),_=ae(R,2),V=_[0],F=_[1],W=$.useState(!1),K=ae(W,2),J=K[0],H=K[1],X="".concat(r,"-selection"),Y=i||d==="multiple"&&s===!1||d==="tags"?a:"",le=d==="tags"||d==="multiple"&&s===!1||f&&(i||J);IB(function(){F(T.current.scrollWidth)},[Y]);var Q=function(ce,he,Ee,Oe,xe){return p.createElement("span",{title:Fw(ce),className:ee("".concat(X,"-item"),q({},"".concat(X,"-item-disabled"),Ee))},p.createElement("span",{className:"".concat(X,"-item-content")},he),Oe&&p.createElement(vd,{className:"".concat(X,"-item-remove"),onMouseDown:P0,onClick:xe,customizeIcon:y},"×"))},fe=function(ce,he,Ee,Oe,xe,je){var z=function(se){P0(se),E(!i)};return p.createElement("span",{onMouseDown:z},w({label:he,value:ce,disabled:Ee,closable:Oe,onClose:xe,isMaxTag:!!je}))},ye=function(ce){var he=ce.disabled,Ee=ce.label,Oe=ce.value,xe=!u&&!he,je=Ee;if(typeof C=="number"&&(typeof Ee=="string"||typeof Ee=="number")){var z=String(je);z.length>C&&(je="".concat(z.slice(0,C),"..."))}var ve=function(pe){pe&&pe.stopPropagation(),N(ce)};return typeof w=="function"?fe(Oe,je,he,xe,ve):Q(ce,je,he,xe,ve)},ue=function(ce){if(!o.length)return null;var he=typeof S=="function"?S(ce):S;return typeof w=="function"?fe(void 0,he,!1,!1,void 0,!0):Q({title:he},he,!1)},ie=p.createElement("div",{className:"".concat(X,"-search"),style:{width:V},onFocus:function(){H(!0)},onBlur:function(){H(!1)}},p.createElement(Qm,{ref:l,open:i,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:h,autoComplete:m,editable:le,activeDescendantId:v,value:Y,onKeyDown:I,onMouseDown:k,onChange:O,onPaste:M,onCompositionStart:D,onCompositionEnd:A,onBlur:L,tabIndex:g,attrs:Gr(t,!0)}),p.createElement("span",{ref:T,className:"".concat(X,"-search-mirror"),"aria-hidden":!0},Y," ")),me=p.createElement(lo,{prefixCls:"".concat(X,"-overflow"),data:o,renderItem:ye,renderRest:ue,suffix:ie,itemKey:TB,maxCount:b});return p.createElement("span",{className:"".concat(X,"-wrap")},me,!o.length&&!Y&&p.createElement("span",{className:"".concat(X,"-placeholder")},c))},AB=function(t){var n=t.inputElement,r=t.prefixCls,o=t.id,i=t.inputRef,a=t.disabled,s=t.autoFocus,l=t.autoComplete,c=t.activeDescendantId,u=t.mode,d=t.open,f=t.values,h=t.placeholder,m=t.tabIndex,v=t.showSearch,g=t.searchValue,y=t.activeValue,b=t.maxLength,C=t.onInputKeyDown,x=t.onInputMouseDown,S=t.onInputChange,w=t.onInputPaste,E=t.onInputCompositionStart,N=t.onInputCompositionEnd,O=t.onInputBlur,M=t.title,I=p.useState(!1),k=ae(I,2),D=k[0],A=k[1],L=u==="combobox",T=L||v,R=f[0],_=g||"";L&&y&&!D&&(_=y),p.useEffect(function(){L&&A(!1)},[L,y]);var V=u!=="combobox"&&!d&&!v?!1:!!_,F=M===void 0?Fw(R):M,W=p.useMemo(function(){return R?null:p.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:V?{visibility:"hidden"}:void 0},h)},[R,V,h,r]);return p.createElement("span",{className:"".concat(r,"-selection-wrap")},p.createElement("span",{className:"".concat(r,"-selection-search")},p.createElement(Qm,{ref:i,prefixCls:r,id:o,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:T,activeDescendantId:c,value:_,onKeyDown:C,onMouseDown:x,onChange:function(J){A(!0),S(J)},onPaste:w,onCompositionStart:E,onCompositionEnd:N,onBlur:O,tabIndex:m,attrs:Gr(t,!0),maxLength:L?b:void 0})),!L&&R?p.createElement("span",{className:"".concat(r,"-selection-item"),title:F,style:V?{visibility:"hidden"}:void 0},R.label):null,W)},kB=function(t,n){var r=$.useRef(null),o=$.useRef(!1),i=t.prefixCls,a=t.open,s=t.mode,l=t.showSearch,c=t.tokenWithEnter,u=t.disabled,d=t.prefix,f=t.autoClearSearchValue,h=t.onSearch,m=t.onSearchSubmit,v=t.onToggleOpen,g=t.onInputKeyDown,y=t.onInputBlur,b=t.domRef;p.useImperativeHandle(n,function(){return{focus:function(F){r.current.focus(F)},blur:function(){r.current.blur()}}});var C=Lw(0),x=ae(C,2),S=x[0],w=x[1],E=function(F){var W=F.which,K=r.current instanceof HTMLTextAreaElement;!K&&a&&(W===Qe.UP||W===Qe.DOWN)&&F.preventDefault(),g&&g(F),W===Qe.ENTER&&s==="tags"&&!o.current&&!a&&(m==null||m(F.target.value)),!(K&&!a&&~[Qe.UP,Qe.DOWN,Qe.LEFT,Qe.RIGHT].indexOf(W))&&hB(W)&&v(!0)},N=function(){w(!0)},O=$.useRef(null),M=function(F){h(F,!0,o.current)!==!1&&v(!0)},I=function(){o.current=!0},k=function(F){o.current=!1,s!=="combobox"&&M(F.target.value)},D=function(F){var W=F.target.value;if(c&&O.current&&/[\r\n]/.test(O.current)){var K=O.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");W=W.replace(K,O.current)}O.current=null,M(W)},A=function(F){var W=F.clipboardData,K=W==null?void 0:W.getData("text");O.current=K||""},L=function(F){var W=F.target;if(W!==r.current){var K=document.body.style.msTouchAction!==void 0;K?setTimeout(function(){r.current.focus()}):r.current.focus()}},T=function(F){var W=S();F.target!==r.current&&!W&&!(s==="combobox"&&u)&&F.preventDefault(),(s!=="combobox"&&(!l||!W)||!a)&&(a&&f!==!1&&h("",!0,!1),v())},R={inputRef:r,onInputKeyDown:E,onInputMouseDown:N,onInputChange:D,onInputPaste:A,onInputCompositionStart:I,onInputCompositionEnd:k,onInputBlur:y},_=s==="multiple"||s==="tags"?p.createElement(PB,De({},t,R)):p.createElement(AB,De({},t,R));return p.createElement("div",{ref:b,className:"".concat(i,"-selector"),onClick:L,onMouseDown:T},d&&p.createElement("div",{className:"".concat(i,"-prefix")},d),_)},Hw=p.forwardRef(kB);process.env.NODE_ENV!=="production"&&(Hw.displayName="Selector");function DB(e){var t=e.prefixCls,n=e.align,r=e.arrow,o=e.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=p.useRef();if(!n||!n.points)return null;var h={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)?h.top=d:g==="t"?h.top=0:h.bottom=0,y===C||!["l","r"].includes(y)?h.left=c:y==="l"?h.left=0:h.right=0}return p.createElement("div",{ref:f,className:ee("".concat(t,"-arrow"),a),style:h},s)}function _B(e){var t=e.prefixCls,n=e.open,r=e.zIndex,o=e.mask,i=e.motion;return o?p.createElement(po,De({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return p.createElement("div",{style:{zIndex:r},className:ee("".concat(t,"-mask"),s)})}):null}var Vw=p.memo(function(e){var t=e.children;return t},function(e,t){return t.cache});process.env.NODE_ENV!=="production"&&(Vw.displayName="PopupContent");var Ww=p.forwardRef(function(e,t){var n=e.popup,r=e.className,o=e.prefixCls,i=e.style,a=e.target,s=e.onVisibleChanged,l=e.open,c=e.keepDom,u=e.fresh,d=e.onClick,f=e.mask,h=e.arrow,m=e.arrowPos,v=e.align,g=e.motion,y=e.maskMotion,b=e.forceRender,C=e.getPopupContainer,x=e.autoDestroy,S=e.portal,w=e.zIndex,E=e.onMouseEnter,N=e.onMouseLeave,O=e.onPointerEnter,M=e.onPointerDownCapture,I=e.ready,k=e.offsetX,D=e.offsetY,A=e.offsetR,L=e.offsetB,T=e.onAlign,R=e.onPrepare,_=e.stretch,V=e.targetWidth,F=e.targetHeight,W=typeof n=="function"?n():n,K=l||c,J=(C==null?void 0:C.length)>0,H=p.useState(!C||!J),X=ae(H,2),Y=X[0],le=X[1];if(en(function(){!Y&&J&&a&&le(!0)},[Y,J,a]),!Y)return null;var Q="auto",fe={left:"-1000vw",top:"-1000vh",right:Q,bottom:Q};if(I||!l){var ye,ue=v.points,ie=v.dynamicInset||((ye=v._experimental)===null||ye===void 0?void 0:ye.dynamicInset),me=ie&&ue[0][1]==="r",re=ie&&ue[0][0]==="b";me?(fe.right=A,fe.left=Q):(fe.left=k,fe.right=Q),re?(fe.bottom=L,fe.top=Q):(fe.top=D,fe.bottom=Q)}var ce={};return _&&(_.includes("height")&&F?ce.height=F:_.includes("minHeight")&&F&&(ce.minHeight=F),_.includes("width")&&V?ce.width=V:_.includes("minWidth")&&V&&(ce.minWidth=V)),l||(ce.pointerEvents="none"),p.createElement(S,{open:b||K,getContainer:C&&function(){return C(a)},autoDestroy:x},p.createElement(_B,{prefixCls:o,open:l,zIndex:w,mask:f,motion:y}),p.createElement(ko,{onResize:T,disabled:!l},function(he){return p.createElement(po,De({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(o,"-hidden")},g,{onAppearPrepare:R,onEnterPrepare:R,visible:l,onVisibleChanged:function(Oe){var xe;g==null||(xe=g.onVisibleChanged)===null||xe===void 0||xe.call(g,Oe),s(Oe)}}),function(Ee,Oe){var xe=Ee.className,je=Ee.style,z=ee(o,xe,r);return p.createElement("div",{ref:dr(he,t,Oe),className:z,style:U(U(U(U({"--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:N,onPointerEnter:O,onClick:d,onPointerDownCapture:M},h&&p.createElement(DB,{prefixCls:o,arrow:h,arrowPos:m,align:v}),p.createElement(Vw,{cache:!l&&!u},W))})}))});process.env.NODE_ENV!=="production"&&(Ww.displayName="Popup");var qw=p.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,o=vi(n),i=p.useCallback(function(s){wm(t,r?r(s):s)},[r]),a=gi(i,Ji(n));return o?p.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(qw.displayName="TriggerWrapper");var A0=p.createContext(null);function k0(e){return e?Array.isArray(e)?e:[e]:[]}function LB(e,t,n,r){return p.useMemo(function(){var o=k0(n??t),i=k0(r??t),a=new Set(o),s=new Set(i);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[e,t,n,r])}function jB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function BB(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var s,l=i[a];if(jB((s=e[l])===null||s===void 0?void 0:s.points,o,r))return"".concat(t,"-placement-").concat(l)}return""}function D0(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function wl(e){return e.ownerDocument.defaultView}function vp(e){for(var t=[],n=e==null?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=wl(n).getComputedStyle(n),i=o.overflowX,a=o.overflowY,s=o.overflow;[i,a,s].some(function(l){return r.includes(l)})&&t.push(n),n=n.parentElement}return t}function Zs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function ls(e){return Zs(parseFloat(e),0)}function _0(e,t){var n=U({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var o=wl(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,h=r.clientHeight,m=r.offsetWidth,v=r.clientWidth,g=ls(s),y=ls(l),b=ls(c),C=ls(u),x=Zs(Math.round(d.width/m*1e3)/1e3),S=Zs(Math.round(d.height/f*1e3)/1e3),w=(m-v-b-C)*x,E=(f-h-g-y)*S,N=g*S,O=y*S,M=b*x,I=C*x,k=0,D=0;if(i==="clip"){var A=ls(a);k=A*x,D=A*S}var L=d.x+M-k,T=d.y+N-D,R=L+d.width+2*k-M-I-w,_=T+d.height+2*D-N-O-E;n.left=Math.max(n.left,L),n.top=Math.max(n.top,T),n.right=Math.min(n.right,R),n.bottom=Math.min(n.bottom,_)}}),n}function L0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function j0(e,t){var n=t||[],r=ae(n,2),o=r[0],i=r[1];return[L0(e.width,o),L0(e.height,i)]}function B0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function la(e,t){var n=t[0],r=t[1],o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function Bo(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(r,o){return o===t?n[r]||"c":r}).join("")}function zB(e,t,n,r,o,i,a){var s=p.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),l=ae(s,2),c=l[0],u=l[1],d=p.useRef(0),f=p.useMemo(function(){return t?vp(t):[]},[t]),h=p.useRef({}),m=function(){h.current={}};e||m();var v=Ut(function(){if(t&&n&&e){let Zn=function(Lo,eo){var zr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pe,Za=H.x+Lo,Il=H.y+eo,Id=Za+me,Td=Il+ie,Pd=Math.max(Za,zr.left),dt=Math.max(Il,zr.top),xt=Math.min(Id,zr.right),yn=Math.min(Td,zr.bottom);return Math.max(0,(xt-Pd)*(yn-dt))},Qa=function(){zt=H.y+Ge,Wt=zt+ie,Qt=H.x+Ue,jn=Qt+me};var b,C,x,S,w=t,E=w.ownerDocument,N=wl(w),O=N.getComputedStyle(w),M=O.width,I=O.height,k=O.position,D=w.style.left,A=w.style.top,L=w.style.right,T=w.style.bottom,R=w.style.overflow,_=U(U({},o[r]),i),V=E.createElement("div");(b=w.parentElement)===null||b===void 0||b.appendChild(V),V.style.left="".concat(w.offsetLeft,"px"),V.style.top="".concat(w.offsetTop,"px"),V.style.position=k,V.style.height="".concat(w.offsetHeight,"px"),V.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 F;if(Array.isArray(n))F={x:n[0],y:n[1],width:0,height:0};else{var W,K,J=n.getBoundingClientRect();J.x=(W=J.x)!==null&&W!==void 0?W:J.left,J.y=(K=J.y)!==null&&K!==void 0?K:J.top,F={x:J.x,y:J.y,width:J.width,height:J.height}}var H=w.getBoundingClientRect();H.x=(C=H.x)!==null&&C!==void 0?C:H.left,H.y=(x=H.y)!==null&&x!==void 0?x:H.top;var X=E.documentElement,Y=X.clientWidth,le=X.clientHeight,Q=X.scrollWidth,fe=X.scrollHeight,ye=X.scrollTop,ue=X.scrollLeft,ie=H.height,me=H.width,re=F.height,ce=F.width,he={left:0,top:0,right:Y,bottom:le},Ee={left:-ue,top:-ye,right:Q-ue,bottom:fe-ye},Oe=_.htmlRegion,xe="visible",je="visibleFirst";Oe!=="scroll"&&Oe!==je&&(Oe=xe);var z=Oe===je,ve=_0(Ee,f),se=_0(he,f),pe=Oe===xe?se:ve,$e=z?se:pe;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";var Me=w.getBoundingClientRect();w.style.left=D,w.style.top=A,w.style.right=L,w.style.bottom=T,w.style.overflow=R,(S=w.parentElement)===null||S===void 0||S.removeChild(V);var we=Zs(Math.round(me/parseFloat(M)*1e3)/1e3),Be=Zs(Math.round(ie/parseFloat(I)*1e3)/1e3);if(we===0||Be===0||Hs(n)&&!_m(n))return;var Fe=_.offset,Re=_.targetOffset,qe=j0(H,Fe),Ke=ae(qe,2),Pe=Ke[0],ze=Ke[1],Le=j0(F,Re),He=ae(Le,2),et=He[0],pt=He[1];F.x-=et,F.y-=pt;var _t=_.points||[],Lt=ae(_t,2),cn=Lt[0],Je=Lt[1],Ve=B0(Je),ct=B0(cn),at=la(F,Ve),mt=la(H,ct),Ze=U({},_),Ue=at.x-mt.x+Pe,Ge=at.y-mt.y+ze,Et=Zn(Ue,Ge),Tt=Zn(Ue,Ge,se),tt=la(F,["t","l"]),We=la(H,["t","l"]),it=la(F,["b","r"]),st=la(H,["b","r"]),rt=_.overflow||{},ft=rt.adjustX,jt=rt.adjustY,Nt=rt.shiftX,Jt=rt.shiftY,At=function(eo){return typeof eo=="boolean"?eo:eo>=0},zt,Wt,Qt,jn;Qa();var Zt=At(jt),un=ct[0]===Ve[0];if(Zt&&ct[0]==="t"&&(Wt>$e.bottom||h.current.bt)){var _e=Ge;un?_e-=ie-re:_e=tt.y-st.y-ze;var ot=Zn(Ue,_e),Ye=Zn(Ue,_e,se);ot>Et||ot===Et&&(!z||Ye>=Tt)?(h.current.bt=!0,Ge=_e,ze=-ze,Ze.points=[Bo(ct,0),Bo(Ve,0)]):h.current.bt=!1}if(Zt&&ct[0]==="b"&&(zt<$e.top||h.current.tb)){var Ae=Ge;un?Ae+=ie-re:Ae=it.y-We.y-ze;var ht=Zn(Ue,Ae),Ot=Zn(Ue,Ae,se);ht>Et||ht===Et&&(!z||Ot>=Tt)?(h.current.tb=!0,Ge=Ae,ze=-ze,Ze.points=[Bo(ct,0),Bo(Ve,0)]):h.current.tb=!1}var Mt=At(ft),dn=ct[1]===Ve[1];if(Mt&&ct[1]==="l"&&(jn>$e.right||h.current.rl)){var on=Ue;dn?on-=me-ce:on=tt.x-st.x-Pe;var bn=Zn(on,Ge),fn=Zn(on,Ge,se);bn>Et||bn===Et&&(!z||fn>=Tt)?(h.current.rl=!0,Ue=on,Pe=-Pe,Ze.points=[Bo(ct,1),Bo(Ve,1)]):h.current.rl=!1}if(Mt&&ct[1]==="r"&&(Qt<$e.left||h.current.lr)){var an=Ue;dn?an+=me-ce:an=it.x-We.x-Pe;var Pn=Zn(an,Ge),Bn=Zn(an,Ge,se);Pn>Et||Pn===Et&&(!z||Bn>=Tt)?(h.current.lr=!0,Ue=an,Pe=-Pe,Ze.points=[Bo(ct,1),Bo(Ve,1)]):h.current.lr=!1}Qa();var P=Nt===!0?0:Nt;typeof P=="number"&&(Qt<se.left&&(Ue-=Qt-se.left-Pe,F.x+ce<se.left+P&&(Ue+=F.x-se.left+ce-P)),jn>se.right&&(Ue-=jn-se.right-Pe,F.x>se.right-P&&(Ue+=F.x-se.right+P)));var G=Jt===!0?0:Jt;typeof G=="number"&&(zt<se.top&&(Ge-=zt-se.top-ze,F.y+re<se.top+G&&(Ge+=F.y-se.top+re-G)),Wt>se.bottom&&(Ge-=Wt-se.bottom-ze,F.y>se.bottom-G&&(Ge+=F.y-se.bottom+G)));var B=H.x+Ue,te=B+me,oe=H.y+Ge,Z=oe+ie,Ce=F.x,ge=Ce+ce,de=F.y,be=de+re,Se=Math.max(B,Ce),Te=Math.min(te,ge),nt=(Se+Te)/2,yt=nt-B,St=Math.max(oe,de),Ft=Math.min(Z,be),Ht=(St+Ft)/2,sn=Ht-oe;a==null||a(t,Ze);var En=Me.right-H.x-(Ue+H.width),xn=Me.bottom-H.y-(Ge+H.height);we===1&&(Ue=Math.round(Ue),En=Math.round(En)),Be===1&&(Ge=Math.round(Ge),xn=Math.round(xn));var Ci={ready:!0,offsetX:Ue/we,offsetY:Ge/Be,offsetR:En/we,offsetB:xn/Be,arrowX:yt/we,arrowY:sn/Be,scaleX:we,scaleY:Be,align:Ze};u(Ci)}}),g=function(){d.current+=1;var C=d.current;Promise.resolve().then(function(){d.current===C&&v()})},y=function(){u(function(C){return U(U({},C),{},{ready:!1})})};return en(y,[r]),en(function(){e||y()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function FB(e,t,n,r,o){en(function(){if(e&&t&&n){let d=function(){r(),o()};var i=t,a=n,s=vp(i),l=vp(a),c=wl(a),u=new Set([c].concat(Ie(s),Ie(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)})}}},[e,t,n])}function HB(e,t,n,r,o,i,a,s){var l=p.useRef(e);l.current=e;var c=p.useRef(!1);p.useEffect(function(){if(t&&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)},h=wl(r);h.addEventListener("pointerdown",d,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var m=Jc(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);fo(y===b,"trigger element and popup element should in same shadow root.")}return function(){h.removeEventListener("pointerdown",d,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),m&&(m.removeEventListener("mousedown",f,!0),m.removeEventListener("contextmenu",f,!0))}}},[t,n,r,o,i]);function u(){c.current=!0}return u}var VB=["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 WB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pd,t=p.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,h=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,N=n.forceRender,O=n.autoDestroy,M=n.destroyPopupOnHide,I=n.popup,k=n.popupClassName,D=n.popupStyle,A=n.popupPlacement,L=n.builtinPlacements,T=L===void 0?{}:L,R=n.popupAlign,_=n.zIndex,V=n.stretch,F=n.getPopupClassNameFromAlign,W=n.fresh,K=n.alignPoint,J=n.onPopupClick,H=n.onPopupAlign,X=n.arrow,Y=n.popupMotion,le=n.maskMotion,Q=n.popupTransitionName,fe=n.popupAnimation,ye=n.maskTransitionName,ue=n.maskAnimation,ie=n.className,me=n.getTriggerDOMNode,re=wt(n,VB),ce=O||M||!1,he=p.useState(!1),Ee=ae(he,2),Oe=Ee[0],xe=Ee[1];en(function(){xe(Jm())},[]);var je=p.useRef({}),z=p.useContext(A0),ve=p.useMemo(function(){return{registerSubPopup:function(xt,yn){je.current[xt]=yn,z==null||z.registerSubPopup(xt,yn)}}},[z]),se=yl(),pe=p.useState(null),$e=ae(pe,2),Me=$e[0],we=$e[1],Be=p.useRef(null),Fe=Ut(function(dt){Be.current=dt,Hs(dt)&&Me!==dt&&we(dt),z==null||z.registerSubPopup(se,dt)}),Re=p.useState(null),qe=ae(Re,2),Ke=qe[0],Pe=qe[1],ze=p.useRef(null),Le=Ut(function(dt){Hs(dt)&&Ke!==dt&&(Pe(dt),ze.current=dt)}),He=p.Children.only(a),et=(He==null?void 0:He.props)||{},pt={},_t=Ut(function(dt){var xt,yn,zn=Ke;return(zn==null?void 0:zn.contains(dt))||((xt=Jc(zn))===null||xt===void 0?void 0:xt.host)===dt||dt===zn||(Me==null?void 0:Me.contains(dt))||((yn=Jc(Me))===null||yn===void 0?void 0:yn.host)===dt||dt===Me||Object.values(je.current).some(function($n){return($n==null?void 0:$n.contains(dt))||dt===$n})}),Lt=D0(i,Y,fe,Q),cn=D0(i,le,ue,ye),Je=p.useState(f||!1),Ve=ae(Je,2),ct=Ve[0],at=Ve[1],mt=d??ct,Ze=Ut(function(dt){d===void 0&&at(dt)});en(function(){at(d||!1)},[d]);var Ue=p.useRef(mt);Ue.current=mt;var Ge=p.useRef([]);Ge.current=[];var Et=Ut(function(dt){var xt;Ze(dt),((xt=Ge.current[Ge.current.length-1])!==null&&xt!==void 0?xt:mt)!==dt&&(Ge.current.push(dt),h==null||h(dt))}),Tt=p.useRef(),tt=function(){clearTimeout(Tt.current)},We=function(xt){var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;tt(),yn===0?Et(xt):Tt.current=setTimeout(function(){Et(xt)},yn*1e3)};p.useEffect(function(){return tt},[]);var it=p.useState(!1),st=ae(it,2),rt=st[0],ft=st[1];en(function(dt){(!dt||mt)&&ft(!0)},[mt]);var jt=p.useState(null),Nt=ae(jt,2),Jt=Nt[0],At=Nt[1],zt=p.useState(null),Wt=ae(zt,2),Qt=Wt[0],jn=Wt[1],Zt=function(xt){jn([xt.clientX,xt.clientY])},un=zB(mt,Me,K&&Qt!==null?Qt:Ke,A,T,R,H),_e=ae(un,11),ot=_e[0],Ye=_e[1],Ae=_e[2],ht=_e[3],Ot=_e[4],Mt=_e[5],dn=_e[6],on=_e[7],bn=_e[8],fn=_e[9],an=_e[10],Pn=LB(Oe,l,c,u),Bn=ae(Pn,2),P=Bn[0],G=Bn[1],B=P.has("click"),te=G.has("click")||G.has("contextMenu"),oe=Ut(function(){rt||an()}),Z=function(){Ue.current&&K&&te&&We(!1)};FB(mt,Ke,Me,oe,Z),en(function(){oe()},[Qt,A]),en(function(){mt&&!(T!=null&&T[A])&&oe()},[JSON.stringify(R)]);var Ce=p.useMemo(function(){var dt=BB(T,i,fn,K);return ee(dt,F==null?void 0:F(fn))},[fn,F,T,i,K]);p.useImperativeHandle(r,function(){return{nativeElement:ze.current,popupElement:Be.current,forceAlign:oe}});var ge=p.useState(0),de=ae(ge,2),be=de[0],Se=de[1],Te=p.useState(0),nt=ae(Te,2),yt=nt[0],St=nt[1],Ft=function(){if(V&&Ke){var xt=Ke.getBoundingClientRect();Se(xt.width),St(xt.height)}},Ht=function(){Ft(),oe()},sn=function(xt){ft(!1),an(),m==null||m(xt)},En=function(){return new Promise(function(xt){Ft(),At(function(){return xt})})};en(function(){Jt&&(an(),Jt(),At(null))},[Jt]);function xn(dt,xt,yn,zn){pt[dt]=function($n){var Tl;zn==null||zn($n),We(xt,yn);for(var Ad=arguments.length,Fg=new Array(Ad>1?Ad-1:0),Pl=1;Pl<Ad;Pl++)Fg[Pl-1]=arguments[Pl];(Tl=et[dt])===null||Tl===void 0||Tl.call.apply(Tl,[et,$n].concat(Fg))}}(B||te)&&(pt.onClick=function(dt){var xt;Ue.current&&te?We(!1):!Ue.current&&B&&(Zt(dt),We(!0));for(var yn=arguments.length,zn=new Array(yn>1?yn-1:0),$n=1;$n<yn;$n++)zn[$n-1]=arguments[$n];(xt=et.onClick)===null||xt===void 0||xt.call.apply(xt,[et,dt].concat(zn))});var Ci=HB(mt,te,Ke,Me,x,w,_t,We),Zn=P.has("hover"),Qa=G.has("hover"),Lo,eo;Zn&&(xn("onMouseEnter",!0,v,function(dt){Zt(dt)}),xn("onPointerEnter",!0,v,function(dt){Zt(dt)}),Lo=function(xt){(mt||rt)&&Me!==null&&Me!==void 0&&Me.contains(xt.target)&&We(!0,v)},K&&(pt.onMouseMove=function(dt){var xt;(xt=et.onMouseMove)===null||xt===void 0||xt.call(et,dt)})),Qa&&(xn("onMouseLeave",!1,y),xn("onPointerLeave",!1,y),eo=function(){We(!1,y)}),P.has("focus")&&xn("onFocus",!0,b),G.has("focus")&&xn("onBlur",!1,C),P.has("contextMenu")&&(pt.onContextMenu=function(dt){var xt;Ue.current&&G.has("contextMenu")?We(!1):(Zt(dt),We(!0)),dt.preventDefault();for(var yn=arguments.length,zn=new Array(yn>1?yn-1:0),$n=1;$n<yn;$n++)zn[$n-1]=arguments[$n];(xt=et.onContextMenu)===null||xt===void 0||xt.call.apply(xt,[et,dt].concat(zn))}),ie&&(pt.className=ee(et.className,ie));var zr=U(U({},et),pt),Za={},Il=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Il.forEach(function(dt){re[dt]&&(Za[dt]=function(){for(var xt,yn=arguments.length,zn=new Array(yn),$n=0;$n<yn;$n++)zn[$n]=arguments[$n];(xt=zr[dt])===null||xt===void 0||xt.call.apply(xt,[zr].concat(zn)),re[dt].apply(re,zn)})});var Id=p.cloneElement(He,U(U({},zr),Za)),Td={x:Mt,y:dn},Pd=X?U({},X!==!0?X:{}):null;return p.createElement(p.Fragment,null,p.createElement(ko,{disabled:!mt,ref:Le,onResize:Ht},p.createElement(qw,{getTriggerDOMNode:me},Id)),p.createElement(A0.Provider,{value:ve},p.createElement(Ww,{portal:e,ref:Fe,prefixCls:i,popup:I,className:ee(k,Ce),style:D,target:Ke,onMouseEnter:Lo,onMouseLeave:eo,onPointerEnter:Lo,zIndex:_,open:mt,keepDom:rt,fresh:W,onClick:J,onPointerDownCapture:Ci,mask:x,motion:Lt,maskMotion:cn,onVisibleChanged:sn,onPrepare:En,forceRender:N,autoDestroy:ce,getPopupContainer:E,align:fn,arrow:Pd,arrowPos:Td,ready:ot,offsetX:Ye,offsetY:Ae,offsetR:ht,offsetB:Ot,onAlign:oe,stretch:V,targetWidth:be/on,targetHeight:yt/bn})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const bd=WB(pd);var qB=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],UB=function(t){var n=t===!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"}}},KB=function(t,n){var r=t.prefixCls;t.disabled;var o=t.visible,i=t.children,a=t.popupElement,s=t.animation,l=t.transitionName,c=t.dropdownStyle,u=t.dropdownClassName,d=t.direction,f=d===void 0?"ltr":d,h=t.placement,m=t.builtinPlacements,v=t.dropdownMatchSelectWidth,g=t.dropdownRender,y=t.dropdownAlign,b=t.getPopupContainer,C=t.empty,x=t.getTriggerDOMNode,S=t.onPopupVisibleChange,w=t.onPopupMouseEnter,E=wt(t,qB),N="".concat(r,"-dropdown"),O=a;g&&(O=g(a));var M=p.useMemo(function(){return m||UB(v)},[m,v]),I=s?"".concat(N,"-").concat(s):l,k=typeof v=="number",D=p.useMemo(function(){return k?null:v===!1?"minWidth":"width"},[v,k]),A=c;k&&(A=U(U({},A),{},{width:v}));var L=p.useRef(null);return p.useImperativeHandle(n,function(){return{getPopupElement:function(){var R;return(R=L.current)===null||R===void 0?void 0:R.popupElement}}}),p.createElement(bd,De({},E,{showAction:S?["click"]:[],hideAction:S?["click"]:[],popupPlacement:h||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:M,prefixCls:N,popupTransitionName:I,popup:p.createElement("div",{onMouseEnter:w},O),ref:L,stretch:D,popupAlign:y,popupVisible:o,getPopupContainer:b,popupClassName:ee(u,q({},"".concat(N,"-empty"),C)),popupStyle:A,getTriggerDOMNode:x,onPopupVisibleChange:S}),i)},Uw=p.forwardRef(KB);process.env.NODE_ENV!=="production"&&(Uw.displayName="SelectTrigger");function z0(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n??(r!==void 0?r:"rc-index-key-".concat(t))}function bp(e){return typeof e<"u"&&!Number.isNaN(e)}function Kw(e,t){var n=e||{},r=n.label,o=n.value,i=n.options,a=n.groupLabel,s=r||(t?"children":"label");return{label:s,value:o||"value",options:i||"options",groupLabel:a||s}}function GB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,o=[],i=Kw(n,!1),a=i.label,s=i.value,l=i.options,c=i.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(h){if(f||!(l in h)){var m=h[s];o.push({key:z0(h,o.length),groupOption:f,data:h,label:h[a],value:m})}else{var v=h[c];v===void 0&&r&&(v=h.label),o.push({key:z0(h,o.length),group:!0,data:h,label:v}),u(h[l],!0)}})}return u(e,!1),o}function yp(e){var t=U({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Ct(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var XB=function(t,n,r){if(!n||!n.length)return null;var o=!1,i=function s(l,c){var u=Ux(c),d=u[0],f=u.slice(1);if(!d)return[l];var h=l.split(d);return o=o||h.length>1,h.reduce(function(m,v){return[].concat(Ie(m),Ie(s(v,f)))},[]).filter(Boolean)},a=i(t,n);return o?typeof r<"u"?a.slice(0,r):a:null},eg=p.createContext(null);function YB(e){var t=e.visible,n=e.values;if(!t)return null;var r=50;return p.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(lt(i))?i:a}).join(", ")),n.length>r?", ...":null)}var JB=["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"],QB=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],nu=function(t){return t==="tags"||t==="multiple"},Gw=p.forwardRef(function(e,t){var n,r=e.id,o=e.prefixCls,i=e.className,a=e.showSearch,s=e.tagRender,l=e.direction,c=e.omitDomProps,u=e.displayValues,d=e.onDisplayValuesChange,f=e.emptyOptions,h=e.notFoundContent,m=h===void 0?"Not Found":h,v=e.onClear,g=e.mode,y=e.disabled,b=e.loading,C=e.getInputElement,x=e.getRawInputElement,S=e.open,w=e.defaultOpen,E=e.onDropdownVisibleChange,N=e.activeValue,O=e.onActiveValueChange,M=e.activeDescendantId,I=e.searchValue,k=e.autoClearSearchValue,D=e.onSearch,A=e.onSearchSplit,L=e.tokenSeparators,T=e.allowClear,R=e.prefix,_=e.suffixIcon,V=e.clearIcon,F=e.OptionList,W=e.animation,K=e.transitionName,J=e.dropdownStyle,H=e.dropdownClassName,X=e.dropdownMatchSelectWidth,Y=e.dropdownRender,le=e.dropdownAlign,Q=e.placement,fe=e.builtinPlacements,ye=e.getPopupContainer,ue=e.showAction,ie=ue===void 0?[]:ue,me=e.onFocus,re=e.onBlur,ce=e.onKeyUp,he=e.onKeyDown,Ee=e.onMouseDown,Oe=wt(e,JB),xe=nu(g),je=(a!==void 0?a:xe)||g==="combobox",z=U({},Oe);QB.forEach(function(ge){delete z[ge]}),c==null||c.forEach(function(ge){delete z[ge]});var ve=p.useState(!1),se=ae(ve,2),pe=se[0],$e=se[1];p.useEffect(function(){$e(Jm())},[]);var Me=p.useRef(null),we=p.useRef(null),Be=p.useRef(null),Fe=p.useRef(null),Re=p.useRef(null),qe=p.useRef(!1),Ke=dB(),Pe=ae(Ke,3),ze=Pe[0],Le=Pe[1],He=Pe[2];p.useImperativeHandle(t,function(){var ge,de;return{focus:(ge=Fe.current)===null||ge===void 0?void 0:ge.focus,blur:(de=Fe.current)===null||de===void 0?void 0:de.blur,scrollTo:function(Se){var Te;return(Te=Re.current)===null||Te===void 0?void 0:Te.scrollTo(Se)},nativeElement:Me.current||we.current}});var et=p.useMemo(function(){var ge;if(g!=="combobox")return I;var de=(ge=u[0])===null||ge===void 0?void 0:ge.value;return typeof de=="string"||typeof de=="number"?String(de):""},[I,g,u]),pt=g==="combobox"&&typeof C=="function"&&C()||null,_t=typeof x=="function"&&x(),Lt=gi(we,_t==null||(n=_t.props)===null||n===void 0?void 0:n.ref),cn=p.useState(!1),Je=ae(cn,2),Ve=Je[0],ct=Je[1];en(function(){ct(!0)},[]);var at=gn(!1,{defaultValue:w,value:S}),mt=ae(at,2),Ze=mt[0],Ue=mt[1],Ge=Ve?Ze:!1,Et=!m&&f;(y||Et&&Ge&&g==="combobox")&&(Ge=!1);var Tt=Et?!1:Ge,tt=p.useCallback(function(ge){var de=ge!==void 0?ge:!Ge;y||(Ue(de),Ge!==de&&(E==null||E(de)))},[y,Ge,Ue,E]),We=p.useMemo(function(){return(L||[]).some(function(ge){return[`
339
+ `,`\r
340
+ `].includes(ge)})},[L]),it=p.useContext(eg)||{},st=it.maxCount,rt=it.rawValues,ft=function(de,be,Se){if(!(xe&&bp(st)&&(rt==null?void 0:rt.size)>=st)){var Te=!0,nt=de;O==null||O(null);var yt=XB(de,L,bp(st)?st-rt.size:void 0),St=Se?null:yt;return g!=="combobox"&&St&&(nt="",A==null||A(St),tt(!1),Te=!1),D&&et!==nt&&D(nt,{source:be?"typing":"effect"}),Te}},jt=function(de){!de||!de.trim()||D(de,{source:"submit"})};p.useEffect(function(){!Ge&&!xe&&g!=="combobox"&&ft("",!1,!1)},[Ge]),p.useEffect(function(){Ze&&y&&Ue(!1),y&&!qe.current&&Le(!1)},[y]);var Nt=Lw(),Jt=ae(Nt,2),At=Jt[0],zt=Jt[1],Wt=p.useRef(!1),Qt=function(de){var be=At(),Se=de.key,Te=Se==="Enter";if(Te&&(g!=="combobox"&&de.preventDefault(),Ge||tt(!0)),zt(!!et),Se==="Backspace"&&!be&&xe&&!et&&u.length){for(var nt=Ie(u),yt=null,St=nt.length-1;St>=0;St-=1){var Ft=nt[St];if(!Ft.disabled){nt.splice(St,1),yt=Ft;break}}yt&&d(nt,{type:"remove",values:[yt]})}for(var Ht=arguments.length,sn=new Array(Ht>1?Ht-1:0),En=1;En<Ht;En++)sn[En-1]=arguments[En];if(Ge&&(!Te||!Wt.current)){var xn;Te&&(Wt.current=!0),(xn=Re.current)===null||xn===void 0||xn.onKeyDown.apply(xn,[de].concat(sn))}he==null||he.apply(void 0,[de].concat(sn))},jn=function(de){for(var be=arguments.length,Se=new Array(be>1?be-1:0),Te=1;Te<be;Te++)Se[Te-1]=arguments[Te];if(Ge){var nt;(nt=Re.current)===null||nt===void 0||nt.onKeyUp.apply(nt,[de].concat(Se))}de.key==="Enter"&&(Wt.current=!1),ce==null||ce.apply(void 0,[de].concat(Se))},Zt=function(de){var be=u.filter(function(Se){return Se!==de});d(be,{type:"remove",values:[de]})},un=function(){Wt.current=!1},_e=p.useRef(!1),ot=function(){Le(!0),y||(me&&!_e.current&&me.apply(void 0,arguments),ie.includes("focus")&&tt(!0)),_e.current=!0},Ye=function(){qe.current=!0,Le(!1,function(){_e.current=!1,qe.current=!1,tt(!1)}),!y&&(et&&(g==="tags"?D(et,{source:"submit"}):g==="multiple"&&D("",{source:"blur"})),re&&re.apply(void 0,arguments))},Ae=[];p.useEffect(function(){return function(){Ae.forEach(function(ge){return clearTimeout(ge)}),Ae.splice(0,Ae.length)}},[]);var ht=function(de){var be,Se=de.target,Te=(be=Be.current)===null||be===void 0?void 0:be.getPopupElement();if(Te&&Te.contains(Se)){var nt=setTimeout(function(){var Ht=Ae.indexOf(nt);if(Ht!==-1&&Ae.splice(Ht,1),He(),!pe&&!Te.contains(document.activeElement)){var sn;(sn=Fe.current)===null||sn===void 0||sn.focus()}});Ae.push(nt)}for(var yt=arguments.length,St=new Array(yt>1?yt-1:0),Ft=1;Ft<yt;Ft++)St[Ft-1]=arguments[Ft];Ee==null||Ee.apply(void 0,[de].concat(St))},Ot=p.useState({}),Mt=ae(Ot,2),dn=Mt[1];function on(){dn({})}var bn;_t&&(bn=function(de){tt(de)}),fB(function(){var ge;return[Me.current,(ge=Be.current)===null||ge===void 0?void 0:ge.getPopupElement()]},Tt,tt,!!_t);var fn=p.useMemo(function(){return U(U({},e),{},{notFoundContent:m,open:Ge,triggerOpen:Tt,id:r,showSearch:je,multiple:xe,toggleOpen:tt})},[e,m,Tt,Ge,r,je,xe,tt]),an=!!_||b,Pn;an&&(Pn=p.createElement(vd,{className:ee("".concat(o,"-arrow"),q({},"".concat(o,"-arrow-loading"),b)),customizeIcon:_,customizeIconProps:{loading:b,searchValue:et,open:Ge,focused:ze,showSearch:je}}));var Bn=function(){var de;v==null||v(),(de=Fe.current)===null||de===void 0||de.focus(),d([],{type:"clear",values:u}),ft("",!1,!1)},P=cB(o,Bn,u,T,V,y,et,g),G=P.allowClear,B=P.clearIcon,te=p.createElement(F,{ref:Re}),oe=ee(o,i,q(q(q(q(q(q(q(q(q(q({},"".concat(o,"-focused"),ze),"".concat(o,"-multiple"),xe),"".concat(o,"-single"),!xe),"".concat(o,"-allow-clear"),T),"".concat(o,"-show-arrow"),an),"".concat(o,"-disabled"),y),"".concat(o,"-loading"),b),"".concat(o,"-open"),Ge),"".concat(o,"-customize-input"),pt),"".concat(o,"-show-search"),je)),Z=p.createElement(Uw,{ref:Be,disabled:y,prefixCls:o,visible:Tt,popupElement:te,animation:W,transitionName:K,dropdownStyle:J,dropdownClassName:H,direction:l,dropdownMatchSelectWidth:X,dropdownRender:Y,dropdownAlign:le,placement:Q,builtinPlacements:fe,getPopupContainer:ye,empty:f,getTriggerDOMNode:function(de){return we.current||de},onPopupVisibleChange:bn,onPopupMouseEnter:on},_t?p.cloneElement(_t,{ref:Lt}):p.createElement(Hw,De({},e,{domRef:we,prefixCls:o,inputElement:pt,ref:Fe,id:r,prefix:R,showSearch:je,autoClearSearchValue:k,mode:g,activeDescendantId:M,tagRender:s,values:u,open:Ge,onToggleOpen:tt,activeValue:N,searchValue:et,onSearch:ft,onSearchSubmit:jt,onRemove:Zt,tokenWithEnter:We,onInputBlur:un}))),Ce;return _t?Ce=Z:Ce=p.createElement("div",De({className:oe},z,{ref:Me,onMouseDown:ht,onKeyDown:Qt,onKeyUp:jn,onFocus:ot,onBlur:Ye}),p.createElement(YB,{visible:ze&&!Ge,values:u}),Z,Pn,G&&B),p.createElement(_w.Provider,{value:fn},Ce)});process.env.NODE_ENV!=="production"&&(Gw.displayName="BaseSelect");var tg=function(){return null};tg.isSelectOptGroup=!0;var ng=function(){return null};ng.isSelectOption=!0;var Xw=p.forwardRef(function(e,t){var n=e.height,r=e.offsetY,o=e.offsetX,i=e.children,a=e.prefixCls,s=e.onInnerResize,l=e.innerProps,c=e.rtl,u=e.extra,d={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},f=U(U({},f),{},q(q(q(q(q({transform:"translateY(".concat(r,"px)")},c?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),p.createElement("div",{style:d},p.createElement(ko,{onResize:function(m){var v=m.offsetHeight;v&&s&&s()}},p.createElement("div",De({style:f,className:ee(q({},"".concat(a,"-holder-inner"),a)),ref:t},l),i,u)))});Xw.displayName="Filler";function ZB(e){var t=e.children,n=e.setRef,r=p.useCallback(function(o){n(o)},[]);return p.cloneElement(t,{ref:r})}function ez(e,t,n,r,o,i,a,s){var l=s.getKey;return e.slice(t,n+1).map(function(c,u){var d=t+u,f=a(c,d,{style:{width:r},offsetX:o}),h=l(c);return p.createElement(ZB,{key:h,setRef:function(v){return i(c,v)}},f)})}function tz(e,t,n){var r=e.length,o=t.length,i,a;if(r===0&&o===0)return null;r<o?(i=e,a=t):(i=t,a=e);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]),h=l(a[d]);if(f!==h){c=d,u=u||f!==l(a[d+1]);break}}return c===null?null:{index:c,multiple:u}}function nz(e,t,n){var r=p.useState(e),o=ae(r,2),i=o[0],a=o[1],s=p.useState(null),l=ae(s,2),c=l[0],u=l[1];return p.useEffect(function(){var d=tz(i||[],e||[],t);(d==null?void 0:d.index)!==void 0&&u(e[d.index]),a(e)},[e]),[c]}var F0=(typeof navigator>"u"?"undefined":lt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const Yw=function(e,t,n,r){var o=$.useRef(!1),i=$.useRef(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(function(){o.current=!1},50)}var s=$.useRef({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,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 rz(e,t,n,r,o,i,a){var s=$.useRef(0),l=$.useRef(null),c=$.useRef(null),u=$.useRef(!1),d=Yw(t,n,r,o);function f(b,C){if(Dt.cancel(l.current),!d(!1,C)){var x=b;if(!x._virtualHandled)x._virtualHandled=!0;else return;s.current+=C,c.current=C,F0||x.preventDefault(),l.current=Dt(function(){var S=u.current?10:1;a(s.current*S,!1),s.current=0})}}function h(b,C){a(C,!0),F0||b.preventDefault()}var m=$.useRef(null),v=$.useRef(null);function g(b){if(e){Dt.cancel(v.current),v.current=Dt(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 N=Math.abs(w),O=Math.abs(E);m.current===null&&(m.current=i&&N>O?"x":"y"),m.current==="y"?f(b,E):h(b,w)}}function y(b){e&&(u.current=b.detail===c.current)}return[g,y]}function oz(e,t,n,r){var o=p.useMemo(function(){return[new Map,[]]},[e,n.id,r]),i=ae(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),h=a.get(d);if(f===void 0||h===void 0)for(var m=e.length,v=s.length;v<m;v+=1){var g,y=e[v],b=t(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&&(h=v),f!==void 0&&h!==void 0)break}return{top:s[f-1]||0,bottom:s[h]}};return l}var iz=function(){function e(){In(this,e),q(this,"maps",void 0),q(this,"id",0),q(this,"diffKeys",new Set),this.maps=Object.create(null)}return Tn(e,[{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}}]),e}();function H0(e){var t=parseFloat(e);return isNaN(t)?0:t}function az(e,t,n){var r=p.useState(0),o=ae(r,2),i=o[0],a=o[1],s=$.useRef(new Map),l=$.useRef(new iz),c=$.useRef(0);function u(){c.current+=1}function d(){var h=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,N=H0(w),O=H0(E),M=x+N+O;l.current.get(C)!==M&&(l.current.set(C,M),y=!0)}}),y&&a(function(b){return b+1})};if(h)m();else{c.current+=1;var v=c.current;Promise.resolve().then(function(){v===c.current&&m()})}}function f(h,m){var v=e(h);s.current.get(v),m?(s.current.set(v,m),d()):s.current.delete(v)}return $.useEffect(function(){return u},[]),[f,d,l.current,i]}var V0=14/15;function sz(e,t,n){var r=$.useRef(!1),o=$.useRef(0),i=$.useRef(0),a=$.useRef(null),s=$.useRef(null),l,c=function(h){if(r.current){var m=Math.ceil(h.touches[0].pageX),v=Math.ceil(h.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,h);C&&h.preventDefault(),clearInterval(s.current),C&&(s.current=setInterval(function(){b?g*=V0:y*=V0;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(h){l(),h.touches.length===1&&!r.current&&(r.current=!0,o.current=Math.ceil(h.touches[0].pageX),i.current=Math.ceil(h.touches[0].pageY),a.current=h.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))},en(function(){return e&&t.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=t.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[e])}function W0(e){return Math.floor(Math.pow(e,.5))}function Cp(e,t){var n="touches"in e?e.touches[0]:e;return n[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function lz(e,t,n){p.useEffect(function(){var r=t.current;if(e&&r){var o=!1,i,a,s=function(){Dt.cancel(i)},l=function f(){s(),i=Dt(function(){n(a),f()})},c=function(h){if(!(h.target.draggable||h.button!==0)){var m=h;m._virtualHandled||(m._virtualHandled=!0,o=!0)}},u=function(){o=!1,s()},d=function(h){if(o){var m=Cp(h,!1),v=r.getBoundingClientRect(),g=v.top,y=v.bottom;if(m<=g){var b=g-m;a=-W0(b),l()}else if(m>=y){var C=m-y;a=W0(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()}}},[e])}var q0=10;function cz(e,t,n,r,o,i,a,s){var l=p.useRef(),c=p.useState(null),u=ae(c,2),d=u[0],f=u[1];return en(function(){if(d&&d.times<q0){if(!e.current){f(function(V){return U({},V)});return}i();var h=d.targetAlign,m=d.originAlign,v=d.index,g=d.offset,y=e.current.clientHeight,b=!1,C=h,x=null;if(y){for(var S=h||m,w=0,E=0,N=0,O=Math.min(t.length-1,v),M=0;M<=O;M+=1){var I=o(t[M]);E=w;var k=n.get(I);N=E+(k===void 0?r:k),w=N}for(var D=S==="top"?g:y-g,A=O;A>=0;A-=1){var L=o(t[A]),T=n.get(L);if(T===void 0){b=!0;break}if(D-=T,D<=0)break}switch(S){case"top":x=E-g;break;case"bottom":x=N-y+g;break;default:{var R=e.current.scrollTop,_=R+y;E<R?C="top":N>_&&(C="bottom")}}x!==null&&a(x),x!==d.lastTop&&(b=!0)}b&&f(U(U({},d),{},{times:d.times+1,targetAlign:C,lastTop:x}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===q0&&Ct(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,e.current]),function(h){if(h==null){s();return}if(Dt.cancel(l.current),typeof h=="number")a(h);else if(h&&lt(h)==="object"){var m,v=h.align;"index"in h?m=h.index:m=t.findIndex(function(b){return o(b)===h.key});var g=h.offset,y=g===void 0?0:g;f({times:0,index:m,offset:y,originAlign:v})}}}var Sp=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.rtl,o=e.scrollOffset,i=e.scrollRange,a=e.onStartMove,s=e.onStopMove,l=e.onScroll,c=e.horizontal,u=e.spinSize,d=e.containerSize,f=e.style,h=e.thumbStyle,m=e.showScrollBar,v=p.useState(!1),g=ae(v,2),y=g[0],b=g[1],C=p.useState(null),x=ae(C,2),S=x[0],w=x[1],E=p.useState(null),N=ae(E,2),O=N[0],M=N[1],I=!r,k=p.useRef(),D=p.useRef(),A=p.useState(m),L=ae(A,2),T=L[0],R=L[1],_=p.useRef(),V=function(){m===!0||m===!1||(clearTimeout(_.current),R(!0),_.current=setTimeout(function(){R(!1)},3e3))},F=i-d||0,W=d-u||0,K=p.useMemo(function(){if(o===0||F===0)return 0;var ue=o/F;return ue*W},[o,F,W]),J=function(ie){ie.stopPropagation(),ie.preventDefault()},H=p.useRef({top:K,dragging:y,pageY:S,startTop:O});H.current={top:K,dragging:y,pageY:S,startTop:O};var X=function(ie){b(!0),w(Cp(ie,c)),M(H.current.top),a(),ie.stopPropagation(),ie.preventDefault()};p.useEffect(function(){var ue=function(ce){ce.preventDefault()},ie=k.current,me=D.current;return ie.addEventListener("touchstart",ue,{passive:!1}),me.addEventListener("touchstart",X,{passive:!1}),function(){ie.removeEventListener("touchstart",ue),me.removeEventListener("touchstart",X)}},[]);var Y=p.useRef();Y.current=F;var le=p.useRef();le.current=W,p.useEffect(function(){if(y){var ue,ie=function(ce){var he=H.current,Ee=he.dragging,Oe=he.pageY,xe=he.startTop;Dt.cancel(ue);var je=k.current.getBoundingClientRect(),z=d/(c?je.width:je.height);if(Ee){var ve=(Cp(ce,c)-Oe)*z,se=xe;!I&&c?se-=ve:se+=ve;var pe=Y.current,$e=le.current,Me=$e?se/$e:0,we=Math.ceil(Me*pe);we=Math.max(we,0),we=Math.min(we,pe),ue=Dt(function(){l(we,c)})}},me=function(){b(!1),s()};return window.addEventListener("mousemove",ie,{passive:!0}),window.addEventListener("touchmove",ie,{passive:!0}),window.addEventListener("mouseup",me,{passive:!0}),window.addEventListener("touchend",me,{passive:!0}),function(){window.removeEventListener("mousemove",ie),window.removeEventListener("touchmove",ie),window.removeEventListener("mouseup",me),window.removeEventListener("touchend",me),Dt.cancel(ue)}}},[y]),p.useEffect(function(){return V(),function(){clearTimeout(_.current)}},[o]),p.useImperativeHandle(t,function(){return{delayHidden:V}});var Q="".concat(n,"-scrollbar"),fe={position:"absolute",visibility:T?null:"hidden"},ye={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,ye.height="100%",ye.width=u,I?ye.left=K:ye.right=K):(fe.width=8,fe.top=0,fe.bottom=0,I?fe.right=0:fe.left=0,ye.width="100%",ye.height=u,ye.top=K),p.createElement("div",{ref:k,className:ee(Q,q(q(q({},"".concat(Q,"-horizontal"),c),"".concat(Q,"-vertical"),!c),"".concat(Q,"-visible"),T)),style:U(U({},fe),f),onMouseDown:J,onMouseMove:V},p.createElement("div",{ref:D,className:ee("".concat(Q,"-thumb"),q({},"".concat(Q,"-thumb-moving"),y)),style:U(U({},ye),h),onMouseDown:X}))});process.env.NODE_ENV!=="production"&&(Sp.displayName="ScrollBar");var uz=20;function U0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,uz),Math.floor(n)}var dz=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],fz=[],hz={overflowY:"auto",overflowAnchor:"none"};function pz(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,o=e.className,i=e.height,a=e.itemHeight,s=e.fullHeight,l=s===void 0?!0:s,c=e.style,u=e.data,d=e.children,f=e.itemKey,h=e.virtual,m=e.direction,v=e.scrollWidth,g=e.component,y=g===void 0?"div":g,b=e.onScroll,C=e.onVirtualScroll,x=e.onVisibleChange,S=e.innerProps,w=e.extraRender,E=e.styles,N=e.showScrollBar,O=N===void 0?"optional":N,M=wt(e,dz),I=p.useCallback(function(_e){return typeof f=="function"?f(_e):_e==null?void 0:_e[f]},[f]),k=az(I),D=ae(k,4),A=D[0],L=D[1],T=D[2],R=D[3],_=!!(h!==!1&&i&&a),V=p.useMemo(function(){return Object.values(T.maps).reduce(function(_e,ot){return _e+ot},0)},[T.id,T.maps]),F=_&&u&&(Math.max(a*u.length,V)>i||!!v),W=m==="rtl",K=ee(r,q({},"".concat(r,"-rtl"),W),o),J=u||fz,H=$.useRef(),X=$.useRef(),Y=$.useRef(),le=$.useState(0),Q=ae(le,2),fe=Q[0],ye=Q[1],ue=$.useState(0),ie=ae(ue,2),me=ie[0],re=ie[1],ce=$.useState(!1),he=ae(ce,2),Ee=he[0],Oe=he[1],xe=function(){Oe(!0)},je=function(){Oe(!1)},z={getKey:I};function ve(_e){ye(function(ot){var Ye;typeof _e=="function"?Ye=_e(ot):Ye=_e;var Ae=ct(Ye);return H.current.scrollTop=Ae,Ae})}var se=$.useRef({start:0,end:J.length}),pe=$.useRef(),$e=nz(J,I),Me=ae($e,1),we=Me[0];pe.current=we;var Be=p.useMemo(function(){if(!_)return{scrollHeight:void 0,start:0,end:J.length-1,offset:void 0};if(!F){var _e;return{scrollHeight:((_e=X.current)===null||_e===void 0?void 0:_e.offsetHeight)||0,start:0,end:J.length-1,offset:void 0}}for(var ot=0,Ye,Ae,ht,Ot=J.length,Mt=0;Mt<Ot;Mt+=1){var dn=J[Mt],on=I(dn),bn=T.get(on),fn=ot+(bn===void 0?a:bn);fn>=fe&&Ye===void 0&&(Ye=Mt,Ae=ot),fn>fe+i&&ht===void 0&&(ht=Mt),ot=fn}return Ye===void 0&&(Ye=0,Ae=0,ht=Math.ceil(i/a)),ht===void 0&&(ht=J.length-1),ht=Math.min(ht+1,J.length-1),{scrollHeight:ot,start:Ye,end:ht,offset:Ae}},[F,_,fe,J,R,i]),Fe=Be.scrollHeight,Re=Be.start,qe=Be.end,Ke=Be.offset;se.current.start=Re,se.current.end=qe,p.useLayoutEffect(function(){var _e=T.getRecord();if(_e.size===1){var ot=Array.from(_e)[0],Ye=J[Re];if(Ye){var Ae=I(Ye);if(Ae===ot){var ht=T.get(ot),Ot=ht-a;ve(function(Mt){return Mt+Ot})}}}T.resetRecord()},[Fe]);var Pe=p.useState({width:0,height:i}),ze=ae(Pe,2),Le=ze[0],He=ze[1],et=function(ot){He({width:ot.offsetWidth,height:ot.offsetHeight})},pt=$.useRef(),_t=$.useRef(),Lt=p.useMemo(function(){return U0(Le.width,v)},[Le.width,v]),cn=p.useMemo(function(){return U0(Le.height,Fe)},[Le.height,Fe]),Je=Fe-i,Ve=$.useRef(Je);Ve.current=Je;function ct(_e){var ot=_e;return Number.isNaN(Ve.current)||(ot=Math.min(ot,Ve.current)),ot=Math.max(ot,0),ot}var at=fe<=0,mt=fe>=Je,Ze=me<=0,Ue=me>=v,Ge=Yw(at,mt,Ze,Ue),Et=function(){return{x:W?-me:me,y:fe}},Tt=$.useRef(Et()),tt=Ut(function(_e){if(C){var ot=U(U({},Et()),_e);(Tt.current.x!==ot.x||Tt.current.y!==ot.y)&&(C(ot),Tt.current=ot)}});function We(_e,ot){var Ye=_e;ot?(kr.flushSync(function(){re(Ye)}),tt()):ve(Ye)}function it(_e){var ot=_e.currentTarget.scrollTop;ot!==fe&&ve(ot),b==null||b(_e),tt()}var st=function(ot){var Ye=ot,Ae=v?v-Le.width:0;return Ye=Math.max(Ye,0),Ye=Math.min(Ye,Ae),Ye},rt=Ut(function(_e,ot){ot?(kr.flushSync(function(){re(function(Ye){var Ae=Ye+(W?-_e:_e);return st(Ae)})}),tt()):ve(function(Ye){var Ae=Ye+_e;return Ae})}),ft=rz(_,at,mt,Ze,Ue,!!v,rt),jt=ae(ft,2),Nt=jt[0],Jt=jt[1];sz(_,H,function(_e,ot,Ye,Ae){var ht=Ae;return Ge(_e,ot,Ye)?!1:!ht||!ht._virtualHandled?(ht&&(ht._virtualHandled=!0),Nt({preventDefault:function(){},deltaX:_e?ot:0,deltaY:_e?0:ot}),!0):!1}),lz(F,H,function(_e){ve(function(ot){return ot+_e})}),en(function(){function _e(Ye){var Ae=at&&Ye.detail<0,ht=mt&&Ye.detail>0;_&&!Ae&&!ht&&Ye.preventDefault()}var ot=H.current;return ot.addEventListener("wheel",Nt,{passive:!1}),ot.addEventListener("DOMMouseScroll",Jt,{passive:!0}),ot.addEventListener("MozMousePixelScroll",_e,{passive:!1}),function(){ot.removeEventListener("wheel",Nt),ot.removeEventListener("DOMMouseScroll",Jt),ot.removeEventListener("MozMousePixelScroll",_e)}},[_,at,mt]),en(function(){if(v){var _e=st(me);re(_e),tt({x:_e})}},[Le.width,v]);var At=function(){var ot,Ye;(ot=pt.current)===null||ot===void 0||ot.delayHidden(),(Ye=_t.current)===null||Ye===void 0||Ye.delayHidden()},zt=cz(H,J,T,a,I,function(){return L(!0)},ve,At);p.useImperativeHandle(t,function(){return{nativeElement:Y.current,getScrollInfo:Et,scrollTo:function(ot){function Ye(Ae){return Ae&&lt(Ae)==="object"&&("left"in Ae||"top"in Ae)}Ye(ot)?(ot.left!==void 0&&re(st(ot.left)),zt(ot.top)):zt(ot)}}}),en(function(){if(x){var _e=J.slice(Re,qe+1);x(_e,J)}},[Re,qe,J]);var Wt=oz(J,I,T,a),Qt=w==null?void 0:w({start:Re,end:qe,virtual:F,offsetX:me,offsetY:Ke,rtl:W,getSize:Wt}),jn=ez(J,Re,qe,v,me,A,d,z),Zt=null;i&&(Zt=U(q({},l?"height":"maxHeight",i),hz),_&&(Zt.overflowY="hidden",v&&(Zt.overflowX="hidden"),Ee&&(Zt.pointerEvents="none")));var un={};return W&&(un.dir="rtl"),p.createElement("div",De({ref:Y,style:U(U({},c),{},{position:"relative"}),className:K},un,M),p.createElement(ko,{onResize:et},p.createElement(y,{className:"".concat(r,"-holder"),style:Zt,ref:H,onScroll:it,onMouseEnter:At},p.createElement(Xw,{prefixCls:r,height:Fe,offsetX:me,offsetY:Ke,scrollWidth:v,onInnerResize:L,ref:X,innerProps:S,rtl:W,extra:Qt},jn))),F&&Fe>i&&p.createElement(Sp,{ref:pt,prefixCls:r,scrollOffset:fe,scrollRange:Fe,rtl:W,onScroll:We,onStartMove:xe,onStopMove:je,spinSize:cn,containerSize:Le.height,style:E==null?void 0:E.verticalScrollBar,thumbStyle:E==null?void 0:E.verticalScrollBarThumb,showScrollBar:O}),F&&v>Le.width&&p.createElement(Sp,{ref:_t,prefixCls:r,scrollOffset:me,scrollRange:v,rtl:W,onScroll:We,onStartMove:xe,onStopMove:je,spinSize:Lt,containerSize:Le.width,horizontal:!0,style:E==null?void 0:E.horizontalScrollBar,thumbStyle:E==null?void 0:E.horizontalScrollBarThumb,showScrollBar:O}))}var Jw=p.forwardRef(pz);Jw.displayName="List";function mz(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var gz=["disabled","title","children","style","className"];function K0(e){return typeof e=="string"||typeof e=="number"}var vz=function(t,n){var r=uB(),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,h=p.useContext(eg),m=h.maxCount,v=h.flattenOptions,g=h.onActiveValue,y=h.defaultActiveFirstOption,b=h.onSelect,C=h.menuItemSelectedIcon,x=h.rawValues,S=h.fieldNames,w=h.virtual,E=h.direction,N=h.listHeight,O=h.listItemHeight,M=h.optionRender,I="".concat(o,"-item"),k=cl(function(){return v},[a,v],function(ue,ie){return ie[0]&&ue[1]!==ie[1]}),D=p.useRef(null),A=p.useMemo(function(){return s&&bp(m)&&(x==null?void 0:x.size)>=m},[s,m,x==null?void 0:x.size]),L=function(ie){ie.preventDefault()},T=function(ie){var me;(me=D.current)===null||me===void 0||me.scrollTo(typeof ie=="number"?{index:ie}:ie)},R=p.useCallback(function(ue){return l==="combobox"?!1:x.has(ue)},[l,Ie(x).toString(),x.size]),_=function(ie){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,re=k.length,ce=0;ce<re;ce+=1){var he=(ie+ce*me+re)%re,Ee=k[he]||{},Oe=Ee.group,xe=Ee.data;if(!Oe&&!(xe!=null&&xe.disabled)&&(R(xe.value)||!A))return he}return-1},V=p.useState(function(){return _(0)}),F=ae(V,2),W=F[0],K=F[1],J=function(ie){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;K(ie);var re={source:me?"keyboard":"mouse"},ce=k[ie];if(!ce){g(null,-1,re);return}g(ce.value,ie,re)};$.useEffect(function(){J(y!==!1?_(0):-1)},[k.length,c]);var H=p.useCallback(function(ue){return l==="combobox"?String(ue).toLowerCase()===c.toLowerCase():x.has(ue)},[l,c,Ie(x).toString(),x.size]);$.useEffect(function(){var ue=setTimeout(function(){if(!s&&a&&x.size===1){var me=Array.from(x)[0],re=k.findIndex(function(ce){var he=ce.data;return he.value===me});re!==-1&&(J(re),T(re))}});if(a){var ie;(ie=D.current)===null||ie===void 0||ie.scrollTo(void 0)}return function(){return clearTimeout(ue)}},[a,c]);var X=function(ie){ie!==void 0&&b(ie,{selected:!x.has(ie)}),s||u(!1)};if(p.useImperativeHandle(n,function(){return{onKeyDown:function(ie){var me=ie.which,re=ie.ctrlKey;switch(me){case Qe.N:case Qe.P:case Qe.UP:case Qe.DOWN:{var ce=0;if(me===Qe.UP?ce=-1:me===Qe.DOWN?ce=1:mz()&&re&&(me===Qe.N?ce=1:me===Qe.P&&(ce=-1)),ce!==0){var he=_(W+ce,ce);T(he),J(he,!0)}break}case Qe.TAB:case Qe.ENTER:{var Ee,Oe=k[W];Oe&&!(Oe!=null&&(Ee=Oe.data)!==null&&Ee!==void 0&&Ee.disabled)&&!A?X(Oe.value):X(void 0),a&&ie.preventDefault();break}case Qe.ESC:u(!1),a&&ie.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ie){T(ie)}}}),k.length===0)return p.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(I,"-empty"),onMouseDown:L},d);var Y=Object.keys(S).map(function(ue){return S[ue]}),le=function(ie){return ie.label};function Q(ue,ie){var me=ue.group;return{role:me?"presentation":"option",id:"".concat(i,"_list_").concat(ie)}}var fe=function(ie){var me=k[ie];if(!me)return null;var re=me.data||{},ce=re.value,he=me.group,Ee=Gr(re,!0),Oe=le(me);return me?p.createElement("div",De({"aria-label":typeof Oe=="string"&&!he?Oe:null},Ee,{key:ie},Q(me,ie),{"aria-selected":H(ce)}),ce):null},ye={role:"listbox",id:"".concat(i,"_list")};return p.createElement(p.Fragment,null,w&&p.createElement("div",De({},ye,{style:{height:0,width:0,overflow:"hidden"}}),fe(W-1),fe(W),fe(W+1)),p.createElement(Jw,{itemKey:"key",ref:D,data:k,height:N,itemHeight:O,fullHeight:!1,onMouseDown:L,onScroll:f,virtual:w,direction:E,innerProps:w?null:ye},function(ue,ie){var me=ue.group,re=ue.groupOption,ce=ue.data,he=ue.label,Ee=ue.value,Oe=ce.key;if(me){var xe,je=(xe=ce.title)!==null&&xe!==void 0?xe:K0(he)?he.toString():void 0;return p.createElement("div",{className:ee(I,"".concat(I,"-group"),ce.className),title:je},he!==void 0?he:Oe)}var z=ce.disabled,ve=ce.title;ce.children;var se=ce.style,pe=ce.className,$e=wt(ce,gz),Me=Fn($e,Y),we=R(Ee),Be=z||!we&&A,Fe="".concat(I,"-option"),Re=ee(I,Fe,pe,q(q(q(q({},"".concat(Fe,"-grouped"),re),"".concat(Fe,"-active"),W===ie&&!Be),"".concat(Fe,"-disabled"),Be),"".concat(Fe,"-selected"),we)),qe=le(ue),Ke=!C||typeof C=="function"||we,Pe=typeof qe=="number"?qe:qe||Ee,ze=K0(Pe)?Pe.toString():void 0;return ve!==void 0&&(ze=ve),p.createElement("div",De({},Gr(Me),w?{}:Q(ue,ie),{"aria-selected":H(Ee),className:Re,title:ze,onMouseMove:function(){W===ie||Be||J(ie)},onClick:function(){Be||X(Ee)},style:se}),p.createElement("div",{className:"".concat(Fe,"-content")},typeof M=="function"?M(ue,{index:ie}):Pe),p.isValidElement(C)||we,Ke&&p.createElement(vd,{className:"".concat(I,"-option-state"),customizeIcon:C,customizeIconProps:{value:Ee,disabled:Be,isSelected:we}},we?"✓":null))}))},Qw=p.forwardRef(vz);process.env.NODE_ENV!=="production"&&(Qw.displayName="OptionList");const bz=function(e,t){var n=p.useRef({values:new Map,options:new Map}),r=p.useMemo(function(){var i=n.current,a=i.values,s=i.options,l=e.map(function(d){if(d.label===void 0){var f;return U(U({},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,t.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[e,t]),o=p.useCallback(function(i){return t.get(i)||n.current.options.get(i)},[t]);return[r,o]};function Af(e,t){return Zm(e).join("").toUpperCase().includes(t)}const yz=function(e,t,n,r,o){return p.useMemo(function(){if(!n||r===!1)return e;var i=t.options,a=t.label,s=t.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(h,m){return o?Af(m[o],u):m[i]?Af(m[a!=="children"?a:"label"],u):Af(m[s],u)},f=c?function(h){return yp(h)}:function(h){return h};return e.forEach(function(h){if(h[i]){var m=d(n,f(h));if(m)l.push(h);else{var v=h[i].filter(function(g){return d(n,f(g))});v.length&&l.push(U(U({},h),{},q({},i,v)))}return}d(n,f(h))&&l.push(h)}),l},[e,r,o,n,t])};var G0=0,Cz=process.env.NODE_ENV!=="test"&&rr();function Sz(){var e;return Cz?(e=G0,G0+=1):e="TEST_OR_SSR",e}function xz(e){var t=p.useState(),n=ae(t,2),r=n[0],o=n[1];return p.useEffect(function(){o("rc_select_".concat(Sz()))},[]),e||r}var wz=["children","value"],Ez=["children"];function $z(e){var t=e,n=t.key,r=t.props,o=r.children,i=r.value,a=wt(r,wz);return U({key:n,value:i!==void 0?i:n,children:o},a)}function rg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return wr(e).map(function(n,r){if(!p.isValidElement(n)||!n.type)return null;var o=n,i=o.type.isSelectOptGroup,a=o.key,s=o.props,l=s.children,c=wt(s,Ez);return t||!i?$z(n):U(U({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:rg(l)})}).filter(function(n){return n})}var Oz=function(t,n,r,o,i){return p.useMemo(function(){var a=t,s=!t;s&&(a=rg(n));var l=new Map,c=new Map,u=function(h,m,v){v&&typeof v=="string"&&h.set(m[v],m)},d=function f(h){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<h.length;v+=1){var g=h[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}},[t,n,r,o,i])};function X0(e){var t=p.useRef();t.current=e;var n=p.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}function Nz(e){var t=e.mode,n=e.options,r=e.children,o=e.backfill,i=e.allowClear,a=e.placeholder,s=e.getInputElement,l=e.showSearch,c=e.onSearch,u=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,h=e.value,m=e.inputValue,v=e.optionLabelProp,g=nu(t),y=l!==void 0?l:g||t==="combobox",b=n||rg(r);if(Ct(t!=="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."),t==="tags"||t==="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"});Ct(!C,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Ct(t!=="combobox"||!v,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Ct(t==="combobox"||!o,"`backfill` only works with `combobox` mode."),Ct(t==="combobox"||!s,"`getInputElement` only work with `combobox` mode."),xh(t!=="combobox"||!s||!i||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),c&&!y&&t!=="combobox"&&t!=="tags"&&Ct(!1,"`onSearch` should work with `showSearch` instead of use alone."),xh(!u||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),h!=null){var x=Zm(h);Ct(!f||x.every(function(w){return lt(w)==="object"&&("key"in w||"value"in w)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Ct(!g||Array.isArray(h),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var S=null;wr(r).some(function(w){if(!p.isValidElement(w)||!w.type)return!1;var E=w,N=E.type;if(N.isSelectOption)return!1;if(N.isSelectOptGroup){var O=wr(w.props.children).every(function(M){return!p.isValidElement(M)||!w.type||M.type.isSelectOption?!0:(S=M.type,!1)});return!O}return S=N,!0}),S&&Ct(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(S.displayName||S.name||S,"`.")),Ct(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Mz(e,t){if(e){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[t==null?void 0:t.value]===null)return Ct(!1,"`value` in Select options should not be `null`."),!0;if(!i&&Array.isArray(s[t==null?void 0:t.options])&&r(s[t==null?void 0:t.options],!0))break}};n(e)}}var Rz=["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"],Iz=["inputValue"];function Tz(e){return!e||lt(e)!=="object"}var Zw=p.forwardRef(function(e,t){var n=e.id,r=e.mode,o=e.prefixCls,i=o===void 0?"rc-select":o,a=e.backfill,s=e.fieldNames,l=e.inputValue,c=e.searchValue,u=e.onSearch,d=e.autoClearSearchValue,f=d===void 0?!0:d,h=e.onSelect,m=e.onDeselect,v=e.dropdownMatchSelectWidth,g=v===void 0?!0:v,y=e.filterOption,b=e.filterSort,C=e.optionFilterProp,x=e.optionLabelProp,S=e.options,w=e.optionRender,E=e.children,N=e.defaultActiveFirstOption,O=e.menuItemSelectedIcon,M=e.virtual,I=e.direction,k=e.listHeight,D=k===void 0?200:k,A=e.listItemHeight,L=A===void 0?20:A,T=e.labelRender,R=e.value,_=e.defaultValue,V=e.labelInValue,F=e.onChange,W=e.maxCount,K=wt(e,Rz),J=xz(n),H=nu(r),X=!!(!S&&E),Y=p.useMemo(function(){return y===void 0&&r==="combobox"?!1:y},[y,r]),le=p.useMemo(function(){return Kw(s,X)},[JSON.stringify(s),X]),Q=gn("",{value:c!==void 0?c:l,postState:function(We){return We||""}}),fe=ae(Q,2),ye=fe[0],ue=fe[1],ie=Oz(S,E,le,C,x),me=ie.valueOptions,re=ie.labelOptions,ce=ie.options,he=p.useCallback(function(tt){var We=Zm(tt);return We.map(function(it){var st,rt,ft,jt,Nt;if(Tz(it))st=it;else{var Jt;ft=it.key,rt=it.label,st=(Jt=it.value)!==null&&Jt!==void 0?Jt:ft}var At=me.get(st);if(At){var zt;if(rt===void 0&&(rt=At==null?void 0:At[x||le.label]),ft===void 0&&(ft=(zt=At==null?void 0:At.key)!==null&&zt!==void 0?zt:st),jt=At==null?void 0:At.disabled,Nt=At==null?void 0:At.title,process.env.NODE_ENV!=="production"&&!x){var Wt=At==null?void 0:At[le.label];Wt!==void 0&&!p.isValidElement(Wt)&&!p.isValidElement(rt)&&Wt!==rt&&Ct(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:rt,value:st,key:ft,disabled:jt,title:Nt}})},[le,x,me]),Ee=gn(_,{value:R}),Oe=ae(Ee,2),xe=Oe[0],je=Oe[1],z=p.useMemo(function(){var tt,We=H&&xe===null?[]:xe,it=he(We);return r==="combobox"&&RB((tt=it[0])===null||tt===void 0?void 0:tt.value)?[]:it},[xe,he,r,H]),ve=bz(z,me),se=ae(ve,2),pe=se[0],$e=se[1],Me=p.useMemo(function(){if(!r&&pe.length===1){var tt=pe[0];if(tt.value===null&&(tt.label===null||tt.label===void 0))return[]}return pe.map(function(We){var it;return U(U({},We),{},{label:(it=typeof T=="function"?T(We):We.label)!==null&&it!==void 0?it:We.value})})},[r,pe,T]),we=p.useMemo(function(){return new Set(pe.map(function(tt){return tt.value}))},[pe]);p.useEffect(function(){if(r==="combobox"){var tt,We=(tt=pe[0])===null||tt===void 0?void 0:tt.value;ue(MB(We)?String(We):"")}},[pe]);var Be=X0(function(tt,We){var it=We??tt;return q(q({},le.value,tt),le.label,it)}),Fe=p.useMemo(function(){if(r!=="tags")return ce;var tt=Ie(ce),We=function(st){return me.has(st)};return Ie(pe).sort(function(it,st){return it.value<st.value?-1:1}).forEach(function(it){var st=it.value;We(st)||tt.push(Be(st,it.label))}),tt},[Be,ce,me,pe,r]),Re=yz(Fe,le,ye,Y,C),qe=p.useMemo(function(){return r!=="tags"||!ye||Re.some(function(tt){return tt[C||"value"]===ye})||Re.some(function(tt){return tt[le.value]===ye})?Re:[Be(ye)].concat(Ie(Re))},[Be,C,r,Re,ye,le]),Ke=function tt(We){var it=Ie(We).sort(function(st,rt){return b(st,rt,{searchValue:ye})});return it.map(function(st){return Array.isArray(st.options)?U(U({},st),{},{options:st.options.length>0?tt(st.options):st.options}):st})},Pe=p.useMemo(function(){return b?Ke(qe):qe},[qe,b,ye]),ze=p.useMemo(function(){return GB(Pe,{fieldNames:le,childrenAsData:X})},[Pe,le,X]),Le=function(We){var it=he(We);if(je(it),F&&(it.length!==pe.length||it.some(function(ft,jt){var Nt;return((Nt=pe[jt])===null||Nt===void 0?void 0:Nt.value)!==(ft==null?void 0:ft.value)}))){var st=V?it:it.map(function(ft){return ft.value}),rt=it.map(function(ft){return yp($e(ft.value))});F(H?st:st[0],H?rt:rt[0])}},He=p.useState(null),et=ae(He,2),pt=et[0],_t=et[1],Lt=p.useState(0),cn=ae(Lt,2),Je=cn[0],Ve=cn[1],ct=N!==void 0?N:r!=="combobox",at=p.useCallback(function(tt,We){var it=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},st=it.source,rt=st===void 0?"keyboard":st;Ve(We),a&&r==="combobox"&&tt!==null&&rt==="keyboard"&&_t(String(tt))},[a,r]),mt=function(We,it,st){var rt=function(){var Zt,un=$e(We);return[V?{label:un==null?void 0:un[le.label],value:We,key:(Zt=un==null?void 0:un.key)!==null&&Zt!==void 0?Zt:We}:We,yp(un)]};if(it&&h){var ft=rt(),jt=ae(ft,2),Nt=jt[0],Jt=jt[1];h(Nt,Jt)}else if(!it&&m&&st!=="clear"){var At=rt(),zt=ae(At,2),Wt=zt[0],Qt=zt[1];m(Wt,Qt)}},Ze=X0(function(tt,We){var it,st=H?We.selected:!0;st?it=H?[].concat(Ie(pe),[tt]):[tt]:it=pe.filter(function(rt){return rt.value!==tt}),Le(it),mt(tt,st),r==="combobox"?_t(""):(!nu||f)&&(ue(""),_t(""))}),Ue=function(We,it){Le(We);var st=it.type,rt=it.values;(st==="remove"||st==="clear")&&rt.forEach(function(ft){mt(ft.value,!1,st)})},Ge=function(We,it){if(ue(We),_t(null),it.source==="submit"){var st=(We||"").trim();if(st){var rt=Array.from(new Set([].concat(Ie(we),[st])));Le(rt),mt(st,!0),ue("")}return}it.source!=="blur"&&(r==="combobox"&&Le(We),u==null||u(We))},Et=function(We){var it=We;r!=="tags"&&(it=We.map(function(rt){var ft=re.get(rt);return ft==null?void 0:ft.value}).filter(function(rt){return rt!==void 0}));var st=Array.from(new Set([].concat(Ie(we),Ie(it))));Le(st),st.forEach(function(rt){mt(rt,!0)})},Tt=p.useMemo(function(){var tt=M!==!1&&g!==!1;return U(U({},ie),{},{flattenOptions:ze,onActiveValue:at,defaultActiveFirstOption:ct,onSelect:Ze,menuItemSelectedIcon:O,rawValues:we,fieldNames:le,virtual:tt,direction:I,listHeight:D,listItemHeight:L,childrenAsData:X,maxCount:W,optionRender:w})},[W,ie,ze,at,ct,Ze,O,we,le,M,g,I,D,L,X,w]);return process.env.NODE_ENV!=="production"&&(Nz(e),Mz(ce,le)),p.createElement(eg.Provider,{value:Tt},p.createElement(Gw,De({},K,{id:J,prefixCls:i,ref:t,omitDomProps:Iz,mode:r,displayValues:Me,onDisplayValuesChange:Ue,direction:I,searchValue:ye,onSearch:Ge,autoClearSearchValue:f,onSearchSplit:Et,dropdownMatchSelectWidth:g,OptionList:Qw,emptyOptions:!ze.length,activeValue:pt,activeDescendantId:"".concat(J,"_list_").concat(Je)})))});process.env.NODE_ENV!=="production"&&(Zw.displayName="Select");var og=Zw;og.Option=ng;og.OptGroup=tg;function Gi(e,t,n){return ee({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const El=(e,t)=>t||e,eE=()=>{const[,e]=pr(),[t]=_o("Empty"),r=new qt(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return p.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,(t==null?void 0:t.description)||"Empty"),p.createElement("g",{fill:"none",fillRule:"evenodd"},p.createElement("g",{transform:"translate(24 31.67)"},p.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),p.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"}),p.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)"}),p.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"}),p.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"})),p.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"}),p.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},p.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),p.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(eE.displayName="EmptyImage");const tE=()=>{const[,e]=pr(),[t]=_o("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:s,contentColor:l}=$.useMemo(()=>({borderColor:new qt(n).onBackground(i).toHexString(),shadowColor:new qt(r).onBackground(i).toHexString(),contentColor:new qt(o).onBackground(i).toHexString()}),[n,r,o,i]);return p.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,(t==null?void 0:t.description)||"Empty"),p.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},p.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),p.createElement("g",{fillRule:"nonzero",stroke:a},p.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"}),p.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"&&(tE.displayName="SimpleImage");const Pz=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},Az=vn("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=Vt(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[Pz(o)]});var kz=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const nE=p.createElement(eE,null),rE=p.createElement(tE,null),Ko=e=>{const{className:t,rootClassName:n,prefixCls:r,image:o=nE,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=e,d=kz(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:h,className:m,style:v,classNames:g,styles:y}=$r("empty"),b=f("empty",r),[C,x,S]=Az(b),[w]=_o("Empty"),E=typeof i<"u"?i:w==null?void 0:w.description,N=typeof E=="string"?E:"empty";let O=null;if(typeof o=="string"?O=p.createElement("img",{alt:N,src:o}):O=o,process.env.NODE_ENV!=="production"){const M=rn("Empty");[["imageStyle","styles: { image: {} }"]].forEach(I=>{let[k,D]=I;M.deprecated(!(k in e),k,D)})}return C(p.createElement("div",Object.assign({className:ee(x,S,b,m,{[`${b}-normal`]:o===rE,[`${b}-rtl`]:h==="rtl"},t,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),p.createElement("div",{className:ee(`${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)},O),E&&p.createElement("div",{className:ee(`${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&&p.createElement("div",{className:ee(`${b}-footer`,g.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},y.footer),u==null?void 0:u.footer)},a)))};Ko.PRESENTED_IMAGE_DEFAULT=nE;Ko.PRESENTED_IMAGE_SIMPLE=rE;process.env.NODE_ENV!=="production"&&(Ko.displayName="Empty");const Dz=e=>{const{componentName:t}=e,{getPrefixCls:n}=$.useContext(It),r=n("empty");switch(t){case"Table":case"List":return $.createElement(Ko,{image:Ko.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return $.createElement(Ko,{image:Ko.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return $.createElement(Ko,null)}},yd=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var r,o;const{variant:i,[e]:a}=p.useContext(It),s=p.useContext(mj),l=a==null?void 0:a.variant;let c;typeof t<"u"?c=t:n===!1?c="borderless":c=(o=(r=s??l)!==null&&r!==void 0?r:i)!==null&&o!==void 0?o:"outlined";const u=iA.includes(c);return[c,u]},_z=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="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 Lz(e,t){return e||_z(t)}const Y0=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},jz=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},Ln(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
341
+ ${o}${s}bottomLeft,
342
+ ${i}${s}bottomLeft
343
+ `]:{animationName:Fm},[`
344
+ ${o}${s}topLeft,
345
+ ${i}${s}topLeft,
346
+ ${o}${s}topRight,
347
+ ${i}${s}topRight
348
+ `]:{animationName:Vm},[`${a}${s}bottomLeft`]:{animationName:Hm},[`
349
+ ${a}${s}topLeft,
350
+ ${a}${s}topRight
351
+ `]:{animationName:Wm},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},Y0(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Js),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Y0(e)),{color:e.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Ha(e,"slide-up"),Ha(e,"slide-down"),Zc(e,"move-up"),Zc(e,"move-down")]},Bz=e=>{const{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:o}=e,i=e.max(e.calc(n).sub(r).equal(),0),a=e.max(e.calc(i).sub(o).equal(),0);return{basePadding:i,containerPadding:a,itemHeight:ne(t),itemLineHeight:ne(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},zz=e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()},Fz=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:o,paddingXS:i,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${t}-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:e.calc(u).mul(2).equal(),paddingInlineStart:i,paddingInlineEnd:e.calc(i).div(2).equal(),[`${t}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(i).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},Qi()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},Hz=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,o=`${n}-selection-overflow`,i=e.multipleSelectItemHeight,a=zz(e),s=t?`${n}-${t}`:"",l=Bz(e);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},Fz(e)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ne(r)} 0`,lineHeight:ne(i),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:ne(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:ne(i),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${o}-item + ${o}-item,
352
+ ${n}-prefix + ${n}-selection-wrap
353
+ `]:{[`${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:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:ne(i),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function kf(e,t){const{componentCls:n}=e,r=t?`${n}-${t}`:"",o={[`${n}-multiple${r}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
354
+ &${n}-show-arrow ${n}-selector,
355
+ &${n}-allow-clear ${n}-selector
356
+ `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[Hz(e,t),o]}const Vz=e=>{const{componentCls:t}=e,n=Vt(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=Vt(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[kf(e),kf(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},kf(r,"lg")]};function Df(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=e,i=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?`${n}-${t}`:"";return{[`${n}-single${a}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},Ln(e,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:ne(i)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
357
+ ${n}-selection-item,
358
+ ${n}-selection-placeholder
359
+ `]:{display:"block",padding:0,lineHeight:ne(i),transition:`all ${e.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"'}}),[`
360
+ &${n}-show-arrow ${n}-selection-item,
361
+ &${n}-show-arrow ${n}-selection-search,
362
+ &${n}-show-arrow ${n}-selection-placeholder
363
+ `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${ne(r)}`,[`${n}-selection-search-input`]:{height:i,fontSize:e.fontSize},"&:after":{lineHeight:ne(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 ${ne(r)}`,"&:after":{display:"none"}}}}}}}function Wz(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Df(e),Df(Vt(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${ne(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
364
+ &${t}-show-arrow ${t}-selection-item,
365
+ &${t}-show-arrow ${t}-selection-placeholder
366
+ `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Df(Vt(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const qz=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:m,colorFillSecondary:v,colorBgContainerDisabled:g,colorTextDisabled:y,colorPrimaryHover:b,colorPrimary:C,controlOutline:x}=e,S=s*2,w=r*2,E=Math.min(o-S,o-w),N=Math.min(i-S,i-w),O=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:h,optionPadding:`${(o-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:o,selectorBg:m,clearBg:m,singleItemHeightLG:a,multipleItemBg:v,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:N,multipleItemHeightLG:O,multipleSelectorBgDisabled:g,multipleItemColorDisabled:y,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:b,activeBorderColor:C,activeOutlineColor:x,selectAffixPadding:s}},oE=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:o}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${ne(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${ne(o)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},J0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},oE(e,t))}),Uz=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},oE(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),J0(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),J0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${ne(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),iE=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${ne(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},Q0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},iE(e,t))}),Kz=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},iE(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),Q0(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),Q0(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${ne(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Gz=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${ne(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${ne(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),aE=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${ne(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${n}-prefix`]:{color:t.color}}}},Z0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},aE(e,t))}),Xz=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},aE(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),Z0(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),Z0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${ne(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Yz=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Uz(e)),Kz(e)),Gz(e)),Xz(e))}),Jz=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Qz=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},Zz=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=e;return{[n]:Object.assign(Object.assign({},Ln(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},Jz(e)),Qz(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Js),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Js),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},Qi()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${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:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},[`&:hover ${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},eF=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Zz(e),Wz(e),Vz(e),jz(e),{[`${t}-rtl`]:{direction:"rtl"}},vl(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},tF=vn("Select",(e,t)=>{let{rootPrefixCls:n}=t;const r=Vt(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[eF(r),Yz(r)]},qz,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var nF={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"},rF=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:nF}))},sE=p.forwardRef(rF);process.env.NODE_ENV!=="production"&&(sE.displayName="CheckOutlined");var oF={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"},iF=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:oF}))},ig=p.forwardRef(iF);process.env.NODE_ENV!=="production"&&(ig.displayName="DownOutlined");var aF={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"},sF=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:aF}))},ag=p.forwardRef(sF);process.env.NODE_ENV!=="production"&&(ag.displayName="SearchOutlined");function lF(e){let{suffixIcon:t,clearIcon:n,menuItemSelectedIcon:r,removeIcon:o,loading:i,multiple:a,hasFeedback:s,prefixCls:l,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:f}=e;process.env.NODE_ENV!=="production"&&rn(f).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const h=n??p.createElement(od,null),m=b=>t===null&&!s&&!d?null:p.createElement(p.Fragment,null,c!==!1&&b,s&&u);let v=null;if(t!==void 0)v=m(t);else if(i)v=m(p.createElement(Dm,{spin:!0}));else{const b=`${l}-suffix`;v=C=>{let{open:x,showSearch:S}=C;return m(x&&S?p.createElement(ag,{className:b}):p.createElement(ig,{className:b}))}}let g=null;r!==void 0?g=r:a?g=p.createElement(sE,null):g=null;let y=null;return o!==void 0?y=o:y=p.createElement(fl,null),{clearIcon:h,suffixIcon:v,itemIcon:g,removeIcon:y}}function cF(e,t){return t!==void 0?t:e!==null}var uF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const lE="SECRET_COMBOBOX_MODE_DO_NOT_USE",cE=(e,t)=>{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:h,disabled:m,notFoundContent:v,status:g,builtinPlacements:y,dropdownMatchSelectWidth:b,popupMatchSelectWidth:C,direction:x,style:S,allowClear:w,variant:E,dropdownStyle:N,transitionName:O,tagRender:M,maxCount:I,prefix:k}=e,D=uF(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:A,getPrefixCls:L,renderEmpty:T,direction:R,virtual:_,popupMatchSelectWidth:V,popupOverflow:F}=p.useContext(It),W=$r("select"),[,K]=pr(),J=f??(K==null?void 0:K.controlHeight),H=L("select",r),X=L(),Y=x??R,{compactSize:le,compactItemClassnames:Q}=bi(H,Y),[fe,ye]=yd("select",E,o),ue=Qr(H),[ie,me,re]=tF(H,ue),ce=p.useMemo(()=>{const{mode:pt}=e;if(pt!=="combobox")return pt===lE?"combobox":pt},[e.mode]),he=ce==="multiple"||ce==="tags",Ee=cF(e.suffixIcon,e.showArrow),Oe=(n=C??b)!==null&&n!==void 0?n:V,{status:xe,hasFeedback:je,isFormItemInput:z,feedbackIcon:ve}=p.useContext(Er),se=El(xe,g);let pe;v!==void 0?pe=v:ce==="combobox"?pe=null:pe=(T==null?void 0:T("Select"))||p.createElement(Dz,{componentName:"Select"});const{suffixIcon:$e,itemIcon:Me,removeIcon:we,clearIcon:Be}=lF(Object.assign(Object.assign({},D),{multiple:he,hasFeedback:je,feedbackIcon:ve,showSuffixIcon:Ee,prefixCls:H,componentName:"Select"})),Fe=w===!0?{clearIcon:Be}:w,Re=Fn(D,["suffixIcon","itemIcon"]),qe=ee(l||c,{[`${H}-dropdown-${Y}`]:Y==="rtl"},a,re,ue,me),Ke=jr(pt=>{var _t;return(_t=h??le)!==null&&_t!==void 0?_t:pt}),Pe=p.useContext(_r),ze=m??Pe,Le=ee({[`${H}-lg`]:Ke==="large",[`${H}-sm`]:Ke==="small",[`${H}-rtl`]:Y==="rtl",[`${H}-${fe}`]:ye,[`${H}-in-form-item`]:z},Gi(H,se,je),Q,W.className,i,a,re,ue,me),He=p.useMemo(()=>d!==void 0?d:Y==="rtl"?"bottomRight":"bottomLeft",[d,Y]);if(process.env.NODE_ENV!=="production"){const pt=rn("Select");pt.deprecated(!c,"dropdownClassName","popupClassName"),pt.deprecated(b===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),process.env.NODE_ENV!=="production"&&pt(!("showArrow"in e),"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."),pt.deprecated(!("bordered"in e),"bordered","variant"),process.env.NODE_ENV!=="production"&&pt(!(typeof I<"u"&&!he),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[et]=pl("SelectLike",N==null?void 0:N.zIndex);return ie(p.createElement(og,Object.assign({ref:t,virtual:_,showSearch:W.showSearch},Re,{style:Object.assign(Object.assign({},W.style),S),dropdownMatchSelectWidth:Oe,transitionName:Ki(X,"slide-up",O),builtinPlacements:Lz(y,F),listHeight:u,listItemHeight:J,mode:ce,prefixCls:H,placement:He,direction:Y,prefix:k,suffixIcon:$e,menuItemSelectedIcon:Me,removeIcon:we,allowClear:Fe,notFoundContent:pe,className:Le,getPopupContainer:s||A,dropdownClassName:qe,disabled:ze,dropdownStyle:Object.assign(Object.assign({},N),{zIndex:et}),maxCount:he?I:void 0,tagRender:he?M:void 0})))};process.env.NODE_ENV!=="production"&&(cE.displayName="Select");const To=p.forwardRef(cE),dF=Ym(To,"dropdownAlign");To.SECRET_COMBOBOX_MODE_DO_NOT_USE=lE;To.Option=ng;To.OptGroup=tg;To._InternalPanelDoNotUseOrYouWillBeFired=dF;process.env.NODE_ENV!=="production"&&(To.displayName="Select");const ru=e=>e?typeof e=="function"?e():e:null;function sg(e){var t=e.children,n=e.prefixCls,r=e.id,o=e.overlayInnerStyle,i=e.bodyClassName,a=e.className,s=e.style;return p.createElement("div",{className:ee("".concat(n,"-content"),a),style:s},p.createElement("div",{className:ee("".concat(n,"-inner"),i),id:r,role:"tooltip",style:o},typeof t=="function"?t():t))}var ca={shiftX:64,adjustY:1},ua={adjustX:1,shiftY:!0},Mr=[0,0],fF={left:{points:["cr","cl"],overflow:ua,offset:[-4,0],targetOffset:Mr},right:{points:["cl","cr"],overflow:ua,offset:[4,0],targetOffset:Mr},top:{points:["bc","tc"],overflow:ca,offset:[0,-4],targetOffset:Mr},bottom:{points:["tc","bc"],overflow:ca,offset:[0,4],targetOffset:Mr},topLeft:{points:["bl","tl"],overflow:ca,offset:[0,-4],targetOffset:Mr},leftTop:{points:["tr","tl"],overflow:ua,offset:[-4,0],targetOffset:Mr},topRight:{points:["br","tr"],overflow:ca,offset:[0,-4],targetOffset:Mr},rightTop:{points:["tl","tr"],overflow:ua,offset:[4,0],targetOffset:Mr},bottomRight:{points:["tr","br"],overflow:ca,offset:[0,4],targetOffset:Mr},rightBottom:{points:["bl","br"],overflow:ua,offset:[4,0],targetOffset:Mr},bottomLeft:{points:["tl","bl"],overflow:ca,offset:[0,4],targetOffset:Mr},leftBottom:{points:["br","bl"],overflow:ua,offset:[-4,0],targetOffset:Mr}},hF=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],pF=function(t,n){var r=t.overlayClassName,o=t.trigger,i=o===void 0?["hover"]:o,a=t.mouseEnterDelay,s=a===void 0?0:a,l=t.mouseLeaveDelay,c=l===void 0?.1:l,u=t.overlayStyle,d=t.prefixCls,f=d===void 0?"rc-tooltip":d,h=t.children,m=t.onVisibleChange,v=t.afterVisibleChange,g=t.transitionName,y=t.animation,b=t.motion,C=t.placement,x=C===void 0?"right":C,S=t.align,w=S===void 0?{}:S,E=t.destroyTooltipOnHide,N=E===void 0?!1:E,O=t.defaultVisible,M=t.getTooltipContainer,I=t.overlayInnerStyle;t.arrowContent;var k=t.overlay,D=t.id,A=t.showArrow,L=A===void 0?!0:A,T=t.classNames,R=t.styles,_=wt(t,hF),V=yl(D),F=$.useRef(null);$.useImperativeHandle(n,function(){return F.current});var W=U({},_);"visible"in t&&(W.popupVisible=t.visible);var K=function(){return p.createElement(sg,{key:"content",prefixCls:f,id:V,bodyClassName:T==null?void 0:T.body,overlayInnerStyle:U(U({},I),R==null?void 0:R.body)},k)},J=function(){var X=p.Children.only(h),Y=(X==null?void 0:X.props)||{},le=U(U({},Y),{},{"aria-describedby":k?V:null});return p.cloneElement(h,le)};return p.createElement(bd,De({popupClassName:ee(r,T==null?void 0:T.root),prefixCls:f,popup:K,action:i,builtinPlacements:fF,popupPlacement:x,ref:F,popupAlign:w,getPopupContainer:M,onPopupVisibleChange:m,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:y,popupMotion:b,defaultPopupVisible:O,autoDestroy:N,mouseLeaveDelay:c,popupStyle:U(U({},u),R==null?void 0:R.root),mouseEnterDelay:s,arrow:L},W),J())};const mF=$.forwardRef(pF);function lg(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/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,h=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 ${h} ${m} A ${r} ${r} 0 0 0 ${v} ${g} Z')`;return{arrowShadowWidth:y,arrowPath:x,arrowPolygon:C}}const gF=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e;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:t,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 ${ne(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},uE=8;function Cd(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?uE:r}}function Ql(e,t){return e?t:{}}function cg(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=e,{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"},gF(e,t,o)),{"&:before":{background:t}})]},Ql(!!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% - ${ne(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),Ql(!!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% - ${ne(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),Ql(!!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}})),Ql(!!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 vF(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=r&&typeof r=="object"?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.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 ey={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"]}},bF={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"]}},yF=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function dE(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={};return Object.keys(ey).forEach(c=>{const u=r&&bF[c]||ey[c],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=d,yF.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=Cd({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=vF(c,f,t,n),a&&(d.htmlRegion="visibleFirst")}),l}const CF=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:h}=e,m=t(a).add(h).add(f).equal(),v=t(a).mul(2).add(h).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Ln(e)),{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:`${ne(e.calc(u).div(2).equal())} ${ne(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:e.min(a,uE)}},[`${n}-content`]:{position:"relative"}}),TA(e,(g,y)=>{let{darkColor:b}=y;return{[`&${n}-${g}`]:{[`${n}-inner`]:{backgroundColor:b},[`${n}-arrow`]:{"--antd-arrow-background-color":b}}}})),{"&-rtl":{direction:"rtl"}})},cg(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},SF=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Cd({contentRadius:e.borderRadius,limitVerticalRadius:!0})),lg(Vt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),fE=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return vn("Tooltip",r=>{const{borderRadius:o,colorTextLightSolid:i,colorBgSpotlight:a}=r,s=Vt(r,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:o,tooltipBg:a});return[CF(s),gl(r,"zoom-big-fast")]},SF,{resetStyle:!1,injectStyle:t})(e)},xF=ui.map(e=>`${e}-inverse`);function wF(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(Ie(xF),Ie(ui)).includes(e):ui.includes(e)}function hE(e,t){const n=wF(t),r=ee({[`${e}-${t}`]:t&&n}),o={},i={};return t&&!n&&(o.background=t,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}const EF=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a}=e,{getPrefixCls:s}=p.useContext(It),l=s("tooltip",t),[c,u,d]=fE(l),f=hE(l,i),h=f.arrowStyle,m=Object.assign(Object.assign({},a),f.overlayStyle),v=ee(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(p.createElement("div",{className:v,style:h},p.createElement("div",{className:`${l}-arrow`}),p.createElement(sg,Object.assign({},e,{className:u,prefixCls:l,overlayInnerStyle:m}),o)))};var $F=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const OF=p.forwardRef((e,t)=>{var n,r;const{prefixCls:o,openClassName:i,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,arrow:h=!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:N,rootClassName:O,overlayClassName:M,styles:I,classNames:k}=e,D=$F(e,["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=!!h,[,L]=pr(),{getPopupContainer:T,getPrefixCls:R,direction:_,className:V,style:F,classNames:W,styles:K}=$r("tooltip"),J=rn("Tooltip"),H=p.useRef(null),X=()=>{var Re;(Re=H.current)===null||Re===void 0||Re.forceAlign()};p.useImperativeHandle(t,()=>{var Re,qe;return{forceAlign:X,forcePopupAlign:()=>{J.deprecated(!1,"forcePopupAlign","forceAlign"),X()},nativeElement:(Re=H.current)===null||Re===void 0?void 0:Re.nativeElement,popupElement:(qe=H.current)===null||qe===void 0?void 0:qe.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(Re=>{let[qe,Ke]=Re;J.deprecated(!(qe in e),qe,Ke)}),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(!h||typeof h=="boolean"||!("arrowPointAtCenter"in h),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[Y,le]=gn(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),Q=!m&&!v&&m!==0,fe=Re=>{var qe,Ke;le(Q?!1:Re),Q||((qe=e.onOpenChange)===null||qe===void 0||qe.call(e,Re),(Ke=e.onVisibleChange)===null||Ke===void 0||Ke.call(e,Re))},ye=p.useMemo(()=>{var Re,qe;let Ke=y;return typeof h=="object"&&(Ke=(qe=(Re=h.pointAtCenter)!==null&&Re!==void 0?Re:h.arrowPointAtCenter)!==null&&qe!==void 0?qe:y),g||dE({arrowPointAtCenter:Ke,autoAdjustOverflow:b,arrowWidth:A?L.sizePopupArrow:0,borderRadius:L.borderRadius,offset:L.marginXXS,visibleFirst:!0})},[y,h,g,L]),ue=p.useMemo(()=>m===0?m:v||m||"",[v,m]),ie=p.createElement(di,{space:!0},typeof ue=="function"?ue():ue),me=R("tooltip",o),re=R(),ce=e["data-popover-inject"];let he=Y;!("open"in e)&&!("visible"in e)&&Q&&(he=!1);const Ee=p.isValidElement(c)&&!D1(c)?c:p.createElement("span",null,c),Oe=Ee.props,xe=!Oe.className||typeof Oe.className=="string"?ee(Oe.className,i||`${me}-open`):Oe.className,[je,z,ve]=fE(me,!ce),se=hE(me,s),pe=se.arrowStyle,$e=ee(M,{[`${me}-rtl`]:_==="rtl"},se.className,O,z,ve,V,W.root,k==null?void 0:k.root),Me=ee(W.body,k==null?void 0:k.body),[we,Be]=pl("Tooltip",D.zIndex),Fe=p.createElement(mF,Object.assign({},D,{zIndex:we,showArrow:A,placement:S,mouseEnterDelay:w,mouseLeaveDelay:E,prefixCls:me,classNames:{root:$e,body:Me},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pe),K.root),F),N),I==null?void 0:I.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},K.body),l),I==null?void 0:I.body),se.overlayStyle)},getTooltipContainer:x||a||T,ref:H,builtinPlacements:ye,overlay:ie,visible:he,onVisibleChange:fe,afterVisibleChange:u??d,arrowContent:p.createElement("span",{className:`${me}-arrow-content`}),motion:{motionName:Ki(re,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!f}),he?Lr(Ee,{className:xe}):Ee);return je(p.createElement(hl.Provider,{value:Be},Fe))}),Cn=OF;process.env.NODE_ENV!=="production"&&(Cn.displayName="Tooltip");Cn._InternalPanelDoNotUseOrYouWillBeFired=EF;const NF=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:h,innerContentPadding:m,titlePadding:v}=e;return[{[t]:Object.assign(Object.assign({},Ln(e)),{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"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:i},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:o,borderBottom:h,padding:v},[`${t}-inner-content`]:{color:n,padding:m}})},cg(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},MF=e=>{const{componentCls:t}=e;return{[t]:ui.map(n=>{const r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}})}},RF=e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=e,f=n-r,h=f/2,m=f/2-t,v=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},lg(e)),Cd({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:l,titlePadding:i?`${h}px ${v}px ${m}px`:0,titleBorderBottom:i?`${t}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${v}px`:0})},pE=vn("Popover",e=>{const{colorBgElevated:t,colorText:n}=e,r=Vt(e,{popoverBg:t,popoverColor:n});return[NF(r),MF(r),gl(r,"zoom-big")]},RF,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var IF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const mE=e=>{let{title:t,content:n,prefixCls:r}=e;return!t&&!n?null:p.createElement(p.Fragment,null,t&&p.createElement("div",{className:`${r}-title`},t),n&&p.createElement("div",{className:`${r}-inner-content`},n))},TF=e=>{const{hashId:t,prefixCls:n,className:r,style:o,placement:i="top",title:a,content:s,children:l}=e,c=ru(a),u=ru(s),d=ee(t,n,`${n}-pure`,`${n}-placement-${i}`,r);return p.createElement("div",{className:d,style:o},p.createElement("div",{className:`${n}-arrow`}),p.createElement(sg,Object.assign({},e,{className:t,prefixCls:n}),l||p.createElement(mE,{prefixCls:n,title:c,content:u})))},PF=e=>{const{prefixCls:t,className:n}=e,r=IF(e,["prefixCls","className"]),{getPrefixCls:o}=p.useContext(It),i=o("popover",t),[a,s,l]=pE(i);return a(p.createElement(TF,Object.assign({},r,{prefixCls:i,hashId:s,className:ee(n,l)})))};var AF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const kF=p.forwardRef((e,t)=>{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:h,overlayStyle:m={},styles:v,classNames:g}=e,y=AF(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:b,className:C,style:x,classNames:S,styles:w}=$r("popover"),E=b("popover",o),[N,O,M]=pE(E),I=b(),k=ee(s,O,M,C,S.root,g==null?void 0:g.root),D=ee(S.body,g==null?void 0:g.body),[A,L]=gn(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),T=(W,K)=>{L(W,!0),h==null||h(W,K)},R=W=>{W.keyCode===Qe.ESC&&T(!1,W)},_=W=>{T(W)},V=ru(i),F=ru(a);return N(p.createElement(Cn,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},y,{prefixCls:E,classNames:{root:k,body:D},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:t,open:A,onOpenChange:_,overlay:V||F?p.createElement(mE,{prefixCls:E,title:V,content:F}):null,transitionName:Ki(I,"zoom-big",y.transitionName),"data-popover-inject":!0}),Lr(u,{onKeyDown:W=>{var K,J;p.isValidElement(u)&&((J=u==null?void 0:(K=u.props).onKeyDown)===null||J===void 0||J.call(K,W)),R(W)}})))}),Sd=kF;Sd._InternalPanelDoNotUseOrYouWillBeFired=PF;process.env.NODE_ENV!=="production"&&(Sd.displayName="Popover");var DF={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"},_F=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:DF}))},ou=p.forwardRef(_F);process.env.NODE_ENV!=="production"&&(ou.displayName="LeftOutlined");var LF=Qe.ESC,jF=Qe.TAB;function BF(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,o=e.autoFocus,i=e.overlayRef,a=p.useRef(!1),s=function(){if(t){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 LF:s();break;case jF:{var f=!1;a.current||(f=l()),f?d.preventDefault():s();break}}};p.useEffect(function(){return t?(window.addEventListener("keydown",c),o&&Dt(l,3),function(){window.removeEventListener("keydown",c),a.current=!1}):function(){a.current=!1}},[t])}var zF=$.forwardRef(function(e,t){var n=e.overlay,r=e.arrow,o=e.prefixCls,i=$.useMemo(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),a=dr(t,Ji(i));return $.createElement($.Fragment,null,r&&$.createElement("div",{className:"".concat(o,"-arrow")}),$.cloneElement(i,{ref:vi(i)?a:void 0}))}),da={adjustX:1,adjustY:1},fa=[0,0],FF={topLeft:{points:["bl","tl"],overflow:da,offset:[0,-4],targetOffset:fa},top:{points:["bc","tc"],overflow:da,offset:[0,-4],targetOffset:fa},topRight:{points:["br","tr"],overflow:da,offset:[0,-4],targetOffset:fa},bottomLeft:{points:["tl","bl"],overflow:da,offset:[0,4],targetOffset:fa},bottom:{points:["tc","bc"],overflow:da,offset:[0,4],targetOffset:fa},bottomRight:{points:["tr","br"],overflow:da,offset:[0,4],targetOffset:fa}},HF=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function VF(e,t){var n,r=e.arrow,o=r===void 0?!1:r,i=e.prefixCls,a=i===void 0?"rc-dropdown":i,s=e.transitionName,l=e.animation,c=e.align,u=e.placement,d=u===void 0?"bottomLeft":u,f=e.placements,h=f===void 0?FF:f,m=e.getPopupContainer,v=e.showAction,g=e.hideAction,y=e.overlayClassName,b=e.overlayStyle,C=e.visible,x=e.trigger,S=x===void 0?["hover"]:x,w=e.autoFocus,E=e.overlay,N=e.children,O=e.onVisibleChange,M=wt(e,HF),I=$.useState(),k=ae(I,2),D=k[0],A=k[1],L="visible"in e?C:D,T=$.useRef(null),R=$.useRef(null),_=$.useRef(null);$.useImperativeHandle(t,function(){return T.current});var V=function(Q){A(Q),O==null||O(Q)};BF({visible:L,triggerRef:_,onVisibleChange:V,autoFocus:w,overlayRef:R});var F=function(Q){var fe=e.onOverlayClick;A(!1),fe&&fe(Q)},W=function(){return $.createElement(zF,{ref:R,overlay:E,prefixCls:a,arrow:o})},K=function(){return typeof E=="function"?W:W()},J=function(){var Q=e.minOverlayWidthMatchTrigger,fe=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?Q:!fe},H=function(){var Q=e.openClassName;return Q!==void 0?Q:"".concat(a,"-open")},X=$.cloneElement(N,{className:ee((n=N.props)===null||n===void 0?void 0:n.className,L&&H()),ref:vi(N)?dr(_,Ji(N)):void 0}),Y=g;return!Y&&S.indexOf("contextMenu")!==-1&&(Y=["click"]),$.createElement(bd,De({builtinPlacements:h},M,{prefixCls:a,ref:T,popupClassName:ee(y,q({},"".concat(a,"-show-arrow"),o)),popupStyle:b,action:S,showAction:v,hideAction:Y,popupPlacement:d,popupAlign:c,popupTransitionName:s,popupAnimation:l,popupVisible:L,stretch:J()?"minWidth":"",popup:K(),onPopupVisibleChange:V,onPopupClick:F,getPopupContainer:m}),X)}const WF=$.forwardRef(VF),qF=e=>typeof e!="object"&&typeof e!="function"||e===null;var gE=p.createContext(null);function vE(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function bE(e){var t=p.useContext(gE);return vE(t,e)}var UF=["children","locked"],Yr=p.createContext(null);function KF(e,t){var n=U({},e);return Object.keys(t).forEach(function(r){var o=t[r];o!==void 0&&(n[r]=o)}),n}function el(e){var t=e.children,n=e.locked,r=wt(e,UF),o=p.useContext(Yr),i=cl(function(){return KF(o,r)},[o,r],function(a,s){return!n&&(a[0]!==s[0]||!Da(a[1],s[1],!0))});return p.createElement(Yr.Provider,{value:i},t)}var GF=[],yE=p.createContext(null);function xd(){return p.useContext(yE)}var CE=p.createContext(GF);function Xa(e){var t=p.useContext(CE);return p.useMemo(function(){return e!==void 0?[].concat(Ie(t),[e]):t},[t,e])}var SE=p.createContext(null),ug=p.createContext({});function ty(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(_m(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o),a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function XF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Ie(e.querySelectorAll("*")).filter(function(r){return ty(r,t)});return ty(e,t)&&n.unshift(e),n}var xp=Qe.LEFT,wp=Qe.RIGHT,Ep=Qe.UP,Ec=Qe.DOWN,$c=Qe.ENTER,xE=Qe.ESC,cs=Qe.HOME,us=Qe.END,ny=[Ep,Ec,xp,wp];function YF(e,t,n,r){var o,i="prev",a="next",s="children",l="parent";if(e==="inline"&&r===$c)return{inlineTrigger:!0};var c=q(q({},Ep,i),Ec,a),u=q(q(q(q({},xp,n?a:i),wp,n?i:a),Ec,s),$c,s),d=q(q(q(q(q(q({},Ep,i),Ec,a),$c,s),xE,l),xp,n?s:l),wp,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},h=(o=f["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[r];switch(h){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 JF(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function QF(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function dg(e,t){var n=XF(e,!0);return n.filter(function(r){return t.has(r)})}function ry(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=dg(e,t),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 $p=function(t,n){var r=new Set,o=new Map,i=new Map;return t.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(vE(n,a),"']"));s&&(r.add(s),i.set(s,a),o.set(a,s))}),{elements:r,key2element:o,element2key:i}};function ZF(e,t,n,r,o,i,a,s,l,c){var u=p.useRef(),d=p.useRef();d.current=t;var f=function(){Dt.cancel(u.current)};return p.useEffect(function(){return function(){f()}},[]),function(h){var m=h.which;if([].concat(ny,[$c,xE,cs,us]).includes(m)){var v=i(),g=$p(v,r),y=g,b=y.elements,C=y.key2element,x=y.element2key,S=C.get(t),w=QF(S,b),E=x.get(w),N=YF(e,a(E,!0).length===1,n,m);if(!N&&m!==cs&&m!==us)return;(ny.includes(m)||[cs,us].includes(m))&&h.preventDefault();var O=function(R){if(R){var _=R,V=R.querySelector("a");V!=null&&V.getAttribute("href")&&(_=V);var F=x.get(R);s(F),f(),u.current=Dt(function(){d.current===F&&_.focus()})}};if([cs,us].includes(m)||N.sibling||!w){var M;!w||e==="inline"?M=o.current:M=JF(w);var I,k=dg(M,b);m===cs?I=k[0]:m===us?I=k[k.length-1]:I=ry(M,b,w,N.offset),O(I)}else if(N.inlineTrigger)l(E);else if(N.offset>0)l(E,!0),f(),u.current=Dt(function(){g=$p(v,r);var T=w.getAttribute("aria-controls"),R=document.getElementById(T),_=ry(R,g.elements);O(_)},5);else if(N.offset<0){var D=a(E,!0),A=D[D.length-2],L=C.get(A);l(A,!1),O(L)}}c==null||c(h)}}function eH(e){Promise.resolve().then(e)}var fg="__RC_UTIL_PATH_SPLIT__",oy=function(t){return t.join(fg)},tH=function(t){return t.split(fg)},Op="rc-menu-more";function nH(){var e=p.useState({}),t=ae(e,2),n=t[1],r=$.useRef(new Map),o=$.useRef(new Map),i=p.useState([]),a=ae(i,2),s=a[0],l=a[1],c=$.useRef(0),u=$.useRef(!1),d=function(){u.current||n({})},f=$.useCallback(function(C,x){process.env.NODE_ENV!=="production"&&Ct(!r.current.has(C),"Duplicated key '".concat(C,"' used in Menu by path [").concat(x.join(" > "),"]"));var S=oy(x);o.current.set(S,C),r.current.set(C,S),c.current+=1;var w=c.current;eH(function(){w===c.current&&d()})},[]),h=$.useCallback(function(C,x){var S=oy(x);o.current.delete(S),r.current.delete(C)},[]),m=$.useCallback(function(C){l(C)},[]),v=$.useCallback(function(C,x){var S=r.current.get(C)||"",w=tH(S);return x&&s.includes(w[0])&&w.unshift(Op),w},[s]),g=$.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=Ie(r.current.keys());return s.length&&x.push(Op),x},b=$.useCallback(function(C){var x="".concat(r.current.get(C)).concat(fg),S=new Set;return Ie(o.current.keys()).forEach(function(w){w.startsWith(x)&&S.add(o.current.get(w))}),S},[]);return p.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:v,getKeys:y,getSubPathKeys:b}}function bs(e){var t=p.useRef(e);t.current=e;var n=p.useCallback(function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(i))},[]);return e?n:void 0}var rH=Math.random().toFixed(5).toString().slice(2),iy=0;function oH(e){var t=gn(e,{value:e}),n=ae(t,2),r=n[0],o=n[1];return p.useEffect(function(){iy+=1;var i=process.env.NODE_ENV==="test"?"test":"".concat(rH,"-").concat(iy);o("rc-menu-uuid-".concat(i))},[]),r}function wE(e,t,n,r){var o=p.useContext(Yr),i=o.activeKey,a=o.onActive,s=o.onInactive,l={active:i===e};return t||(l.onMouseEnter=function(c){n==null||n({key:e,domEvent:c}),a(e)},l.onMouseLeave=function(c){r==null||r({key:e,domEvent:c}),s(e)}),l}function EE(e){var t=p.useContext(Yr),n=t.mode,r=t.rtl,o=t.inlineIndent;if(n!=="inline")return null;var i=e;return r?{paddingRight:i*o}:{paddingLeft:i*o}}function $E(e){var t=e.icon,n=e.props,r=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=p.createElement(t,U({},n)):typeof t!="boolean"&&(o=t),o||r||null)}var iH=["item"];function iu(e){var t=e.item,n=wt(e,iH);return Object.defineProperty(n,"item",{get:function(){return Ct(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var aH=["title","attribute","elementRef"],sH=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],lH=["active"],cH=function(e){Po(n,e);var t=Ao(n);function n(){return In(this,n),t.apply(this,arguments)}return Tn(n,[{key:"render",value:function(){var o=this.props,i=o.title,a=o.attribute,s=o.elementRef,l=wt(o,aH),c=Fn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ct(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),p.createElement(lo.Item,De({},a,{title:typeof i=="string"?i:void 0},c,{ref:s}))}}]),n}(p.Component),uH=p.forwardRef(function(e,t){var n=e.style,r=e.className,o=e.eventKey,i=e.warnKey,a=e.disabled,s=e.itemIcon,l=e.children,c=e.role,u=e.onMouseEnter,d=e.onMouseLeave,f=e.onClick,h=e.onKeyDown,m=e.onFocus,v=wt(e,sH),g=bE(o),y=p.useContext(Yr),b=y.prefixCls,C=y.onItemClick,x=y.disabled,S=y.overflowDisabled,w=y.itemIcon,E=y.selectedKeys,N=y.onActive,O=p.useContext(ug),M=O._internalRenderMenuItem,I="".concat(b,"-item"),k=p.useRef(),D=p.useRef(),A=x||a,L=gi(t,D),T=Xa(o);process.env.NODE_ENV!=="production"&&i&&Ct(!1,"MenuItem should not leave undefined `key`.");var R=function(ye){return{key:o,keyPath:Ie(T).reverse(),item:k.current,domEvent:ye}},_=s||w,V=wE(o,A,u,d),F=V.active,W=wt(V,lH),K=E.includes(o),J=EE(T.length),H=function(ye){if(!A){var ue=R(ye);f==null||f(iu(ue)),C(ue)}},X=function(ye){if(h==null||h(ye),ye.which===Qe.ENTER){var ue=R(ye);f==null||f(iu(ue)),C(ue)}},Y=function(ye){N(o),m==null||m(ye)},le={};e.role==="option"&&(le["aria-selected"]=K);var Q=p.createElement(cH,De({ref:k,elementRef:L,role:c===null?"none":c||"menuitem",tabIndex:a?null:-1,"data-menu-id":S&&g?null:g},Fn(v,["extra"]),W,le,{component:"li","aria-disabled":a,style:U(U({},J),n),className:ee(I,q(q(q({},"".concat(I,"-active"),F),"".concat(I,"-selected"),K),"".concat(I,"-disabled"),A),r),onClick:H,onKeyDown:X,onFocus:Y}),l,p.createElement($E,{props:U(U({},e),{},{isSelected:K}),icon:_}));return M&&(Q=M(Q,e,{selected:K})),Q});function dH(e,t){var n=e.eventKey,r=xd(),o=Xa(n);return p.useEffect(function(){if(r)return r.registerPath(n,o),function(){r.unregisterPath(n,o)}},[o]),r?null:p.createElement(uH,De({},e,{ref:t}))}const wd=p.forwardRef(dH);var fH=["className","children"],hH=function(t,n){var r=t.className,o=t.children,i=wt(t,fH),a=p.useContext(Yr),s=a.prefixCls,l=a.mode,c=a.rtl;return p.createElement("ul",De({className:ee(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)},hg=p.forwardRef(hH);hg.displayName="SubMenuList";function pg(e,t){return wr(e).map(function(n,r){if(p.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(Ie(t),[r]).join("-")));var c={key:s,eventKey:s};return process.env.NODE_ENV!=="production"&&l&&(c.warnKey=!0),p.cloneElement(n,c)}return n})}var tr={adjustX:1,adjustY:1},pH={topLeft:{points:["bl","tl"],overflow:tr},topRight:{points:["br","tr"],overflow:tr},bottomLeft:{points:["tl","bl"],overflow:tr},bottomRight:{points:["tr","br"],overflow:tr},leftTop:{points:["tr","tl"],overflow:tr},leftBottom:{points:["br","bl"],overflow:tr},rightTop:{points:["tl","tr"],overflow:tr},rightBottom:{points:["bl","br"],overflow:tr}},mH={topLeft:{points:["bl","tl"],overflow:tr},topRight:{points:["br","tr"],overflow:tr},bottomLeft:{points:["tl","bl"],overflow:tr},bottomRight:{points:["tr","br"],overflow:tr},rightTop:{points:["tr","tl"],overflow:tr},rightBottom:{points:["br","bl"],overflow:tr},leftTop:{points:["tl","tr"],overflow:tr},leftBottom:{points:["bl","br"],overflow:tr}};function OE(e,t,n){if(t)return t;if(n)return n[e]||n.other}var gH={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function vH(e){var t=e.prefixCls,n=e.visible,r=e.children,o=e.popup,i=e.popupStyle,a=e.popupClassName,s=e.popupOffset,l=e.disabled,c=e.mode,u=e.onVisibleChange,d=p.useContext(Yr),f=d.getPopupContainer,h=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=p.useState(!1),E=ae(w,2),N=E[0],O=E[1],M=U(h?U({},mH):U({},pH),g),I=gH[c],k=OE(c,x,S),D=p.useRef(k);c!=="inline"&&(D.current=k);var A=U(U({},D.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),L=p.useRef();return p.useEffect(function(){return L.current=Dt(function(){O(n)}),function(){Dt.cancel(L.current)}},[n]),p.createElement(bd,{prefixCls:t,popupClassName:ee("".concat(t,"-popup"),q({},"".concat(t,"-rtl"),h),a,C),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:M,popupPlacement:I,popupVisible:N,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 bH(e){var t=e.id,n=e.open,r=e.keyPath,o=e.children,i="inline",a=p.useContext(Yr),s=a.prefixCls,l=a.forceSubMenuRender,c=a.motion,u=a.defaultMotions,d=a.mode,f=p.useRef(!1);f.current=d===i;var h=p.useState(!f.current),m=ae(h,2),v=m[0],g=m[1],y=f.current?n:!1;p.useEffect(function(){f.current&&g(!1)},[d]);var b=U({},OE(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:p.createElement(el,{mode:i,locked:!f.current},p.createElement(po,De({visible:y},b,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(x){var S=x.className,w=x.style;return p.createElement(hg,{id:t,className:S,style:w},o)}))}var yH=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],CH=["active"],SH=p.forwardRef(function(e,t){var n=e.style,r=e.className,o=e.title,i=e.eventKey,a=e.warnKey,s=e.disabled,l=e.internalPopupClose,c=e.children,u=e.itemIcon,d=e.expandIcon,f=e.popupClassName,h=e.popupOffset,m=e.popupStyle,v=e.onClick,g=e.onMouseEnter,y=e.onMouseLeave,b=e.onTitleClick,C=e.onTitleMouseEnter,x=e.onTitleMouseLeave,S=wt(e,yH),w=bE(i),E=p.useContext(Yr),N=E.prefixCls,O=E.mode,M=E.openKeys,I=E.disabled,k=E.overflowDisabled,D=E.activeKey,A=E.selectedKeys,L=E.itemIcon,T=E.expandIcon,R=E.onItemClick,_=E.onOpenChange,V=E.onActive,F=p.useContext(ug),W=F._internalRenderSubMenuItem,K=p.useContext(SE),J=K.isSubPathKey,H=Xa(),X="".concat(N,"-submenu"),Y=I||s,le=p.useRef(),Q=p.useRef();process.env.NODE_ENV!=="production"&&a&&Ct(!1,"SubMenu should not leave undefined `key`.");var fe=u??L,ye=d??T,ue=M.includes(i),ie=!k&&ue,me=J(A,i),re=wE(i,Y,C,x),ce=re.active,he=wt(re,CH),Ee=p.useState(!1),Oe=ae(Ee,2),xe=Oe[0],je=Oe[1],z=function(et){Y||je(et)},ve=function(et){z(!0),g==null||g({key:i,domEvent:et})},se=function(et){z(!1),y==null||y({key:i,domEvent:et})},pe=p.useMemo(function(){return ce||(O!=="inline"?xe||J([D],i):!1)},[O,ce,D,xe,i,J]),$e=EE(H.length),Me=function(et){Y||(b==null||b({key:i,domEvent:et}),O==="inline"&&_(i,!ue))},we=bs(function(He){v==null||v(iu(He)),R(He)}),Be=function(et){O!=="inline"&&_(i,et)},Fe=function(){V(i)},Re=w&&"".concat(w,"-popup"),qe=p.useMemo(function(){return p.createElement($E,{icon:O!=="horizontal"?ye:void 0,props:U(U({},e),{},{isOpen:ie,isSubMenu:!0})},p.createElement("i",{className:"".concat(X,"-arrow")}))},[O,ye,e,ie,X]),Ke=p.createElement("div",De({role:"menuitem",style:$e,className:"".concat(X,"-title"),tabIndex:Y?null:-1,ref:le,title:typeof o=="string"?o:null,"data-menu-id":k&&w?null:w,"aria-expanded":ie,"aria-haspopup":!0,"aria-controls":Re,"aria-disabled":Y,onClick:Me,onFocus:Fe},he),o,qe),Pe=p.useRef(O);if(O!=="inline"&&H.length>1?Pe.current="vertical":Pe.current=O,!k){var ze=Pe.current;Ke=p.createElement(vH,{mode:ze,prefixCls:X,visible:!l&&ie&&O!=="inline",popupClassName:f,popupOffset:h,popupStyle:m,popup:p.createElement(el,{mode:ze==="horizontal"?"vertical":ze},p.createElement(hg,{id:Re,ref:Q},c)),disabled:Y,onVisibleChange:Be},Ke)}var Le=p.createElement(lo.Item,De({ref:t,role:"none"},S,{component:"li",style:n,className:ee(X,"".concat(X,"-").concat(O),r,q(q(q(q({},"".concat(X,"-open"),ie),"".concat(X,"-active"),pe),"".concat(X,"-selected"),me),"".concat(X,"-disabled"),Y)),onMouseEnter:ve,onMouseLeave:se}),Ke,!k&&p.createElement(bH,{id:Re,open:ie,keyPath:H},c));return W&&(Le=W(Le,e,{selected:me,active:pe,open:ie,disabled:Y})),p.createElement(el,{onItemClick:we,mode:O==="horizontal"?"vertical":O,itemIcon:fe,expandIcon:ye},Le)}),$l=p.forwardRef(function(e,t){var n=e.eventKey,r=e.children,o=Xa(n),i=pg(r,o),a=xd();p.useEffect(function(){if(a)return a.registerPath(n,o),function(){a.unregisterPath(n,o)}},[o]);var s;return a?s=i:s=p.createElement(SH,De({ref:t},e),i),p.createElement(CE.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&($l.displayName="SubMenu");function mg(e){var t=e.className,n=e.style,r=p.useContext(Yr),o=r.prefixCls,i=xd();return i?null:p.createElement("li",{role:"separator",className:ee("".concat(o,"-item-divider"),t),style:n})}var xH=["className","title","eventKey","children"],wH=p.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var o=e.children,i=wt(e,xH),a=p.useContext(Yr),s=a.prefixCls,l="".concat(s,"-item-group");return p.createElement("li",De({ref:t,role:"presentation"},i,{onClick:function(u){return u.stopPropagation()},className:ee(l,n)}),p.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),p.createElement("ul",{role:"group",className:"".concat(l,"-list")},o))}),Ed=p.forwardRef(function(e,t){var n=e.eventKey,r=e.children,o=Xa(n),i=pg(r,o),a=xd();return a?i:p.createElement(wH,De({ref:t},Fn(e,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(Ed.displayName="MenuItemGroup");var EH=["label","children","key","type","extra"];function Np(e,t,n){var r=t.item,o=t.group,i=t.submenu,a=t.divider;return(e||[]).map(function(s,l){if(s&&lt(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,h=c.type,m=c.extra,v=wt(c,EH),g=f??"tmp-".concat(l);return d||h==="group"?h==="group"?p.createElement(o,De({key:g},v,{title:u}),Np(d,t,n)):p.createElement(i,De({key:g},v,{title:u}),Np(d,t,n)):h==="divider"?p.createElement(a,De({key:g},v)):p.createElement(r,De({key:g},v,{extra:m}),u,(!!m||m===0)&&p.createElement("span",{className:"".concat(n,"-item-extra")},m))}return null}).filter(function(s){return s})}function ay(e,t,n,r,o){var i=e,a=U({divider:mg,item:wd,group:Ed,submenu:$l},r);return t&&(i=Np(t,a,o)),pg(i,n)}var $H=["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"],Si=[],OH=p.forwardRef(function(e,t){var n,r=e,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,h=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,N=r.forceSubMenuRender,O=r.defaultOpenKeys,M=r.openKeys,I=r.activeKey,k=r.defaultActiveFirst,D=r.selectable,A=D===void 0?!0:D,L=r.multiple,T=L===void 0?!1:L,R=r.defaultSelectedKeys,_=r.selectedKeys,V=r.onSelect,F=r.onDeselect,W=r.inlineIndent,K=W===void 0?24:W,J=r.motion,H=r.defaultMotions,X=r.triggerSubMenuAction,Y=X===void 0?"hover":X,le=r.builtinPlacements,Q=r.itemIcon,fe=r.expandIcon,ye=r.overflowedIndicator,ue=ye===void 0?"...":ye,ie=r.overflowedIndicatorPopupClassName,me=r.getPopupContainer,re=r.onClick,ce=r.onOpenChange,he=r.onKeyDown,Ee=r.openAnimation,Oe=r.openTransitionName,xe=r._internalRenderMenuItem,je=r._internalRenderSubMenuItem,z=r._internalComponents,ve=wt(r,$H),se=p.useMemo(function(){return[ay(f,d,Si,z,i),ay(f,d,Si,{},i)]},[f,d,z]),pe=ae(se,2),$e=pe[0],Me=pe[1],we=p.useState(!1),Be=ae(we,2),Fe=Be[0],Re=Be[1],qe=p.useRef(),Ke=oH(m),Pe=h==="rtl";process.env.NODE_ENV!=="production"&&Ct(!Ee&&!Oe,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var ze=gn(O,{value:M,postState:function(be){return be||Si}}),Le=ae(ze,2),He=Le[0],et=Le[1],pt=function(be){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Te(){et(be),ce==null||ce(be)}Se?kr.flushSync(Te):Te()},_t=p.useState(He),Lt=ae(_t,2),cn=Lt[0],Je=Lt[1],Ve=p.useRef(!1),ct=p.useMemo(function(){return(g==="inline"||g==="vertical")&&y?["vertical",y]:[g,!1]},[g,y]),at=ae(ct,2),mt=at[0],Ze=at[1],Ue=mt==="inline",Ge=p.useState(mt),Et=ae(Ge,2),Tt=Et[0],tt=Et[1],We=p.useState(Ze),it=ae(We,2),st=it[0],rt=it[1];p.useEffect(function(){tt(mt),rt(Ze),Ve.current&&(Ue?et(cn):pt(Si))},[mt,Ze]);var ft=p.useState(0),jt=ae(ft,2),Nt=jt[0],Jt=jt[1],At=Nt>=$e.length-1||Tt!=="horizontal"||C;p.useEffect(function(){Ue&&Je(He)},[He]),p.useEffect(function(){return Ve.current=!0,function(){Ve.current=!1}},[]);var zt=nH(),Wt=zt.registerPath,Qt=zt.unregisterPath,jn=zt.refreshOverflowKeys,Zt=zt.isSubPathKey,un=zt.getKeyPath,_e=zt.getKeys,ot=zt.getSubPathKeys,Ye=p.useMemo(function(){return{registerPath:Wt,unregisterPath:Qt}},[Wt,Qt]),Ae=p.useMemo(function(){return{isSubPathKey:Zt}},[Zt]);p.useEffect(function(){jn(At?Si:$e.slice(Nt+1).map(function(de){return de.key}))},[Nt,At]);var ht=gn(I||k&&((n=$e[0])===null||n===void 0?void 0:n.key),{value:I}),Ot=ae(ht,2),Mt=Ot[0],dn=Ot[1],on=bs(function(de){dn(de)}),bn=bs(function(){dn(void 0)});$.useImperativeHandle(t,function(){return{list:qe.current,focus:function(be){var Se,Te=_e(),nt=$p(Te,Ke),yt=nt.elements,St=nt.key2element,Ft=nt.element2key,Ht=dg(qe.current,yt),sn=Mt??(Ht[0]?Ft.get(Ht[0]):(Se=$e.find(function(Ci){return!Ci.props.disabled}))===null||Se===void 0?void 0:Se.key),En=St.get(sn);if(sn&&En){var xn;En==null||(xn=En.focus)===null||xn===void 0||xn.call(En,be)}}}});var fn=gn(R||[],{value:_,postState:function(be){return Array.isArray(be)?be:be==null?Si:[be]}}),an=ae(fn,2),Pn=an[0],Bn=an[1],P=function(be){if(A){var Se=be.key,Te=Pn.includes(Se),nt;T?Te?nt=Pn.filter(function(St){return St!==Se}):nt=[].concat(Ie(Pn),[Se]):nt=[Se],Bn(nt);var yt=U(U({},be),{},{selectedKeys:nt});Te?F==null||F(yt):V==null||V(yt)}!T&&He.length&&Tt!=="inline"&&pt(Si)},G=bs(function(de){re==null||re(iu(de)),P(de)}),B=bs(function(de,be){var Se=He.filter(function(nt){return nt!==de});if(be)Se.push(de);else if(Tt!=="inline"){var Te=ot(de);Se=Se.filter(function(nt){return!Te.has(nt)})}Da(He,Se,!0)||pt(Se,!0)}),te=function(be,Se){var Te=Se??!He.includes(be);B(be,Te)},oe=ZF(Tt,Mt,Pe,Ke,qe,_e,un,dn,te,he);p.useEffect(function(){Re(!0)},[]);var Z=p.useMemo(function(){return{_internalRenderMenuItem:xe,_internalRenderSubMenuItem:je}},[xe,je]),Ce=Tt!=="horizontal"||C?$e:$e.map(function(de,be){return p.createElement(el,{key:de.key,overflowDisabled:be>Nt},de)}),ge=p.createElement(lo,De({id:m,ref:qe,prefixCls:"".concat(i,"-overflow"),component:"ul",itemComponent:wd,className:ee(i,"".concat(i,"-root"),"".concat(i,"-").concat(Tt),l,q(q({},"".concat(i,"-inline-collapsed"),st),"".concat(i,"-rtl"),Pe),a),dir:h,style:s,role:"menu",tabIndex:u,data:Ce,renderRawItem:function(be){return be},renderRawRest:function(be){var Se=be.length,Te=Se?$e.slice(-Se):null;return p.createElement($l,{eventKey:Op,title:ue,disabled:At,internalPopupClose:Se===0,popupClassName:ie},Te)},maxCount:Tt!=="horizontal"||C?lo.INVALIDATE:lo.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(be){Jt(be)},onKeyDown:oe},ve));return p.createElement(ug.Provider,{value:Z},p.createElement(gE.Provider,{value:Ke},p.createElement(el,{prefixCls:i,rootClassName:a,mode:Tt,openKeys:He,rtl:Pe,disabled:b,motion:Fe?J:null,defaultMotions:Fe?H:null,activeKey:Mt,onActive:on,onInactive:bn,selectedKeys:Pn,inlineIndent:K,subMenuOpenDelay:S,subMenuCloseDelay:E,forceSubMenuRender:N,builtinPlacements:le,triggerSubMenuAction:Y,getPopupContainer:me,itemIcon:Q,expandIcon:fe,onItemClick:G,onOpenChange:B},p.createElement(SE.Provider,{value:Ae},ge),p.createElement("div",{style:{display:"none"},"aria-hidden":!0},p.createElement(yE.Provider,{value:Ye},Me)))))}),Ol=OH;Ol.Item=wd;Ol.SubMenu=$l;Ol.ItemGroup=Ed;Ol.Divider=mg;var NH={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"},MH=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:NH}))},NE=p.forwardRef(MH);process.env.NODE_ENV!=="production"&&(NE.displayName="BarsOutlined");const RH=p.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),IH=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=e;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:ne(i),background:d,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},ME=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=e,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},RE=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];vn("Layout",e=>[IH(e)],ME,{deprecatedTokens:RE});const TH=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:h,lightTriggerColor:m,lightTriggerBg:v,bodyBg:g}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:ne(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${ne(f)} ${ne(f)} 0`,cursor:"pointer",transition:`background ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${ne(f)} 0 0 ${ne(f)}`}},"&-light":{background:h,[`${t}-trigger`]:{color:m,background:v},[`${t}-zero-width-trigger`]:{color:m,background:v,border:`1px solid ${g}`,borderInlineStart:0}}}}},PH=vn(["Layout","Sider"],e=>[TH(e)],ME,{deprecatedTokens:RE});var AH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const sy={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},kH=e=>!Number.isNaN(Number.parseFloat(e))&&isFinite(e),gg=p.createContext({}),DH=(()=>{let e=0;return function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${t}${e}`}})(),_H=p.forwardRef((e,t)=>{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:h,breakpoint:m,onCollapse:v,onBreakpoint:g}=e,y=AH(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:b}=$.useContext(RH),[C,x]=$.useState("collapsed"in e?e.collapsed:a),[S,w]=$.useState(!1);$.useEffect(()=>{"collapsed"in e&&x(e.collapsed)},[e.collapsed]);const E=(Q,fe)=>{"collapsed"in e||x(Q),v==null||v(Q,fe)},{getPrefixCls:N,direction:O}=$.useContext(It),M=N("layout-sider",n),[I,k,D]=PH(M),A=$.useRef(null);A.current=Q=>{w(Q.matches),g==null||g(Q.matches),C!==Q.matches&&E(Q.matches,"responsive")},$.useEffect(()=>{function Q(ye){return A.current(ye)}let fe;if(typeof window<"u"){const{matchMedia:ye}=window;if(ye&&m&&m in sy){fe=ye(`screen and (max-width: ${sy[m]})`);try{fe.addEventListener("change",Q)}catch{fe.addListener(Q)}Q(fe)}}return()=>{try{fe==null||fe.removeEventListener("change",Q)}catch{fe==null||fe.removeListener(Q)}}},[m]),$.useEffect(()=>{const Q=DH("ant-sider-");return b.addSider(Q),()=>b.removeSider(Q)},[]);const L=()=>{E(!C,"clickTrigger")},T=Fn(y,["collapsed"]),R=C?f:d,_=kH(R)?`${R}px`:String(R),V=parseFloat(String(f||0))===0?p.createElement("span",{onClick:L,className:ee(`${M}-zero-width-trigger`,`${M}-zero-width-trigger-${u?"right":"left"}`),style:h},o||p.createElement(NE,null)):null,F=O==="rtl"==!u,J={expanded:F?p.createElement(Qs,null):p.createElement(ou,null),collapsed:F?p.createElement(ou,null):p.createElement(Qs,null)}[C?"collapsed":"expanded"],H=o!==null?V||p.createElement("div",{className:`${M}-trigger`,onClick:L,style:{width:_}},o||J):null,X=Object.assign(Object.assign({},l),{flex:`0 0 ${_}`,maxWidth:_,minWidth:_,width:_}),Y=ee(M,`${M}-${s}`,{[`${M}-collapsed`]:!!C,[`${M}-has-trigger`]:c&&o!==null&&!V,[`${M}-below`]:!!S,[`${M}-zero-width`]:parseFloat(_)===0},r,k,D),le=p.useMemo(()=>({siderCollapsed:C}),[C]);return I(p.createElement(gg.Provider,{value:le},p.createElement("aside",Object.assign({className:Y},T,{style:X,ref:t}),p.createElement("div",{className:`${M}-children`},i),c||S&&V?H:null)))});process.env.NODE_ENV!=="production"&&(_H.displayName="Sider");var LH={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"},jH=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:LH}))},vg=p.forwardRef(jH);process.env.NODE_ENV!=="production"&&(vg.displayName="EllipsisOutlined");const au=$.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var BH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const IE=e=>{const{prefixCls:t,className:n,dashed:r}=e,o=BH(e,["prefixCls","className","dashed"]),{getPrefixCls:i}=p.useContext(It),a=i("menu",t),s=ee({[`${a}-item-divider-dashed`]:!!r},n);return p.createElement(mg,Object.assign({className:s},o))},TE=e=>{var t;const{className:n,children:r,icon:o,title:i,danger:a,extra:s}=e,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=p.useContext(au),h=C=>{const x=r==null?void 0:r[0],S=p.createElement("span",{className:ee(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!o||p.isValidElement(r)&&r.type==="span")&&r&&C&&c&&typeof x=="string"?p.createElement("div",{className:`${l}-inline-collapsed-noicon`},x.charAt(0)):S},{siderCollapsed:m}=p.useContext(gg);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=wr(r).length;let b=p.createElement(wd,Object.assign({},Fn(e,["title","icon","danger"]),{className:ee({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(o?y+1:y)===1},n),title:typeof i=="string"?i:void 0}),Lr(o,{className:ee(p.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:"",`${l}-item-icon`)}),h(f));return d||(b=p.createElement(Cn,Object.assign({},g,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),b)),b};var zH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const su=p.createContext(null),FH=p.forwardRef((e,t)=>{const{children:n}=e,r=zH(e,["children"]),o=p.useContext(su),i=p.useMemo(()=>Object.assign(Object.assign({},o),r),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=ZT(n),s=gi(t,a?Ji(n):null);return p.createElement(su.Provider,{value:i},p.createElement(di,{space:!0},a?p.cloneElement(n,{ref:s}):n))}),HH=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${ne(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${t}-item:hover,
367
+ > ${t}-item-active,
368
+ > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},VH=e=>{let{componentCls:t,menuArrowOffset:n,calc:r}=e;return{[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical,
369
+ ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ne(r(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ne(n)})`}}}}},ly=e=>Object.assign({},dl(e)),cy=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:h,motionEaseInOut:m,motionEaseOut:v,itemPaddingInline:g,motionDurationMid:y,itemHoverColor:b,lineType:C,colorSplit:x,itemDisabledColor:S,dangerItemColor:w,dangerItemHoverColor:E,dangerItemSelectedColor:N,dangerItemActiveBg:O,dangerItemSelectedBg:M,popupBg:I,itemHoverBg:k,itemActiveBg:D,menuSubMenuBg:A,horizontalItemSelectedColor:L,horizontalItemSelectedBg:T,horizontalItemBorderRadius:R,horizontalItemHoverBg:_}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},ly(e)),[`${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({},ly(e))},[`${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:k},"&:active":{backgroundColor:D}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:D}}},[`${n}-item-danger`]:{color:w,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:O}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:M}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:I},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:I},[`&${n}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:R,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${ne(u)} solid transparent`,transition:`border-color ${h} ${m}`,content:'""'},"&:hover, &-active, &-open":{background:_,"&::after":{borderBottomWidth:u,borderBottomColor:L}},"&-selected":{color:L,backgroundColor:T,"&:hover":{backgroundColor:T},"&::after":{borderBottomWidth:u,borderBottomColor:L}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${ne(f)} ${C} ${x}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ne(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${v}`,`opacity ${y} ${v}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${m}`,`opacity ${y} ${m}`].join(",")}}}}}},uy=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(i).add(o).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:ne(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${t}-item,
370
+ > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:ne(n)},[`${t}-item-group-list ${t}-submenu-title,
371
+ ${t}-submenu-title`]:{paddingInlineEnd:u}}},WH=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:m,collapsedWidth:v,collapsedIconSize:g}=e,y={height:r,lineHeight:ne(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},uy(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},uy(e)),{boxShadow:m})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${ne(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${d} ${s}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:y,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:y}},{[`${t}-inline-collapsed`]:{width:v,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${t}-item,
372
+ > ${t}-item-group > ${t}-item-group-list > ${t}-item,
373
+ > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
374
+ > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ne(e.calc(g).div(2).equal())} - ${ne(c)})`,textOverflow:"clip",[`
375
+ ${t}-submenu-arrow,
376
+ ${t}-submenu-expand-icon
377
+ `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:ne(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},Js),{paddingInline:h})}}]},dy=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=e;return{[`${t}-item, ${t}-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(","),[`${t}-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(",")}},[`${t}-item-icon`]:Object.assign({},Qi()),[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},fy=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.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(${ne(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ne(a)})`}}}}},qH=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:h,menuArrowSize:m,menuArrowOffset:v,lineType:g,groupTitleLineHeight:y,groupTitleFontSize:b}=e;return[{"":{[n]:Object.assign(Object.assign({},Xc()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ln(e)),Xc()),{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:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${ne(s)} ${ne(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%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.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"}}}),dy(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${ne(e.calc(r).mul(2).equal())} ${ne(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},dy(e)),fy(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:h},[`${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:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),fy(e)),{[`&-inline-collapsed ${n}-submenu-arrow,
378
+ &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ne(v)})`},"&::after":{transform:`rotate(45deg) translateX(${ne(e.calc(v).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${ne(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ne(e.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ne(v)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},UH=e=>{var t,n,r;const{colorPrimary:o,colorError:i,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:m,controlItemBgActive:v,colorBgTextHover:g,controlHeightLG:y,lineHeight:b,colorBgElevated:C,marginXXS:x,padding:S,fontSize:w,controlHeightSM:E,fontSizeLG:N,colorTextLightSolid:O,colorErrorHover:M}=e,I=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,k=(n=e.activeBarBorderWidth)!==null&&n!==void 0?n:h,D=(r=e.itemMarginInline)!==null&&r!==void 0?r:e.marginXXS,A=new qt(O).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.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:h,activeBarBorderWidth:k,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:D,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:N,groupTitleFontSize:w,darkItemDisabledColor:new qt(O).setA(.25).toRgbString(),darkItemColor:A,darkDangerItemColor:i,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:O,darkItemSelectedBg:o,darkDangerItemSelectedBg:i,darkItemHoverBg:"transparent",darkGroupTitleColor:A,darkItemHoverColor:O,darkDangerItemHoverColor:M,darkDangerItemSelectedColor:O,darkDangerItemActiveBg:i,itemWidth:I?`calc(100% + ${k}px)`:`calc(100% - ${D*2}px)`}},KH=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return vn("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:h,darkDangerItemSelectedBg:m,darkItemHoverBg:v,darkGroupTitleColor:g,darkItemHoverColor:y,darkItemDisabledColor:b,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:S,popupBg:w,darkPopupBg:E}=o,N=o.calc(s).div(7).mul(5).equal(),O=Vt(o,{menuArrowSize:N,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(N).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:w}),M=Vt(O,{itemColor:l,itemHoverColor:y,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:E,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:b,dangerItemColor:c,dangerItemHoverColor:C,dangerItemSelectedColor:x,dangerItemActiveBg:S,dangerItemSelectedBg:m,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:h});return[qH(O),HH(O),WH(O),cy(O,"light"),cy(M,"dark"),VH(O),Z1(O),Ha(O,"slide-up"),Ha(O,"slide-down"),gl(O,"zoom-big")]},UH,{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}})(e,t)},PE=e=>{var t;const{popupClassName:n,icon:r,title:o,theme:i}=e,a=p.useContext(au),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=Xa();let d;if(!r)d=l&&!u.length&&o&&typeof o=="string"?p.createElement("div",{className:`${s}-inline-collapsed-noicon`},o.charAt(0)):p.createElement("span",{className:`${s}-title-content`},o);else{const m=p.isValidElement(o)&&o.type==="span";d=p.createElement(p.Fragment,null,Lr(r,{className:ee(p.isValidElement(r)?(t=r.props)===null||t===void 0?void 0:t.className:"",`${s}-item-icon`)}),m?o:p.createElement("span",{className:`${s}-title-content`},o))}const f=p.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[h]=pl("Menu");return p.createElement(au.Provider,{value:f},p.createElement($l,Object.assign({},Fn(e,["icon"]),{title:d,popupClassName:ee(s,n,`${s}-${i||c}`),popupStyle:Object.assign({zIndex:h},e.popupStyle)})))};var GH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function _f(e){return e===null||e===!1}const XH={item:TE,submenu:PE,divider:IE},YH=$.forwardRef((e,t)=>{var n;const r=p.useContext(su),o=r||{},{getPrefixCls:i,getPopupContainer:a,direction:s,menu:l}=p.useContext(It),c=i(),{prefixCls:u,className:d,style:f,theme:h="light",expandIcon:m,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:g,siderCollapsed:y,rootClassName:b,mode:C,selectable:x,onClick:S,overflowedIndicatorPopupClassName:w}=e,E=GH(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),N=Fn(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const K=rn("Menu");process.env.NODE_ENV!=="production"&&K(!("inlineCollapsed"in e&&C!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),K.deprecated("items"in e&&!e.children,"children","items")}(n=o.validator)===null||n===void 0||n.call(o,{mode:C});const O=Ut(function(){var K;S==null||S.apply(void 0,arguments),(K=o.onClick)===null||K===void 0||K.call(o)}),M=o.mode||C,I=x??o.selectable,k=g??y,D={horizontal:{motionName:`${c}-slide-up`},inline:B1(c),other:{motionName:`${c}-zoom-big`}},A=i("menu",u||o.prefixCls),L=Qr(A),[T,R,_]=KH(A,L,!r),V=ee(`${A}-${h}`,l==null?void 0:l.className,d),F=p.useMemo(()=>{var K,J;if(typeof m=="function"||_f(m))return m||null;if(typeof o.expandIcon=="function"||_f(o.expandIcon))return o.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||_f(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const H=(K=m??(o==null?void 0:o.expandIcon))!==null&&K!==void 0?K:l==null?void 0:l.expandIcon;return Lr(H,{className:ee(`${A}-submenu-expand-icon`,p.isValidElement(H)?(J=H.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]),W=p.useMemo(()=>({prefixCls:A,inlineCollapsed:k||!1,direction:s,firstLevel:!0,theme:h,mode:M,disableMenuItemTitleTooltip:v}),[A,k,s,v,h]);return T(p.createElement(su.Provider,{value:null},p.createElement(au.Provider,{value:W},p.createElement(Ol,Object.assign({getPopupContainer:a,overflowedIndicator:p.createElement(vg,null),overflowedIndicatorPopupClassName:ee(A,`${A}-${h}`,w),mode:M,selectable:I,onClick:O},N,{inlineCollapsed:k,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:V,prefixCls:A,direction:s,defaultMotions:D,expandIcon:F,ref:t,rootClassName:ee(b,R,o.rootClassName,_,L),_internalComponents:XH})))))}),fi=$.forwardRef((e,t)=>{const n=$.useRef(null),r=p.useContext(gg);return $.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{var i;(i=n.current)===null||i===void 0||i.focus(o)}})),p.createElement(YH,Object.assign({ref:n},e,r))});fi.Item=TE;fi.SubMenu=PE;fi.Divider=IE;fi.ItemGroup=Ed;process.env.NODE_ENV!=="production"&&(fi.displayName="Menu");const JH=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},QH=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:h,controlPaddingHorizontal:m,colorBgElevated:v}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.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:h}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:h},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-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${t}-placement-bottomLeft,
379
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,
380
+ &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,
381
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,
382
+ &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,
383
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Fm},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,
384
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,
385
+ &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,
386
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,
387
+ &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,
388
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Vm},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,
389
+ &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,
390
+ &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Hm},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,
391
+ &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,
392
+ &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Wm}}},cg(e,v,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${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}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Ln(e)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:v,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Fa(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${ne(c)} ${ne(m)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.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:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${ne(c)} ${ne(m)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Fa(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:v,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ne(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:h,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${ne(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:v,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ha(e,"slide-up"),Ha(e,"slide-down"),Zc(e,"move-up"),Zc(e,"move-down"),gl(e,"zoom-big")]]},ZH=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},Cd({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),lg(e)),e5=vn("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=Vt(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[QH(i),JH(i)]},ZH,{resetStyle:!1}),Nl=e=>{var t;const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,getPopupContainer:c,overlayClassName:u,rootClassName:d,overlayStyle:f,open:h,onOpenChange:m,visible:v,onVisibleChange:g,mouseEnterDelay:y=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:C=!0,placement:x="",overlay:S,transitionName:w}=e,{getPopupContainer:E,getPrefixCls:N,direction:O,dropdown:M}=p.useContext(It),I=rn("Dropdown");process.env.NODE_ENV!=="production"&&([["visible","open"],["onVisibleChange","onOpenChange"]].forEach(re=>{let[ce,he]=re;I.deprecated(!(ce in e),ce,he)}),I.deprecated(!("overlay"in e),"overlay","menu"));const k=p.useMemo(()=>{const re=N();return w!==void 0?w:x.includes("top")?`${re}-slide-down`:`${re}-slide-up`},[N,x,w]),D=p.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:O==="rtl"?"bottomRight":"bottomLeft",[x,O]);if(process.env.NODE_ENV!=="production"){if(x.includes("Center")){const re=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 '${re}' instead.`)}[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(re=>{let[ce,he]=re;I.deprecated(!(ce in e),ce,he)})}const A=N("dropdown",o),L=Qr(A),[T,R,_]=e5(A,L),[,V]=pr(),F=p.Children.only(qF(i)?p.createElement("span",null,i):i),W=Lr(F,{className:ee(`${A}-trigger`,{[`${A}-rtl`]:O==="rtl"},F.props.className),disabled:(t=F.props.disabled)!==null&&t!==void 0?t:s}),K=s?[]:a,J=!!(K!=null&&K.includes("contextMenu")),[H,X]=gn(!1,{value:h??v}),Y=Ut(re=>{m==null||m(re,{source:"trigger"}),g==null||g(re),X(re)}),le=ee(u,d,R,_,L,M==null?void 0:M.className,{[`${A}-rtl`]:O==="rtl"}),Q=dE({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:C,offset:V.marginXXS,arrowWidth:r?V.sizePopupArrow:0,borderRadius:V.borderRadius}),fe=p.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]),ye=()=>{let re;return n!=null&&n.items?re=p.createElement(fi,Object.assign({},n)):typeof S=="function"?re=S():re=S,l&&(re=l(re)),re=p.Children.only(typeof re=="string"?p.createElement("span",null,re):re),p.createElement(FH,{prefixCls:`${A}-menu`,rootClassName:ee(_,L),expandIcon:p.createElement("span",{className:`${A}-menu-submenu-arrow`},O==="rtl"?p.createElement(ou,{className:`${A}-menu-submenu-arrow-icon`}):p.createElement(Qs,{className:`${A}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:fe,validator:ce=>{let{mode:he}=ce;process.env.NODE_ENV!=="production"&&I(!he||he==="vertical","usage",`mode="${he}" is not supported for Dropdown's Menu.`)}},re)},[ue,ie]=pl("Dropdown",f==null?void 0:f.zIndex);let me=p.createElement(WF,Object.assign({alignPoint:J},Fn(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:b,visible:H,builtinPlacements:Q,arrow:!!r,overlayClassName:le,prefixCls:A,getPopupContainer:c||E,transitionName:k,trigger:K,overlay:ye,placement:D,onVisibleChange:Y,overlayStyle:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.style),f),{zIndex:ue})}),W);return ue&&(me=p.createElement(hl.Provider,{value:ie},me)),T(me)},t5=Ym(Nl,"align",void 0,"dropdown",e=>e),n5=e=>p.createElement(t5,Object.assign({},e),p.createElement("span",null));Nl._InternalPanelDoNotUseOrYouWillBeFired=n5;process.env.NODE_ENV!=="production"&&(Nl.displayName="Dropdown");const AE=p.createContext(null),r5=AE.Provider,kE=p.createContext(null),o5=kE.Provider;var i5=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],a5=$.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,o=e.className,i=e.style,a=e.checked,s=e.disabled,l=e.defaultChecked,c=l===void 0?!1:l,u=e.type,d=u===void 0?"checkbox":u,f=e.title,h=e.onChange,m=wt(e,i5),v=$.useRef(null),g=$.useRef(null),y=gn(c,{value:a}),b=ae(y,2),C=b[0],x=b[1];$.useImperativeHandle(t,function(){return{focus:function(N){var O;(O=v.current)===null||O===void 0||O.focus(N)},blur:function(){var N;(N=v.current)===null||N===void 0||N.blur()},input:v.current,nativeElement:g.current}});var S=ee(r,o,q(q({},"".concat(r,"-checked"),C),"".concat(r,"-disabled"),s)),w=function(N){s||("checked"in e||x(N.target.checked),h==null||h({target:U(U({},e),{},{type:d,checked:N.target.checked}),stopPropagation:function(){N.stopPropagation()},preventDefault:function(){N.preventDefault()},nativeEvent:N.nativeEvent}))};return p.createElement("span",{className:S,title:f,style:i,ref:g},p.createElement("input",De({},m,{className:"".concat(r,"-input"),ref:v,onChange:w,disabled:s,checked:!!C,type:d})),p.createElement("span",{className:"".concat(r,"-inner")}))});function s5(e){const t=$.useRef(null),n=()=>{Dt.cancel(t.current),t.current=null};return[()=>{n(),t.current=Dt(()=>{t.current=null})},i=>{t.current&&(i.stopPropagation(),n()),e==null||e(i)}]}const l5=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},Ln(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},c5=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:i,motionDurationMid:a,motionEaseInOutCirc:s,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:f,paddingXS:h,dotColorDisabled:m,lineType:v,radioColor:g,radioBgColor:y,calc:b}=e,C=`${t}-inner`,S=b(o).sub(b(4).mul(2)),w=b(1).mul(o).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},Ln(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${ne(u)} ${v} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},Ln(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
393
+ &:hover ${C}`]:{borderColor:r},[`${t}-input:focus-visible + ${C}`]:Object.assign({},dl(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:w,height:w,marginBlockStart:b(1).mul(o).div(-2).equal({unit:!0}),marginInlineStart:b(1).mul(o).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:w,transform:"scale(0)",opacity:0,transition:`all ${i} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:w,height:w,backgroundColor:l,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[C]:{borderColor:r,backgroundColor:y,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${i} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[C]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:m}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:f,cursor:"not-allowed"},[`&${t}-checked`]:{[C]:{"&::after":{transform:`scale(${b(S).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},u5=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:i,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:f,controlHeightLG:h,controlHeightSM:m,paddingXS:v,borderRadius:g,borderRadiusSM:y,borderRadiusLG:b,buttonCheckedBg:C,buttonSolidCheckedColor:x,colorTextDisabled:S,colorBgContainerDisabled:w,buttonCheckedBgDisabled:E,buttonCheckedColorDisabled:N,colorPrimary:O,colorPrimaryHover:M,colorPrimaryActive:I,buttonSolidCheckedBg:k,buttonSolidCheckedHoverBg:D,buttonSolidCheckedActiveBg:A,calc:L}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:ne(L(n).sub(L(o).mul(2)).equal()),background:d,border:`${ne(o)} ${i} ${a}`,borderBlockStartWidth:L(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:L(o).mul(-1).equal(),insetInlineStart:L(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${ne(o)} ${i} ${a}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${r}-group-large &`]:{height:h,fontSize:f,lineHeight:ne(L(h).sub(L(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},[`${r}-group-small &`]:{height:m,paddingInline:L(v).sub(o).equal(),paddingBlock:0,lineHeight:ne(L(m).sub(L(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},"&:hover":{position:"relative",color:O},"&:has(:focus-visible)":Object.assign({},dl(e)),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:O,background:C,borderColor:O,"&::before":{backgroundColor:O},"&:first-child":{borderColor:O},"&:hover":{color:M,borderColor:M,"&::before":{backgroundColor:M}},"&:active":{color:I,borderColor:I,"&::before":{backgroundColor:I}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:x,background:k,borderColor:k,"&:hover":{color:x,background:D,borderColor:D},"&:active":{color:x,background:A,borderColor:A}},"&-disabled":{color:S,backgroundColor:w,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:S,backgroundColor:w,borderColor:a}},[`&-disabled${r}-button-wrapper-checked`]:{color:N,backgroundColor:E,borderColor:a,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},d5=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:i,colorText:a,colorBgContainer:s,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:h,colorWhite:m}=e,v=4,g=i,y=t?g-v*2:g-(v+o)*2;return{radioSize:g,dotSize:y,dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:h,buttonBg:s,buttonCheckedBg:s,buttonColor:a,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},DE=vn("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${ne(n)} ${t}`,i=Vt(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[l5(i),c5(i),u5(i)]},d5,{unitless:{radioSize:!0,dotSize:!0}});var f5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const h5=(e,t)=>{var n,r;const o=p.useContext(AE),i=p.useContext(kE),{getPrefixCls:a,direction:s,radio:l}=p.useContext(It),c=p.useRef(null),u=dr(t,c),{isFormItemInput:d}=p.useContext(Er);if(process.env.NODE_ENV!=="production"){const T=rn("Radio");process.env.NODE_ENV!=="production"&&T(!("optionType"in e),"usage","`optionType` is only support in Radio.Group.")}const f=T=>{var R,_;(R=e.onChange)===null||R===void 0||R.call(e,T),(_=o==null?void 0:o.onChange)===null||_===void 0||_.call(o,T)},{prefixCls:h,className:m,rootClassName:v,children:g,style:y,title:b}=e,C=f5(e,["prefixCls","className","rootClassName","children","style","title"]),x=a("radio",h),S=((o==null?void 0:o.optionType)||i)==="button",w=S?`${x}-button`:x,E=Qr(x),[N,O,M]=DE(x,E),I=Object.assign({},C),k=p.useContext(_r);o&&(I.name=o.name,I.onChange=f,I.checked=e.value===o.value,I.disabled=(n=I.disabled)!==null&&n!==void 0?n:o.disabled),I.disabled=(r=I.disabled)!==null&&r!==void 0?r:k;const D=ee(`${w}-wrapper`,{[`${w}-wrapper-checked`]:I.checked,[`${w}-wrapper-disabled`]:I.disabled,[`${w}-wrapper-rtl`]:s==="rtl",[`${w}-wrapper-in-form-item`]:d,[`${w}-wrapper-block`]:!!(o!=null&&o.block)},l==null?void 0:l.className,m,v,O,M,E),[A,L]=s5(I.onClick);return N(p.createElement(jm,{component:"Radio",disabled:I.disabled},p.createElement("label",{className:D,style:Object.assign(Object.assign({},l==null?void 0:l.style),y),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:b,onClick:A},p.createElement(a5,Object.assign({},I,{className:ee(I.className,{[Lm]:!S}),type:"radio",prefixCls:w,ref:u,onClick:L})),g!==void 0?p.createElement("span",{className:`${w}-label`},g):null)))},tl=p.forwardRef(h5);process.env.NODE_ENV!=="production"&&(tl.displayName="Radio");const p5=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=p.useContext(It),o=yl(),{prefixCls:i,className:a,rootClassName:s,options:l,buttonStyle:c="outline",disabled:u,children:d,size:f,style:h,id:m,optionType:v,name:g=o,defaultValue:y,value:b,block:C=!1,onChange:x,onMouseEnter:S,onMouseLeave:w,onFocus:E,onBlur:N}=e,[O,M]=gn(y,{value:b}),I=p.useCallback(K=>{const J=O,H=K.target.value;"value"in e||M(H),H!==J&&(x==null||x(K))},[O,M,x]),k=n("radio",i),D=`${k}-group`,A=Qr(k),[L,T,R]=DE(k,A);let _=d;l&&l.length>0&&(_=l.map(K=>typeof K=="string"||typeof K=="number"?p.createElement(tl,{key:K.toString(),prefixCls:k,disabled:u,value:K,checked:O===K},K):p.createElement(tl,{key:`radio-group-value-options-${K.value}`,prefixCls:k,disabled:K.disabled||u,value:K.value,checked:O===K.value,title:K.title,style:K.style,id:K.id,required:K.required},K.label)));const V=jr(f),F=ee(D,`${D}-${c}`,{[`${D}-${V}`]:V,[`${D}-rtl`]:r==="rtl",[`${D}-block`]:C},a,s,T,R,A),W=p.useMemo(()=>({onChange:I,value:O,disabled:u,name:g,optionType:v,block:C}),[I,O,u,g,v,C]);return L(p.createElement("div",Object.assign({},Gr(e,{aria:!0,data:!0}),{className:F,style:h,onMouseEnter:S,onMouseLeave:w,onFocus:E,onBlur:N,id:m,ref:t}),p.createElement(r5,{value:W},_)))}),m5=p.memo(p5);var g5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const v5=(e,t)=>{const{getPrefixCls:n}=p.useContext(It),{prefixCls:r}=e,o=g5(e,["prefixCls"]),i=n("radio",r);return p.createElement(o5,{value:"button"},p.createElement(tl,Object.assign({prefixCls:i},o,{type:"radio",ref:t})))},b5=p.forwardRef(v5),Go=tl;Go.Button=b5;Go.Group=m5;Go.__ANT_RADIO=!0;function Ml(e){return Vt(e,{inputAffixPadding:e.paddingXXS})}const Rl=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:h,colorPrimary:m,controlOutlineWidth:v,controlOutline:g,colorErrorOutline:y,colorWarningOutline:b,colorBgContainer:C,inputFontSize:x,inputFontSizeLG:S,inputFontSizeSM:w}=e,E=x||n,N=w||E,O=S||s,M=Math.round((t-E*r)/2*10)/10-o,I=Math.round((i-N*r)/2*10)/10-o,k=Math.ceil((a-O*l)/2*10)/10-o;return{paddingBlock:Math.max(M,0),paddingBlockSM:Math.max(I,0),paddingBlockLG:Math.max(k,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:f,activeBorderColor:m,hoverBorderColor:h,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:O,inputFontSizeSM:N}},y5=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),bg=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},y5(Vt(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),_E=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),hy=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},_E(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),LE=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},_E(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},bg(e))}),hy(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),hy(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),py=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),jE=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ne(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},py(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),py(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},bg(e))}})}),BE=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},zE=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t==null?void 0:t.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},my=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},zE(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),FE=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zE(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},bg(e))}),my(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),my(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),gy=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),HE=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary},[`${e.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${ne(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${ne(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}}}},gy(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),gy(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ne(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ne(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ne(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ne(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ne(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ne(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),VE=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ne(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.borderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),vy=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},VE(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),WE=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},VE(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),vy(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),vy(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),qE=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),UE=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${ne(t)} ${ne(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},KE=e=>({padding:`${ne(e.paddingBlockSM)} ${ne(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),$d=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ne(e.paddingBlock)} ${ne(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},qE(e.colorTextPlaceholder)),{"&-lg":Object.assign({},UE(e)),"&-sm":Object.assign({},KE(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),GE=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},UE(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},KE(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ne(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${ne(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ne(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${ne(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${ne(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},Xc()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
394
+ & > ${t}-affix-wrapper,
395
+ & > ${t}-number-affix-wrapper,
396
+ & > ${n}-picker-range
397
+ `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
398
+ & > ${n}-select-auto-complete ${t},
399
+ & > ${n}-cascader-picker ${t},
400
+ & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
401
+ & > ${n}-select:first-child > ${n}-select-selector,
402
+ & > ${n}-select-auto-complete:first-child ${t},
403
+ & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
404
+ & > ${n}-select:last-child > ${n}-select-selector,
405
+ & > ${n}-cascader-picker:last-child ${t},
406
+ & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},C5=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ln(e)),$d(e)),LE(e)),FE(e)),BE(e)),WE(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},S5=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ne(e.inputAffixPadding)}`}}}},x5=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:s}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},$d(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),S5(e)),{[`${s}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}}),[`${t}-underlined`]:{borderRadius:0},[c]:{[`${s}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},w5=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Ln(e)),GE(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},jE(e)),HE(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},E5=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
407
+ > ${t},
408
+ ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},$5=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},XE=vn(["Input","Shared"],e=>{const t=Vt(e,Ml(e));return[C5(t),x5(t)]},Rl,{resetFont:!1}),YE=vn(["Input","Component"],e=>{const t=Vt(e,Ml(e));return[w5(t),E5(t),$5(t),vl(t)]},Rl,{resetFont:!1}),O5=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},Ln(e)),{borderBlockStart:`${ne(o)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${ne(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${ne(e.dividerHorizontalGutterMargin)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${ne(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${ne(o)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${ne(o)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${ne(o)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},N5=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),M5=vn("Divider",e=>{const t=Vt(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[O5(t)]},N5,{unitless:{orientationMargin:!0}});var R5=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const JE=e=>{const{getPrefixCls:t,direction:n,className:r,style:o}=$r("divider"),{prefixCls:i,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:h="solid",plain:m,style:v}=e,g=R5(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),y=t("divider",i),[b,C,x]=M5(y),S=!!d,w=p.useMemo(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),E=w==="start"&&l!=null,N=w==="end"&&l!=null,O=ee(y,r,C,x,`${y}-${a}`,{[`${y}-with-text`]:S,[`${y}-with-text-${w}`]:S,[`${y}-dashed`]:!!f,[`${y}-${h}`]:h!=="solid",[`${y}-plain`]:!!m,[`${y}-rtl`]:n==="rtl",[`${y}-no-default-orientation-margin-start`]:E,[`${y}-no-default-orientation-margin-end`]:N},c,u),M=p.useMemo(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),I={marginInlineStart:E?M:void 0,marginInlineEnd:N?M:void 0};if(process.env.NODE_ENV!=="production"){const k=rn("Divider");process.env.NODE_ENV!=="production"&&k(!d||a!=="vertical","usage","`children` not working in `vertical` mode.")}return b(p.createElement("div",Object.assign({className:O,style:Object.assign(Object.assign({},o),v)},g,{role:"separator"}),d&&a!=="vertical"&&p.createElement("span",{className:`${y}-inner-text`,style:I},d)))};process.env.NODE_ENV!=="production"&&(JE.displayName="Divider");var by=function(t,n){if(!t)return null;var r={left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth,top:t.offsetTop,bottom:t.parentElement.clientHeight-t.clientHeight-t.offsetTop,height:t.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}},to=function(t){return t!==void 0?"".concat(t,"px"):void 0};function I5(e){var t=e.prefixCls,n=e.containerRef,r=e.value,o=e.getValueIndex,i=e.motionName,a=e.onMotionStart,s=e.onMotionEnd,l=e.direction,c=e.vertical,u=c===void 0?!1:c,d=p.useRef(null),f=p.useState(r),h=ae(f,2),m=h[0],v=h[1],g=function(L){var T,R=o(L),_=(T=n.current)===null||T===void 0?void 0:T.querySelectorAll(".".concat(t,"-item"))[R];return(_==null?void 0:_.offsetParent)&&_},y=p.useState(null),b=ae(y,2),C=b[0],x=b[1],S=p.useState(null),w=ae(S,2),E=w[0],N=w[1];en(function(){if(m!==r){var A=g(m),L=g(r),T=by(A,u),R=by(L,u);v(r),x(T),N(R),A&&L?a():s()}},[r]);var O=p.useMemo(function(){if(u){var A;return to((A=C==null?void 0:C.top)!==null&&A!==void 0?A:0)}return to(l==="rtl"?-(C==null?void 0:C.right):C==null?void 0:C.left)},[u,l,C]),M=p.useMemo(function(){if(u){var A;return to((A=E==null?void 0:E.top)!==null&&A!==void 0?A:0)}return to(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)"}},k=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)"}},D=function(){x(null),N(null),s()};return!C||!E?null:p.createElement(po,{visible:!0,motionName:i,motionAppear:!0,onAppearStart:I,onAppearActive:k,onVisibleChanged:D},function(A,L){var T=A.className,R=A.style,_=U(U({},R),{},{"--thumb-start-left":O,"--thumb-start-width":to(C==null?void 0:C.width),"--thumb-active-left":M,"--thumb-active-width":to(E==null?void 0:E.width),"--thumb-start-top":O,"--thumb-start-height":to(C==null?void 0:C.height),"--thumb-active-top":M,"--thumb-active-height":to(E==null?void 0:E.height)}),V={ref:dr(d,L),style:_,className:ee("".concat(t,"-thumb"),T)};return process.env.NODE_ENV==="test"&&(V["data-test-style"]=JSON.stringify(_)),p.createElement("div",V)})}var T5=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function P5(e){if(typeof e.title<"u")return e.title;if(lt(e.label)!=="object"){var t;return(t=e.label)===null||t===void 0?void 0:t.toString()}}function A5(e){return e.map(function(t){if(lt(t)==="object"&&t!==null){var n=P5(t);return U(U({},t),{},{title:n})}return{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t}})}var k5=function(t){var n=t.prefixCls,r=t.className,o=t.disabled,i=t.checked,a=t.label,s=t.title,l=t.value,c=t.name,u=t.onChange,d=t.onFocus,f=t.onBlur,h=t.onKeyDown,m=t.onKeyUp,v=t.onMouseDown,g=function(b){o||u(b,l)};return p.createElement("label",{className:ee(r,q({},"".concat(n,"-item-disabled"),o)),onMouseDown:v},p.createElement("input",{name:c,className:"".concat(n,"-item-input"),type:"radio",disabled:o,checked:i,onChange:g,onFocus:d,onBlur:f,onKeyDown:h,onKeyUp:m}),p.createElement("div",{className:"".concat(n,"-item-label"),title:s,"aria-selected":i},a))},QE=p.forwardRef(function(e,t){var n,r,o=e.prefixCls,i=o===void 0?"rc-segmented":o,a=e.direction,s=e.vertical,l=e.options,c=l===void 0?[]:l,u=e.disabled,d=e.defaultValue,f=e.value,h=e.name,m=e.onChange,v=e.className,g=v===void 0?"":v,y=e.motionName,b=y===void 0?"thumb-motion":y,C=wt(e,T5),x=p.useRef(null),S=p.useMemo(function(){return dr(x,t)},[x,t]),w=p.useMemo(function(){return A5(c)},[c]),E=gn((n=w[0])===null||n===void 0?void 0:n.value,{value:f,defaultValue:d}),N=ae(E,2),O=N[0],M=N[1],I=p.useState(!1),k=ae(I,2),D=k[0],A=k[1],L=function(ie,me){M(me),m==null||m(me)},T=Fn(C,["children"]),R=p.useState(!1),_=ae(R,2),V=_[0],F=_[1],W=p.useState(!1),K=ae(W,2),J=K[0],H=K[1],X=function(){H(!0)},Y=function(){H(!1)},le=function(){F(!1)},Q=function(ie){ie.key==="Tab"&&F(!0)},fe=function(ie){var me=w.findIndex(function(Ee){return Ee.value===O}),re=w.length,ce=(me+ie+re)%re,he=w[ce];he&&(M(he.value),m==null||m(he.value))},ye=function(ie){switch(ie.key){case"ArrowLeft":case"ArrowUp":fe(-1);break;case"ArrowRight":case"ArrowDown":fe(1);break}};return p.createElement("div",De({role:"radiogroup","aria-label":"segmented control",tabIndex:u?void 0:0},T,{className:ee(i,(r={},q(r,"".concat(i,"-rtl"),a==="rtl"),q(r,"".concat(i,"-disabled"),u),q(r,"".concat(i,"-vertical"),s),r),g),ref:S}),p.createElement("div",{className:"".concat(i,"-group")},p.createElement(I5,{vertical:s,prefixCls:i,value:O,containerRef:x,motionName:"".concat(i,"-").concat(b),direction:a,getValueIndex:function(ie){return w.findIndex(function(me){return me.value===ie})},onMotionStart:function(){A(!0)},onMotionEnd:function(){A(!1)}}),w.map(function(ue){var ie;return p.createElement(k5,De({},ue,{name:h,key:ue.value,prefixCls:i,className:ee(ue.className,"".concat(i,"-item"),(ie={},q(ie,"".concat(i,"-item-selected"),ue.value===O&&!D),q(ie,"".concat(i,"-item-focused"),J&&V&&ue.value===O),ie)),checked:ue.value===O,onChange:L,onFocus:X,onBlur:Y,onKeyDown:ye,onKeyUp:Q,onMouseDown:le,disabled:!!u||!!ue.disabled}))})))});process.env.NODE_ENV!=="production"&&(QE.displayName="Segmented");var D5=QE;function yy(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function Cy(e){return{backgroundColor:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const _5=Object.assign({overflow:"hidden"},Js),L5=e=>{const{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),o=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ln(e)),{display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`}),Fa(e)),{[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${ne(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},Cy(e)),{color:e.itemSelectedColor}),"&-focused":Object.assign({},dl(e)),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemHoverBg}},[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:ne(n),padding:`0 ${ne(e.segmentedPaddingHorizontal)}`},_5),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Object.assign(Object.assign({},Cy(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${ne(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:r,lineHeight:ne(r),padding:`0 ${ne(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:o,lineHeight:ne(o),padding:`0 ${ne(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),yy(`&-disabled ${t}-item`,e)),yy(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}},j5=e=>{const{colorTextLabel:t,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:a,colorBgLayout:s}=e;return{trackPadding:a,trackBg:s,itemColor:t,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}},B5=vn("Segmented",e=>{const{lineWidth:t,calc:n}=e,r=Vt(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()});return[L5(r)]},j5);var Sy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function z5(e){return typeof e=="object"&&!!(e!=null&&e.icon)}const F5=p.forwardRef((e,t)=>{const n=yl(),{prefixCls:r,className:o,rootClassName:i,block:a,options:s=[],size:l="middle",style:c,vertical:u,shape:d="default",name:f=n}=e,h=Sy(e,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:m,direction:v,className:g,style:y}=$r("segmented"),b=m("segmented",r),[C,x,S]=B5(b),w=jr(l),E=p.useMemo(()=>s.map(M=>{if(z5(M)){const{icon:I,label:k}=M,D=Sy(M,["icon","label"]);return Object.assign(Object.assign({},D),{label:p.createElement(p.Fragment,null,p.createElement("span",{className:`${b}-item-icon`},I),k&&p.createElement("span",null,k))})}return M}),[s,b]),N=ee(o,i,g,{[`${b}-block`]:a,[`${b}-sm`]:w==="small",[`${b}-lg`]:w==="large",[`${b}-vertical`]:u,[`${b}-shape-${d}`]:d==="round"},x,S),O=Object.assign(Object.assign({},y),c);return C(p.createElement(D5,Object.assign({},h,{name:f,className:N,style:O,options:E,ref:t,prefixCls:b,direction:v,vertical:u})))}),ZE=F5;process.env.NODE_ENV!=="production"&&(ZE.displayName="Segmented");const e$=$.createContext({}),t$=$.createContext({}),n$=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=()=>{if(r&&n&&!n.cleared){const i=n.toHsb();i.a=0;const a=or(i);a.cleared=!0,r(a)}};return $.createElement("div",{className:`${t}-clear`,onClick:o})},r$="hex",o$="rgb",i$="hsb";var H5={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"},V5=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:H5}))},a$=p.forwardRef(V5);process.env.NODE_ENV!=="production"&&(a$.displayName="UpOutlined");function Mp(){return typeof BigInt=="function"}function s$(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Bi(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"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 yg(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function Pi(e){var t=String(e);if(yg(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&Cg(t)?t.length-t.indexOf(".")-1:0}function Od(e){var t=String(e);if(yg(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Mp()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(Mp()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(Pi(t))}return Bi(t).fullStr}function Cg(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var W5=function(){function e(t){if(In(this,e),q(this,"origin",""),q(this,"negative",void 0),q(this,"integer",void 0),q(this,"decimal",void 0),q(this,"decimalLen",void 0),q(this,"empty",void 0),q(this,"nan",void 0),s$(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}var n=t;if(yg(n)&&(n=Number(n)),n=typeof n=="string"?n:Od(n),Cg(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 Tn(e,[{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 e(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,h="".concat(d).concat(f.padStart(c+1,"0"));return new e("".concat(h.slice(0,-c),".").concat(h.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=new e(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 e(n);return this.isInvalidate()||r.isInvalidate()?new e(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}}]),e}(),q5=function(){function e(t){if(In(this,e),q(this,"origin",""),q(this,"number",void 0),q(this,"empty",void 0),s$(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Tn(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=Number(n);if(Number.isNaN(r))return this;var o=this.number+r;if(o>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var i=Math.max(Pi(this.number),Pi(r));return new e(o.toFixed(i))}},{key:"multi",value:function(n){var r=Number(n);if(this.isInvalidate()||Number.isNaN(r))return new e(NaN);var o=this.number*r;if(o>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var i=Math.max(Pi(this.number),Pi(r));return new e(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()?"":Od(this.number):this.origin}}]),e}();function Fr(e){return Mp()?new W5(e):new q5(e)}function Oc(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var o=Bi(e),i=o.negativeStr,a=o.integerStr,s=o.decimalStr,l="".concat(t).concat(s),c="".concat(i).concat(a);if(n>=0){var u=Number(s[n]);if(u>=5&&!r){var d=Fr(e).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-u));return Oc(d.toString(),t,n,r)}return n===0?c:"".concat(c).concat(t).concat(s.padEnd(n,"0").slice(0,n))}return l===".0"?c:"".concat(c).concat(l)}function U5(e){return!!(e.addonBefore||e.addonAfter)}function K5(e){return!!(e.prefix||e.suffix||e.allowClear)}function xy(e,t,n){var r=t.cloneNode(!0),o=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},o}function lu(e,t,n,r){if(n){var o=t;if(t.type==="click"){o=xy(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=xy(t,e,r),n(o);return}n(o)}}function Sg(e,t){if(e){e.focus(t);var n=t||{},r=n.cursor;if(r){var o=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}}var xg=$.forwardRef(function(e,t){var n,r,o,i=e.inputElement,a=e.children,s=e.prefixCls,l=e.prefix,c=e.suffix,u=e.addonBefore,d=e.addonAfter,f=e.className,h=e.style,m=e.disabled,v=e.readOnly,g=e.focused,y=e.triggerFocus,b=e.allowClear,C=e.value,x=e.handleReset,S=e.hidden,w=e.classes,E=e.classNames,N=e.dataAttrs,O=e.styles,M=e.components,I=e.onClear,k=a??i,D=(M==null?void 0:M.affixWrapper)||"span",A=(M==null?void 0:M.groupWrapper)||"span",L=(M==null?void 0:M.wrapper)||"span",T=(M==null?void 0:M.groupAddon)||"span",R=$.useRef(null),_=function(ce){var he;(he=R.current)!==null&&he!==void 0&&he.contains(ce.target)&&(y==null||y())},V=K5(e),F=$.cloneElement(k,{value:C,className:ee((n=k.props)===null||n===void 0?void 0:n.className,!V&&(E==null?void 0:E.variant))||null}),W=$.useRef(null);if($.useImperativeHandle(t,function(){return{nativeElement:W.current||R.current}}),V){var K=null;if(b){var J=!m&&!v&&C,H="".concat(s,"-clear-icon"),X=lt(b)==="object"&&b!==null&&b!==void 0&&b.clearIcon?b.clearIcon:"✖";K=$.createElement("button",{type:"button",tabIndex:-1,onClick:function(ce){x==null||x(ce),I==null||I()},onMouseDown:function(ce){return ce.preventDefault()},className:ee(H,q(q({},"".concat(H,"-hidden"),!J),"".concat(H,"-has-suffix"),!!c))},X)}var Y="".concat(s,"-affix-wrapper"),le=ee(Y,q(q(q(q(q({},"".concat(s,"-disabled"),m),"".concat(Y,"-disabled"),m),"".concat(Y,"-focused"),g),"".concat(Y,"-readonly"),v),"".concat(Y,"-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),Q=(c||b)&&$.createElement("span",{className:ee("".concat(s,"-suffix"),E==null?void 0:E.suffix),style:O==null?void 0:O.suffix},K,c);F=$.createElement(D,De({className:le,style:O==null?void 0:O.affixWrapper,onClick:_},N==null?void 0:N.affixWrapper,{ref:R}),l&&$.createElement("span",{className:ee("".concat(s,"-prefix"),E==null?void 0:E.prefix),style:O==null?void 0:O.prefix},l),F,Q)}if(U5(e)){var fe="".concat(s,"-group"),ye="".concat(fe,"-addon"),ue="".concat(fe,"-wrapper"),ie=ee("".concat(s,"-wrapper"),fe,w==null?void 0:w.wrapper,E==null?void 0:E.wrapper),me=ee(ue,q({},"".concat(ue,"-disabled"),m),w==null?void 0:w.group,E==null?void 0:E.groupWrapper);F=$.createElement(A,{className:me,ref:W},$.createElement(L,{className:ie},u&&$.createElement(T,{className:ye},u),F,d&&$.createElement(T,{className:ye},d)))}return $.cloneElement(F,{className:ee((r=F.props)===null||r===void 0?void 0:r.className,f)||null,style:U(U({},(o=F.props)===null||o===void 0?void 0:o.style),h),hidden:S})}),G5=["show"];function l$(e,t){return p.useMemo(function(){var n={};t&&(n.show=lt(t)==="object"&&t.formatter?t.formatter:!!t),n=U(U({},n),e);var r=n,o=r.show,i=wt(r,G5);return U(U({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[e,t])}var X5=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],Y5=$.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,o=e.onFocus,i=e.onBlur,a=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,c=e.prefixCls,u=c===void 0?"rc-input":c,d=e.disabled,f=e.htmlSize,h=e.className,m=e.maxLength,v=e.suffix,g=e.showCount,y=e.count,b=e.type,C=b===void 0?"text":b,x=e.classes,S=e.classNames,w=e.styles,E=e.onCompositionStart,N=e.onCompositionEnd,O=wt(e,X5),M=$.useState(!1),I=ae(M,2),k=I[0],D=I[1],A=$.useRef(!1),L=$.useRef(!1),T=$.useRef(null),R=$.useRef(null),_=function(pe){T.current&&Sg(T.current,pe)},V=gn(e.defaultValue,{value:e.value}),F=ae(V,2),W=F[0],K=F[1],J=W==null?"":String(W),H=$.useState(null),X=ae(H,2),Y=X[0],le=X[1],Q=l$(y,g),fe=Q.max||m,ye=Q.strategy(J),ue=!!fe&&ye>fe;$.useImperativeHandle(t,function(){var se;return{focus:_,blur:function(){var $e;($e=T.current)===null||$e===void 0||$e.blur()},setSelectionRange:function($e,Me,we){var Be;(Be=T.current)===null||Be===void 0||Be.setSelectionRange($e,Me,we)},select:function(){var $e;($e=T.current)===null||$e===void 0||$e.select()},input:T.current,nativeElement:((se=R.current)===null||se===void 0?void 0:se.nativeElement)||T.current}}),$.useEffect(function(){L.current&&(L.current=!1),D(function(se){return se&&d?!1:se})},[d]);var ie=function(pe,$e,Me){var we=$e;if(!A.current&&Q.exceedFormatter&&Q.max&&Q.strategy($e)>Q.max){if(we=Q.exceedFormatter($e,{max:Q.max}),$e!==we){var Be,Fe;le([((Be=T.current)===null||Be===void 0?void 0:Be.selectionStart)||0,((Fe=T.current)===null||Fe===void 0?void 0:Fe.selectionEnd)||0])}}else if(Me.source==="compositionEnd")return;K(we),T.current&&lu(T.current,pe,r,we)};$.useEffect(function(){if(Y){var se;(se=T.current)===null||se===void 0||se.setSelectionRange.apply(se,Ie(Y))}},[Y]);var me=function(pe){ie(pe,pe.target.value,{source:"change"})},re=function(pe){A.current=!1,ie(pe,pe.currentTarget.value,{source:"compositionEnd"}),N==null||N(pe)},ce=function(pe){a&&pe.key==="Enter"&&!L.current&&(L.current=!0,a(pe)),s==null||s(pe)},he=function(pe){pe.key==="Enter"&&(L.current=!1),l==null||l(pe)},Ee=function(pe){D(!0),o==null||o(pe)},Oe=function(pe){L.current&&(L.current=!1),D(!1),i==null||i(pe)},xe=function(pe){K(""),_(),T.current&&lu(T.current,pe,r)},je=ue&&"".concat(u,"-out-of-range"),z=function(){var pe=Fn(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return $.createElement("input",De({autoComplete:n},pe,{onChange:me,onFocus:Ee,onBlur:Oe,onKeyDown:ce,onKeyUp:he,className:ee(u,q({},"".concat(u,"-disabled"),d),S==null?void 0:S.input),style:w==null?void 0:w.input,ref:T,size:f,type:C,onCompositionStart:function(Me){A.current=!0,E==null||E(Me)},onCompositionEnd:re}))},ve=function(){var pe=Number(fe)>0;if(v||Q.show){var $e=Q.showFormatter?Q.showFormatter({value:J,count:ye,maxLength:fe}):"".concat(ye).concat(pe?" / ".concat(fe):"");return $.createElement($.Fragment,null,Q.show&&$.createElement("span",{className:ee("".concat(u,"-show-count-suffix"),q({},"".concat(u,"-show-count-has-suffix"),!!v),S==null?void 0:S.count),style:U({},w==null?void 0:w.count)},$e),v)}return null};return $.createElement(xg,De({},O,{prefixCls:u,className:ee(h,je),handleReset:xe,value:J,focused:k,triggerFocus:_,suffix:ve(),disabled:d,classes:x,classNames:S,styles:w}),z())});function J5(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get:function(r,o){if(t[o])return t[o];var i=r[o];return typeof i=="function"?i.bind(r):i}}):e}function Q5(e,t){var n=$.useRef(null);function r(){try{var i=e.selectionStart,a=e.selectionEnd,s=e.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(e&&n.current&&t)try{var i=e.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)}e.setSelectionRange(u,u)}catch(h){Ct(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(h.message))}}return[r,o]}var Z5=function(){var t=$.useState(!1),n=ae(t,2),r=n[0],o=n[1];return en(function(){o(Jm())},[]),r},eV=200,tV=600;function nV(e){var t=e.prefixCls,n=e.upNode,r=e.downNode,o=e.upDisabled,i=e.downDisabled,a=e.onStep,s=p.useRef(),l=p.useRef([]),c=p.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,eV)}s.current=setTimeout(S,tV)};p.useEffect(function(){return function(){u(),l.current.forEach(function(b){return Dt.cancel(b)})}},[]);var f=Z5();if(f)return null;var h="".concat(t,"-handler"),m=ee(h,"".concat(h,"-up"),q({},"".concat(h,"-up-disabled"),o)),v=ee(h,"".concat(h,"-down"),q({},"".concat(h,"-down-disabled"),i)),g=function(){return l.current.push(Dt(u))},y={unselectable:"on",role:"button",onMouseUp:g,onMouseLeave:g};return p.createElement("div",{className:"".concat(h,"-wrap")},p.createElement("span",De({},y,{onMouseDown:function(C){d(C,!0)},"aria-label":"Increase Value","aria-disabled":o,className:m}),n||p.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),p.createElement("span",De({},y,{onMouseDown:function(C){d(C,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:v}),r||p.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function wy(e){var t=typeof e=="number"?Od(e):Bi(e).fullStr,n=t.includes(".");return n?Bi(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const rV=function(){var e=$.useRef(0),t=function(){Dt.cancel(e.current)};return $.useEffect(function(){return t},[]),function(n){t(),e.current=Dt(function(){n()})}};var oV=["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"],iV=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],Ey=function(t,n){return t||n.isEmpty()?n.toString():n.toNumber()},$y=function(t){var n=Fr(t);return n.isInvalidate()?null:n},aV=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,o=e.style,i=e.min,a=e.max,s=e.step,l=s===void 0?1:s,c=e.defaultValue,u=e.value,d=e.disabled,f=e.readOnly,h=e.upHandler,m=e.downHandler,v=e.keyboard,g=e.changeOnWheel,y=g===void 0?!1:g,b=e.controls,C=b===void 0?!0:b;e.classNames;var x=e.stringMode,S=e.parser,w=e.formatter,E=e.precision,N=e.decimalSeparator,O=e.onChange,M=e.onInput,I=e.onPressEnter,k=e.onStep,D=e.changeOnBlur,A=D===void 0?!0:D,L=e.domRef,T=wt(e,oV),R="".concat(n,"-input"),_=p.useRef(null),V=p.useState(!1),F=ae(V,2),W=F[0],K=F[1],J=p.useRef(!1),H=p.useRef(!1),X=p.useRef(!1),Y=p.useState(function(){return Fr(u??c)}),le=ae(Y,2),Q=le[0],fe=le[1];function ye(Je){u===void 0&&fe(Je)}var ue=p.useCallback(function(Je,Ve){if(!Ve)return E>=0?E:Math.max(Pi(Je),Pi(l))},[E,l]),ie=p.useCallback(function(Je){var Ve=String(Je);if(S)return S(Ve);var ct=Ve;return N&&(ct=ct.replace(N,".")),ct.replace(/[^\w.-]+/g,"")},[S,N]),me=p.useRef(""),re=p.useCallback(function(Je,Ve){if(w)return w(Je,{userTyping:Ve,input:String(me.current)});var ct=typeof Je=="number"?Od(Je):Je;if(!Ve){var at=ue(ct,Ve);if(Cg(ct)&&(N||at>=0)){var mt=N||".";ct=Oc(ct,mt,at)}}return ct},[w,ue,N]),ce=p.useState(function(){var Je=c??u;return Q.isInvalidate()&&["string","number"].includes(lt(Je))?Number.isNaN(Je)?"":Je:re(Q.toString(),!1)}),he=ae(ce,2),Ee=he[0],Oe=he[1];me.current=Ee;function xe(Je,Ve){Oe(re(Je.isInvalidate()?Je.toString(!1):Je.toString(!Ve),Ve))}var je=p.useMemo(function(){return $y(a)},[a,E]),z=p.useMemo(function(){return $y(i)},[i,E]),ve=p.useMemo(function(){return!je||!Q||Q.isInvalidate()?!1:je.lessEquals(Q)},[je,Q]),se=p.useMemo(function(){return!z||!Q||Q.isInvalidate()?!1:Q.lessEquals(z)},[z,Q]),pe=Q5(_.current,W),$e=ae(pe,2),Me=$e[0],we=$e[1],Be=function(Ve){return je&&!Ve.lessEquals(je)?je:z&&!z.lessEquals(Ve)?z:null},Fe=function(Ve){return!Be(Ve)},Re=function(Ve,ct){var at=Ve,mt=Fe(at)||at.isEmpty();if(!at.isEmpty()&&!ct&&(at=Be(at)||at,mt=!0),!f&&!d&&mt){var Ze=at.toString(),Ue=ue(Ze,ct);return Ue>=0&&(at=Fr(Oc(Ze,".",Ue)),Fe(at)||(at=Fr(Oc(Ze,".",Ue,!0)))),at.equals(Q)||(ye(at),O==null||O(at.isEmpty()?null:Ey(x,at)),u===void 0&&xe(at,ct)),at}return Q},qe=rV(),Ke=function Je(Ve){if(Me(),me.current=Ve,Oe(Ve),!H.current){var ct=ie(Ve),at=Fr(ct);at.isNaN()||Re(at,!0)}M==null||M(Ve),qe(function(){var mt=Ve;S||(mt=Ve.replace(/。/g,".")),mt!==Ve&&Je(mt)})},Pe=function(){H.current=!0},ze=function(){H.current=!1,Ke(_.current.value)},Le=function(Ve){Ke(Ve.target.value)},He=function(Ve){var ct;if(!(Ve&&ve||!Ve&&se)){J.current=!1;var at=Fr(X.current?wy(l):l);Ve||(at=at.negate());var mt=(Q||Fr(0)).add(at.toString()),Ze=Re(mt,!1);k==null||k(Ey(x,Ze),{offset:X.current?wy(l):l,type:Ve?"up":"down"}),(ct=_.current)===null||ct===void 0||ct.focus()}},et=function(Ve){var ct=Fr(ie(Ee)),at;ct.isNaN()?at=Re(Q,Ve):at=Re(ct,Ve),u!==void 0?xe(Q,!1):at.isNaN()||xe(at,!1)},pt=function(){J.current=!0},_t=function(Ve){var ct=Ve.key,at=Ve.shiftKey;J.current=!0,X.current=at,ct==="Enter"&&(H.current||(J.current=!1),et(!1),I==null||I(Ve)),v!==!1&&!H.current&&["Up","ArrowUp","Down","ArrowDown"].includes(ct)&&(He(ct==="Up"||ct==="ArrowUp"),Ve.preventDefault())},Lt=function(){J.current=!1,X.current=!1};p.useEffect(function(){if(y&&W){var Je=function(at){He(at.deltaY<0),at.preventDefault()},Ve=_.current;if(Ve)return Ve.addEventListener("wheel",Je,{passive:!1}),function(){return Ve.removeEventListener("wheel",Je)}}});var cn=function(){A&&et(!1),K(!1),J.current=!1};return Es(function(){Q.isInvalidate()||xe(Q,!1)},[E,w]),Es(function(){var Je=Fr(u);fe(Je);var Ve=Fr(ie(Ee));(!Je.equals(Ve)||!J.current||w)&&xe(Je,J.current)},[u]),Es(function(){w&&we()},[Ee]),p.createElement("div",{ref:L,className:ee(n,r,q(q(q(q(q({},"".concat(n,"-focused"),W),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),f),"".concat(n,"-not-a-number"),Q.isNaN()),"".concat(n,"-out-of-range"),!Q.isInvalidate()&&!Fe(Q))),style:o,onFocus:function(){K(!0)},onBlur:cn,onKeyDown:_t,onKeyUp:Lt,onCompositionStart:Pe,onCompositionEnd:ze,onBeforeInput:pt},C&&p.createElement(nV,{prefixCls:n,upNode:h,downNode:m,upDisabled:ve,downDisabled:se,onStep:He}),p.createElement("div",{className:"".concat(R,"-wrap")},p.createElement("input",De({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":Q.isInvalidate()?null:Q.toString(),step:l},T,{ref:dr(_,t),className:R,value:Ee,onChange:Le,disabled:d,readOnly:f}))))}),c$=p.forwardRef(function(e,t){var n=e.disabled,r=e.style,o=e.prefixCls,i=o===void 0?"rc-input-number":o,a=e.value,s=e.prefix,l=e.suffix,c=e.addonBefore,u=e.addonAfter,d=e.className,f=e.classNames,h=wt(e,iV),m=p.useRef(null),v=p.useRef(null),g=p.useRef(null),y=function(C){g.current&&Sg(g.current,C)};return p.useImperativeHandle(t,function(){return J5(g.current,{focus:y,nativeElement:m.current.nativeElement||v.current})}),p.createElement(xg,{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},p.createElement(aV,De({prefixCls:i,disabled:n,ref:g,domRef:v,className:f==null?void 0:f.input},h)))});process.env.NODE_ENV!=="production"&&(c$.displayName="InputNumber");const sV=e=>{var t;const n=(t=e.handleVisible)!==null&&t!==void 0?t:"auto",r=e.controlHeightSM-e.lineWidth*2;return Object.assign(Object.assign({},Rl(e)),{controlWidth:90,handleWidth:r,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new qt(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},Oy=(e,t)=>{let{componentCls:n,borderRadiusSM:r,borderRadiusLG:o}=e;const i=t==="lg"?o:r;return{[`&-${t}`]:{[`${n}-handler-wrap`]:{borderStartEndRadius:i,borderEndEndRadius:i},[`${n}-handler-up`]:{borderStartEndRadius:i},[`${n}-handler-down`]:{borderEndEndRadius:i}}}},lV=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:f,paddingInlineLG:h,colorTextDescription:m,motionDurationMid:v,handleHoverColor:g,handleOpacity:y,paddingInline:b,paddingBlock:C,handleBg:x,handleActiveBg:S,colorTextDisabled:w,borderRadiusSM:E,borderRadiusLG:N,controlWidth:O,handleBorderColor:M,filledHandleBg:I,lineHeightLG:k,calc:D}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ln(e)),$d(e)),{display:"inline-block",width:O,margin:0,padding:0,borderRadius:o}),LE(e,{[`${t}-handler-wrap`]:{background:x,[`${t}-handler-down`]:{borderBlockStart:`${ne(n)} ${r} ${M}`}}})),FE(e,{[`${t}-handler-wrap`]:{background:I,[`${t}-handler-down`]:{borderBlockStart:`${ne(n)} ${r} ${M}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:x}}})),WE(e,{[`${t}-handler-wrap`]:{background:x,[`${t}-handler-down`]:{borderBlockStart:`${ne(n)} ${r} ${M}`}}})),BE(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:k,borderRadius:N,[`input${t}-input`]:{height:D(s).sub(D(n).mul(2)).equal(),padding:`${ne(f)} ${ne(h)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:E,[`input${t}-input`]:{height:D(l).sub(D(n).mul(2)).equal(),padding:`${ne(d)} ${ne(u)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},Ln(e)),GE(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:N,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:E}}},jE(e)),HE(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},Ln(e)),{width:"100%",padding:`${ne(C)} ${ne(b)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${v} linear`,appearance:"textfield",fontSize:"inherit"}),qE(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:y,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${v}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
409
+ ${t}-handler-up-inner,
410
+ ${t}-handler-down-inner
411
+ `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:m,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${ne(n)} ${r} ${M}`,transition:`all ${v} linear`,"&:active":{background:S},"&:hover":{height:"60%",[`
412
+ ${t}-handler-up-inner,
413
+ ${t}-handler-down-inner
414
+ `]:{color:g}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},Qi()),{color:m,transition:`all ${v} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderEndEndRadius:o}},Oy(e,"lg")),Oy(e,"sm")),{"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[`
415
+ ${t}-handler-up-disabled,
416
+ ${t}-handler-down-disabled
417
+ `]:{cursor:"not-allowed"},[`
418
+ ${t}-handler-up-disabled:hover &-handler-up-inner,
419
+ ${t}-handler-down-disabled:hover &-handler-down-inner
420
+ `]:{color:w}})}]},cV=e=>{const{componentCls:t,paddingBlock:n,paddingInline:r,inputAffixPadding:o,controlWidth:i,borderRadiusLG:a,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:f}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${ne(n)} 0`}},$d(e)),{position:"relative",display:"inline-flex",alignItems:"center",width:i,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:a,paddingInlineStart:l,[`input${t}-input`]:{padding:`${ne(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${t}-input`]:{padding:`${ne(d)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{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 ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:e.calc(e.handleWidth).add(r).equal()}})}},uV=vn("InputNumber",e=>{const t=Vt(e,Ml(e));return[lV(t),cV(t),vl(t)]},sV,{unitless:{handleOpacity:!0}});var dV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const u$=p.forwardRef((e,t)=>{if(process.env.NODE_ENV!=="production"){const Q=rn("InputNumber");Q.deprecated(!("bordered"in e),"bordered","variant"),Q(!(e.type==="number"&&e.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}=p.useContext(It),o=p.useRef(null);p.useImperativeHandle(t,()=>o.current);const{className:i,rootClassName:a,size:s,disabled:l,prefixCls:c,addonBefore:u,addonAfter:d,prefix:f,suffix:h,bordered:m,readOnly:v,status:g,controls:y,variant:b}=e,C=dV(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),x=n("input-number",c),S=Qr(x),[w,E,N]=uV(x,S),{compactSize:O,compactItemClassnames:M}=bi(x,r);let I=p.createElement(a$,{className:`${x}-handler-up-inner`}),k=p.createElement(ig,{className:`${x}-handler-down-inner`});const D=typeof y=="boolean"?y:void 0;typeof y=="object"&&(I=typeof y.upIcon>"u"?I:p.createElement("span",{className:`${x}-handler-up-inner`},y.upIcon),k=typeof y.downIcon>"u"?k:p.createElement("span",{className:`${x}-handler-down-inner`},y.downIcon));const{hasFeedback:A,status:L,isFormItemInput:T,feedbackIcon:R}=p.useContext(Er),_=El(L,g),V=jr(Q=>{var fe;return(fe=s??O)!==null&&fe!==void 0?fe:Q}),F=p.useContext(_r),W=l??F,[K,J]=yd("inputNumber",b,m),H=A&&p.createElement(p.Fragment,null,R),X=ee({[`${x}-lg`]:V==="large",[`${x}-sm`]:V==="small",[`${x}-rtl`]:r==="rtl",[`${x}-in-form-item`]:T},E),Y=`${x}-group`,le=p.createElement(c$,Object.assign({ref:o,disabled:W,className:ee(N,S,i,a,M),upHandler:I,downHandler:k,prefixCls:x,readOnly:v,controls:D,prefix:f,suffix:H||h,addonBefore:u&&p.createElement(di,{form:!0,space:!0},u),addonAfter:d&&p.createElement(di,{form:!0,space:!0},d),classNames:{input:X,variant:ee({[`${x}-${K}`]:J},Gi(x,_,A)),affixWrapper:ee({[`${x}-affix-wrapper-sm`]:V==="small",[`${x}-affix-wrapper-lg`]:V==="large",[`${x}-affix-wrapper-rtl`]:r==="rtl",[`${x}-affix-wrapper-without-controls`]:y===!1||W},E),wrapper:ee({[`${Y}-rtl`]:r==="rtl"},E),groupWrapper:ee({[`${x}-group-wrapper-sm`]:V==="small",[`${x}-group-wrapper-lg`]:V==="large",[`${x}-group-wrapper-rtl`]:r==="rtl",[`${x}-group-wrapper-${K}`]:J},Gi(`${x}-group-wrapper`,_,A),E)}},C));return w(le)}),wg=u$,fV=e=>p.createElement(mo,{theme:{components:{InputNumber:{handleVisible:!0}}}},p.createElement(u$,Object.assign({},e)));process.env.NODE_ENV!=="production"&&(wg.displayName="InputNumber");wg._InternalPanelDoNotUseOrYouWillBeFired=fV;const zi=e=>{let{prefixCls:t,min:n=0,max:r=100,value:o,onChange:i,className:a,formatter:s}=e;const l=`${t}-steppers`,[c,u]=$.useState(o);return $.useEffect(()=>{Number.isNaN(o)||u(o)},[o]),$.createElement(wg,{className:ee(l,a),min:n,max:r,value:c,formatter:s,size:"small",onChange:d=>{o||u(d||0),i==null||i(d)}})},hV=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=`${t}-alpha-input`,[i,a]=$.useState(or(n||"#000"));$.useEffect(()=>{n&&a(n)},[n]);const s=l=>{const c=i.toHsb();c.a=(l||0)/100;const u=or(c);n||a(u),r==null||r(u)};return $.createElement(zi,{value:qm(i),prefixCls:t,formatter:l=>`${l}%`,className:o,onChange:s})},d$=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:$.createElement(od,null)}),t};function f$(e,t){const n=$.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;!((o=e.current)===null||o===void 0)&&o.input&&((i=e.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((a=e.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=e.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return $.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[]),r}function pV(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var mV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Ya=$.forwardRef((e,t)=>{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:h,style:m,styles:v,rootClassName:g,onChange:y,classNames:b,variant:C}=e,x=mV(e,["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:xe}=rn("Input");xe(!("bordered"in e),"bordered","variant")}const{getPrefixCls:S,direction:w,allowClear:E,autoComplete:N,className:O,style:M,classNames:I,styles:k}=$r("input"),D=S("input",n),A=$.useRef(null),L=Qr(D),[T,R,_]=XE(D,g),[V]=YE(D,L),{compactSize:F,compactItemClassnames:W}=bi(D,w),K=jr(xe=>{var je;return(je=i??F)!==null&&je!==void 0?je:xe}),J=$.useContext(_r),H=a??J,{status:X,hasFeedback:Y,feedbackIcon:le}=$.useContext(Er),Q=El(X,o),fe=pV(e)||!!Y,ye=$.useRef(fe);if(process.env.NODE_ENV!=="production"){const xe=rn("Input");$.useEffect(()=>{var je;fe&&!ye.current&&process.env.NODE_ENV!=="production"&&xe(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"),ye.current=fe},[fe])}const ue=f$(A,!0),ie=xe=>{ue(),s==null||s(xe)},me=xe=>{ue(),l==null||l(xe)},re=xe=>{ue(),y==null||y(xe)},ce=(Y||c)&&$.createElement($.Fragment,null,c,Y&&le),he=d$(u??E),[Ee,Oe]=yd("input",C,r);return T(V($.createElement(Y5,Object.assign({ref:dr(t,A),prefixCls:D,autoComplete:N},x,{disabled:H,onBlur:ie,onFocus:me,style:Object.assign(Object.assign({},M),m),styles:Object.assign(Object.assign({},k),v),suffix:ce,allowClear:he,className:ee(h,g,_,L,W,O),onChange:re,addonBefore:f&&$.createElement(di,{form:!0,space:!0},f),addonAfter:d&&$.createElement(di,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},b),I),{input:ee({[`${D}-sm`]:K==="small",[`${D}-lg`]:K==="large",[`${D}-rtl`]:w==="rtl"},b==null?void 0:b.input,I.input,R),variant:ee({[`${D}-${Ee}`]:Oe},Gi(D,Q)),affixWrapper:ee({[`${D}-affix-wrapper-sm`]:K==="small",[`${D}-affix-wrapper-lg`]:K==="large",[`${D}-affix-wrapper-rtl`]:w==="rtl"},R),wrapper:ee({[`${D}-group-rtl`]:w==="rtl"},R),groupWrapper:ee({[`${D}-group-wrapper-sm`]:K==="small",[`${D}-group-wrapper-lg`]:K==="large",[`${D}-group-wrapper-rtl`]:w==="rtl",[`${D}-group-wrapper-${Ee}`]:Oe},Gi(`${D}-group-wrapper`,Q,Y),R)})}))))});process.env.NODE_ENV!=="production"&&(Ya.displayName="Input");const gV=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,vV=e=>gV.test(`#${e}`),bV=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=`${t}-hex-input`,[i,a]=$.useState(()=>n?gs(n.toHexString()):void 0);$.useEffect(()=>{n&&a(gs(n.toHexString()))},[n]);const s=l=>{const c=l.target.value;a(gs(c)),vV(gs(c,!0))&&(r==null||r(or(c)))};return $.createElement(Ya,{className:o,value:i,prefix:"#",onChange:s,size:"small"})},yV=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=`${t}-hsb-input`,[i,a]=$.useState(or(n||"#000"));$.useEffect(()=>{n&&a(n)},[n]);const s=(l,c)=>{const u=i.toHsb();u[c]=c==="h"?l:(l||0)/100;const d=or(u);n||a(d),r==null||r(d)};return $.createElement("div",{className:o},$.createElement(zi,{max:360,min:0,value:Number(i.toHsb().h),prefixCls:t,className:o,formatter:l=>xc(l||0).toString(),onChange:l=>s(Number(l),"h")}),$.createElement(zi,{max:100,min:0,value:Number(i.toHsb().s)*100,prefixCls:t,className:o,formatter:l=>`${xc(l||0)}%`,onChange:l=>s(Number(l),"s")}),$.createElement(zi,{max:100,min:0,value:Number(i.toHsb().b)*100,prefixCls:t,className:o,formatter:l=>`${xc(l||0)}%`,onChange:l=>s(Number(l),"b")}))},CV=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=`${t}-rgb-input`,[i,a]=$.useState(or(n||"#000"));$.useEffect(()=>{n&&a(n)},[n]);const s=(l,c)=>{const u=i.toRgb();u[c]=l||0;const d=or(u);n||a(d),r==null||r(d)};return $.createElement("div",{className:o},$.createElement(zi,{max:255,min:0,value:Number(i.toRgb().r),prefixCls:t,className:o,onChange:l=>s(Number(l),"r")}),$.createElement(zi,{max:255,min:0,value:Number(i.toRgb().g),prefixCls:t,className:o,onChange:l=>s(Number(l),"g")}),$.createElement(zi,{max:255,min:0,value:Number(i.toRgb().b),prefixCls:t,className:o,onChange:l=>s(Number(l),"b")}))},SV=[r$,i$,o$].map(e=>({value:e,label:e.toUpperCase()})),xV=e=>{const{prefixCls:t,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:a,disabledFormat:s}=e,[l,c]=gn(r$,{value:n,onChange:i}),u=`${t}-input`,d=h=>{c(h)},f=$.useMemo(()=>{const h={value:r,prefixCls:t,onChange:a};switch(l){case i$:return $.createElement(yV,Object.assign({},h));case o$:return $.createElement(CV,Object.assign({},h));default:return $.createElement(bV,Object.assign({},h))}},[l,t,r,a]);return $.createElement("div",{className:`${u}-container`},!s&&$.createElement(To,{value:l,variant:"borderless",getPopupContainer:h=>h,popupMatchSelectWidth:68,placement:"bottomRight",onChange:d,className:`${t}-format-select`,size:"small",options:SV}),$.createElement("div",{className:u},f),!o&&$.createElement(hV,{prefixCls:t,value:r,onChange:a}))};function Rp(e,t,n){return(e-t)/(n-t)}function Eg(e,t,n,r){var o=Rp(t,n,r),i={};switch(e){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 Oi(e,t){return Array.isArray(e)?e[t]:e}var ta=p.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),h$=p.createContext({}),wV=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],Ip=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.value,o=e.valueIndex,i=e.onStartMove,a=e.onDelete,s=e.style,l=e.render,c=e.dragging,u=e.draggingDelete,d=e.onOffsetChange,f=e.onChangeComplete,h=e.onFocus,m=e.onMouseEnter,v=wt(e,wV),g=p.useContext(ta),y=g.min,b=g.max,C=g.direction,x=g.disabled,S=g.keyboard,w=g.range,E=g.tabIndex,N=g.ariaLabelForHandle,O=g.ariaLabelledByForHandle,M=g.ariaRequired,I=g.ariaValueTextFormatterForHandle,k=g.styles,D=g.classNames,A="".concat(n,"-handle"),L=function(X){x||i(X,o)},T=function(X){h==null||h(X,o)},R=function(X){m(X,o)},_=function(X){if(!x&&S){var Y=null;switch(X.which||X.keyCode){case Qe.LEFT:Y=C==="ltr"||C==="btt"?-1:1;break;case Qe.RIGHT:Y=C==="ltr"||C==="btt"?1:-1;break;case Qe.UP:Y=C!=="ttb"?1:-1;break;case Qe.DOWN:Y=C!=="ttb"?-1:1;break;case Qe.HOME:Y="min";break;case Qe.END:Y="max";break;case Qe.PAGE_UP:Y=2;break;case Qe.PAGE_DOWN:Y=-2;break;case Qe.BACKSPACE:case Qe.DELETE:a(o);break}Y!==null&&(X.preventDefault(),d(Y,o))}},V=function(X){switch(X.which||X.keyCode){case Qe.LEFT:case Qe.RIGHT:case Qe.UP:case Qe.DOWN:case Qe.HOME:case Qe.END:case Qe.PAGE_UP:case Qe.PAGE_DOWN:f==null||f();break}},F=Eg(C,r,y,b),W={};if(o!==null){var K;W={tabIndex:x?null:Oi(E,o),role:"slider","aria-valuemin":y,"aria-valuemax":b,"aria-valuenow":r,"aria-disabled":x,"aria-label":Oi(N,o),"aria-labelledby":Oi(O,o),"aria-required":Oi(M,o),"aria-valuetext":(K=Oi(I,o))===null||K===void 0?void 0:K(r),"aria-orientation":C==="ltr"||C==="rtl"?"horizontal":"vertical",onMouseDown:L,onTouchStart:L,onFocus:T,onMouseEnter:R,onKeyDown:_,onKeyUp:V}}var J=p.createElement("div",De({ref:t,className:ee(A,q(q(q({},"".concat(A,"-").concat(o+1),o!==null&&w),"".concat(A,"-dragging"),c),"".concat(A,"-dragging-delete"),u),D.handle),style:U(U(U({},F),s),k.handle)},W,v));return l&&(J=l(J,{index:o,prefixCls:n,value:r,dragging:c,draggingDelete:u})),J});process.env.NODE_ENV!=="production"&&(Ip.displayName="Handle");var EV=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],p$=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.activeHandleRender,c=e.draggingIndex,u=e.draggingDelete,d=e.onFocus,f=wt(e,EV),h=p.useRef({}),m=p.useState(!1),v=ae(m,2),g=v[0],y=v[1],b=p.useState(-1),C=ae(b,2),x=C[0],S=C[1],w=function(I){S(I),y(!0)},E=function(I,k){w(k),d==null||d(I)},N=function(I,k){w(k)};p.useImperativeHandle(t,function(){return{focus:function(I){var k;(k=h.current[I])===null||k===void 0||k.focus()},hideHelp:function(){kr.flushSync(function(){y(!1)})}}});var O=U({prefixCls:n,onStartMove:o,onOffsetChange:i,render:s,onFocus:E,onMouseEnter:N},f);return p.createElement(p.Fragment,null,a.map(function(M,I){var k=c===I;return p.createElement(Ip,De({ref:function(A){A?h.current[I]=A:delete h.current[I]},dragging:k,draggingDelete:k&&u,style:Oi(r,I),key:I,value:M,valueIndex:I},O))}),l&&g&&p.createElement(Ip,De({key:"a11y"},O,{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"&&(p$.displayName="Handles");var $V=function(t){var n=t.prefixCls,r=t.style,o=t.children,i=t.value,a=t.onClick,s=p.useContext(ta),l=s.min,c=s.max,u=s.direction,d=s.includedStart,f=s.includedEnd,h=s.included,m="".concat(n,"-text"),v=Eg(u,i,l,c);return p.createElement("span",{className:ee(m,q({},"".concat(m,"-active"),h&&d<=i&&i<=f)),style:U(U({},v),r),onMouseDown:function(y){y.stopPropagation()},onClick:function(){a(i)}},o)},OV=function(t){var n=t.prefixCls,r=t.marks,o=t.onClick,i="".concat(n,"-mark");return r.length?p.createElement("div",{className:i},r.map(function(a){var s=a.value,l=a.style,c=a.label;return p.createElement($V,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},NV=function(t){var n=t.prefixCls,r=t.value,o=t.style,i=t.activeStyle,a=p.useContext(ta),s=a.min,l=a.max,c=a.direction,u=a.included,d=a.includedStart,f=a.includedEnd,h="".concat(n,"-dot"),m=u&&d<=r&&r<=f,v=U(U({},Eg(c,r,s,l)),typeof o=="function"?o(r):o);return m&&(v=U(U({},v),typeof i=="function"?i(r):i)),p.createElement("span",{className:ee(h,q({},"".concat(h,"-active"),m)),style:v})},MV=function(t){var n=t.prefixCls,r=t.marks,o=t.dots,i=t.style,a=t.activeStyle,s=p.useContext(ta),l=s.min,c=s.max,u=s.step,d=p.useMemo(function(){var f=new Set;if(r.forEach(function(m){f.add(m.value)}),o&&u!==null)for(var h=l;h<=c;)f.add(h),h+=u;return Array.from(f)},[l,c,u,o,r]);return p.createElement("div",{className:"".concat(n,"-step")},d.map(function(f){return p.createElement(NV,{prefixCls:n,key:f,value:f,style:i,activeStyle:a})}))},Ny=function(t){var n=t.prefixCls,r=t.style,o=t.start,i=t.end,a=t.index,s=t.onStartMove,l=t.replaceCls,c=p.useContext(ta),u=c.direction,d=c.min,f=c.max,h=c.disabled,m=c.range,v=c.classNames,g="".concat(n,"-track"),y=Rp(o,d,f),b=Rp(i,d,f),C=function(E){!h&&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||ee(g,q(q({},"".concat(g,"-").concat(a+1),a!==null&&m),"".concat(n,"-track-draggable"),s),v.track);return p.createElement("div",{className:S,style:U(U({},x),r),onMouseDown:C,onTouchStart:C})},RV=function(t){var n=t.prefixCls,r=t.style,o=t.values,i=t.startPoint,a=t.onStartMove,s=p.useContext(ta),l=s.included,c=s.range,u=s.min,d=s.styles,f=s.classNames,h=p.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=h!=null&&h.length&&(f.tracks||d.tracks)?p.createElement(Ny,{index:null,prefixCls:n,start:h[0].start,end:h[h.length-1].end,replaceCls:ee(f.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return p.createElement(p.Fragment,null,m,h.map(function(v,g){var y=v.start,b=v.end;return p.createElement(Ny,{index:g,prefixCls:n,style:U(U({},Oi(r,g)),d.track),start:y,end:b,key:g,onStartMove:a})}))},IV=130;function My(e){var t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function TV(e,t,n,r,o,i,a,s,l,c,u){var d=p.useState(null),f=ae(d,2),h=f[0],m=f[1],v=p.useState(-1),g=ae(v,2),y=g[0],b=g[1],C=p.useState(!1),x=ae(C,2),S=x[0],w=x[1],E=p.useState(n),N=ae(E,2),O=N[0],M=N[1],I=p.useState(n),k=ae(I,2),D=k[0],A=k[1],L=p.useRef(null),T=p.useRef(null),R=p.useRef(null),_=p.useContext(h$),V=_.onDragStart,F=_.onDragChange;en(function(){y===-1&&M(n)},[n,y]),p.useEffect(function(){return function(){document.removeEventListener("mousemove",L.current),document.removeEventListener("mouseup",T.current),R.current&&(R.current.removeEventListener("touchmove",L.current),R.current.removeEventListener("touchend",T.current))}},[]);var W=function(Y,le,Q){le!==void 0&&m(le),M(Y);var fe=Y;Q&&(fe=Y.filter(function(ye,ue){return ue!==y})),a(fe),F&&F({rawValues:Y,deleteIndex:Q?y:-1,draggingIndex:y,draggingValue:le})},K=Ut(function(X,Y,le){if(X===-1){var Q=D[0],fe=D[D.length-1],ye=r-Q,ue=o-fe,ie=Y*(o-r);ie=Math.max(ie,ye),ie=Math.min(ie,ue);var me=i(Q+ie);ie=me-Q;var re=D.map(function(Oe){return Oe+ie});W(re)}else{var ce=(o-r)*Y,he=Ie(O);he[X]=D[X];var Ee=l(he,ce,X,"dist");W(Ee.values,Ee.value,le)}}),J=function(Y,le,Q){Y.stopPropagation();var fe=Q||n,ye=fe[le];b(le),m(ye),A(fe),M(fe),w(!1);var ue=My(Y),ie=ue.pageX,me=ue.pageY,re=!1;V&&V({rawValues:fe,draggingIndex:le,draggingValue:ye});var ce=function(Oe){Oe.preventDefault();var xe=My(Oe),je=xe.pageX,z=xe.pageY,ve=je-ie,se=z-me,pe=e.current.getBoundingClientRect(),$e=pe.width,Me=pe.height,we,Be;switch(t){case"btt":we=-se/Me,Be=ve;break;case"ttb":we=se/Me,Be=ve;break;case"rtl":we=-ve/$e,Be=se;break;default:we=ve/$e,Be=se}re=c?Math.abs(Be)>IV&&u<O.length:!1,w(re),K(le,we,re)},he=function Ee(Oe){Oe.preventDefault(),document.removeEventListener("mouseup",Ee),document.removeEventListener("mousemove",ce),R.current&&(R.current.removeEventListener("touchmove",L.current),R.current.removeEventListener("touchend",T.current)),L.current=null,T.current=null,R.current=null,s(re),b(-1),w(!1)};document.addEventListener("mouseup",he),document.addEventListener("mousemove",ce),Y.currentTarget.addEventListener("touchend",he),Y.currentTarget.addEventListener("touchmove",ce),L.current=ce,T.current=he,R.current=Y.currentTarget},H=p.useMemo(function(){var X=Ie(n).sort(function(ye,ue){return ye-ue}),Y=Ie(O).sort(function(ye,ue){return ye-ue}),le={};Y.forEach(function(ye){le[ye]=(le[ye]||0)+1}),X.forEach(function(ye){le[ye]=(le[ye]||0)-1});var Q=c?1:0,fe=Object.values(le).reduce(function(ye,ue){return ye+Math.abs(ue)},0);return fe<=Q?O:n},[n,O,c]);return[y,h,S,H,J]}function PV(e,t,n,r,o,i){var a=p.useCallback(function(h){return Math.max(e,Math.min(t,h))},[e,t]),s=p.useCallback(function(h){if(n!==null){var m=e+Math.round((a(h)-e)/n)*n,v=function(C){return(String(C).split(".")[1]||"").length},g=Math.max(v(n),v(t),v(e)),y=Number(m.toFixed(g));return e<=y&&y<=t?y:null}return null},[n,e,t,a]),l=p.useCallback(function(h){var m=a(h),v=r.map(function(b){return b.value});n!==null&&v.push(s(h)),v.push(e,t);var g=v[0],y=t-e;return v.forEach(function(b){var C=Math.abs(m-b);C<=y&&(g=b,y=C)}),g},[e,t,r,n,a,s]),c=function h(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(M){S.push(M.value)}),S.push(e,t),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(M){return M!==null}).filter(function(M){return v<0?M<=C:M>=C}),y==="unit"&&(S=S.filter(function(M){return M!==C}));var E=y==="unit"?C:x;b=S[0];var N=Math.abs(b-E);if(S.forEach(function(M){var I=Math.abs(M-E);I<N&&(b=M,N=I)}),b===void 0)return v<0?e:t;if(y==="dist")return b;if(Math.abs(v)>1){var O=Ie(m);return O[g]=b,h(O,v-w,g,y)}return b}else{if(v==="min")return e;if(v==="max")return t}},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 N=u(b,1,w);b[w]=N.value,E=N.changed}for(var O=g;O>0;O-=1)for(var M=!0;d(b[O]-b[O-1])&&M;){var I=u(b,-1,O-1);b[O-1]=I.value,M=I.changed}for(var k=b.length-1;k>0;k-=1)for(var D=!0;d(b[k]-b[k-1])&&D;){var A=u(b,-1,k-1);b[k-1]=A.value,D=A.changed}for(var L=0;L<b.length-1;L+=1)for(var T=!0;d(b[L+1]-b[L])&&T;){var R=u(b,1,L+1);b[L+1]=R.value,T=R.changed}}return{value:b[g],values:b}};return[l,f]}function AV(e){return $.useMemo(function(){if(e===!0||!e)return[!!e,!1,!1,0];var t=e.editable,n=e.draggableTrack,r=e.minCount,o=e.maxCount;return process.env.NODE_ENV!=="production"&&fo(!t||!n,"`editable` can not work with `draggableTrack`."),[!0,t,!t&&n,r||0,o]},[e])}var m$=p.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-slider":n,o=e.className,i=e.style,a=e.classNames,s=e.styles,l=e.id,c=e.disabled,u=c===void 0?!1:c,d=e.keyboard,f=d===void 0?!0:d,h=e.autoFocus,m=e.onFocus,v=e.onBlur,g=e.min,y=g===void 0?0:g,b=e.max,C=b===void 0?100:b,x=e.step,S=x===void 0?1:x,w=e.value,E=e.defaultValue,N=e.range,O=e.count,M=e.onChange,I=e.onBeforeChange,k=e.onAfterChange,D=e.onChangeComplete,A=e.allowCross,L=A===void 0?!0:A,T=e.pushable,R=T===void 0?!1:T,_=e.reverse,V=e.vertical,F=e.included,W=F===void 0?!0:F,K=e.startPoint,J=e.trackStyle,H=e.handleStyle,X=e.railStyle,Y=e.dotStyle,le=e.activeDotStyle,Q=e.marks,fe=e.dots,ye=e.handleRender,ue=e.activeHandleRender,ie=e.track,me=e.tabIndex,re=me===void 0?0:me,ce=e.ariaLabelForHandle,he=e.ariaLabelledByForHandle,Ee=e.ariaRequired,Oe=e.ariaValueTextFormatterForHandle,xe=p.useRef(null),je=p.useRef(null),z=p.useMemo(function(){return V?_?"ttb":"btt":_?"rtl":"ltr"},[_,V]),ve=AV(N),se=ae(ve,5),pe=se[0],$e=se[1],Me=se[2],we=se[3],Be=se[4],Fe=p.useMemo(function(){return isFinite(y)?y:0},[y]),Re=p.useMemo(function(){return isFinite(C)?C:100},[C]),qe=p.useMemo(function(){return S!==null&&S<=0?1:S},[S]),Ke=p.useMemo(function(){return typeof R=="boolean"?R?qe:!1:R>=0?R:!1},[R,qe]),Pe=p.useMemo(function(){return Object.keys(Q||{}).map(function(Ye){var Ae=Q[Ye],ht={value:Number(Ye)};return Ae&&lt(Ae)==="object"&&!p.isValidElement(Ae)&&("label"in Ae||"style"in Ae)?(ht.style=Ae.style,ht.label=Ae.label):ht.label=Ae,ht}).filter(function(Ye){var Ae=Ye.label;return Ae||typeof Ae=="number"}).sort(function(Ye,Ae){return Ye.value-Ae.value})},[Q]),ze=PV(Fe,Re,qe,Pe,L,Ke),Le=ae(ze,2),He=Le[0],et=Le[1],pt=gn(E,{value:w}),_t=ae(pt,2),Lt=_t[0],cn=_t[1],Je=p.useMemo(function(){var Ye=Lt==null?[]:Array.isArray(Lt)?Lt:[Lt],Ae=ae(Ye,1),ht=Ae[0],Ot=ht===void 0?Fe:ht,Mt=Lt===null?[]:[Ot];if(pe){if(Mt=Ie(Ye),O||Lt===void 0){var dn=O>=0?O+1:2;for(Mt=Mt.slice(0,dn);Mt.length<dn;){var on;Mt.push((on=Mt[Mt.length-1])!==null&&on!==void 0?on:Fe)}}Mt.sort(function(bn,fn){return bn-fn})}return Mt.forEach(function(bn,fn){Mt[fn]=He(bn)}),Mt},[Lt,pe,Fe,O,He]),Ve=function(Ae){return pe?Ae:Ae[0]},ct=Ut(function(Ye){var Ae=Ie(Ye).sort(function(ht,Ot){return ht-Ot});M&&!Da(Ae,Je,!0)&&M(Ve(Ae)),cn(Ae)}),at=Ut(function(Ye){Ye&&xe.current.hideHelp();var Ae=Ve(Je);k==null||k(Ae),Ct(!k,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),D==null||D(Ae)}),mt=function(Ae){if(!(u||!$e||Je.length<=we)){var ht=Ie(Je);ht.splice(Ae,1),I==null||I(Ve(ht)),ct(ht);var Ot=Math.max(0,Ae-1);xe.current.hideHelp(),xe.current.focus(Ot)}},Ze=TV(je,z,Je,Fe,Re,He,ct,at,et,$e,we),Ue=ae(Ze,5),Ge=Ue[0],Et=Ue[1],Tt=Ue[2],tt=Ue[3],We=Ue[4],it=function(Ae,ht){if(!u){var Ot=Ie(Je),Mt=0,dn=0,on=Re-Fe;Je.forEach(function(Bn,P){var G=Math.abs(Ae-Bn);G<=on&&(on=G,Mt=P),Bn<Ae&&(dn=P)});var bn=Mt;$e&&on!==0&&(!Be||Je.length<Be)?(Ot.splice(dn+1,0,Ae),bn=dn+1):Ot[Mt]=Ae,pe&&!Je.length&&O===void 0&&Ot.push(Ae);var fn=Ve(Ot);if(I==null||I(fn),ct(Ot),ht){var an,Pn;(an=document.activeElement)===null||an===void 0||(Pn=an.blur)===null||Pn===void 0||Pn.call(an),xe.current.focus(bn),We(ht,bn,Ot)}else k==null||k(fn),Ct(!k,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),D==null||D(fn)}},st=function(Ae){Ae.preventDefault();var ht=je.current.getBoundingClientRect(),Ot=ht.width,Mt=ht.height,dn=ht.left,on=ht.top,bn=ht.bottom,fn=ht.right,an=Ae.clientX,Pn=Ae.clientY,Bn;switch(z){case"btt":Bn=(bn-Pn)/Mt;break;case"ttb":Bn=(Pn-on)/Mt;break;case"rtl":Bn=(fn-an)/Ot;break;default:Bn=(an-dn)/Ot}var P=Fe+Bn*(Re-Fe);it(He(P),Ae)},rt=p.useState(null),ft=ae(rt,2),jt=ft[0],Nt=ft[1],Jt=function(Ae,ht){if(!u){var Ot=et(Je,Ae,ht);I==null||I(Ve(Je)),ct(Ot.values),Nt(Ot.value)}};p.useEffect(function(){if(jt!==null){var Ye=Je.indexOf(jt);Ye>=0&&xe.current.focus(Ye)}Nt(null)},[jt]);var At=p.useMemo(function(){return Me&&qe===null?(process.env.NODE_ENV!=="production"&&Ct(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):Me},[Me,qe]),zt=Ut(function(Ye,Ae){We(Ye,Ae),I==null||I(Ve(Je))}),Wt=Ge!==-1;p.useEffect(function(){if(!Wt){var Ye=Je.lastIndexOf(Et);xe.current.focus(Ye)}},[Wt]);var Qt=p.useMemo(function(){return Ie(tt).sort(function(Ye,Ae){return Ye-Ae})},[tt]),jn=p.useMemo(function(){return pe?[Qt[0],Qt[Qt.length-1]]:[Fe,Qt[0]]},[Qt,pe,Fe]),Zt=ae(jn,2),un=Zt[0],_e=Zt[1];p.useImperativeHandle(t,function(){return{focus:function(){xe.current.focus(0)},blur:function(){var Ae,ht=document,Ot=ht.activeElement;(Ae=je.current)!==null&&Ae!==void 0&&Ae.contains(Ot)&&(Ot==null||Ot.blur())}}}),p.useEffect(function(){h&&xe.current.focus(0)},[]);var ot=p.useMemo(function(){return{min:Fe,max:Re,direction:z,disabled:u,keyboard:f,step:qe,included:W,includedStart:un,includedEnd:_e,range:pe,tabIndex:re,ariaLabelForHandle:ce,ariaLabelledByForHandle:he,ariaRequired:Ee,ariaValueTextFormatterForHandle:Oe,styles:s||{},classNames:a||{}}},[Fe,Re,z,u,f,qe,W,un,_e,pe,re,ce,he,Ee,Oe,s,a]);return p.createElement(ta.Provider,{value:ot},p.createElement("div",{ref:je,className:ee(r,o,q(q(q(q({},"".concat(r,"-disabled"),u),"".concat(r,"-vertical"),V),"".concat(r,"-horizontal"),!V),"".concat(r,"-with-marks"),Pe.length)),style:i,onMouseDown:st,id:l},p.createElement("div",{className:ee("".concat(r,"-rail"),a==null?void 0:a.rail),style:U(U({},X),s==null?void 0:s.rail)}),ie!==!1&&p.createElement(RV,{prefixCls:r,style:J,values:Je,startPoint:K,onStartMove:At?zt:void 0}),p.createElement(MV,{prefixCls:r,marks:Pe,dots:fe,style:Y,activeStyle:le}),p.createElement(p$,{ref:xe,prefixCls:r,style:H,values:tt,draggingIndex:Ge,draggingDelete:Tt,onStartMove:zt,onOffsetChange:Jt,onFocus:m,onBlur:v,handleRender:ye,activeHandleRender:ue,onChangeComplete:at,onDelete:$e?mt:void 0}),p.createElement(OV,{prefixCls:r,marks:Pe,onClick:it})))});process.env.NODE_ENV!=="production"&&(m$.displayName="Slider");const g$=$.createContext({}),Tp=p.forwardRef((e,t)=>{const{open:n,draggingDelete:r}=e,o=$.useRef(null),i=n&&!r,a=$.useRef(null);function s(){Dt.cancel(a.current),a.current=null}function l(){a.current=Dt(()=>{var c;(c=o.current)===null||c===void 0||c.forceAlign(),a.current=null})}return p.useEffect(()=>(i?l():s(),s),[i,e.title]),p.createElement(Cn,Object.assign({ref:dr(o,t)},e,{open:i}))});process.env.NODE_ENV!=="production"&&(Tp.displayName="SliderTooltip");const kV=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:h,handleLineWidth:m,handleLineWidthHover:v,motionDurationMid:g}=e;return{[t]:Object.assign(Object.assign({},Ln(e)),{position:"relative",height:r,margin:`${ne(a)} ${ne(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${ne(i)} ${ne(a)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${g}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${g}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${ne(m)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-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:e.colorBgElevated,boxShadow:`0 0 0 ${ne(m)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
421
+ inset-inline-start ${g},
422
+ inset-block-start ${g},
423
+ width ${g},
424
+ height ${g},
425
+ box-shadow ${g},
426
+ outline ${g}
427
+ `},"&: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 ${ne(v)} ${f}`,outline:`6px solid ${h}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:"none"}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:e.colorBgElevated,border:`${ne(m)} solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[`
428
+ ${t}-dot
429
+ `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${ne(m)} ${l}`,insetInlineStart:0,insetBlockStart:0},[`
430
+ ${t}-mark-text,
431
+ ${t}-dot
432
+ `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},v$=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:a,calc:s}=e,l=t?"paddingBlock":"paddingInline",c=t?"width":"height",u=t?"height":"width",d=t?"insetBlockStart":"insetInlineStart",f=t?"top":"insetInlineStart",h=s(r).mul(3).sub(o).div(2).equal(),m=s(o).sub(r).div(2).equal(),v=t?{borderWidth:`${ne(m)} 0`,transform:`translateY(${ne(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${ne(m)}`,transform:`translateX(${ne(e.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]:h},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(t?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()}}},DV=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},v$(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},_V=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},v$(e,!1)),{height:"100%"})}},LV=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,o=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,s=new qt(a).setA(.2).toRgbString();return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:s,handleColorDisabled:new qt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},jV=vn("Slider",e=>{const t=Vt(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[kV(t),DV(t),_V(t)]},LV);function Lf(){const[e,t]=p.useState(!1),n=p.useRef(null),r=()=>{Dt.cancel(n.current)},o=i=>{r(),i?t(i):n.current=Dt(()=>{t(i)})};return p.useEffect(()=>r,[]),[e,o]}var BV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function zV(e,t){return e||e===null?e:t||t===null?t:n=>typeof n=="number"?n.toString():""}const b$=$.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:o,rootClassName:i,style:a,disabled:s,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:f,tooltip:h={},onChangeComplete:m,classNames:v,styles:g}=e,y=BV(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:b}=e,{getPrefixCls:C,direction:x,className:S,style:w,classNames:E,styles:N,getPopupContainer:O}=$r("slider"),M=$.useContext(_r),I=s??M,{handleRender:k,direction:D}=$.useContext(g$),L=(D||x)==="rtl",[T,R]=Lf(),[_,V]=Lf(),F=Object.assign({},h),{open:W,placement:K,getPopupContainer:J,prefixCls:H,formatter:X}=F,Y=W??u,le=(T||_)&&Y!==!1,Q=zV(X,c),[fe,ye]=Lf(),ue=pe=>{m==null||m(pe),ye(!1)},ie=(pe,$e)=>pe||($e?L?"left":"right":"top"),me=C("slider",n),[re,ce,he]=jV(me),Ee=ee(o,S,E.root,v==null?void 0:v.root,i,{[`${me}-rtl`]:L,[`${me}-lock`]:fe},ce,he);if(L&&!y.vertical&&(y.reverse=!y.reverse),process.env.NODE_ENV!=="production"){const pe=rn("Slider");[["tooltipPrefixCls","prefixCls"],["getTooltipPopupContainer","getPopupContainer"],["tipFormatter","formatter"],["tooltipPlacement","placement"],["tooltipVisible","open"]].forEach($e=>{let[Me,we]=$e;pe.deprecated(!(Me in e),Me,`tooltip.${we}`)})}$.useEffect(()=>{const pe=()=>{Dt(()=>{V(!1)},1)};return document.addEventListener("mouseup",pe),()=>{document.removeEventListener("mouseup",pe)}},[]);const Oe=r&&!Y,xe=k||((pe,$e)=>{const{index:Me}=$e,we=pe.props;function Be(Ke,Pe,ze){var Le,He,et,pt;ze&&((He=(Le=y)[Ke])===null||He===void 0||He.call(Le,Pe)),(pt=(et=we)[Ke])===null||pt===void 0||pt.call(et,Pe)}const Fe=Object.assign(Object.assign({},we),{onMouseEnter:Ke=>{R(!0),Be("onMouseEnter",Ke)},onMouseLeave:Ke=>{R(!1),Be("onMouseLeave",Ke)},onMouseDown:Ke=>{V(!0),ye(!0),Be("onMouseDown",Ke)},onFocus:Ke=>{var Pe;V(!0),(Pe=y.onFocus)===null||Pe===void 0||Pe.call(y,Ke),Be("onFocus",Ke,!0)},onBlur:Ke=>{var Pe;V(!1),(Pe=y.onBlur)===null||Pe===void 0||Pe.call(y,Ke),Be("onBlur",Ke,!0)}}),Re=$.cloneElement(pe,Fe),qe=(!!Y||le)&&Q!==null;return Oe?Re:$.createElement(Tp,Object.assign({},F,{prefixCls:C("tooltip",H??l),title:Q?Q($e.value):"",open:qe,placement:ie(K??f,b),key:Me,classNames:{root:`${me}-tooltip`},getPopupContainer:J||d||O}),Re)}),je=Oe?(pe,$e)=>{const Me=$.cloneElement(pe,{style:Object.assign(Object.assign({},pe.props.style),{visibility:"hidden"})});return $.createElement(Tp,Object.assign({},F,{prefixCls:C("tooltip",H??l),title:Q?Q($e.value):"",open:Q!==null&&le,placement:ie(K??f,b),key:"tooltip",classNames:{root:`${me}-tooltip`},getPopupContainer:J||d||O,draggingDelete:$e.draggingDelete}),Me)}:void 0,z=Object.assign(Object.assign(Object.assign(Object.assign({},N.root),w),g==null?void 0:g.root),a),ve=Object.assign(Object.assign({},N.tracks),g==null?void 0:g.tracks),se=ee(E.tracks,v==null?void 0:v.tracks);return re($.createElement(m$,Object.assign({},y,{classNames:Object.assign({handle:ee(E.handle,v==null?void 0:v.handle),rail:ee(E.rail,v==null?void 0:v.rail),track:ee(E.track,v==null?void 0:v.track)},se?{tracks:se}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},N.handle),g==null?void 0:g.handle),rail:Object.assign(Object.assign({},N.rail),g==null?void 0:g.rail),track:Object.assign(Object.assign({},N.track),g==null?void 0:g.track)},Object.keys(ve).length?{tracks:ve}:{}),step:y.step,range:r,className:Ee,style:z,disabled:I,ref:t,prefixCls:me,handleRender:xe,activeHandleRender:je,onChangeComplete:ue})))});process.env.NODE_ENV!=="production"&&(b$.displayName="Slider");var FV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const y$=e=>{const{prefixCls:t,colors:n,type:r,color:o,range:i=!1,className:a,activeIndex:s,onActive:l,onDragStart:c,onDragChange:u,onKeyDelete:d}=e,f=FV(e,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDragChange","onKeyDelete"]),h=Object.assign(Object.assign({},f),{track:!1}),m=p.useMemo(()=>`linear-gradient(90deg, ${n.map(w=>`${w.color} ${w.percent}%`).join(", ")})`,[n]),v=p.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),g=Ut(c),y=Ut(u),b=p.useMemo(()=>({onDragStart:g,onDragChange:y}),[]),C=Ut((S,w)=>{const{onFocus:E,style:N,className:O,onKeyDown:M}=S.props,I=Object.assign({},N);return r==="gradient"&&(I.background=tw(n,w.value)),p.cloneElement(S,{onFocus:k=>{l==null||l(w.index),E==null||E(k)},style:I,className:ee(O,{[`${t}-slider-handle-active`]:s===w.index}),onKeyDown:k=>{(k.key==="Delete"||k.key==="Backspace")&&d&&d(w.index),M==null||M(k)}})}),x=p.useMemo(()=>({direction:"ltr",handleRender:C}),[]);return p.createElement(g$.Provider,{value:x},p.createElement(h$.Provider,{value:b},p.createElement(b$,Object.assign({},h,{className:ee(a,`${t}-slider`),tooltip:{open:!1},range:{editable:i,minCount:2},styles:{rail:{background:m},handle:v?{background:v}:{}},classNames:{rail:`${t}-slider-rail`,handle:`${t}-slider-handle`}}))))},HV=e=>{const{value:t,onChange:n,onChangeComplete:r}=e,o=a=>n(a[0]),i=a=>r(a[0]);return p.createElement(y$,Object.assign({},e,{value:[t],onChange:o,onChangeComplete:i}))};function Ry(e){return Ie(e).sort((t,n)=>t.percent-n.percent)}const VV=e=>{const{prefixCls:t,mode:n,onChange:r,onChangeComplete:o,onActive:i,activeIndex:a,onGradientDragging:s,colors:l}=e,c=n==="gradient",u=p.useMemo(()=>l.map(y=>({percent:y.percent,color:y.color.toRgbString()})),[l]),d=p.useMemo(()=>u.map(y=>y.percent),[u]),f=p.useRef(u),h=y=>{let{rawValues:b,draggingIndex:C,draggingValue:x}=y;if(b.length>u.length){const S=tw(u,x),w=Ie(u);w.splice(C,0,{percent:x,color:S}),f.current=w}else f.current=u;s(!0),r(new Cr(Ry(f.current)),!0)},m=y=>{let{deleteIndex:b,draggingIndex:C,draggingValue:x}=y,S=Ie(f.current);b!==-1?S.splice(b,1):(S[C]=Object.assign(Object.assign({},S[C]),{percent:x}),S=Ry(S)),r(new Cr(S),!0)},v=y=>{const b=Ie(u);b.splice(y,1);const C=new Cr(b);r(C),o(C)},g=y=>{o(new Cr(u)),a>=y.length&&i(y.length-1),s(!1)};return c?p.createElement(y$,{min:0,max:100,prefixCls:t,className:`${t}-gradient-slider`,colors:u,color:null,value:d,range:!0,onChangeComplete:g,disabled:!1,type:"gradient",activeIndex:a,onActive:i,onDragStart:h,onDragChange:m,onKeyDelete:v}):null},WV=p.memo(VV);var qV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const UV={slider:HV},Iy=()=>{const e=$.useContext(e$),{mode:t,onModeChange:n,modeOptions:r,prefixCls:o,allowClear:i,value:a,disabledAlpha:s,onChange:l,onClear:c,onChangeComplete:u,activeIndex:d,gradientDragging:f}=e,h=qV(e,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=$.useMemo(()=>a.cleared?[{percent:0,color:new Cr("")},{percent:100,color:new Cr("")}]:a.getColors(),[a]),v=!a.isGradient(),[g,y]=$.useState(a);en(()=>{var A;v||y((A=m[d])===null||A===void 0?void 0:A.color)},[f,d]);const b=$.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]=$.useState(b),[S,w]=$.useState(0),E=C!=null&&C.equals(b)?b:C;en(()=>{x(b)},[S,b==null?void 0:b.toHexString()]);const N=(A,L)=>{let T=or(A);if(a.cleared){const _=T.toRgb();if(!_.r&&!_.g&&!_.b&&L){const{type:V,value:F=0}=L;T=new Cr({h:V==="hue"?F:0,s:1,b:1,a:V==="alpha"?F/100:1})}else T=wc(T)}if(t==="single")return T;const R=Ie(m);return R[d]=Object.assign(Object.assign({},R[d]),{color:T}),new Cr(R)},O=(A,L,T)=>{const R=N(A,T);x(R.isGradient()?R.getColors()[d].color:R),l(R,L)},M=(A,L)=>{u(N(A,L)),w(T=>T+1)},I=A=>{l(N(A))};let k=null;const D=r.length>1;return(i||D)&&(k=$.createElement("div",{className:`${o}-operation`},D&&$.createElement(ZE,{size:"small",options:r,value:t,onChange:n}),$.createElement(n$,Object.assign({prefixCls:o,value:a,onChange:A=>{l(A),c==null||c()}},h)))),$.createElement($.Fragment,null,k,$.createElement(WV,Object.assign({},e,{colors:m})),$.createElement(Y1,{prefixCls:o,value:E==null?void 0:E.toHsb(),disabledAlpha:s,onChange:(A,L)=>{O(A,!0,L)},onChangeComplete:(A,L)=>{M(A,L)},components:UV}),$.createElement(xV,Object.assign({value:b,onChange:I,prefixCls:o,disabledAlpha:s},h)))},Ty=()=>{const{prefixCls:e,value:t,presets:n,onChange:r}=$.useContext(t$);return Array.isArray(n)?$.createElement(R_,{value:t,presets:n,prefixCls:e,onChange:r}):null},C$=e=>{const{prefixCls:t,presets:n,panelRender:r,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:h,onActive:m,format:v,onFormatChange:g,gradientDragging:y,onGradientDragging:b,disabledFormat:C}=e,x=`${t}-inner`,S=$.useMemo(()=>({prefixCls:t,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:h,onActive:m,format:v,onFormatChange:g,gradientDragging:y,onGradientDragging:b,disabledFormat:C}),[t,o,i,a,s,l,c,u,d,f,h,m,v,g,y,b,C]),w=$.useMemo(()=>({prefixCls:t,value:o,presets:n,onChange:i}),[t,o,n,i]),E=$.createElement("div",{className:`${x}-content`},$.createElement(Iy,null),Array.isArray(n)&&$.createElement(JE,null),$.createElement(Ty,null));return $.createElement(e$.Provider,{value:S},$.createElement(t$.Provider,{value:w},$.createElement("div",{className:x},typeof r=="function"?r(E,{components:{Picker:Iy,Presets:Ty}}):E)))};process.env.NODE_ENV!=="production"&&(C$.displayName="ColorPickerPanel");var KV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const GV=$.forwardRef((e,t)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:a,className:s,showText:l,activeIndex:c}=e,u=KV(e,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),d=`${r}-trigger`,f=`${d}-text`,h=`${f}-cell`,[m]=_o("ColorPicker"),v=$.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 $.createElement("span",{key:x,className:ee(h,S&&`${h}-inactive`)},C.color.toRgbString()," ",C.percent,"%")});const y=n.toHexString().toUpperCase(),b=qm(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=$.useMemo(()=>n.cleared?$.createElement(n$,{prefixCls:r}):$.createElement(Bm,{prefixCls:r,color:n.toCssString()}),[n,r]);return $.createElement("div",Object.assign({ref:t,className:ee(d,s,{[`${d}-active`]:o,[`${d}-disabled`]:i})},Gr(u)),g,l&&$.createElement("div",{className:f},v))});function XV(e,t,n){const[r]=_o("ColorPicker"),[o,i]=gn(e,{value:t}),[a,s]=p.useState("single"),[l,c]=p.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]=p.useState(null),f=Ut(v=>{d(v),i(v)}),h=p.useMemo(()=>{const v=or(o||"");return v.equals(u)?u:v},[o,u]),m=p.useMemo(()=>{var v;return c.has(a)?a:(v=l[0])===null||v===void 0?void 0:v.value},[c,a,l]);return p.useEffect(()=>{s(h.isGradient()?"gradient":"single")},[h]),[h,f,m,s,l]}const S$=(e,t)=>({backgroundImage:`conic-gradient(${t} 25%, transparent 25% 50%, ${t} 50% 75%, transparent 75% 100%)`,backgroundSize:`${e} ${e}`}),Py=(e,t)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:a}=e;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:r,width:t,height:t,boxShadow:o,flex:"none"},S$("50%",e.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${ne(i)} ${a}`,borderRadius:"inherit"}})}},YV=e=>{const{componentCls:t,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:a,paddingXXS:s,controlHeightSM:l,marginXS:c,fontSizeIcon:u,paddingXS:d,colorTextPlaceholder:f,colorPickerInputNumberHandleWidth:h,lineWidth:m}=e;return{[`${t}-input-container`]:{display:"flex",[`${t}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,[`${n}-input-number-input`]:{paddingInlineStart:s,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:h}},[`${t}-steppers${t}-alpha-input`]:{flex:`0 0 ${ne(i)}`,marginInlineStart:a},[`${t}-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:e.calc(u).add(a).equal(),fontSize:r,lineHeight:ne(l)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${t}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${t}-hsb-input,${t}-rgb-input`]:{display:"flex",gap:a,alignItems:"center"},[`${t}-steppers`]:{flex:1},[`${t}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${ne(d)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:ne(e.calc(l).sub(e.calc(m).mul(2)).equal())},[`${n}-input-prefix`]:{color:f}}}}}},JV=e=>{const{componentCls:t,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:a,colorFillSecondary:s,lineWidthBold:l,colorPickerHandlerSize:c}=e;return{userSelect:"none",[`${t}-select`]:{[`${t}-palette`]:{minHeight:e.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:r},[`${t}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:i},[`${t}-handler`]:{width:c,height:c,border:`${ne(l)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${s}`}}},QV=e=>{const{componentCls:t,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:a,colorText:s,lineHeightSM:l,lineWidth:c,borderRadius:u,colorFill:d,colorWhite:f,marginXXS:h,paddingXS:m,fontHeightSM:v}=e;return{[`${t}-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:h},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${ne(m)} 0`},"&-label":{fontSize:a,color:s,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:e.calc(h).mul(1.5).equal(),[`${t}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:e.calc(i).add(e.calc(c).mul(4)).equal(),height:e.calc(i).add(e.calc(c).mul(4)).equal(),position:"absolute",top:e.calc(c).mul(-2).equal(),insetInlineStart:e.calc(c).mul(-2).equal(),borderRadius:u,border:`${ne(c)} solid transparent`,transition:`border-color ${e.motionDurationMid} ${e.motionEaseInBack}`},"&:hover::before":{borderColor:d},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.calc(i).div(13).mul(5).equal(),height:e.calc(i).div(13).mul(8).equal(),border:`${ne(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`},[`&${t}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:f,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`},[`&${t}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:a,color:r}}}},ZV=e=>{const{componentCls:t,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:a,colorPickerSliderHeight:s,marginSM:l,marginXS:c}=e,u=e.calc(a).sub(e.calc(i).mul(2).equal()).equal(),d=e.calc(a).add(e.calc(i).mul(2).equal()).equal(),f={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${e.colorPrimaryActive}`}};return{[`${t}-slider`]:[S$(ne(s),e.colorFillSecondary),{margin:0,padding:0,height:s,borderRadius:e.calc(s).div(2).equal(),"&-rail":{height:s,borderRadius:e.calc(s).div(2).equal(),boxShadow:n},[`& ${t}-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:`${ne(i)} solid ${r}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:e.calc(i).mul(-1).equal(),top:e.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":f}}],[`${t}-slider-container`]:{display:"flex",gap:l,marginBottom:l,[`${t}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${t}-gradient-slider`]:{marginBottom:c,[`& ${t}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":f}}}},Pp=(e,t,n)=>({borderInlineEndWidth:e.lineWidth,borderColor:t,boxShadow:`0 0 0 ${ne(e.controlOutlineWidth)} ${n}`,outline:0}),e4=e=>{const{componentCls:t}=e;return{"&-rtl":{[`${t}-presets-color`]:{"&::after":{direction:"ltr"}},[`${t}-clear`]:{"&::after":{direction:"ltr"}}}}},Ay=(e,t,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:a,colorBorder:s,red6:l}=e;return{[`${r}-clear`]:Object.assign(Object.assign({width:t,height:t,borderRadius:o,border:`${ne(i)} solid ${a}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${e.motionDurationFast}`},n),{"&::after":{content:'""',position:"absolute",insetInlineEnd:e.calc(i).mul(-1).equal(),top:e.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:l},"&:hover":{borderColor:s}})}},t4=e=>{const{componentCls:t,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:a,colorWarningOutline:s}=e;return{[`&${t}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${t}-trigger-active`]:Object.assign({},Pp(e,n,a))},[`&${t}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${t}-trigger-active`]:Object.assign({},Pp(e,r,s))}}},n4=e=>{const{componentCls:t,controlHeightLG:n,controlHeightSM:r,controlHeight:o,controlHeightXS:i,borderRadius:a,borderRadiusSM:s,borderRadiusXS:l,borderRadiusLG:c,fontSizeLG:u}=e;return{[`&${t}-lg`]:{minWidth:n,minHeight:n,borderRadius:c,[`${t}-color-block, ${t}-clear`]:{width:o,height:o,borderRadius:a},[`${t}-trigger-text`]:{fontSize:u}},[`&${t}-sm`]:{minWidth:r,minHeight:r,borderRadius:s,[`${t}-color-block, ${t}-clear`]:{width:i,height:i,borderRadius:l},[`${t}-trigger-text`]:{lineHeight:ne(i)}}}},r4=e=>{const{antCls:t,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:a,colorTextDisabled:s,colorText:l,colorBgContainerDisabled:c,borderRadius:u,marginXS:d,marginSM:f,controlHeight:h,controlHeightSM:m,colorBgTextActive:v,colorPickerPresetColorSize:g,colorPickerPreviewSize:y,lineWidth:b,colorBorder:C,paddingXXS:x,fontSize:S,colorPrimaryHover:w,controlOutline:E}=e;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,[`& > ${t}-divider`]:{margin:`${ne(f)} 0 ${ne(d)}`}},[`${n}-panel`]:Object.assign({},JV(e))},ZV(e)),Py(e,y)),YV(e)),QV(e)),Ay(e,g,{marginInlineStart:"auto"})),{[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:d}}),"&-trigger":Object.assign(Object.assign(Object.assign(Object.assign({minWidth:h,minHeight:h,borderRadius:u,border:`${ne(b)} solid ${C}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:e.calc(x).sub(b).equal(),[`${n}-trigger-text`]:{marginInlineStart:d,marginInlineEnd:e.calc(d).sub(e.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({},Pp(e,o,E)),"&-disabled":{color:s,background:c,cursor:"not-allowed","&:hover":{borderColor:v},[`${n}-trigger-text`]:{color:s}}},Ay(e,m)),Py(e,m)),t4(e)),n4(e))},e4(e))},vl(e,{focusElCls:`${n}-trigger-active`})]},o4=vn("ColorPicker",e=>{const{colorTextQuaternary:t,marginSM:n}=e,r=8,o=Vt(e,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${t}`,colorPickerSliderHeight:r,colorPickerPreviewSize:e.calc(r).mul(2).add(n).equal()});return[r4(o)]});var i4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Nd=e=>{const{mode:t,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:h=!0,panelRender:m,showText:v,style:g,className:y,size:b,rootClassName:C,prefixCls:x,styles:S,disabledAlpha:w=!1,onFormatChange:E,onChange:N,onClear:O,onOpenChange:M,onChangeComplete:I,getPopupContainer:k,autoAdjustOverflow:D=!0,destroyTooltipOnHide:A,disabledFormat:L}=e,T=i4(e,["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:R,direction:_,colorPicker:V}=$.useContext(It),F=$.useContext(_r),W=d??F,[K,J]=gn(!1,{value:u,postState:He=>!W&&He,onChange:M}),[H,X]=gn(o,{value:o,defaultValue:i,onChange:E}),Y=R("color-picker",x),[le,Q,fe,ye,ue]=XV(r,n,t),ie=$.useMemo(()=>qm(le)<100,[le]),[me,re]=$.useState(null),ce=He=>{if(I){let et=or(He);w&&ie&&(et=wc(He)),I(et)}},he=(He,et)=>{let pt=or(He);w&&ie&&(pt=wc(pt)),Q(pt),re(null),N&&N(pt,pt.toCssString()),et||ce(pt)},[Ee,Oe]=$.useState(0),[xe,je]=$.useState(!1),z=He=>{if(ye(He),He==="single"&&le.isGradient())Oe(0),he(new Cr(le.getColors()[0].color)),re(le);else if(He==="gradient"&&!le.isGradient()){const et=ie?wc(le):le;he(new Cr(me||[{percent:0,color:et},{percent:100,color:et}]))}},{status:ve}=$.useContext(Er),{compactSize:se,compactItemClassnames:pe}=bi(Y,_),$e=jr(He=>{var et;return(et=b??se)!==null&&et!==void 0?et:He}),Me=Qr(Y),[we,Be,Fe]=o4(Y,Me),Re={[`${Y}-rtl`]:_},qe=ee(C,Fe,Me,Re),Ke=ee(Gi(Y,ve),{[`${Y}-sm`]:$e==="small",[`${Y}-lg`]:$e==="large"},pe,V==null?void 0:V.className,qe,y,Be),Pe=ee(Y,qe);if(process.env.NODE_ENV!=="production"){const He=rn("ColorPicker");process.env.NODE_ENV!=="production"&&He(!(w&&ie),"usage","`disabledAlpha` will make the alpha to be 100% when use alpha color.")}const ze={open:K,trigger:c,placement:f,arrow:h,rootClassName:C,getPopupContainer:k,autoAdjustOverflow:D,destroyTooltipOnHide:A},Le=Object.assign(Object.assign({},V==null?void 0:V.style),g);return we($.createElement(Sd,Object.assign({style:S==null?void 0:S.popup,styles:{body:S==null?void 0:S.popupOverlayInner},onOpenChange:He=>{(!He||!W)&&J(He)},content:$.createElement(di,{form:!0},$.createElement(C$,{mode:fe,onModeChange:z,modeOptions:ue,prefixCls:Y,value:le,allowClear:a,disabled:W,disabledAlpha:w,presets:s,panelRender:m,format:H,onFormatChange:X,onChange:he,onChangeComplete:ce,onClear:O,activeIndex:Ee,onActive:Oe,gradientDragging:xe,onGradientDragging:je,disabledFormat:L})),classNames:{root:Pe}},ze),l||$.createElement(GV,Object.assign({activeIndex:K?Ee:-1,open:K,className:Ke,style:Le,prefixCls:Y,disabled:W,showText:v,format:H},T,{color:le}))))};process.env.NODE_ENV!=="production"&&(Nd.displayName="ColorPicker");const a4=Ym(Nd,void 0,e=>Object.assign(Object.assign({},e),{placement:"bottom",autoAdjustOverflow:!1}),"color-picker",e=>e);Nd._InternalPanelDoNotUseOrYouWillBeFired=a4;function ky(e){return["small","middle","large"].includes(e)}function Dy(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const x$=$.createContext({latestIndex:0}),s4=x$.Provider,l4=e=>{let{className:t,index:n,children:r,split:o,style:i}=e;const{latestIndex:a}=p.useContext(x$);return r==null?null:p.createElement(p.Fragment,null,p.createElement("div",{className:t,style:i},r),n<a&&o&&p.createElement("span",{className:`${t}-split`},o))};var c4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const u4=p.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:o,size:i,className:a,style:s,classNames:l,styles:c}=$r("space"),{size:u=i??"small",align:d,className:f,rootClassName:h,children:m,direction:v="horizontal",prefixCls:g,split:y,style:b,wrap:C=!1,classNames:x,styles:S}=e,w=c4(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,N]=Array.isArray(u)?u:[u,u],O=ky(N),M=ky(E),I=Dy(N),k=Dy(E),D=wr(m,{keepEmpty:!0}),A=d===void 0&&v==="horizontal"?"center":d,L=r("space",g),[T,R,_]=z1(L),V=ee(L,a,R,`${L}-${v}`,{[`${L}-rtl`]:o==="rtl",[`${L}-align-${A}`]:A,[`${L}-gap-row-${N}`]:O,[`${L}-gap-col-${E}`]:M},f,h,_),F=ee(`${L}-item`,(n=x==null?void 0:x.item)!==null&&n!==void 0?n:l.item);let W=0;const K=D.map((X,Y)=>{var le;X!=null&&(W=Y);const Q=(X==null?void 0:X.key)||`${F}-${Y}`;return p.createElement(l4,{className:F,key:Q,index:Y,split:y,style:(le=S==null?void 0:S.item)!==null&&le!==void 0?le:c.item},X)}),J=p.useMemo(()=>({latestIndex:W}),[W]);if(D.length===0)return null;const H={};return C&&(H.flexWrap="wrap"),!M&&k&&(H.columnGap=E),!O&&I&&(H.rowGap=N),T(p.createElement("div",Object.assign({ref:t,className:V,style:Object.assign(Object.assign(Object.assign({},H),s),b)},w),p.createElement(s4,{value:J},K)))}),$g=u4;$g.Compact=gD;process.env.NODE_ENV!=="production"&&($g.displayName="Space");var d4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const w$=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=p.useContext(It),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:h,arrow:m,autoFocus:v,overlay:g,trigger:y,align:b,open:C,onOpenChange:x,placement:S,getPopupContainer:w,href:E,icon:N=p.createElement(vg,null),title:O,buttonsRender:M=Q=>Q,mouseEnterDelay:I,mouseLeaveDelay:k,overlayClassName:D,overlayStyle:A,destroyPopupOnHide:L,dropdownRender:T}=e,R=d4(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),_=n("dropdown",o),V=`${_}-button`,F={menu:h,arrow:m,autoFocus:v,align:b,disabled:s,trigger:s?[]:y,onOpenChange:x,getPopupContainer:w||t,mouseEnterDelay:I,mouseLeaveDelay:k,overlayClassName:D,overlayStyle:A,destroyPopupOnHide:L,dropdownRender:T},{compactSize:W,compactItemClassnames:K}=bi(_,r),J=ee(V,K,f);"overlay"in e&&(F.overlay=g),"open"in e&&(F.open=C),"placement"in e?F.placement=S:F.placement=r==="rtl"?"bottomLeft":"bottomRight";const H=p.createElement(Io,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:E,title:O},d),X=p.createElement(Io,{type:i,danger:a,icon:N}),[Y,le]=M([H,X]);return p.createElement($g.Compact,Object.assign({className:J,size:W,block:!0},R),Y,p.createElement(Nl,Object.assign({},F),le))};w$.__ANT_BUTTON=!0;const yi=Nl;yi.Button=w$;var f4={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"},h4=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:f4}))},E$=p.forwardRef(h4);process.env.NODE_ENV!=="production"&&(E$.displayName="EyeOutlined");const p4=e=>{const{getPrefixCls:t,direction:n}=$.useContext(It),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[s,l,c]=YE(a),u=ee(i,c,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},l,o),d=$.useContext(Er),f=$.useMemo(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return process.env.NODE_ENV!=="production"&&rn("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),s(p.createElement("span",{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},p.createElement(Er.Provider,{value:f},e.children)))},m4=e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},g4=vn(["Input","OTP"],e=>{const t=Vt(e,Ml(e));return[m4(t)]},Rl);var v4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const b4=p.forwardRef((e,t)=>{const{value:n,onChange:r,onActiveChange:o,index:i,mask:a}=e,s=v4(e,["value","onChange","onActiveChange","index","mask"]),l=n&&typeof a=="string"?a:n,c=m=>{r(i,m.target.value)},u=p.useRef(null);p.useImperativeHandle(t,()=>u.current);const d=()=>{Dt(()=>{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()},h=m=>{m.key==="Backspace"&&!n&&o(i-1),d()};return p.createElement(Ya,Object.assign({type:a===!0?"password":"text"},s,{ref:u,value:l,onInput:c,onFocus:d,onKeyDown:f,onKeyUp:h,onMouseDown:d,onMouseUp:d}))});var y4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function Zl(e){return(e||"").split("")}const C4=e=>{const{index:t,prefixCls:n,separator:r}=e,o=typeof r=="function"?r(t):r;return o?p.createElement("span",{className:`${n}-separator`},o):null},S4=p.forwardRef((e,t)=>{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:h,mask:m,type:v,onInput:g,inputMode:y}=e,b=y4(e,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);if(process.env.NODE_ENV!=="production"){const H=rn("Input.OTP");process.env.NODE_ENV!=="production"&&H(!(typeof m=="string"&&m.length>1),"usage","`mask` prop should be a single character.")}const{getPrefixCls:C,direction:x}=p.useContext(It),S=C("otp",n),w=Gr(b,{aria:!0,data:!0,attr:!0}),[E,N,O]=g4(S),M=jr(H=>o??H),I=p.useContext(Er),k=El(I.status,f),D=p.useMemo(()=>Object.assign(Object.assign({},I),{status:k,hasFeedback:!1,feedbackIcon:null}),[I,k]),A=p.useRef(null),L=p.useRef({});p.useImperativeHandle(t,()=>({focus:()=>{var H;(H=L.current[0])===null||H===void 0||H.focus()},blur:()=>{var H;for(let X=0;X<r;X+=1)(H=L.current[X])===null||H===void 0||H.blur()},nativeElement:A.current}));const T=H=>l?l(H):H,[R,_]=p.useState(()=>Zl(T(i||"")));p.useEffect(()=>{a!==void 0&&_(Zl(a))},[a]);const V=Ut(H=>{_(H),g&&g(H),s&&H.length===r&&H.every(X=>X)&&H.some((X,Y)=>R[Y]!==X)&&s(H.join(""))}),F=Ut((H,X)=>{let Y=Ie(R);for(let Q=0;Q<H;Q+=1)Y[Q]||(Y[Q]="");X.length<=1?Y[H]=X:Y=Y.slice(0,H).concat(Zl(X)),Y=Y.slice(0,r);for(let Q=Y.length-1;Q>=0&&!Y[Q];Q-=1)Y.pop();const le=T(Y.map(Q=>Q||" ").join(""));return Y=Zl(le).map((Q,fe)=>Q===" "&&!Y[fe]?Y[fe]:Q),Y}),W=(H,X)=>{var Y;const le=F(H,X),Q=Math.min(H+X.length,r-1);Q!==H&&le[H]!==void 0&&((Y=L.current[Q])===null||Y===void 0||Y.focus()),V(le)},K=H=>{var X;(X=L.current[H])===null||X===void 0||X.focus()},J={variant:u,disabled:d,status:k,mask:m,type:v,inputMode:y};return E(p.createElement("div",Object.assign({},w,{ref:A,className:ee(S,{[`${S}-sm`]:M==="small",[`${S}-lg`]:M==="large",[`${S}-rtl`]:x==="rtl"},O,N)}),p.createElement(Er.Provider,{value:D},Array.from({length:r}).map((H,X)=>{const Y=`otp-${X}`,le=R[X]||"";return p.createElement(p.Fragment,{key:Y},p.createElement(b4,Object.assign({ref:Q=>{L.current[X]=Q},index:X,size:M,htmlSize:1,className:`${S}-input`,onChange:W,value:le,onActiveChange:K,autoFocus:X===0&&h},J)),X<r-1&&p.createElement(C4,{separator:c,index:X,prefixCls:S}))}))))});var x4={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"},w4=function(t,n){return p.createElement(Vn,De({},t,{ref:n,icon:x4}))},$$=p.forwardRef(w4);process.env.NODE_ENV!=="production"&&($$.displayName="EyeInvisibleOutlined");var E4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const $4=e=>e?p.createElement(E$,null):p.createElement($$,null),O4={click:"onClick",hover:"onMouseOver"},O$=p.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i=$4}=e,a=p.useContext(_r),s=n??a,l=typeof o=="object"&&o.visible!==void 0,[c,u]=$.useState(()=>l?o.visible:!1),d=$.useRef(null);p.useEffect(()=>{l&&u(o.visible)},[l,o]);const f=f$(d),h=()=>{var M;if(s)return;c&&f();const I=!c;u(I),typeof o=="object"&&((M=o.onVisibleChange)===null||M===void 0||M.call(o,I))},m=M=>{const I=O4[r]||"",k=i(c),D={[I]:h,className:`${M}-icon`,key:"passwordIcon",onMouseDown:A=>{A.preventDefault()},onMouseUp:A=>{A.preventDefault()}};return p.cloneElement(p.isValidElement(k)?k:p.createElement("span",null,k),D)},{className:v,prefixCls:g,inputPrefixCls:y,size:b}=e,C=E4(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:x}=p.useContext(It),S=x("input",y),w=x("input-password",g),E=o&&m(w),N=ee(w,v,{[`${w}-${b}`]:!!b}),O=Object.assign(Object.assign({},Fn(C,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:N,prefixCls:S,suffix:E});return b&&(O.size=b),p.createElement(Ya,Object.assign({ref:dr(t,d)},O))});process.env.NODE_ENV!=="production"&&(O$.displayName="Input.Password");var N4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const N$=p.forwardRef((e,t)=>{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:h,onCompositionEnd:m}=e,v=N4(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:g,direction:y}=p.useContext(It),b=p.useRef(!1),C=g("input-search",n),x=g("input",r),{compactSize:S}=bi(C,y),w=jr(W=>{var K;return(K=i??S)!==null&&K!==void 0?K:W}),E=p.useRef(null),N=W=>{W!=null&&W.target&&W.type==="click"&&d&&d(W.target.value,W,{source:"clear"}),f==null||f(W)},O=W=>{var K;document.activeElement===((K=E.current)===null||K===void 0?void 0:K.input)&&W.preventDefault()},M=W=>{var K,J;d&&d((J=(K=E.current)===null||K===void 0?void 0:K.input)===null||J===void 0?void 0:J.value,W,{source:"input"})},I=W=>{b.current||c||M(W)},k=typeof s=="boolean"?p.createElement(ag,null):null,D=`${C}-button`;let A;const L=s||{},T=L.type&&L.type.__ANT_BUTTON===!0;T||L.type==="button"?A=Lr(L,Object.assign({onMouseDown:O,onClick:W=>{var K,J;(J=(K=L==null?void 0:L.props)===null||K===void 0?void 0:K.onClick)===null||J===void 0||J.call(K,W),M(W)},key:"enterButton"},T?{className:D,size:w}:{})):A=p.createElement(Io,{className:D,type:s?"primary":void 0,size:w,disabled:u,key:"enterButton",onMouseDown:O,onClick:M,loading:c,icon:k},s),l&&(A=[A,Lr(l,{key:"addonAfter"})]);const R=ee(C,{[`${C}-rtl`]:y==="rtl",[`${C}-${w}`]:!!w,[`${C}-with-button`]:!!s},o),_=Object.assign(Object.assign({},v),{className:R,prefixCls:x,type:"search"}),V=W=>{b.current=!0,h==null||h(W)},F=W=>{b.current=!1,m==null||m(W)};return p.createElement(Ya,Object.assign({ref:dr(E,t),onPressEnter:I},_,{size:w,onCompositionStart:V,onCompositionEnd:F,addonAfter:A,suffix:a,onChange:N,disabled:u}))});process.env.NODE_ENV!=="production"&&(N$.displayName="Search");var M4=`
433
+ min-height:0 !important;
434
+ max-height:none !important;
435
+ height:0 !important;
436
+ visibility:hidden !important;
437
+ overflow:hidden !important;
438
+ position:absolute !important;
439
+ z-index:-1000 !important;
440
+ top:0 !important;
441
+ right:0 !important;
442
+ pointer-events: none !important;
443
+ `,R4=["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"],jf={},vr;function I4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&jf[n])return jf[n];var r=window.getComputedStyle(e),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=R4.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(jf[n]=l),l}function T4(e){var t=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;vr||(vr=document.createElement("textarea"),vr.setAttribute("tab-index","-1"),vr.setAttribute("aria-hidden","true"),vr.setAttribute("name","hiddenTextarea"),document.body.appendChild(vr)),e.getAttribute("wrap")?vr.setAttribute("wrap",e.getAttribute("wrap")):vr.removeAttribute("wrap");var o=I4(e,t),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;vr.setAttribute("style","".concat(l,";").concat(M4)),vr.value=e.value||e.placeholder||"";var c=void 0,u=void 0,d,f=vr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=i),n!==null||r!==null){vr.value=" ";var h=vr.scrollHeight-i;n!==null&&(c=h*n,s==="border-box"&&(c=c+i+a),f=Math.max(c,f)),r!==null&&(u=h*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 P4=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Bf=0,zf=1,Ff=2,A4=p.forwardRef(function(e,t){var n=e,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,h=wt(n,P4),m=gn(o,{value:i,postState:function(X){return X??""}}),v=ae(m,2),g=v[0],y=v[1],b=function(X){y(X.target.value),d==null||d(X)},C=p.useRef();p.useImperativeHandle(t,function(){return{textArea:C.current}});var x=p.useMemo(function(){return a&&lt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),S=ae(x,2),w=S[0],E=S[1],N=!!a,O=function(){try{if(document.activeElement===C.current){var X=C.current,Y=X.selectionStart,le=X.selectionEnd,Q=X.scrollTop;C.current.setSelectionRange(Y,le),C.current.scrollTop=Q}}catch{}},M=p.useState(Ff),I=ae(M,2),k=I[0],D=I[1],A=p.useState(),L=ae(A,2),T=L[0],R=L[1],_=function(){D(Bf),process.env.NODE_ENV==="test"&&(f==null||f())};en(function(){N&&_()},[i,w,E,N]),en(function(){if(k===Bf)D(zf);else if(k===zf){var H=T4(C.current,!1,w,E);D(Ff),R(H)}else O()},[k]);var V=p.useRef(),F=function(){Dt.cancel(V.current)},W=function(X){k===Ff&&(s==null||s(X),a&&(F(),V.current=Dt(function(){_()})))};p.useEffect(function(){return F},[]);var K=N?T:null,J=U(U({},c),K);return(k===Bf||k===zf)&&(J.overflowY="hidden",J.overflowX="hidden"),p.createElement(ko,{onResize:W,disabled:!(a||s)},p.createElement("textarea",De({},h,{ref:C,style:J,className:ee(r,l,q({},"".concat(r,"-disabled"),u)),disabled:u,value:g,onChange:b})))}),k4=["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"],D4=$.forwardRef(function(e,t){var n,r=e.defaultValue,o=e.value,i=e.onFocus,a=e.onBlur,s=e.onChange,l=e.allowClear,c=e.maxLength,u=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,h=e.prefixCls,m=h===void 0?"rc-textarea":h,v=e.showCount,g=e.count,y=e.className,b=e.style,C=e.disabled,x=e.hidden,S=e.classNames,w=e.styles,E=e.onResize,N=e.onClear,O=e.onPressEnter,M=e.readOnly,I=e.autoSize,k=e.onKeyDown,D=wt(e,k4),A=gn(r,{value:o,defaultValue:r}),L=ae(A,2),T=L[0],R=L[1],_=T==null?"":String(T),V=$.useState(!1),F=ae(V,2),W=F[0],K=F[1],J=$.useRef(!1),H=$.useState(null),X=ae(H,2),Y=X[0],le=X[1],Q=$.useRef(null),fe=$.useRef(null),ye=function(){var ze;return(ze=fe.current)===null||ze===void 0?void 0:ze.textArea},ue=function(){ye().focus()};$.useImperativeHandle(t,function(){var Pe;return{resizableTextArea:fe.current,focus:ue,blur:function(){ye().blur()},nativeElement:((Pe=Q.current)===null||Pe===void 0?void 0:Pe.nativeElement)||ye()}}),$.useEffect(function(){K(function(Pe){return!C&&Pe})},[C]);var ie=$.useState(null),me=ae(ie,2),re=me[0],ce=me[1];$.useEffect(function(){if(re){var Pe;(Pe=ye()).setSelectionRange.apply(Pe,Ie(re))}},[re]);var he=l$(g,v),Ee=(n=he.max)!==null&&n!==void 0?n:c,Oe=Number(Ee)>0,xe=he.strategy(_),je=!!Ee&&xe>Ee,z=function(ze,Le){var He=Le;!J.current&&he.exceedFormatter&&he.max&&he.strategy(Le)>he.max&&(He=he.exceedFormatter(Le,{max:he.max}),Le!==He&&ce([ye().selectionStart||0,ye().selectionEnd||0])),R(He),lu(ze.currentTarget,ze,s,He)},ve=function(ze){J.current=!0,u==null||u(ze)},se=function(ze){J.current=!1,z(ze,ze.currentTarget.value),d==null||d(ze)},pe=function(ze){z(ze,ze.target.value)},$e=function(ze){ze.key==="Enter"&&O&&O(ze),k==null||k(ze)},Me=function(ze){K(!0),i==null||i(ze)},we=function(ze){K(!1),a==null||a(ze)},Be=function(ze){R(""),ue(),lu(ye(),ze,s)},Fe=f,Re;he.show&&(he.showFormatter?Re=he.showFormatter({value:_,count:xe,maxLength:Ee}):Re="".concat(xe).concat(Oe?" / ".concat(Ee):""),Fe=$.createElement($.Fragment,null,Fe,$.createElement("span",{className:ee("".concat(m,"-data-count"),S==null?void 0:S.count),style:w==null?void 0:w.count},Re)));var qe=function(ze){var Le;E==null||E(ze),(Le=ye())!==null&&Le!==void 0&&Le.style.height&&le(!0)},Ke=!I&&!v&&!l;return $.createElement(xg,{ref:Q,value:_,allowClear:l,handleReset:Be,suffix:Fe,prefixCls:m,classNames:U(U({},S),{},{affixWrapper:ee(S==null?void 0:S.affixWrapper,q(q({},"".concat(m,"-show-count"),v),"".concat(m,"-textarea-allow-clear"),l))}),disabled:C,focused:W,className:ee(y,je&&"".concat(m,"-out-of-range")),style:U(U({},b),Y&&!Ke?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Re=="string"?Re:void 0}},hidden:x,readOnly:M,onClear:N},$.createElement(A4,De({},D,{autoSize:I,maxLength:c,onKeyDown:$e,onChange:pe,onFocus:Me,onBlur:we,onCompositionStart:ve,onCompositionEnd:se,className:ee(S==null?void 0:S.textarea),style:U(U({},w==null?void 0:w.textarea),{},{resize:b==null?void 0:b.resize}),disabled:C,prefixCls:m,onResize:qe,ref:fe,readOnly:M})))});const _4=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`> ${t}`]:{height:"100%"},[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
444
+ &-allow-clear > ${t},
445
+ &-affix-wrapper${r}-has-feedback ${t}
446
+ `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},L4=vn(["Input","TextArea"],e=>{const t=Vt(e,Ml(e));return[_4(t)]},Rl,{resetFont:!1});var j4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const B4=$.forwardRef((e,t)=>{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:h,variant:m,showCount:v,onMouseDown:g,onResize:y}=e,b=j4(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:he}=rn("TextArea");he(!("bordered"in e),"bordered","variant")}const{getPrefixCls:C,direction:x,allowClear:S,autoComplete:w,className:E,style:N,classNames:O,styles:M}=$r("textArea"),I=p.useContext(_r),k=a??I,{status:D,hasFeedback:A,feedbackIcon:L}=p.useContext(Er),T=El(D,s),R=p.useRef(null);p.useImperativeHandle(t,()=>{var he;return{resizableTextArea:(he=R.current)===null||he===void 0?void 0:he.resizableTextArea,focus:Ee=>{var Oe,xe;Sg((xe=(Oe=R.current)===null||Oe===void 0?void 0:Oe.resizableTextArea)===null||xe===void 0?void 0:xe.textArea,Ee)},blur:()=>{var Ee;return(Ee=R.current)===null||Ee===void 0?void 0:Ee.blur()}}});const _=C("input",r),V=Qr(_),[F,W,K]=XE(_,u),[J]=L4(_,V),{compactSize:H,compactItemClassnames:X}=bi(_,x),Y=jr(he=>{var Ee;return(Ee=i??H)!==null&&Ee!==void 0?Ee:he}),[le,Q]=yd("textArea",m,o),fe=d$(l??S),[ye,ue]=p.useState(!1),[ie,me]=p.useState(!1),re=he=>{ue(!0),g==null||g(he);const Ee=()=>{ue(!1),document.removeEventListener("mouseup",Ee)};document.addEventListener("mouseup",Ee)},ce=he=>{var Ee,Oe;if(y==null||y(he),ye&&typeof getComputedStyle=="function"){const xe=(Oe=(Ee=R.current)===null||Ee===void 0?void 0:Ee.nativeElement)===null||Oe===void 0?void 0:Oe.querySelector("textarea");xe&&getComputedStyle(xe).resize==="both"&&me(!0)}};return F(J(p.createElement(D4,Object.assign({autoComplete:w},b,{style:Object.assign(Object.assign({},N),f),styles:Object.assign(Object.assign({},M),h),disabled:k,allowClear:fe,className:ee(K,V,d,u,X,E,ie&&`${_}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),O),{textarea:ee({[`${_}-sm`]:Y==="small",[`${_}-lg`]:Y==="large"},W,c==null?void 0:c.textarea,O.textarea,ye&&`${_}-mouse-active`),variant:ee({[`${_}-${le}`]:Q},Gi(_,T)),affixWrapper:ee(`${_}-textarea-affix-wrapper`,{[`${_}-affix-wrapper-rtl`]:x==="rtl",[`${_}-affix-wrapper-sm`]:Y==="small",[`${_}-affix-wrapper-lg`]:Y==="large",[`${_}-textarea-show-count`]:v||((n=e.count)===null||n===void 0?void 0:n.show)},W)}),prefixCls:_,suffix:A&&p.createElement("span",{className:`${_}-textarea-suffix`},L),showCount:v,ref:R,onResize:ce,onMouseDown:re}))))}),si=Ya;si.Group=p4;si.Search=N$;si.TextArea=B4;si.Password=O$;si.OTP=S4;var z4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const F4=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:o,type:i,title:a,children:s,footer:l}=e,c=z4(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=p.useContext(It),d=u(),f=t||u("modal"),h=Qr(d),[m,v,g]=Ew(f,h),y=`${f}-confirm`;let b={};return i?b={closable:o??!1,title:"",footer:"",children:p.createElement(Ow,Object.assign({},e,{prefixCls:f,confirmPrefixCls:y,rootPrefixCls:d,content:s}))}:b={closable:o??!0,title:a,footer:l!==null&&p.createElement(Cw,Object.assign({},e)),children:s},m(p.createElement(Km,Object.assign({prefixCls:f,className:ee(v,`${f}-pure-panel`,i&&y,i&&`${y}-${i}`,n,g,h)},c,{closeIcon:yw(f,r),closable:o},b)))},H4=Dw(F4);function M$(e){return xl(Iw(e))}const Br=$w;Br.useModal=lB;Br.info=function(t){return xl(Tw(t))};Br.success=function(t){return xl(Pw(t))};Br.error=function(t){return xl(Aw(t))};Br.warning=M$;Br.warn=M$;Br.confirm=function(t){return xl(kw(t))};Br.destroyAll=function(){for(;Ti.length;){const t=Ti.pop();t&&t()}};Br.config=rB;Br._InternalPanelDoNotUseOrYouWillBeFired=H4;process.env.NODE_ENV!=="production"&&(Br.displayName="Modal");/**
447
+ * @license lucide-react v0.484.0 - ISC
448
+ *
449
+ * This source code is licensed under the ISC license.
450
+ * See the LICENSE file in the root directory of this source tree.
451
+ */const V4=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),W4=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),_y=e=>{const t=W4(e);return t.charAt(0).toUpperCase()+t.slice(1)},R$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
452
+ * @license lucide-react v0.484.0 - ISC
453
+ *
454
+ * This source code is licensed under the ISC license.
455
+ * See the LICENSE file in the root directory of this source tree.
456
+ */var q4={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"};/**
457
+ * @license lucide-react v0.484.0 - ISC
458
+ *
459
+ * This source code is licensed under the ISC license.
460
+ * See the LICENSE file in the root directory of this source tree.
461
+ */const U4=$.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>$.createElement("svg",{ref:l,...q4,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:R$("lucide",o),...s},[...a.map(([c,u])=>$.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
462
+ * @license lucide-react v0.484.0 - ISC
463
+ *
464
+ * This source code is licensed under the ISC license.
465
+ * See the LICENSE file in the root directory of this source tree.
466
+ */const $t=(e,t)=>{const n=$.forwardRef(({className:r,...o},i)=>$.createElement(U4,{ref:i,iconNode:t,className:R$(`lucide-${V4(_y(e))}`,`lucide-${e}`,r),...o}));return n.displayName=_y(e),n};/**
467
+ * @license lucide-react v0.484.0 - ISC
468
+ *
469
+ * This source code is licensed under the ISC license.
470
+ * See the LICENSE file in the root directory of this source tree.
471
+ */const K4=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],I$=$t("align-center",K4);/**
472
+ * @license lucide-react v0.484.0 - ISC
473
+ *
474
+ * This source code is licensed under the ISC license.
475
+ * See the LICENSE file in the root directory of this source tree.
476
+ */const G4=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],X4=$t("align-justify",G4);/**
477
+ * @license lucide-react v0.484.0 - ISC
478
+ *
479
+ * This source code is licensed under the ISC license.
480
+ * See the LICENSE file in the root directory of this source tree.
481
+ */const Y4=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],T$=$t("align-left",Y4);/**
482
+ * @license lucide-react v0.484.0 - ISC
483
+ *
484
+ * This source code is licensed under the ISC license.
485
+ * See the LICENSE file in the root directory of this source tree.
486
+ */const J4=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],P$=$t("align-right",J4);/**
487
+ * @license lucide-react v0.484.0 - ISC
488
+ *
489
+ * This source code is licensed under the ISC license.
490
+ * See the LICENSE file in the root directory of this source tree.
491
+ */const Q4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Z4=$t("arrow-right",Q4);/**
492
+ * @license lucide-react v0.484.0 - ISC
493
+ *
494
+ * This source code is licensed under the ISC license.
495
+ * See the LICENSE file in the root directory of this source tree.
496
+ */const e3=[["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"}]],t3=$t("bold",e3);/**
497
+ * @license lucide-react v0.484.0 - ISC
498
+ *
499
+ * This source code is licensed under the ISC license.
500
+ * See the LICENSE file in the root directory of this source tree.
501
+ */const n3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],r3=$t("chevron-down",n3);/**
502
+ * @license lucide-react v0.484.0 - ISC
503
+ *
504
+ * This source code is licensed under the ISC license.
505
+ * See the LICENSE file in the root directory of this source tree.
506
+ */const o3=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],i3=$t("code-xml",o3);/**
507
+ * @license lucide-react v0.484.0 - ISC
508
+ *
509
+ * This source code is licensed under the ISC license.
510
+ * See the LICENSE file in the root directory of this source tree.
511
+ */const a3=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],s3=$t("code",a3);/**
512
+ * @license lucide-react v0.484.0 - ISC
513
+ *
514
+ * This source code is licensed under the ISC license.
515
+ * See the LICENSE file in the root directory of this source tree.
516
+ */const l3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],c3=$t("columns-2",l3);/**
517
+ * @license lucide-react v0.484.0 - ISC
518
+ *
519
+ * This source code is licensed under the ISC license.
520
+ * See the LICENSE file in the root directory of this source tree.
521
+ */const u3=[["polyline",{points:"15 10 20 15 15 20",key:"1q7qjw"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],d3=$t("corner-down-right",u3);/**
522
+ * @license lucide-react v0.484.0 - ISC
523
+ *
524
+ * This source code is licensed under the ISC license.
525
+ * See the LICENSE file in the root directory of this source tree.
526
+ */const f3=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],A$=$t("grip-vertical",f3);/**
527
+ * @license lucide-react v0.484.0 - ISC
528
+ *
529
+ * This source code is licensed under the ISC license.
530
+ * See the LICENSE file in the root directory of this source tree.
531
+ */const h3=[["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"}]],Hf=$t("heading-1",h3);/**
532
+ * @license lucide-react v0.484.0 - ISC
533
+ *
534
+ * This source code is licensed under the ISC license.
535
+ * See the LICENSE file in the root directory of this source tree.
536
+ */const p3=[["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"}]],Ly=$t("heading-2",p3);/**
537
+ * @license lucide-react v0.484.0 - ISC
538
+ *
539
+ * This source code is licensed under the ISC license.
540
+ * See the LICENSE file in the root directory of this source tree.
541
+ */const m3=[["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"}]],jy=$t("heading-3",m3);/**
542
+ * @license lucide-react v0.484.0 - ISC
543
+ *
544
+ * This source code is licensed under the ISC license.
545
+ * See the LICENSE file in the root directory of this source tree.
546
+ */const g3=[["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"}]],By=$t("heading-4",g3);/**
547
+ * @license lucide-react v0.484.0 - ISC
548
+ *
549
+ * This source code is licensed under the ISC license.
550
+ * See the LICENSE file in the root directory of this source tree.
551
+ */const v3=[["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"}]],zy=$t("heading-5",v3);/**
552
+ * @license lucide-react v0.484.0 - ISC
553
+ *
554
+ * This source code is licensed under the ISC license.
555
+ * See the LICENSE file in the root directory of this source tree.
556
+ */const b3=[["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"}]],Fy=$t("heading-6",b3);/**
557
+ * @license lucide-react v0.484.0 - ISC
558
+ *
559
+ * This source code is licensed under the ISC license.
560
+ * See the LICENSE file in the root directory of this source tree.
561
+ */const y3=[["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"}]],C3=$t("image",y3);/**
562
+ * @license lucide-react v0.484.0 - ISC
563
+ *
564
+ * This source code is licensed under the ISC license.
565
+ * See the LICENSE file in the root directory of this source tree.
566
+ */const S3=[["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"}]],x3=$t("italic",S3);/**
567
+ * @license lucide-react v0.484.0 - ISC
568
+ *
569
+ * This source code is licensed under the ISC license.
570
+ * See the LICENSE file in the root directory of this source tree.
571
+ */const w3=[["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"}]],E3=$t("layers",w3);/**
572
+ * @license lucide-react v0.484.0 - ISC
573
+ *
574
+ * This source code is licensed under the ISC license.
575
+ * See the LICENSE file in the root directory of this source tree.
576
+ */const $3=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],k$=$t("link",$3);/**
577
+ * @license lucide-react v0.484.0 - ISC
578
+ *
579
+ * This source code is licensed under the ISC license.
580
+ * See the LICENSE file in the root directory of this source tree.
581
+ */const O3=[["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"}]],N3=$t("list-ordered",O3);/**
582
+ * @license lucide-react v0.484.0 - ISC
583
+ *
584
+ * This source code is licensed under the ISC license.
585
+ * See the LICENSE file in the root directory of this source tree.
586
+ */const M3=[["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"}]],R3=$t("list",M3);/**
587
+ * @license lucide-react v0.484.0 - ISC
588
+ *
589
+ * This source code is licensed under the ISC license.
590
+ * See the LICENSE file in the root directory of this source tree.
591
+ */const I3=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ap=$t("minus",I3);/**
592
+ * @license lucide-react v0.484.0 - ISC
593
+ *
594
+ * This source code is licensed under the ISC license.
595
+ * See the LICENSE file in the root directory of this source tree.
596
+ */const T3=[["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"}]],P3=$t("paint-bucket",T3);/**
597
+ * @license lucide-react v0.484.0 - ISC
598
+ *
599
+ * This source code is licensed under the ISC license.
600
+ * See the LICENSE file in the root directory of this source tree.
601
+ */const A3=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],k3=$t("palette",A3);/**
602
+ * @license lucide-react v0.484.0 - ISC
603
+ *
604
+ * This source code is licensed under the ISC license.
605
+ * See the LICENSE file in the root directory of this source tree.
606
+ */const D3=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],_3=$t("pen-line",D3);/**
607
+ * @license lucide-react v0.484.0 - ISC
608
+ *
609
+ * This source code is licensed under the ISC license.
610
+ * See the LICENSE file in the root directory of this source tree.
611
+ */const L3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Sa=$t("plus",L3);/**
612
+ * @license lucide-react v0.484.0 - ISC
613
+ *
614
+ * This source code is licensed under the ISC license.
615
+ * See the LICENSE file in the root directory of this source tree.
616
+ */const j3=[["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"}]],B3=$t("quote",j3);/**
617
+ * @license lucide-react v0.484.0 - ISC
618
+ *
619
+ * This source code is licensed under the ISC license.
620
+ * See the LICENSE file in the root directory of this source tree.
621
+ */const z3=[["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"}]],F3=$t("redo",z3);/**
622
+ * @license lucide-react v0.484.0 - ISC
623
+ *
624
+ * This source code is licensed under the ISC license.
625
+ * See the LICENSE file in the root directory of this source tree.
626
+ */const H3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}]],Hy=$t("rows-2",H3);/**
627
+ * @license lucide-react v0.484.0 - ISC
628
+ *
629
+ * This source code is licensed under the ISC license.
630
+ * See the LICENSE file in the root directory of this source tree.
631
+ */const V3=[["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"}]],W3=$t("square-check-big",V3);/**
632
+ * @license lucide-react v0.484.0 - ISC
633
+ *
634
+ * This source code is licensed under the ISC license.
635
+ * See the LICENSE file in the root directory of this source tree.
636
+ */const q3=[["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"}]],U3=$t("strikethrough",q3);/**
637
+ * @license lucide-react v0.484.0 - ISC
638
+ *
639
+ * This source code is licensed under the ISC license.
640
+ * See the LICENSE file in the root directory of this source tree.
641
+ */const K3=[["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"}]],G3=$t("subscript",K3);/**
642
+ * @license lucide-react v0.484.0 - ISC
643
+ *
644
+ * This source code is licensed under the ISC license.
645
+ * See the LICENSE file in the root directory of this source tree.
646
+ */const X3=[["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"}]],Y3=$t("superscript",X3);/**
647
+ * @license lucide-react v0.484.0 - ISC
648
+ *
649
+ * This source code is licensed under the ISC license.
650
+ * See the LICENSE file in the root directory of this source tree.
651
+ */const J3=[["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"}]],Q3=$t("table",J3);/**
652
+ * @license lucide-react v0.484.0 - ISC
653
+ *
654
+ * This source code is licensed under the ISC license.
655
+ * See the LICENSE file in the root directory of this source tree.
656
+ */const Z3=[["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"}]],e6=$t("text-cursor",Z3);/**
657
+ * @license lucide-react v0.484.0 - ISC
658
+ *
659
+ * This source code is licensed under the ISC license.
660
+ * See the LICENSE file in the root directory of this source tree.
661
+ */const t6=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Og=$t("trash-2",t6);/**
662
+ * @license lucide-react v0.484.0 - ISC
663
+ *
664
+ * This source code is licensed under the ISC license.
665
+ * See the LICENSE file in the root directory of this source tree.
666
+ */const n6=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],r6=$t("type",n6);/**
667
+ * @license lucide-react v0.484.0 - ISC
668
+ *
669
+ * This source code is licensed under the ISC license.
670
+ * See the LICENSE file in the root directory of this source tree.
671
+ */const o6=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],i6=$t("underline",o6);/**
672
+ * @license lucide-react v0.484.0 - ISC
673
+ *
674
+ * This source code is licensed under the ISC license.
675
+ * See the LICENSE file in the root directory of this source tree.
676
+ */const a6=[["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"}]],s6=$t("undo",a6);/**
677
+ * @license lucide-react v0.484.0 - ISC
678
+ *
679
+ * This source code is licensed under the ISC license.
680
+ * See the LICENSE file in the root directory of this source tree.
681
+ */const l6=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],c6=$t("upload",l6);/**
682
+ * @license lucide-react v0.484.0 - ISC
683
+ *
684
+ * This source code is licensed under the ISC license.
685
+ * See the LICENSE file in the root directory of this source tree.
686
+ */const u6=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],d6=$t("video",u6);/**
687
+ * @license lucide-react v0.484.0 - ISC
688
+ *
689
+ * This source code is licensed under the ISC license.
690
+ * See the LICENSE file in the root directory of this source tree.
691
+ */const f6=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],h6=$t("x",f6);function Wa({value:e,onChange:t}){return j.jsx(Nd,{value:e,onChange:t,presets:[{label:"Recommended",colors:["#1677ff","#52c41a","#faad14","#ff4d4f","#722ed1","#13c2c2","#ffffff","#000000","transparent"]}]})}function p6({editor:e}){const[t,n]=$.useState("#1677ff"),[r,o]=$.useState("#ffffff"),i=l=>{const c=l.toHexString();n(c),e.chain().focus().setColor(c).run()},a=l=>{const c=l.toHexString();o(c),e.chain().focus().setHighlight({color:c}).run()},s=l=>{l.preventDefault()};return j.jsxs("div",{className:"flex items-center gap-4",children:[j.jsx(Cn,{title:"Text Color",children:j.jsxs("div",{className:"flex items-center gap-2",onMouseDown:s,children:[j.jsx(e6,{size:20,color:"black"}),j.jsx(Wa,{value:t,onChange:i})]})}),j.jsx(Cn,{title:"Highlight Color",children:j.jsxs("div",{className:"flex items-center gap-2",onMouseDown:s,children:[j.jsx(P3,{size:20,color:"black"}),j.jsx(Wa,{value:r,onChange:a})]})})]})}function m6({editor:e}){if(!e)return null;const t=()=>{for(let r=1;r<=6;r++)if(e.isActive("heading",{level:r}))switch(r){case 1:return j.jsx(Hf,{size:16});case 2:return j.jsx(Ly,{size:16});case 3:return j.jsx(jy,{size:16});case 4:return j.jsx(By,{size:16});case 5:return j.jsx(zy,{size:16});case 6:return j.jsx(Fy,{size:16})}return j.jsx(Hf,{size:16})},n=[...Array.from({length:6},(r,o)=>({key:`${o+1}`,label:j.jsxs("div",{className:"flex items-center gap-2",onClick:()=>e.chain().focus().toggleHeading({level:o+1}).run(),children:[$.createElement([Hf,Ly,jy,By,zy,Fy][o],{size:16}),j.jsxs("span",{children:["Heading",o+1]})]}),className:e.isActive("heading",{level:o+1})?"ant-dropdown-menu-item-active":""}))];return j.jsx(yi,{menu:{items:n},trigger:["hover"],placement:"bottomLeft",children:j.jsx("button",{className:"flex items-center gap-1 p-2 rounded-md hover:bg-blue-100 hover:text-blue-600",type:"button",children:t()})})}const g6=8,v6=8;function b6({editor:e,buttonClass:t,activeClass:n}){const[r,o]=$.useState({rows:0,cols:0}),[i,a]=$.useState(!1),s=$.useCallback((l,c)=>{e&&(e.chain().focus().insertTable({rows:l,cols:c,withHeaderRow:!0}).run(),a(!1))},[e]);return j.jsx(yi,{open:i,onOpenChange:l=>a(l),trigger:["hover"],dropdownRender:()=>j.jsxs("div",{className:"w-56 p-4 bg-white border border-gray-300 rounded-lg shadow-xl",children:[j.jsx("div",{className:"grid grid-cols-8 gap-1",children:Array.from({length:g6}).map((l,c)=>Array.from({length:v6}).map((u,d)=>{const f=c<r.rows&&d<r.cols;return j.jsx("div",{className:`w-5 h-5 border rounded-sm cursor-pointer transition-all duration-200 ${f?"bg-blue-400 border-white scale-110":"bg-gray-200 hover:bg-gray-300"}`,onMouseEnter:()=>o({rows:c+1,cols:d+1}),onClick:h=>{h.stopPropagation(),s(c+1,d+1)}},`${c}-${d}`)}))}),j.jsx("div",{className:"mt-3 text-sm font-medium text-center text-gray-700",children:r.rows>0&&r.cols>0?`${r.rows} × ${r.cols} Table`:"Insert Table"})]}),children:j.jsx("button",{type:"button",className:`${t} ${i?n:""} transition-all`,onClick:l=>{l.preventDefault(),a(!i)},children:j.jsx(Q3,{className:"w-5 h-5"})})})}var kp,Dp;if(typeof WeakMap<"u"){let e=new WeakMap;kp=t=>e.get(t),Dp=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;kp=r=>{for(let o=0;o<e.length;o+=2)if(e[o]==r)return e[o+1]},Dp=(r,o)=>(n==10&&(n=0),e[n++]=r,e[n++]=o)}var Mn=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,o=t/this.width|0;let i=r+1,a=o+1;for(let s=1;i<this.width&&this.map[t+s]==n;s++)i++;for(let s=1;a<this.height&&this.map[t+this.width*s]==n;s++)a++;return{left:r,top:o,right:i,bottom:a}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:o,top:i,bottom:a}=this.findCell(e);return t=="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(e,t){const{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:a,right:s,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,a),top:Math.min(o,l),right:Math.max(r,s),bottom:Math.max(i,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){const i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,!(o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a)&&t.push(a))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==e){let a=t+e*this.width;const s=(e+1)*this.width;for(;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}}static get(e){return kp(e)||Dp(e,y6(e))}};function y6(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=C6(e),n=e.childCount,r=[];let o=0,i=null;const a=[];for(let c=0,u=t*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const d=e.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*t;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)%t*2,N=a[E];N==null||N!=w&&a[E+1]==1?(a[E]=w,a[E+1]=1):N==w&&a[E+1]++}}}o+=g,u+=v.nodeSize}const f=(c+1)*t;let h=0;for(;o<f;)r[o++]==0&&h++;h&&(i||(i=[])).push({type:"missing",row:c,n:h}),u++}(t===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const s=new Mn(t,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&&S6(s,a,e),s}function C6(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const o=e.child(r);let i=0;if(n)for(let a=0;a<r;a++){const s=e.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)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function S6(e,t,n){e.problems||(e.problems=[]);const r={};for(let o=0;o<e.map.length;o++){const i=e.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)%e.width,d=t[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((s||(s=x6(l)))[c]=d)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}function x6(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function ir(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var Xo=new kn("selectingCells");function Ja(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function w6(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Zr(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Md(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=Ja(t.$head)||E6(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function E6(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function _p(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function $6(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Ng(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function D$(e,t,n){const r=e.node(-1),o=Mn.get(r),i=e.start(-1),a=o.nextCell(e.pos-i,t,n);return a==null?null:e.node(0).resolve(i+a)}function Xi(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function _$(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}function O6(e,t,n){const r=ir(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}var pn=class So extends bt{constructor(t,n=t){const r=t.node(-1),o=Mn.get(r),i=t.start(-1),a=o.rectBetween(t.pos-i,n.pos-i),s=t.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 QC(s.resolve(f),s.resolve(f+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=n}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(_p(r)&&_p(o)&&Ng(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 vt.between(r,o)}content(){const t=this.$anchorCell.node(-1),n=Mn.get(t),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 h=n.findCell(f);let m=t.nodeAt(f);if(!m)throw RangeError(`No cell with offset ${f} found`);const v=o.left-h.left,g=h.right-o.right;if(v>0||g>0){let y=m.attrs;if(v>0&&(y=Xi(y,0,v)),g>0&&(y=Xi(y,y.colspan-g,g)),h.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(h.top<o.top||h.bottom>o.bottom){const y={...m.attrs,rowspan:Math.min(h.bottom,o.bottom)-Math.max(h.top,o.top)};h.top<o.top?m=m.type.createAndFill(y):m=m.type.create(y,m.content)}c.push(m)}a.push(t.child(l).copy(Ne.from(c)))}const s=this.isColSelection()&&this.isRowSelection()?t:a;return new Xe(Ne.from(s),1,1)}replace(t,n=Xe.empty){const r=t.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){const{$from:s,$to:l}=o[a],c=t.mapping.slice(r);t.replace(c.map(s.pos),c.map(l.pos),a?Xe.empty:n)}const i=bt.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);i&&t.setSelection(i)}replaceWith(t,n){this.replace(t,new Xe(Ne.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),r=Mn.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++)t(n.nodeAt(i[a]),o+i[a])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),o=Mn.get(r),i=t.start(-1),a=o.findCell(t.pos-i),s=o.findCell(n.pos-i),l=t.node(0);return a.top<=s.top?(a.top>0&&(t=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&&(t=l.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))),new So(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=Mn.get(t),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(t){return t instanceof So&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),o=Mn.get(r),i=t.start(-1),a=o.findCell(t.pos-i),s=o.findCell(n.pos-i),l=t.node(0);return a.left<=s.left?(a.left>0&&(t=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&&(t=l.resolve(i+o.map[o.width*(a.top+1)-1]))),new So(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new So(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new So(t.resolve(n),t.resolve(r))}getBookmark(){return new N6(this.$anchorCell.pos,this.$headCell.pos)}};pn.prototype.visible=!1;bt.jsonID("cell",pn);var N6=class L${constructor(t,n){this.anchor=t,this.head=n}map(t){return new L$(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),r=t.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&&Ng(n,r)?new pn(n,r):bt.near(r,1)}};function M6(e){if(!(e.selection instanceof pn))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push(Un.node(r,r+n.nodeSize,{class:"selectedCell"}))}),hn.create(e.doc,t)}function R6({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let i=t.depth;i>=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function I6({$from:e,$to:t}){let n,r;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"){n=i;break}}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"){r=i;break}}return n!==r&&t.parentOffset===0}function T6(e,t,n){const r=(t||e).selection,o=(t||e).doc;let i,a;if(r instanceof gt&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")i=pn.create(o,r.from);else if(a=="row"){const s=o.resolve(r.from+1);i=pn.rowSelection(s,s)}else if(!n){const s=Mn.get(r.node),l=r.from+1,c=l+s.map[s.width*s.height-1];i=pn.create(o,l+1,c)}}else r instanceof vt&&R6(r)?i=vt.create(o,r.from):r instanceof vt&&I6(r)&&(i=vt.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var P6=new kn("fix-tables");function j$(e,t,n,r){const o=e.childCount,i=t.childCount;e:for(let a=0,s=0;a<i;a++){const l=t.child(a);for(let c=s,u=Math.min(o,a+3);c<u;c++)if(e.child(c)==l){s=c+1,n+=l.nodeSize;continue e}r(l,n),s<o&&e.child(s).sameMarkup(l)?j$(e.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function B$(e,t){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=A6(e,o,i,n))};return t?t.doc!=e.doc&&j$(t.doc,e.doc,0,r):e.doc.descendants(r),n}function A6(e,t,n,r){const o=Mn.get(t);if(!o.problems)return r;r||(r=e.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=t.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,Xi(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=t.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=t.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+t.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=t.child(l),d=c+u.nodeSize,f=i[l];if(f>0){let h="cell";u.firstChild&&(h=u.firstChild.type.spec.tableRole);const m=[];for(let g=0;g<f;g++){const y=ir(e.schema)[h].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(P6,{fixTables:!0})}function go(e){const t=e.selection,n=Md(e),r=n.node(-1),o=n.start(-1),i=Mn.get(r);return{...t instanceof pn?i.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function z$(e,{map:t,tableStart:n,table:r},o){let i=o>0?-1:0;O6(t,r,o+i)&&(i=o==0||o==t.width?null:0);for(let a=0;a<t.height;a++){const s=a*t.width+o;if(o>0&&o<t.width&&t.map[s-1]==t.map[s]){const l=t.map[s],c=r.nodeAt(l);e.setNodeMarkup(e.mapping.map(n+l),null,_$(c.attrs,o-t.colCount(l))),a+=c.attrs.rowspan-1}else{const l=i==null?ir(r.type.schema).cell:r.nodeAt(t.map[s+i]).type,c=t.positionAt(a,o,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function k6(e,t){if(!Zr(e))return!1;if(t){const n=go(e);t(z$(e.tr,n,n.left))}return!0}function D6(e,t){if(!Zr(e))return!1;if(t){const n=go(e);t(z$(e.tr,n,n.right))}return!0}function _6(e,{map:t,table:n,tableStart:r},o){const i=e.mapping.maps.length;for(let a=0;a<t.height;){const s=a*t.width+o,l=t.map[s],c=n.nodeAt(l),u=c.attrs;if(o>0&&t.map[s-1]==l||o<t.width-1&&t.map[s+1]==l)e.setNodeMarkup(e.mapping.slice(i).map(r+l),null,Xi(u,o-t.colCount(l)));else{const d=e.mapping.slice(i).map(r+l);e.delete(d,d+c.nodeSize)}a+=u.rowspan}}function L6(e,t){if(!Zr(e))return!1;if(t){const n=go(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;_6(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=Mn.get(i)}t(r)}return!0}function j6(e,t,n){var r;const o=ir(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(((r=t.nodeAt(e.map[i+n*e.width]))==null?void 0:r.type)!=o)return!1;return!0}function F$(e,{map:t,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;j6(t,r,o+l)&&(l=o==0||o==t.height?null:0);for(let c=0,u=t.width*o;c<t.width;c++,u++)if(o>0&&o<t.height&&t.map[u]==t.map[u-t.width]){const d=t.map[u],f=r.nodeAt(d).attrs;e.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),c+=f.colspan-1}else{const d=l==null?ir(r.type.schema).cell:(i=r.nodeAt(t.map[u+l*t.width]))==null?void 0:i.type,f=d==null?void 0:d.createAndFill();f&&s.push(f)}return e.insert(a,ir(r.type.schema).row.create(null,s)),e}function B6(e,t){if(!Zr(e))return!1;if(t){const n=go(e);t(F$(e.tr,n,n.top))}return!0}function z6(e,t){if(!Zr(e))return!1;if(t){const n=go(e);t(F$(e.tr,n,n.bottom))}return!0}function F6(e,{map:t,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=e.mapping.maps.length;e.delete(i+r,a+r);const l=new Set;for(let c=0,u=o*t.width;c<t.width;c++,u++){const d=t.map[u];if(!l.has(d)){if(l.add(d),o>0&&d==t.map[u-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,{...f,rowspan:f.rowspan-1}),c+=f.colspan-1}else if(o<t.height&&d==t.map[u+t.width]){const f=n.nodeAt(d),h=f.attrs,m=f.type.create({...h,rowspan:f.attrs.rowspan-1},f.content),v=t.positionAt(o+1,c,n);e.insert(e.mapping.slice(s).map(r+v),m),c+=h.colspan-1}}}}function H6(e,t){if(!Zr(e))return!1;if(t){const n=go(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;F6(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=Mn.get(n.table)}t(r)}return!0}function Vy(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function V6({width:e,height:t,map:n},r){let o=r.top*e+r.left,i=o,a=(r.bottom-1)*e+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<e&&n[s]==n[s+1])return!0;i+=e,s+=e}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[a]==n[a+e])return!0;o++,a++}return!1}function Wy(e,t){const n=e.selection;if(!(n instanceof pn)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=go(e),{map:o}=r;if(V6(o,r))return!1;if(t){const i=e.tr,a={};let s=Ne.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],h=r.table.nodeAt(f);if(!(a[f]||!h))if(a[f]=!0,l==null)l=f,c=h;else{Vy(h)||(s=s.append(h.content));const m=i.mapping.map(f+r.tableStart);i.delete(m,m+h.nodeSize)}}if(l==null||c==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{..._$(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=Vy(c)?l+1:u;i.replaceWith(d+r.tableStart,u+r.tableStart,s)}i.setSelection(new pn(i.doc.resolve(l+r.tableStart))),t(i)}return!0}function qy(e,t){const n=ir(e.schema);return W6(({node:r})=>n[r.type.spec.tableRole])(e,t)}function W6(e){return(t,n)=>{var r;const o=t.selection;let i,a;if(o instanceof pn){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(i=w6(o.$from),!i)return!1;a=(r=Ja(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=go(t),d=t.tr;for(let h=0;h<u.right-u.left;h++)l.push(c?{...s,colwidth:c&&c[h]?[c[h]]:null}:s);let f;for(let h=u.top;h<u.bottom;h++){let m=u.map.positionAt(h,u.left,u.table);h==u.top&&(m+=i.nodeSize);for(let v=u.left,g=0;v<u.right;v++,g++)v==u.left&&h==u.top||d.insert(f=d.mapping.map(m+u.tableStart,1),e({node:i,row:h,col:v}).createAndFill(l[g]))}d.setNodeMarkup(a,e({node:i,row:u.top,col:u.left}),l[0]),o instanceof pn&&d.setSelection(new pn(d.doc.resolve(o.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function q6(e,t){return function(n,r){if(!Zr(n))return!1;const o=Md(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){const i=n.tr;n.selection instanceof pn?n.selection.forEachCell((a,s)=>{a.attrs[e]!==t&&i.setNodeMarkup(s,null,{...a.attrs,[e]:t})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function U6(e){return function(t,n){if(!Zr(t))return!1;if(n){const r=ir(t.schema),o=go(t),i=t.tr,a=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="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 Uy(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let o=0;o<r.length;o++){const i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function nl(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?U6(e):function(n,r){if(!Zr(n))return!1;if(r){const o=ir(n.schema),i=go(n),a=n.tr,s=Uy("row",i,o),l=Uy("column",i,o),u=(e==="column"?s:e==="row"?l:!1)?1:0,d=e=="column"?{left:0,top:u,right:1,bottom:i.map.height}:e=="row"?{left:u,top:0,right:i.map.width,bottom:1}:i,f=e=="column"?l?o.cell:o.header_cell:e=="row"?s?o.cell:o.header_cell:o.cell;i.map.cellsInRect(d).forEach(h=>{const m=h+i.tableStart,v=a.doc.nodeAt(m);v&&a.setNodeMarkup(m,f,v.attrs)}),r(a)}return!0}}nl("row",{useDeprecatedLogic:!0});nl("column",{useDeprecatedLogic:!0});var K6=nl("cell",{useDeprecatedLogic:!0});function G6(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){const i=e.node(-1).child(r),a=i.lastChild;if(a)return o-1-a.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),o=e.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function Ky(e){return function(t,n){if(!Zr(t))return!1;const r=G6(Md(t),e);if(r==null)return!1;if(n){const o=t.doc.resolve(r);n(t.tr.setSelection(vt.between(o,$6(o))).scrollIntoView())}return!0}}function X6(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function ec(e,t){const n=e.selection;if(!(n instanceof pn))return!1;if(t){const r=e.tr,o=ir(e.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 Xe(o,0,0))}),r.docChanged&&t(r)}return!0}function Y6(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const o=t.child(0),i=o.type.spec.tableRole,a=o.type.schema,s=[];if(i=="row")for(let l=0;l<t.childCount;l++){let c=t.child(l).content;const u=l?0:Math.max(0,n-1),d=l<t.childCount-1?0:Math.max(0,r-1);(u||d)&&(c=Lp(ir(a).row,new Xe(c,u,d)).content),s.push(c)}else if(i=="cell"||i=="header_cell")s.push(n||r?Lp(ir(a).row,new Xe(t,n,r)).content:t);else return null;return J6(a,s)}function J6(e,t){const n=[];for(let o=0;o<t.length;o++){const i=t[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>=t.length&&t.push(Ne.empty),n[o]<r){const i=ir(e).cell.createAndFill(),a=[];for(let s=n[o];s<r;s++)a.push(i);t[o]=t[o].append(Ne.from(a))}return{height:t.length,width:r,rows:t}}function Lp(e,t){const n=e.createAndFill();return new Jp(n).replace(0,n.content.size,t).doc}function Q6({width:e,height:t,rows:n},r,o){if(e!=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(Xi(f.attrs,f.attrs.colspan,u+f.attrs.colspan-r),f.content)),c.push(f),u+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)i[s+h]=(i[s+h]||0)+f.attrs.colspan}a.push(Ne.from(c))}n=a,e=r}if(t!=o){const i=[];for(let a=0,s=0;a<o;a++,s++){const l=[],c=n[s%t];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(Ne.from(l))}n=i,t=o}return{width:e,height:t,rows:n}}function Z6(e,t,n,r,o,i,a){const s=e.doc.type.schema,l=ir(s);let c,u;if(o>t.width)for(let d=0,f=0;d<t.height;d++){const h=n.child(d);f+=h.nodeSize;const m=[];let v;h.lastChild==null||h.lastChild.type==l.cell?v=c||(c=l.cell.createAndFill()):v=u||(u=l.header_cell.createAndFill());for(let g=t.width;g<o;g++)m.push(v);e.insert(e.mapping.slice(a).map(f-1+r),m)}if(i>t.height){const d=[];for(let m=0,v=(t.height-1)*t.width;m<Math.max(t.width,o);m++){const g=m>=t.width?!1:n.nodeAt(t.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,Ne.from(d)),h=[];for(let m=t.height;m<i;m++)h.push(f);e.insert(e.mapping.slice(a).map(r+n.nodeSize-2),h)}return!!(c||u)}function Gy(e,t,n,r,o,i,a,s){if(a==0||a==t.height)return!1;let l=!1;for(let c=o;c<i;c++){const u=a*t.width+c,d=t.map[u];if(t.map[u-t.width]==d){l=!0;const f=n.nodeAt(d),{top:h,left:m}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,{...f.attrs,rowspan:a-h}),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),f.type.createAndFill({...f.attrs,rowspan:h+f.attrs.rowspan-a})),c+=f.attrs.colspan-1}}return l}function Xy(e,t,n,r,o,i,a,s){if(a==0||a==t.width)return!1;let l=!1;for(let c=o;c<i;c++){const u=c*t.width+a,d=t.map[u];if(t.map[u-1]==d){l=!0;const f=n.nodeAt(d),h=t.colCount(d),m=e.mapping.slice(s).map(d+r);e.setNodeMarkup(m,null,Xi(f.attrs,a-h,f.attrs.colspan-(a-h))),e.insert(m+f.nodeSize,f.type.createAndFill(Xi(f.attrs,0,a-h))),c+=f.attrs.rowspan-1}}return l}function Yy(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc;if(!i)throw new Error("No table found");let a=Mn.get(i);const{top:s,left:l}=r,c=l+o.width,u=s+o.height,d=e.tr;let f=0;function h(){if(i=n?d.doc.nodeAt(n-1):d.doc,!i)throw new Error("No table found");a=Mn.get(i),f=d.mapping.maps.length}Z6(d,a,i,n,c,u,f)&&h(),Gy(d,a,i,n,l,c,s,f)&&h(),Gy(d,a,i,n,l,c,u,f)&&h(),Xy(d,a,i,n,s,u,l,f)&&h(),Xy(d,a,i,n,s,u,c,f)&&h();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 Xe(o.rows[m-s],0,0))}h(),d.setSelection(new pn(d.doc.resolve(n+a.positionAt(s,l,i)),d.doc.resolve(n+a.positionAt(u-1,c-1,i)))),t(d)}var eW=lm({ArrowLeft:tc("horiz",-1),ArrowRight:tc("horiz",1),ArrowUp:tc("vert",-1),ArrowDown:tc("vert",1),"Shift-ArrowLeft":nc("horiz",-1),"Shift-ArrowRight":nc("horiz",1),"Shift-ArrowUp":nc("vert",-1),"Shift-ArrowDown":nc("vert",1),Backspace:ec,"Mod-Backspace":ec,Delete:ec,"Mod-Delete":ec});function Nc(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function tc(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof pn)return Nc(n,r,bt.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;const a=H$(o,e,t);if(a==null)return!1;if(e=="horiz")return Nc(n,r,bt.near(n.doc.resolve(i.head+t),t));{const s=n.doc.resolve(a),l=D$(s,e,t);let c;return l?c=bt.near(l,1):t<0?c=bt.near(n.doc.resolve(s.before(-1)),-1):c=bt.near(n.doc.resolve(s.after(-1)),1),Nc(n,r,c)}}}function nc(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let a;if(i instanceof pn)a=i;else{const l=H$(o,e,t);if(l==null)return!1;a=new pn(n.doc.resolve(l))}const s=D$(a.$headCell,e,t);return s?Nc(n,r,new pn(a.$anchorCell,s)):!1}}function tW(e,t){const n=e.state.doc,r=Ja(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new pn(r))),!0):!1}function nW(e,t,n){if(!Zr(e.state))return!1;let r=Y6(n);const o=e.state.selection;if(o instanceof pn){r||(r={width:1,height:1,rows:[Ne.from(Lp(ir(e.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),s=Mn.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=Q6(r,s.right-s.left,s.bottom-s.top),Yy(e.state,e.dispatch,a,s,r),!0}else if(r){const i=Md(e.state),a=i.start(-1);return Yy(e.state,e.dispatch,a,Mn.get(i.node(-1)).findCell(i.pos-a),r),!0}else return!1}function rW(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=Jy(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof pn)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=Ja(e.state.selection.$anchor))!=null&&((n=Vf(e,t))==null?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(l,c){let u=Vf(e,c);const d=Xo.getState(e.state)==null;if(!u||!Ng(l,u))if(d)u=l;else return;const f=new pn(l,u);if(d||!e.state.selection.eq(f)){const h=e.state.tr.setSelection(f);d&&h.setMeta(Xo,l.pos),e.dispatch(h)}}function a(){e.root.removeEventListener("mouseup",a),e.root.removeEventListener("dragstart",a),e.root.removeEventListener("mousemove",s),Xo.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Xo,-1))}function s(l){const c=l,u=Xo.getState(e.state);let d;if(u!=null)d=e.state.doc.resolve(u);else if(Jy(e,c.target)!=r&&(d=Vf(e,t),!d))return a();d&&i(d,c)}e.root.addEventListener("mouseup",a),e.root.addEventListener("dragstart",a),e.root.addEventListener("mousemove",s)}function H$(e,t,n){if(!(e.state.selection instanceof vt))return null;const{$head:r}=e.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=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function Jy(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Vf(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Ja(e.state.doc.resolve(n.pos)):null}var oW=class{constructor(t,n){this.node=t,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")),jp(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,jp(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function jp(e,t,n,r,o,i){var a;let s=0,l=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){const{colspan:h,colwidth:m}=u.child(d).attrs;for(let v=0;v<h;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,t.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 yr=new kn("tableColumnResizing");function iW({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=oW,lastColumnResizable:o=!0}={}){const i=new Sn({key:yr,state:{init(a,s){var l,c;const u=(c=(l=i.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,d=ir(s.schema).table.name;return r&&u&&(u[d]=(f,h)=>new r(f,n,h)),new aW(-1,!1)},apply(a,s){return s.apply(a)}},props:{attributes:a=>{const s=yr.getState(a);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,s)=>{sW(a,s,e,o)},mouseleave:a=>{lW(a)},mousedown:(a,s)=>{cW(a,s,t,n)}},decorations:a=>{const s=yr.getState(a);if(s&&s.activeHandle>-1)return pW(a,s.activeHandle)},nodeViews:{}}});return i}var aW=class Mc{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,r=t.getMeta(yr);if(r&&r.setHandle!=null)return new Mc(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Mc(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return _p(t.doc.resolve(o))||(o=-1),new Mc(o,n.dragging)}return n}};function sW(e,t,n,r){if(!e.editable)return;const o=yr.getState(e.state);if(o&&!o.dragging){const i=dW(t.target);let a=-1;if(i){const{left:s,right:l}=i.getBoundingClientRect();t.clientX-s<=n?a=Qy(e,t,"left",n):l-t.clientX<=n&&(a=Qy(e,t,"right",n))}if(a!=o.activeHandle){if(!r&&a!==-1){const s=e.state.doc.resolve(a),l=s.node(-1),c=Mn.get(l),u=s.start(-1);if(c.colCount(s.pos-u)+s.nodeAfter.attrs.colspan-1==c.width-1)return}V$(e,a)}}}function lW(e){if(!e.editable)return;const t=yr.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&V$(e,-1)}function cW(e,t,n,r){var o;if(!e.editable)return!1;const i=(o=e.dom.ownerDocument.defaultView)!=null?o:window,a=yr.getState(e.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const s=e.state.doc.nodeAt(a.activeHandle),l=uW(e,a.activeHandle,s.attrs);e.dispatch(e.state.tr.setMeta(yr,{setDragging:{startX:t.clientX,startWidth:l}}));function c(d){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",u);const f=yr.getState(e.state);f!=null&&f.dragging&&(fW(e,f.activeHandle,Zy(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(yr,{setDragging:null})))}function u(d){if(!d.which)return c(d);const f=yr.getState(e.state);if(f&&f.dragging){const h=Zy(f.dragging,d,n);eC(e,f.activeHandle,h,r)}}return eC(e,a.activeHandle,l,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",u),t.preventDefault(),!0}function uW(e,t,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=e.domAtPos(t);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 dW(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function Qy(e,t,n,r){const o=n=="right"?-r:r,i=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!i)return-1;const{pos:a}=i,s=Ja(e.state.doc.resolve(a));if(!s)return-1;if(n=="right")return s.pos;const l=Mn.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 Zy(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function V$(e,t){e.dispatch(e.state.tr.setMeta(yr,{setHandle:t}))}function fW(e,t,n){const r=e.state.doc.resolve(t),o=r.node(-1),i=Mn.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.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,h=f.colspan==1?0:s-i.colCount(d);if(f.colwidth&&f.colwidth[h]==n)continue;const m=f.colwidth?f.colwidth.slice():hW(f.colspan);m[h]=n,l.setNodeMarkup(a+d,null,{...f,colwidth:m})}l.docChanged&&e.dispatch(l)}function eC(e,t,n,r){const o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=Mn.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;let l=e.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&jp(i,l.firstChild,l,r,s,n)}function hW(e){return Array(e).fill(0)}function pW(e,t){var n;const r=[],o=e.doc.resolve(t),i=o.node(-1);if(!i)return hn.empty;const a=Mn.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,h=document.createElement("div");h.className="column-resize-handle",(n=yr.getState(e))!=null&&n.dragging&&r.push(Un.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),r.push(Un.widget(f,h))}}return hn.create(e.doc,r)}function mW({allowTableNodeSelection:e=!1}={}){return new Sn({key:Xo,state:{init(){return null},apply(t,n){const r=t.getMeta(Xo);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:o,pos:i}=t.mapping.mapResult(n);return o?null:i}},props:{decorations:M6,handleDOMEvents:{mousedown:rW},createSelectionBetween(t){return Xo.getState(t.state)!=null?t.state.selection:null},handleTripleClick:tW,handleKeyDown:eW,handlePaste:nW},appendTransaction(t,n,r){return T6(r,B$(r,n),e)}})}function Bp(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function tC(e,t,n,r,o,i){var a;let s=0,l=!0,c=t.firstChild;const u=e.firstChild;if(u!==null)for(let d=0,f=0;d<u.childCount;d+=1){const{colspan:h,colwidth:m}=u.child(d).attrs;for(let v=0;v<h;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]=Bp(r,g);c.style.setProperty(b,C)}c=c.nextSibling}else{const b=document.createElement("col"),[C,x]=Bp(r,g);b.style.setProperty(C,x),t.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 gW{constructor(t,n){this.node=t,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")),tC(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,tC(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type==="attributes"&&(t.target===this.table||this.colgroup.contains(t.target))}}function vW(e,t,n,r){let o=0,i=!0;const a=[],s=e.firstChild;if(!s)return{};for(let d=0,f=0;d<s.childCount;d+=1){const{colspan:h,colwidth:m}=s.child(d).attrs;for(let v=0;v<h;v+=1,f+=1){const g=n===f?r:m&&m[v];o+=g||t,g||(i=!1);const[y,b]=Bp(t,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 nC(e,t){return e.createAndFill()}function bW(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function yW(e,t,n,r,o){const i=bW(e),a=[],s=[];for(let c=0;c<n;c+=1){const u=nC(i.cell);if(u&&s.push(u),r){const d=nC(i.header_cell);d&&a.push(d)}}const l=[];for(let c=0;c<t;c+=1)l.push(i.row.createChecked(null,r&&c===0?a:s));return i.table.createChecked(null,l)}function CW(e){return e instanceof pn}const rc=({editor:e})=>{const{selection:t}=e.state;if(!CW(t))return!1;let n=0;const r=rx(t.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===t.ranges.length?(e.commands.deleteTable(),!0):!1},SW=wn.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:gW,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=vW(e,this.options.cellMinWidth);return["table",Kt(this.options.HTMLAttributes,t,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const a=yW(i.schema,e,t,n);if(o){const s=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(vt.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>k6(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>D6(e,t),deleteColumn:()=>({state:e,dispatch:t})=>L6(e,t),addRowBefore:()=>({state:e,dispatch:t})=>B6(e,t),addRowAfter:()=>({state:e,dispatch:t})=>z6(e,t),deleteRow:()=>({state:e,dispatch:t})=>H6(e,t),deleteTable:()=>({state:e,dispatch:t})=>X6(e,t),mergeCells:()=>({state:e,dispatch:t})=>Wy(e,t),splitCell:()=>({state:e,dispatch:t})=>qy(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>nl("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>nl("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>K6(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>Wy(e,t)?!0:qy(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>q6(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>Ky(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>Ky(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&B$(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const r=pn.create(t.doc,e.anchorCell,e.headCell);t.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:rc,"Mod-Backspace":rc,Delete:rc,"Mod-Delete":rc}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[iW({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],mW({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:Rt(ut(e,"tableRole",t))}}}),xW=SW.extend({name:"table",addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),backgroundColor:{default:null,parseHTML:t=>t.getAttribute("data-background-color"),renderHTML:t=>t.backgroundColor?{"data-background-color":t.backgroundColor,style:`background-color: ${t.backgroundColor}`}:{}},borderColor:{default:"#e5e7eb",parseHTML:t=>t.getAttribute("data-border-color"),renderHTML:t=>t.borderColor?{"data-border-color":t.borderColor,style:`border-color: ${t.borderColor}`}:{}},borderWidth:{default:"1px",parseHTML:t=>t.getAttribute("data-border-width"),renderHTML:t=>t.borderWidth?{"data-border-width":t.borderWidth,style:`border-width: ${t.borderWidth}`}:{}}}},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setTableBackgroundColor:t=>({commands:n})=>n.updateAttributes(this.name,{backgroundColor:t}),setTableBorderColor:t=>({commands:n})=>n.updateAttributes(this.name,{borderColor:t}),setTableBorderWidth:t=>({commands:n})=>n.updateAttributes(this.name,{borderWidth:t})}}}),wW=wn.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",Kt(this.options.HTMLAttributes,e),0]}}),EW=wW.extend({name:"tableCell",addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),backgroundColor:{default:null,parseHTML:t=>t.getAttribute("data-background-color"),renderHTML:t=>t.backgroundColor?{"data-background-color":t.backgroundColor,style:`background-color: ${t.backgroundColor}`}:{}},borderColor:{default:null,parseHTML:t=>t.getAttribute("data-border-color"),renderHTML:t=>t.borderColor?{"data-border-color":t.borderColor,style:`border-color: ${t.borderColor}`}:{}}}},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setCellBackgroundColor:t=>({commands:n})=>n.updateAttributes(this.name,{backgroundColor:t}),setCellBorderColor:t=>({commands:n})=>n.updateAttributes(this.name,{borderColor:t})}}});function $W({editor:e}){const[t,n]=$.useState(!1);return j.jsxs("div",{className:"relative",children:[j.jsx("button",{type:"button",className:`p-1 text-black transition-all duration-300 rounded-md shadow-lg hover:bg-blue-100 hover:text-blue-600 ${t?"bg-blue-100 text-blue-600":""}`,onClick:r=>{r.preventDefault(),r.stopPropagation(),n(!t)},children:t?j.jsx(h6,{size:24}):j.jsx(E3,{size:24})}),t&&j.jsx("div",{className:"fixed z-40 w-64 p-4 bg-white border border-gray-200 rounded-lg shadow-xl bottom-20 right-4 animate-slide-up",children:j.jsxs("div",{className:"space-y-2",children:[j.jsx("h3",{className:"mb-3 font-bold text-center text-gray-700",children:"Custom Extensions"}),j.jsxs("button",{type:"button",onClick:()=>{e.chain().focus().insertContent({type:"accordion",content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()},className:"flex items-center justify-center w-full gap-2 px-3 py-1 text-blue-600 duration-300 rounded-md bg-blue-50 hover:bg-blue-100 hover:text-blue-700",children:[j.jsx(Sa,{size:16})," Accordion"]})]})})]})}function OW({editor:e}){const[t,n]=$.useState(!1),[r,o]=$.useState(!1);if(!e.isActive("table"))return null;const a=h=>{const m=h.toHexString();e.chain().focus().setCellBackgroundColor(m).run()},s=h=>{const m=h.toHexString();e.chain().focus().setTableBorderColor(m).run()},l=e.can().deleteRow(),c=e.can().deleteColumn(),u=e.can().mergeCells(),d=e.can().splitCell(),f=[{key:"insert-row-before",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Sa,{size:16}),"Insert Row Above"]}),onClick:()=>{e.chain().focus().addRowBefore().run()}},{key:"insert-row-after",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Sa,{size:16}),"Insert Row Below"]}),onClick:()=>{e.chain().focus().addRowAfter().run()}},{key:"delete-row",label:j.jsxs("div",{className:`flex items-center gap-2 ${l?"text-red-600":"opacity-50"}`,children:[j.jsx(Ap,{size:16}),"Delete Row"]}),onClick:()=>{l&&e.chain().focus().deleteRow().run()},disabled:!l},{type:"divider"},{key:"insert-column-before",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Sa,{size:16}),"Insert Column Left"]}),onClick:()=>{e.chain().focus().addColumnBefore().run()}},{key:"insert-column-after",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Sa,{size:16}),"Insert Column Right"]}),onClick:()=>{e.chain().focus().addColumnAfter().run()}},{key:"delete-column",label:j.jsxs("div",{className:`flex items-center gap-2 ${c?"text-red-600":"opacity-50"}`,children:[j.jsx(Ap,{size:16}),"Delete Column"]}),onClick:()=>{c&&e.chain().focus().deleteColumn().run()},disabled:!c},{type:"divider"},{key:"merge-cells",label:j.jsxs("div",{className:`flex items-center gap-2 ${u?"":"opacity-50"}`,children:[j.jsx(c3,{size:16}),"Merge Cells"]}),onClick:()=>{u&&e.chain().focus().mergeCells().run()},disabled:!u},{key:"split-cell",label:j.jsxs("div",{className:`flex items-center gap-2 ${d?"":"opacity-50"}`,children:[j.jsx(Hy,{size:16}),"Split Cell"]}),onClick:()=>{d&&e.chain().focus().splitCell().run()},disabled:!d},{type:"divider"},{key:"delete-table",label:j.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[j.jsx(Og,{size:16}),"Delete Table"]}),onClick:()=>{window.confirm("Are you sure you want to delete this table?")&&e.chain().focus().deleteTable().run()}}];return j.jsxs("div",{className:"flex items-center gap-1",children:[j.jsx("span",{className:"text-xs font-medium text-gray-500 px-2",children:"Table"}),j.jsx(yi,{menu:{items:f},trigger:["hover"],children:j.jsx(Cn,{title:"Table Operations",children:j.jsx("button",{type:"button",className:"p-2 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors",children:j.jsx(Hy,{size:16})})})}),j.jsxs("div",{className:"relative",children:[j.jsx(Cn,{title:"Cell Background Color",children:j.jsx("button",{type:"button",onClick:()=>n(!t),className:"p-2 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors",children:j.jsx(k3,{size:16})})}),t&&j.jsxs("div",{className:"absolute top-full mt-2 left-0 z-50 p-3 bg-white border border-gray-300 rounded-lg shadow-xl",children:[j.jsx("div",{className:"mb-2 text-sm font-medium",children:"Cell Color"}),j.jsx(Wa,{value:"#ffffff",onChange:a}),j.jsxs("div",{className:"flex gap-2 mt-2",children:[j.jsx("button",{onClick:()=>{e.chain().focus().setCellBackgroundColor(null).run(),n(!1)},className:"flex-1 px-3 py-1 text-sm bg-red-50 text-red-600 rounded hover:bg-red-100",children:"Clear"}),j.jsx("button",{onClick:()=>n(!1),className:"flex-1 px-3 py-1 text-sm bg-gray-100 rounded hover:bg-gray-200",children:"Close"})]})]})]}),j.jsxs("div",{className:"relative",children:[j.jsx(Cn,{title:"Table Border Color",children:j.jsx("button",{type:"button",onClick:()=>o(!r),className:"p-2 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors",children:j.jsx("span",{className:"text-xs font-semibold",children:"BD"})})}),r&&j.jsxs("div",{className:"absolute top-full mt-2 left-0 z-50 p-3 bg-white border border-gray-300 rounded-lg shadow-xl",children:[j.jsx("div",{className:"mb-2 text-sm font-medium",children:"Border Color"}),j.jsx(Wa,{value:"#e5e7eb",onChange:s}),j.jsxs("div",{className:"flex gap-2 mt-2",children:[j.jsx("button",{onClick:()=>{e.chain().focus().setTableBorderColor(null).run(),o(!1)},className:"flex-1 px-3 py-1 text-sm bg-red-50 text-red-600 rounded hover:bg-red-100",children:"Clear"}),j.jsx("button",{onClick:()=>o(!1),className:"flex-1 px-3 py-1 text-sm bg-gray-100 rounded hover:bg-gray-200",children:"Close"})]})]})]})]})}function NW({editor:e}){const t=[{label:"8px",value:"8px"},{label:"10px",value:"10px"},{label:"12px",value:"12px"},{label:"14px",value:"14px"},{label:"16px",value:"16px"},{label:"18px",value:"18px"},{label:"20px",value:"20px"},{label:"24px",value:"24px"},{label:"28px",value:"28px"},{label:"32px",value:"32px"},{label:"36px",value:"36px"},{label:"48px",value:"48px"}],n=e.getAttributes("textStyle").fontSize||"16px",r=t.map(o=>({key:o.value,label:j.jsx("div",{className:`flex items-center justify-between ${n===o.value?"bg-blue-50":""}`,children:j.jsx("span",{style:{fontSize:o.value},children:o.label})}),onClick:()=>{e.chain().focus().setFontSize(o.value).run()}}));return j.jsx(yi,{menu:{items:r},trigger:["hover"],children:j.jsx(Cn,{title:"Font Size",children:j.jsxs("button",{type:"button",className:"px-2 py-1.5 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors flex items-center gap-1 text-sm",children:[j.jsx(r6,{size:14}),j.jsx("span",{className:"text-xs",children:n})]})})})}function MW({editor:e}){var o;const t=[{label:"Default",value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Times New Roman",value:'"Times New Roman", serif'},{label:"Courier New",value:'"Courier New", monospace'},{label:"Georgia",value:"Georgia, serif"},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Comic Sans MS",value:'"Comic Sans MS", cursive'},{label:"Impact",value:"Impact, sans-serif"},{label:"Trebuchet MS",value:'"Trebuchet MS", sans-serif'}],n=e.getAttributes("textStyle").fontFamily||"Default",r=t.map(i=>({key:i.value||"default",label:j.jsx("div",{className:`${n===i.value?"bg-blue-50":""}`,style:{fontFamily:i.value||"inherit"},children:i.label}),onClick:()=>{i.value?e.chain().focus().setFontFamily(i.value).run():e.chain().focus().unsetFontFamily().run()}}));return j.jsx(yi,{menu:{items:r},trigger:["hover"],children:j.jsx(Cn,{title:"Font Family",children:j.jsx("button",{type:"button",className:"px-2 py-1.5 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors text-sm min-w-[80px] text-left",children:j.jsx("span",{className:"text-xs truncate",children:((o=t.find(i=>i.value===n))==null?void 0:o.label)||"Default"})})})})}function RW({editor:e}){if(!e)return null;const[t,n]=$.useState(!1),[r,o]=$.useState(""),[i,a]=$.useState(!1),s="p-2 rounded-md transition-all duration-200 hover:bg-blue-100 hover:text-blue-600",l="bg-blue-100 text-blue-600",c=(v,g,y,b,C)=>j.jsx(Cn,{title:C,children:j.jsx("button",{type:"button",onClick:g,disabled:b,className:`
692
+ ${s}
693
+ ${y?l:""}
694
+ ${b?"opacity-50 cursor-not-allowed":""}
695
+ `,children:v})}),u=v=>j.jsx("span",{className:"text-xs font-medium text-gray-500 px-2",children:v}),d=()=>{const v=document.createElement("input");v.type="file",v.accept="image/*",v.onchange=g=>{var b;const y=(b=g.target.files)==null?void 0:b[0];if(y){const C=new FileReader;C.onload=x=>{var w;const S=(w=x.target)==null?void 0:w.result;S&&e.chain().focus().setImage({src:S}).run()},C.readAsDataURL(y)}},v.click()},f=()=>{r.trim()&&(e.chain().focus().setImage({src:r.trim()}).run(),o(""),n(!1))},h=()=>{const v=prompt("Enter video URL (YouTube, Vimeo, or Dailymotion):");v&&e.chain().focus().setVideo({src:v}).run()},m=[{key:"upload",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(c6,{size:16}),"Upload Image"]}),onClick:d},{key:"url",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(k$,{size:16}),"Insert from URL"]}),onClick:()=>n(!0)}];return j.jsxs("div",{className:"border-b border-gray-200 rounded-t-lg bg-gray-50",children:[j.jsxs("div",{className:"flex flex-wrap items-center gap-2 p-2 border-b border-gray-100",children:[u("Format"),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(t3,{size:16}),()=>e.chain().focus().toggleBold().run(),e.isActive("bold"),!1,"Bold (Ctrl+B)"),c(j.jsx(x3,{size:16}),()=>e.chain().focus().toggleItalic().run(),e.isActive("italic"),!1,"Italic (Ctrl+I)"),c(j.jsx(i6,{size:16}),()=>e.chain().focus().toggleUnderline().run(),e.isActive("underline"),!1,"Underline (Ctrl+U)"),c(j.jsx(U3,{size:16}),()=>e.chain().focus().toggleStrike().run(),e.isActive("strike"),!1,"Strikethrough"),c(j.jsx(s3,{size:16}),()=>e.chain().focus().toggleCode().run(),e.isActive("code"),!1,"Inline Code")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(G3,{size:16}),()=>e.chain().focus().toggleSubscript().run(),e.isActive("subscript"),!1,"Subscript"),c(j.jsx(Y3,{size:16}),()=>e.chain().focus().toggleSuperscript().run(),e.isActive("superscript"),!1,"Superscript")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Style"),j.jsx(m6,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Font"),j.jsx(MW,{editor:e}),j.jsx(NW,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Color"),j.jsx(p6,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Align"),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(T$,{size:16}),()=>e.chain().focus().setTextAlign("left").run(),e.isActive({textAlign:"left"}),!1,"Align Left"),c(j.jsx(I$,{size:16}),()=>e.chain().focus().setTextAlign("center").run(),e.isActive({textAlign:"center"}),!1,"Align Center"),c(j.jsx(P$,{size:16}),()=>e.chain().focus().setTextAlign("right").run(),e.isActive({textAlign:"right"}),!1,"Align Right"),c(j.jsx(X4,{size:16}),()=>e.chain().focus().setTextAlign("justify").run(),e.isActive({textAlign:"justify"}),!1,"Justify")]})]}),j.jsxs("div",{className:"flex flex-wrap items-center gap-2 p-2",children:[u("Lists"),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(R3,{size:16}),()=>e.chain().focus().toggleBulletList().run(),e.isActive("bulletList"),!1,"Bullet List"),c(j.jsx(N3,{size:16}),()=>e.chain().focus().toggleOrderedList().run(),e.isActive("orderedList"),!1,"Numbered List"),c(j.jsx(W3,{size:16}),()=>e.chain().focus().toggleTaskList().run(),e.isActive("taskList"),!1,"Task List")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Insert"),j.jsxs("div",{className:"flex items-center gap-1 relative",children:[j.jsx(yi,{menu:{items:m},trigger:["hover"],children:j.jsx(Cn,{title:"Insert Image",children:j.jsx("button",{type:"button",className:s,children:j.jsx(C3,{size:16})})})}),t&&j.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[10000]",children:j.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-xl max-w-md w-full",children:[j.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Insert Image from URL"}),j.jsx("input",{type:"text",placeholder:"Enter image URL",value:r,onChange:v=>o(v.target.value),onKeyDown:v=>{v.key==="Enter"?f():v.key==="Escape"&&(n(!1),o(""))},className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",autoFocus:!0}),j.jsxs("div",{className:"flex gap-2 mt-4",children:[j.jsx("button",{onClick:f,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:"Insert"}),j.jsx("button",{onClick:()=>{n(!1),o("")},className:"flex-1 px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300",children:"Cancel"})]})]})}),c(j.jsx(d6,{size:16}),h,!1,!1,"Insert Video"),j.jsx(b6,{editor:e,buttonClass:s,activeClass:l}),c(j.jsx(B3,{size:16}),()=>e.chain().focus().toggleBlockquote().run(),e.isActive("blockquote"),!1,"Blockquote"),c(j.jsx(Ap,{size:16}),()=>e.chain().focus().setHorizontalRule().run(),!1,!1,"Horizontal Line"),c(j.jsx(d3,{size:16}),()=>e.chain().focus().setHardBreak().run(),!1,!1,"Line Break")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),e.isActive("table")&&j.jsxs(j.Fragment,{children:[j.jsx(OW,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"})]}),u("History"),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(s6,{size:16}),()=>e.chain().focus().undo().run(),!1,!e.can().chain().focus().undo().run(),"Undo (Ctrl+Z)"),c(j.jsx(F3,{size:16}),()=>e.chain().focus().redo().run(),!1,!e.can().chain().focus().redo().run(),"Redo (Ctrl+Y)")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),j.jsx($W,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),c(j.jsx(i3,{size:16}),()=>a(!0),!1,!1,"View HTML")]}),i&&j.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[10000]",children:j.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col",children:[j.jsx("h3",{className:"text-lg font-semibold mb-4",children:"HTML Source"}),j.jsx("textarea",{className:"flex-1 w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono text-sm",value:e.getHTML(),onChange:v=>e.commands.setContent(v.target.value)}),j.jsx("div",{className:"flex gap-2 mt-4",children:j.jsx("button",{onClick:()=>a(!1),className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:"Close"})})]})})]})}const IW=e=>{if(!e.children.length)return;const t=e.querySelectorAll("span");t&&t.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}`)})},rC=Jr.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&IW(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.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))||e.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),TW=nn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function W$(e={}){return new Sn({view(t){return new PW(t,e)}})}class PW{constructor(t,n){var r;this.editorView=t,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 t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let s=t.nodeBefore,l=t.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(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.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,t):o;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=KC(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(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}class Nn extends bt{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Nn.valid(r)?new Nn(r):bt.near(r)}content(){return Xe.empty}eq(t){return t instanceof Nn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Nn(t.resolve(n.pos))}getBookmark(){return new Mg(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!AW(t)||!kW(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Nn.valid(t))return t;let o=t.pos,i=null;for(let a=t.depth;;a--){let s=t.node(a);if(n>0?t.indexAfter(a)<s.childCount:t.index(a)>0){i=s.child(n>0?t.indexAfter(a):t.index(a)-1);break}else if(a==0)return null;o+=n;let l=t.doc.resolve(o);if(Nn.valid(l))return l}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!gt.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=a,o+=n;let s=t.doc.resolve(o);if(Nn.valid(s))return s}return null}}}Nn.prototype.visible=!1;Nn.findFrom=Nn.findGapCursorFrom;bt.jsonID("gapcursor",Nn);class Mg{constructor(t){this.pos=t}map(t){return new Mg(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Nn.valid(n)?new Nn(n):bt.near(n)}}function AW(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);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 kW(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);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 q$(){return new Sn({props:{decorations:jW,createSelectionBetween(e,t,n){return t.pos==n.pos&&Nn.valid(n)?new Nn(n):null},handleClick:_W,handleKeyDown:DW,handleDOMEvents:{beforeinput:LW}}})}const DW=lm({ArrowLeft:oc("horiz",-1),ArrowRight:oc("horiz",1),ArrowUp:oc("vert",-1),ArrowDown:oc("vert",1)});function oc(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let a=r.selection,s=t>0?a.$to:a.$from,l=a.empty;if(a instanceof vt){if(!i.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(t>0?s.after():s.before())}let c=Nn.findGapCursorFrom(s,t,l);return c?(o&&o(r.tr.setSelection(new Nn(c))),!0):!1}}function _W(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Nn.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&gt.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Nn(r))),!0)}function LW(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Nn))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=Ne.empty;for(let a=r.length-1;a>=0;a--)o=Ne.from(r[a].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new Xe(o,0,0));return i.setSelection(vt.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function jW(e){if(!(e.selection instanceof Nn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",hn.create(e.doc,[Un.widget(e.selection.head,t,{key:"gapcursor"})])}var cu=200,Gn=function(){};Gn.prototype.append=function(t){return t.length?(t=Gn.from(t),!this.length&&t||t.length<cu&&this.leafAppend(t)||this.length<cu&&t.leafPrepend(this)||this.appendInner(t)):this};Gn.prototype.prepend=function(t){return t.length?Gn.from(t).append(this):this};Gn.prototype.appendInner=function(t){return new BW(this,t)};Gn.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Gn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Gn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Gn.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Gn.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(t(i,a))},n,r),o};Gn.from=function(t){return t instanceof Gn?t:t&&t.length?new U$(t):Gn.empty};var U$=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,a,s){for(var l=i;l<a;l++)if(o(this.values[l],s+l)===!1)return!1},t.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},t.prototype.leafAppend=function(o){if(this.length+o.length<=cu)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=cu)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Gn);Gn.empty=new U$([]);var BW=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.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},t.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},t.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))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(Gn);const zW=500;class Wr{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,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=t.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 no(d.map));let h=d.step.map(o.slice(i)),m;h&&a.maybeStep(h).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new no(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 Wr(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(t,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<t.steps.length;u++){let d=t.steps[u].invert(t.docs[u]),f=new no(t.mapping.maps[u],d,n),h;(h=l&&l.merge(f))&&(f=h,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>HW&&(s=FW(s,c),a-=c),new Wr(s.append(i),a)}remapping(t,n){let r=new _s;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new Wr(this.items.append(t.map(n=>new no(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,a=t.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let h=i.getMirror(--l);if(h==null)return;a=Math.min(a,h);let m=i.maps[h];if(f.step){let v=t.steps[h].invert(t.docs[h]),g=f.selection&&f.selection.map(i.slice(l+1,h));g&&s++,r.push(new no(m,v,g))}else r.push(new no(m))},o);let c=[];for(let f=n;f<a;f++)c.push(new no(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Wr(u,s);return d.emptyItemCount()>zW&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=t)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 no(c.invert(),l,u),f,h=o.length-1;(f=o.length&&o[h].merge(d))?o[h]=f:o.push(d)}}else a.map&&r--},this.items.length,0),new Wr(Gn.from(o.reverse()),i)}}Wr.empty=new Wr(Gn.empty,0);function FW(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class no{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new no(n.getMap().invert(),n,this.selection)}}}class Wo{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const HW=20;function VW(e,t,n,r){let o=n.getMeta(Fi),i;if(o)return o.historyState;n.getMeta(UW)&&(e=new Wo(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(Fi))return a.getMeta(Fi).redo?new Wo(e.done.addTransform(n,void 0,r,Rc(t)),e.undone,oC(n.mapping.maps),e.prevTime,e.prevComposition):new Wo(e.done,e.undone.addTransform(n,void 0,r,Rc(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=e.prevTime==0||!a&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!WW(n,e.prevRanges)),c=a?Wf(e.prevRanges,n.mapping):oC(n.mapping.maps);return new Wo(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,Rc(t)),Wr.empty,c,n.time,s??e.prevComposition)}else return(i=n.getMeta("rebased"))?new Wo(e.done.rebased(n,i),e.undone.rebased(n,i),Wf(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Wo(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Wf(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function WW(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<t.length;i+=2)r<=t[i+1]&&o>=t[i]&&(n=!0)}),n}function oC(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,i,a)=>t.push(i,a));return t}function Wf(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function qW(e,t,n){let r=Rc(t),o=Fi.get(t).spec.config,i=(n?e.undone:e.done).popEvent(t,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),s=(n?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),o,r),l=new Wo(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(a).setMeta(Fi,{redo:n,historyState:l})}let qf=!1,iC=null;function Rc(e){let t=e.plugins;if(iC!=t){qf=!1,iC=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){qf=!0;break}}return qf}const Fi=new kn("history"),UW=new kn("closeHistory");function K$(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Sn({key:Fi,state:{init(){return new Wo(Wr.empty,Wr.empty,null,0,-1)},apply(t,n,r){return VW(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,o=r=="historyUndo"?Rg:r=="historyRedo"?Ig:null;return o?(n.preventDefault(),o(t.state,t.dispatch)):!1}}}})}function G$(e,t){return(n,r)=>{let o=Fi.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let i=qW(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}const Rg=G$(!1,!0),Ig=G$(!0,!0);nn.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Sn({key:new kn("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const o=this.options.limit;if(o==null||o===0){e=!0;return}const i=this.storage.characters({node:r.doc});if(i>o){const a=i-o,s=0,l=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(s,l);return e=!0,c}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!t.getMeta("paste"))return!1;const s=t.selection.$head.pos,l=i-r,c=s-l,u=s;return t.deleteRange(c,u),!(this.storage.characters({node:t.doc})>r)}})]}});var KW=nn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[W$(this.options)]}});nn.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Sn({key:new kn("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,i=[];if(!n||!r)return hn.create(e,[]);let a=0;this.options.mode==="deepest"&&e.descendants((l,c)=>{if(l.isText)return;if(!(o>=c&&o<=c+l.nodeSize-1))return!1;a+=1});let s=0;return e.descendants((l,c)=>{if(l.isText||!(o>=c&&o<=c+l.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&a-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";i.push(Un.node(c,c+l.nodeSize,{class:this.options.className}))}),hn.create(e,i)}}})]}});var GW=nn.create({name:"gapCursor",addProseMirrorPlugins(){return[q$()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Rt(ut(e,"allowGapCursor",n)))!=null?t:null}}}),aC="placeholder";function XW(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}nn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:aC,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const e=this.options.dataAttribute?`data-${XW(this.options.dataAttribute)}`:`data-${aC}`;return[new Sn({key:new kn("placeholder"),props:{decorations:({doc:t,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,i=[];if(!r)return null;const a=this.editor.isEmpty;return t.descendants((s,l)=>{const c=o>=l&&o<=l+s.nodeSize,u=!s.isLeaf&&Yu(s);if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];a&&d.push(this.options.emptyEditorClass);const f=Un.node(l,l+s.nodeSize,{class:d.join(" "),[e]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:c}):this.options.placeholder});i.push(f)}return this.options.includeChildren}),hn.create(t,i)}}})]}});nn.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new Sn({key:new kn("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||ix(n.selection)||e.view.dragging?null:hn.create(n.doc,[Un.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function sC({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}nn.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;const t=new kn(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new Sn({key:t,appendTransaction:(o,i,a)=>{const{doc:s,tr:l,schema:c}=a,u=t.getState(a),d=s.content.size,f=c.nodes[n];if(u)return l.insert(d,f.create())},state:{init:(o,i)=>{const a=i.tr.doc.lastChild;return!sC({node:a,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;const a=o.doc.lastChild;return!sC({node:a,types:r})}}})]}});nn.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Rg(e,t),redo:()=>({state:e,dispatch:t})=>Ig(e,t)}},addProseMirrorPlugins(){return[K$(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()}}});var YW=KW,JW=GW;const QW=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,ZW=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,e8=Jr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[qi({find:QW,type:this.type})]},addPasteRules(){return[ci({find:ZW,type:this.type})]}}),X$=wn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Kt(this.options.HTMLAttributes,e),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)}}}),t8=Jr.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),n8=Jr.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),r8=wn.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",Kt(this.options.HTMLAttributes,e),0]}}),o8=wn.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",Kt(this.options.HTMLAttributes,e),0]}}),i8=/^\s*(\[([( |x])?\])\s$/,a8=wn.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:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",Kt(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,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 h=d.doc.nodeAt(f);return d.setNodeMarkup(f,void 0,{...h==null?void 0:h.attrs,checked:u}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,u)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,u])=>{o.setAttribute(c,u)}),o.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,i.append(s,a),o.append(i,l),Object.entries(t).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[Aa({find:i8,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),s8=wn.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:e}){return["ul",Kt(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),l8=nn.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:e=>{const t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).every(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).every(t=>t)}},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")}}});var c8=e=>Rn({find:/--$/,replace:e??"—"}),u8=e=>Rn({find:/\.\.\.$/,replace:e??"…"}),d8=e=>Rn({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:e??"“"}),f8=e=>Rn({find:/"$/,replace:e??"”"}),h8=e=>Rn({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:e??"‘"}),p8=e=>Rn({find:/'$/,replace:e??"’"}),m8=e=>Rn({find:/<-$/,replace:e??"←"}),g8=e=>Rn({find:/->$/,replace:e??"→"}),v8=e=>Rn({find:/\(c\)$/,replace:e??"©"}),b8=e=>Rn({find:/\(tm\)$/,replace:e??"™"}),y8=e=>Rn({find:/\(sm\)$/,replace:e??"℠"}),C8=e=>Rn({find:/\(r\)$/,replace:e??"®"}),S8=e=>Rn({find:/(?:^|\s)(1\/2)\s$/,replace:e??"½"}),x8=e=>Rn({find:/\+\/-$/,replace:e??"±"}),w8=e=>Rn({find:/!=$/,replace:e??"≠"}),E8=e=>Rn({find:/<<$/,replace:e??"«"}),$8=e=>Rn({find:/>>$/,replace:e??"»"}),O8=e=>Rn({find:/\d+\s?([*x])\s?\d+$/,replace:e??"×"}),N8=e=>Rn({find:/\^2$/,replace:e??"²"}),M8=e=>Rn({find:/\^3$/,replace:e??"³"}),R8=e=>Rn({find:/(?:^|\s)(1\/4)\s$/,replace:e??"¼"}),I8=e=>Rn({find:/(?:^|\s)(3\/4)\s$/,replace:e??"¾"}),T8=nn.create({name:"typography",addOptions(){return{closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}},addInputRules(){const e=[];return this.options.emDash!==!1&&e.push(c8(this.options.emDash)),this.options.ellipsis!==!1&&e.push(u8(this.options.ellipsis)),this.options.openDoubleQuote!==!1&&e.push(d8(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&e.push(f8(this.options.closeDoubleQuote)),this.options.openSingleQuote!==!1&&e.push(h8(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&e.push(p8(this.options.closeSingleQuote)),this.options.leftArrow!==!1&&e.push(m8(this.options.leftArrow)),this.options.rightArrow!==!1&&e.push(g8(this.options.rightArrow)),this.options.copyright!==!1&&e.push(v8(this.options.copyright)),this.options.trademark!==!1&&e.push(b8(this.options.trademark)),this.options.servicemark!==!1&&e.push(y8(this.options.servicemark)),this.options.registeredTrademark!==!1&&e.push(C8(this.options.registeredTrademark)),this.options.oneHalf!==!1&&e.push(S8(this.options.oneHalf)),this.options.plusMinus!==!1&&e.push(x8(this.options.plusMinus)),this.options.notEqual!==!1&&e.push(w8(this.options.notEqual)),this.options.laquo!==!1&&e.push(E8(this.options.laquo)),this.options.raquo!==!1&&e.push($8(this.options.raquo)),this.options.multiplication!==!1&&e.push(O8(this.options.multiplication)),this.options.superscriptTwo!==!1&&e.push(N8(this.options.superscriptTwo)),this.options.superscriptThree!==!1&&e.push(M8(this.options.superscriptThree)),this.options.oneQuarter!==!1&&e.push(R8(this.options.oneQuarter)),this.options.threeQuarters!==!1&&e.push(I8(this.options.threeQuarters)),e}}),P8=T8;const A8=Jr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),k8=/^\s*>\s$/,D8=wn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Aa({find:k8,type:this.type})]}}),_8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,L8=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,j8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,B8=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,z8=Jr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[qi({find:_8,type:this.type}),qi({find:j8,type:this.type})]},addPasteRules(){return[ci({find:L8,type:this.type}),ci({find:B8,type:this.type})]}}),F8="listItem",lC="textStyle",cC=/^\s*([-+*])\s$/,H8=wn.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:e}){return["ul",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(F8,this.editor.getAttributes(lC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Aa({find:cC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Aa({find:cC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(lC),editor:this.editor})),[e]}}),V8=/(^|[^`])`([^`]+)`(?!`)/,W8=/(^|[^`])`([^`]+)`(?!`)/g,q8=Jr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[qi({find:V8,type:this.type})]},addPasteRules(){return[ci({find:W8,type:this.type})]}}),U8=/^```([a-z]+)?[\s\n]$/,K8=/^~~~([a-z]+)?[\s\n]$/,G8=wn.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:e=>{var t;const{languageClassPrefix:n}=this.options,i=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.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:e,HTMLAttributes:t}){return["pre",Kt(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$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(`
696
+
697
+ `);return!i||!a?!1:e.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$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)?e.commands.command(({tr:c})=>(c.setSelection(bt.near(r.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[vh({find:U8,type:this.type,getAttributes:e=>({language:e[1]})}),vh({find:K8,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Sn({key:new kn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.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}=e.state,l=s.text(n.replace(/\r\n?/g,`
698
+ `));return a.replaceSelectionWith(this.type.create({language:i},l)),a.selection.$from.parent.type!==this.type&&a.setSelection(vt.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}}),X8=wn.create({name:"doc",topNode:!0,content:"block+"}),Y8=nn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[W$(this.options)]}}),J8=nn.create({name:"gapCursor",addProseMirrorPlugins(){return[q$()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Rt(ut(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),Q8=wn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Kt(this.options.HTMLAttributes,e)]},renderText(){return`
699
+ `},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.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 t().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()}}}),Z8=wn.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(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Kt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>vh({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),e7=nn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Rg(e,t),redo:()=>({state:e,dispatch:t})=>Ig(e,t)}},addProseMirrorPlugins(){return[K$(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()}}}),t7=wn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Kt(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:r,$to:o}=n,i=e();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):ix(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(vt.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(gt.create(a.doc,c.pos)):a.setSelection(vt.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(vt.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[mT({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),n7=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,r7=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,o7=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,i7=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,a7=Jr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[qi({find:n7,type:this.type}),qi({find:o7,type:this.type})]},addPasteRules(){return[ci({find:r7,type:this.type}),ci({find:i7,type:this.type})]}}),s7="listItem",uC="textStyle",dC=/^(\d+)\.\s$/,l7=wn.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:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Kt(this.options.HTMLAttributes,n),0]:["ol",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(s7,this.editor.getAttributes(uC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Aa({find:dC,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Aa({find:dC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(uC)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),c7=wn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),u7=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,d7=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,f7=Jr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Kt(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[qi({find:u7,type:this.type})]},addPasteRules(){return[ci({find:d7,type:this.type})]}}),h7=wn.create({name:"text",group:"inline"}),p7=nn.create({name:"starterKit",addExtensions(){var e,t,n,r,o,i,a,s,l,c,u,d,f,h,m,v,g,y;const b=[];return this.options.bold!==!1&&b.push(z8.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.blockquote!==!1&&b.push(D8.configure((t=this.options)===null||t===void 0?void 0:t.blockquote)),this.options.bulletList!==!1&&b.push(H8.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(q8.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(G8.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&b.push(X8.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&b.push(Y8.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&b.push(J8.configure((s=this.options)===null||s===void 0?void 0:s.gapcursor)),this.options.hardBreak!==!1&&b.push(Q8.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(Z8.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&b.push(e7.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&b.push(t7.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(a7.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&b.push(X$.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&b.push(l7.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&b.push(c7.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&b.push(f7.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&b.push(h7.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}});function m7({title:e,childrenContent:t,editable:n,childrenEdit:r}){const[o,i]=$.useState(!1),a=n?j.jsx(fi,{children:j.jsx(fi.Item,{onClick:()=>i(!0),children:"Edit"},"edit")}):null;return j.jsxs("div",{children:[n&&a?j.jsx(yi,{dropdownRender:()=>a,trigger:["contextMenu"],children:t}):t,j.jsx(Br,{title:`Edit ${e}`,open:o,onOk:()=>i(!1),onCancel:()=>i(!1),children:r})]})}function g7({node:e,updateAttributes:t,editor:n}){const[r,o]=$.useState(!1),[i,a]=$.useState(e.attrs.bgColor||"#f3f4f6"),[s,l]=$.useState(e.attrs.titleColor||"#000000"),c=e.attrs.variant||"default",u=e.attrs.radius||"md",d=e.attrs.iconType||"chevron",f=C=>{C.preventDefault()},h=C=>{const x=typeof C=="string"?C:C.toHexString();a(x),t({bgColor:x})},m=C=>{const x=typeof C=="string"?C:C.toHexString();l(x),t({titleColor:x})},v=C=>{switch(C){case"sm":return"rounded-sm";case"lg":return"rounded-lg";case"xl":return"rounded-xl";case"none":return"rounded-none";default:return"rounded-md"}},g=()=>{const C={className:`transition-transform duration-300 ${r?"rotate-180":""}`,size:20,style:{color:s}};switch(d){case"plus":return j.jsx(Sa,{...C,className:`transition-transform duration-300 ${r?"rotate-45":""}`});case"arrow":return j.jsx(Z4,{...C,className:`transition-transform duration-300 ${r?"rotate-90":""}`});case"none":return null;default:return j.jsx(r3,{...C})}},y=()=>{const C=`transition-all duration-300 ${v(u)}`;switch(c){case"filled":return`${C} border-none shadow-sm overflow-hidden`;case"ghost":return`${C} border-none bg-transparent hover:bg-gray-50/50`;case"separate":return`${C} border shadow-sm my-2 overflow-hidden`;default:return`${C} border shadow-sm my-4 overflow-hidden`}},b=()=>{const C="flex items-center justify-between p-4 cursor-pointer select-none transition-colors";return c==="filled"?{className:`${C}`,style:{backgroundColor:i}}:c==="ghost"?{className:`${C} hover:bg-black/5`,style:{backgroundColor:"transparent"}}:{className:`${C} bg-gray-50 hover:bg-gray-100`,style:{backgroundColor:i}}};return j.jsx(Cm,{className:"accordion-wrapper",children:j.jsx(m7,{title:"Accordion",childrenContent:j.jsxs("div",{className:y(),onContextMenu:f,style:c==="filled"?{backgroundColor:`${i}20`}:void 0,children:[j.jsxs("div",{...b(),onClick:()=>o(!r),children:[j.jsx("input",{className:"w-full text-lg font-medium bg-transparent border-none outline-none",style:{color:s},defaultValue:e.attrs.title||"Accordion Title",onChange:C=>t({title:C.target.value}),disabled:!n.isEditable,placeholder:"Accordion title"}),g()]}),j.jsx("div",{className:`overflow-hidden duration-300 ease-in-out ${r?"max-h-96 opacity-100":"max-h-0 opacity-0"} `,children:j.jsx("div",{className:"p-4 border-t",children:j.jsx(LT,{contentEditable:n.isEditable})})})]}),editable:n.isEditable,childrenEdit:j.jsxs("div",{className:"px-6 py-4 space-y-6 rounded-lg bg-gray-50",children:[j.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[j.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[j.jsxs("div",{children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Variant"}),j.jsx(To,{value:c,style:{width:"100%"},onChange:C=>t({variant:C}),options:[{value:"default",label:"Default (Bordered)"},{value:"filled",label:"Filled"},{value:"ghost",label:"Ghost"},{value:"separate",label:"Separated"}]})]}),j.jsxs("div",{children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Corner Radius"}),j.jsx(To,{value:u,style:{width:"100%"},onChange:C=>t({radius:C}),options:[{value:"none",label:"Square"},{value:"sm",label:"Small"},{value:"md",label:"Medium"},{value:"lg",label:"Large"},{value:"xl",label:"Extra Large"}]})]})]}),j.jsxs("div",{children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Icon Style"}),j.jsxs(Go.Group,{value:d,onChange:C=>t({iconType:C.target.value}),className:"flex gap-4",children:[j.jsx(Go,{value:"chevron",children:"Chevron"}),j.jsx(Go,{value:"plus",children:"Plus"}),j.jsx(Go,{value:"arrow",children:"Arrow"}),j.jsx(Go,{value:"none",children:"None"})]})]}),j.jsxs("div",{className:"flex flex-col space-y-2",children:[j.jsx("label",{className:"font-medium text-gray-700",children:"Background Color"}),j.jsxs("div",{className:"flex items-center space-x-3",children:[j.jsx("div",{className:"w-8 h-8 border rounded shadow",style:{backgroundColor:i}}),j.jsx(Wa,{value:i,onChange:h})]})]}),j.jsxs("div",{className:"flex flex-col space-y-2",children:[j.jsx("label",{className:"font-medium text-gray-700",children:"Title Color"}),j.jsxs("div",{className:"flex items-center space-x-3",children:[j.jsx("div",{className:"w-8 h-8 border rounded shadow",style:{backgroundColor:s}}),j.jsx(Wa,{value:s,onChange:m})]})]})]}),j.jsx("div",{className:"pt-4 border-t border-gray-200",children:j.jsxs("div",{className:"p-3 bg-white border rounded-md",children:[j.jsx("div",{className:"text-sm text-gray-600",children:"Preview"}),j.jsx("div",{className:"p-2 mt-2 rounded",style:{backgroundColor:i},children:j.jsx("span",{style:{color:s,fontWeight:500},children:"Accordion Title"})})]})})]})})})}const v7=wn.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"},iconType:{default:"chevron"},variant:{default:"default"},radius:{default:"md"}}},parseHTML(){return[{tag:"accordion"}]},renderHTML({HTMLAttributes:e}){return["accordion",Kt(e)]},addNodeView(){return Sm(g7)},addCommands(){return{setAccordion:e=>({chain:t})=>t().insertContent({type:"accordion",attrs:e,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});function b7({node:e,updateAttributes:t,editor:n,selected:r,deleteNode:o}){const[i,a]=$.useState(!1),[s,l]=$.useState(!1),[c,u]=$.useState({width:e.attrs.width||"100%",height:e.attrs.height||"auto"}),[d,f]=$.useState(e.attrs.caption||""),[h,m]=$.useState(e.attrs.link||""),[v,g]=$.useState(!1),[y,b]=$.useState(!1),[C,x]=$.useState(e.attrs.src||""),S=$.useRef(null),w=$.useRef(null),E=$.useRef(null);$.useEffect(()=>{u({width:e.attrs.width||"100%",height:e.attrs.height||"auto"}),f(e.attrs.caption||""),m(e.attrs.link||""),x(e.attrs.src||"")},[e.attrs]);const N=$.useCallback((R,_)=>{if(R.preventDefault(),R.stopPropagation(),!S.current)return;const V=S.current.getBoundingClientRect();E.current={x:R.clientX,y:R.clientY,width:V.width,height:V.height},a(!0);const F=K=>{if(!E.current||!S.current)return;const J=K.clientX-E.current.x,H=K.clientY-E.current.y;let X=E.current.width,Y=E.current.height;if(_.includes("e")&&(X=E.current.width+J),_.includes("w")&&(X=E.current.width-J),_.includes("s")&&(Y=E.current.height+H),_.includes("n")&&(Y=E.current.height-H),_.length===2&&S.current.naturalWidth&&S.current.naturalHeight){const le=S.current.naturalWidth/S.current.naturalHeight;Y=X/le}X=Math.max(50,X),Y=Math.max(50,Y),u({width:`${X}px`,height:`${Y}px`})},W=()=>{a(!1),E.current=null,t({width:c.width,height:c.height}),document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",W)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",W)},[c,t]),O=R=>{t({align:R,float:"none"})},M=R=>{t({float:R,align:R==="none"?"center":"left"})},I=()=>{d!==e.attrs.caption&&t({caption:d})},k=()=>{t({link:h}),g(!1)},D=()=>{t({src:C}),b(!1)},A=()=>{window.confirm("Are you sure you want to delete this image?")&&o()},L=()=>{const R={maxWidth:"100%",display:"block",zIndex:e.attrs.zIndex,position:"relative"};return e.attrs.float==="left"?{...R,float:"left",marginRight:"1rem",marginBottom:"0.5rem",display:"inline-block"}:e.attrs.float==="right"?{...R,float:"right",marginLeft:"1rem",marginBottom:"0.5rem",display:"inline-block"}:e.attrs.align==="center"?{...R,marginLeft:"auto",marginRight:"auto",display:"block"}:e.attrs.align==="right"?{...R,marginLeft:"auto",display:"block"}:R},T=n.isEditable;return $.useEffect(()=>{console.log("EnhancedImageView mounting:",{isEditable:n.isEditable,attrs:e.attrs})},[n.isEditable,e.attrs]),j.jsxs(Cm,{className:"image-wrapper","data-drag-handle":!0,"data-float":e.attrs.float||"none",style:L(),children:[T&&j.jsx(Sd,{content:j.jsxs("div",{className:"flex items-center gap-1 p-1.5 bg-gray-900 text-white rounded-lg shadow-xl",children:[j.jsx(Cn,{title:"Align Left",children:j.jsx("button",{type:"button",onClick:()=>O("left"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.align==="left"&&e.attrs.float==="none"?"bg-gray-700":""}`,children:j.jsx(T$,{size:16})})}),j.jsx(Cn,{title:"Align Center",children:j.jsx("button",{type:"button",onClick:()=>O("center"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.align==="center"&&e.attrs.float==="none"?"bg-gray-700":""}`,children:j.jsx(I$,{size:16})})}),j.jsx(Cn,{title:"Align Right",children:j.jsx("button",{type:"button",onClick:()=>O("right"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.align==="right"&&e.attrs.float==="none"?"bg-gray-700":""}`,children:j.jsx(P$,{size:16})})}),j.jsx("div",{className:"h-4 w-px bg-gray-600 mx-1"}),j.jsx(Cn,{title:"Float Left",children:j.jsx("button",{type:"button",onClick:()=>M("left"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.float==="left"?"bg-gray-700":""}`,children:j.jsx("span",{className:"text-xs font-semibold",children:"FL"})})}),j.jsx(Cn,{title:"Float Right",children:j.jsx("button",{type:"button",onClick:()=>M("right"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.float==="right"?"bg-gray-700":""}`,children:j.jsx("span",{className:"text-xs font-semibold",children:"FR"})})}),j.jsx("div",{className:"h-4 w-px bg-gray-600 mx-1"}),j.jsx(Cn,{title:"Add/Edit Link",children:j.jsx("button",{type:"button",onClick:()=>g(!v),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${h?"bg-gray-700":""}`,children:j.jsx(k$,{size:16})})}),j.jsx(Cn,{title:"Edit Image URL",children:j.jsx("button",{type:"button",onClick:()=>b(!y),className:"p-1.5 rounded hover:bg-gray-700 transition-colors",children:j.jsx("span",{className:"text-xs font-semibold",children:"URL"})})}),j.jsx("div",{className:"h-4 w-px bg-gray-600 mx-1"}),j.jsx(Cn,{title:"Delete Image",children:j.jsx("button",{type:"button",onClick:A,className:"p-1.5 rounded hover:bg-red-600 transition-colors",children:j.jsx(Og,{size:16})})})]}),open:T&&(r||s),placement:"top",arrow:!1,trigger:[],overlayInnerStyle:{padding:0,backgroundColor:"transparent",border:"none",boxShadow:"none"},children:j.jsxs("div",{ref:w,className:`relative inline-block max-w-full ${r?"ring-2 ring-blue-500 ring-offset-2 rounded":""}`,onMouseEnter:()=>T&&l(!0),onMouseLeave:()=>!i&&l(!1),children:[T&&s&&j.jsx("div",{className:"absolute -left-8 top-1/2 -translate-y-1/2 cursor-grab opacity-50 hover:opacity-100 transition-opacity","data-drag-handle":!0,children:j.jsx(A$,{size:20,className:"text-gray-600"})}),h&&!T?j.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:j.jsx("img",{ref:S,src:e.attrs.src,alt:e.attrs.alt||"",title:e.attrs.title||"",style:{width:c.width,height:c.height,maxWidth:"100%",display:"block"},draggable:!1})}):j.jsx("img",{ref:S,src:e.attrs.src,alt:e.attrs.alt||"",title:e.attrs.title||"",style:{width:c.width,height:c.height,maxWidth:"100%",display:"block"},draggable:!1}),T&&(r||s)&&j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"resize-handle resize-handle-nw",onMouseDown:R=>N(R,"nw")}),j.jsx("div",{className:"resize-handle resize-handle-ne",onMouseDown:R=>N(R,"ne")}),j.jsx("div",{className:"resize-handle resize-handle-sw",onMouseDown:R=>N(R,"sw")}),j.jsx("div",{className:"resize-handle resize-handle-se",onMouseDown:R=>N(R,"se")}),j.jsx("div",{className:"resize-handle resize-handle-n",onMouseDown:R=>N(R,"n")}),j.jsx("div",{className:"resize-handle resize-handle-s",onMouseDown:R=>N(R,"s")}),j.jsx("div",{className:"resize-handle resize-handle-e",onMouseDown:R=>N(R,"e")}),j.jsx("div",{className:"resize-handle resize-handle-w",onMouseDown:R=>N(R,"w")})]})]})}),!T&&j.jsx("div",{ref:w,className:"relative block max-w-full",style:L(),children:h?j.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:j.jsx("img",{ref:S,src:e.attrs.src,alt:e.attrs.alt||"",title:e.attrs.title||"",style:{width:c.width,height:c.height,maxWidth:"100%",display:"block"},draggable:!1})}):j.jsx("img",{ref:S,src:e.attrs.src,alt:e.attrs.alt||"",title:e.attrs.title||"",style:{width:c.width,height:c.height,maxWidth:"100%",display:"block"},draggable:!1})}),T&&y&&kr.createPortal(j.jsx("div",{className:"fixed inset-0 bg-black/50 z-[99999] flex items-center justify-center p-4",children:j.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-xl max-w-md w-full relative z-[100000]",children:[j.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Edit Image URL"}),j.jsx(si,{placeholder:"Enter image URL",value:C,onChange:R=>x(R.target.value),onPressEnter:D,size:"large",autoFocus:!0,className:"mb-4"}),j.jsxs("div",{className:"flex gap-2 justify-end",children:[j.jsx("button",{type:"button",onClick:()=>{b(!1),x(e.attrs.src||"")},className:"px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors",children:"Cancel"}),j.jsx("button",{type:"button",onClick:D,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:"Save"})]})]})}),document.body),T&&v&&j.jsxs("div",{className:"absolute -top-24 left-1/2 -translate-x-1/2 flex items-center gap-2 p-2 bg-white border border-gray-200 rounded-lg shadow-lg z-[10000] min-w-[300px]",children:[j.jsx(si,{placeholder:"Enter link URL",value:h,onChange:R=>m(R.target.value),onPressEnter:k,size:"small"}),j.jsx("button",{type:"button",onClick:k,className:"px-3 py-1 bg-blue-600 text-white rounded hover:bg-blue-700 text-sm",children:"Save"})]}),T?j.jsx(si,{placeholder:"Add a caption...",value:d,onChange:R=>f(R.target.value),onBlur:I,className:"mt-2 text-sm text-center italic",bordered:!1,size:"small"}):d&&j.jsx("div",{className:"image-caption mt-2",children:d})]})}const y7=wn.create({name:"image",addOptions(){return{inline:!1,allowBase64:!0,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,selectable:!0,atom:!0,addAttributes(){return{src:{default:null,parseHTML:e=>e.getAttribute("src"),renderHTML:e=>e.src?{src:e.src}:{}},alt:{default:null,parseHTML:e=>e.getAttribute("alt"),renderHTML:e=>e.alt?{alt:e.alt}:{}},title:{default:null,parseHTML:e=>e.getAttribute("title"),renderHTML:e=>e.title?{title:e.title}:{}},width:{default:"50%",parseHTML:e=>e.getAttribute("width")||"50%",renderHTML:e=>({width:e.width})},height:{default:"auto",parseHTML:e=>e.getAttribute("height")||"auto",renderHTML:e=>({height:e.height})},align:{default:"center",parseHTML:e=>e.getAttribute("data-align")||"center",renderHTML:e=>({"data-align":e.align})},float:{default:"none",parseHTML:e=>e.getAttribute("data-float")||"none",renderHTML:e=>({"data-float":e.float})},caption:{default:"",parseHTML:e=>e.getAttribute("data-caption")||"",renderHTML:e=>({"data-caption":e.caption})},link:{default:"",parseHTML:e=>e.getAttribute("data-link")||"",renderHTML:e=>({"data-link":e.link})},zIndex:{default:0,parseHTML:e=>parseInt(e.getAttribute("data-z-index")||"0",10),renderHTML:e=>({"data-z-index":e.zIndex})}}},parseHTML(){return[{tag:"img[src]",getAttrs:e=>{if(!(e instanceof HTMLElement))return null;const t=e.tagName==="IMG"?e:e.querySelector("img");return t?{src:t.getAttribute("src"),alt:t.getAttribute("alt"),title:t.getAttribute("title"),width:t.getAttribute("width")||"100%",height:t.getAttribute("height")||"auto",align:e.getAttribute("data-align")||"center",float:e.getAttribute("data-float")||"none",caption:e.getAttribute("data-caption")||"",link:e.getAttribute("data-link")||""}:null}}]},renderHTML({HTMLAttributes:e}){return["img",Kt(this.options.HTMLAttributes,e)]},addNodeView(){return Sm(b7)},addCommands(){return{setImage:e=>({commands:t})=>!e||!e.src?!1:t.insertContent({type:this.name,attrs:{src:e.src,alt:e.alt||"",title:e.title||"",width:e.width||"50%",height:e.height||"auto",align:e.align||"center",float:e.float||"none",caption:e.caption||"",link:e.link||"",zIndex:e.zIndex||0}}),updateImage:e=>({commands:t})=>t.updateAttributes(this.name,e),deleteImage:()=>({commands:e})=>e.deleteSelection()}}});function C7({node:e,updateAttributes:t,editor:n,selected:r,deleteNode:o}){const[i,a]=$.useState(!1),[s,l]=$.useState(!1),[c,u]=$.useState({width:e.attrs.width,height:e.attrs.height}),d=$.useRef(null),f=$.useRef(null),h=()=>{const{src:b,provider:C}=e.attrs;switch(C){case"youtube":return`https://www.youtube.com/embed/${b}`;case"vimeo":return`https://player.vimeo.com/video/${b}`;case"dailymotion":return`https://www.dailymotion.com/embed/video/${b}`;default:return b}},m=$.useCallback(b=>{if(b.preventDefault(),b.stopPropagation(),!d.current)return;const C=d.current.getBoundingClientRect();f.current={x:b.clientX,y:b.clientY,width:C.width,height:C.height},a(!0);const x=w=>{if(!f.current)return;const E=w.clientX-f.current.x,N=w.clientY-f.current.y,O=Math.max(200,f.current.width+E),M=Math.max(150,f.current.height+N);u({width:`${O}px`,height:`${M}px`})},S=()=>{a(!1),f.current=null,t({width:c.width,height:c.height}),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",S)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",S)},[c,t]),v=()=>{window.confirm("Are you sure you want to delete this video?")&&o()},g=()=>{const b=prompt("Enter new video URL:","");if(b){let C="youtube",x="";if(b.includes("youtube.com")||b.includes("youtu.be")){C="youtube";const S=/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/,w=b.match(S);x=w?w[1]:""}else if(b.includes("vimeo.com")){C="vimeo";const S=/vimeo\.com\/(\d+)/,w=b.match(S);x=w?w[1]:""}else if(b.includes("dailymotion.com")){C="dailymotion";const S=/dailymotion\.com\/video\/([^_]+)/,w=b.match(S);x=w?w[1]:""}x?t({src:x,provider:C}):alert("Invalid video URL")}},y=n.isEditable;return j.jsx(Cm,{className:"video-wrapper-container","data-drag-handle":!0,children:j.jsxs("div",{ref:d,className:`relative mx-auto ${r?"ring-2 ring-blue-500 ring-offset-2 rounded":""}`,style:{width:c.width,maxWidth:"100%"},onMouseEnter:()=>y&&l(!0),onMouseLeave:()=>!i&&l(!1),children:[y&&s&&j.jsx("div",{className:"absolute -left-8 top-1/2 -translate-y-1/2 cursor-grab opacity-50 hover:opacity-100 transition-opacity","data-drag-handle":!0,children:j.jsx(A$,{size:20,className:"text-gray-600"})}),j.jsx("div",{className:"relative w-full",style:{paddingBottom:"56.25%",height:0},children:j.jsx("iframe",{src:h(),className:"absolute top-0 left-0 w-full h-full rounded",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})}),y&&(r||s)&&j.jsx("div",{className:"absolute -bottom-2 -right-2 w-4 h-4 bg-blue-500 rounded-full cursor-se-resize opacity-75 hover:opacity-100 transition-opacity",onMouseDown:m}),y&&(r||s)&&j.jsxs("div",{className:"absolute -top-12 left-1/2 -translate-x-1/2 flex items-center gap-1 p-1.5 bg-gray-900 text-white rounded-lg shadow-xl z-10",children:[j.jsx(Cn,{title:"Edit URL",children:j.jsx("button",{type:"button",onClick:g,className:"p-1.5 rounded hover:bg-gray-700 transition-colors",children:j.jsx(_3,{size:16})})}),j.jsx("div",{className:"h-4 w-px bg-gray-600 mx-1"}),j.jsx(Cn,{title:"Delete Video",children:j.jsx("button",{type:"button",onClick:v,className:"p-1.5 rounded hover:bg-red-600 transition-colors",children:j.jsx(Og,{size:16})})})]})]})})}const S7=wn.create({name:"video",addOptions(){return{inline:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,selectable:!0,atom:!0,addAttributes(){return{src:{default:null},width:{default:"100%"},height:{default:"400px"},provider:{default:"youtube"}}},parseHTML(){return[{tag:"div[data-video-embed]",getAttrs:e=>e instanceof HTMLElement?{src:e.getAttribute("data-src"),width:e.getAttribute("data-width")||"100%",height:e.getAttribute("data-height")||"400px",provider:e.getAttribute("data-provider")||"youtube"}:null}]},renderHTML({HTMLAttributes:e}){return["div",Kt(this.options.HTMLAttributes,e,{"data-video-embed":""})]},addNodeView(){return Sm(C7)},addCommands(){return{setVideo:e=>({commands:t})=>{let n="youtube",r="";if(e.src.includes("youtube.com")||e.src.includes("youtu.be")){n="youtube";const o=/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/,i=e.src.match(o);r=i?i[1]:""}else if(e.src.includes("vimeo.com")){n="vimeo";const o=/vimeo\.com\/(\d+)/,i=e.src.match(o);r=i?i[1]:""}else if(e.src.includes("dailymotion.com")){n="dailymotion";const o=/dailymotion\.com\/video\/([^_]+)/,i=e.src.match(o);r=i?i[1]:""}return t.insertContent({type:this.name,attrs:{src:r,width:e.width||"100%",height:e.height||"400px",provider:n}})}}}}),x7="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",w7="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",zp="numeric",Fp="ascii",Hp="alpha",Ms="asciinumeric",ys="alphanumeric",Vp="domain",Y$="emoji",E7="scheme",$7="slashscheme",Uf="whitespace";function O7(e,t){return e in t||(t[e]=[]),t[e]}function Ai(e,t,n){t[zp]&&(t[Ms]=!0,t[ys]=!0),t[Fp]&&(t[Ms]=!0,t[Hp]=!0),t[Ms]&&(t[ys]=!0),t[Hp]&&(t[ys]=!0),t[ys]&&(t[Vp]=!0),t[Y$]&&(t[Vp]=!0);for(const r in t){const o=O7(r,n);o.indexOf(e)<0&&o.push(e)}}function N7(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function fr(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}fr.groups={};fr.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const o=t.jr[r][0],i=t.jr[r][1];if(i&&o.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let o=0;o<e.length;o++)this.tt(e[o],t,n,r)},tr(e,t,n,r){r=r||fr.groups;let o;return t&&t.j?o=t:(o=new fr(t),n&&r&&Ai(t,n,r)),this.jr.push([e,o]),o},ts(e,t,n,r){let o=this;const i=e.length;if(!i)return o;for(let a=0;a<i-1;a++)o=o.tt(e[a]);return o.tt(e[i-1],t,n,r)},tt(e,t,n,r){r=r||fr.groups;const o=this;if(t&&t.j)return o.j[e]=t,t;const i=t;let a,s=o.go(e);if(s?(a=new fr,Object.assign(a.j,s.j),a.jr.push.apply(a.jr,s.jr),a.jd=s.jd,a.t=s.t):a=new fr,i){if(r)if(a.t&&typeof a.t=="string"){const l=Object.assign(N7(a.t,r),n);Ai(i,l,r)}else n&&Ai(i,n,r);a.t=i}return o.j[e]=a,a}};const Pt=(e,t,n,r,o)=>e.ta(t,n,r,o),On=(e,t,n,r,o)=>e.tr(t,n,r,o),fC=(e,t,n,r,o)=>e.ts(t,n,r,o),ke=(e,t,n,r,o)=>e.tt(t,n,r,o),xo="WORD",Wp="UWORD",J$="ASCIINUMERICAL",Q$="ALPHANUMERICAL",rl="LOCALHOST",qp="TLD",Up="UTLD",Ic="SCHEME",ma="SLASH_SCHEME",Tg="NUM",Kp="WS",Pg="NL",Rs="OPENBRACE",Is="CLOSEBRACE",uu="OPENBRACKET",du="CLOSEBRACKET",fu="OPENPAREN",hu="CLOSEPAREN",pu="OPENANGLEBRACKET",mu="CLOSEANGLEBRACKET",gu="FULLWIDTHLEFTPAREN",vu="FULLWIDTHRIGHTPAREN",bu="LEFTCORNERBRACKET",yu="RIGHTCORNERBRACKET",Cu="LEFTWHITECORNERBRACKET",Su="RIGHTWHITECORNERBRACKET",xu="FULLWIDTHLESSTHAN",wu="FULLWIDTHGREATERTHAN",Eu="AMPERSAND",$u="APOSTROPHE",Ou="ASTERISK",qo="AT",Nu="BACKSLASH",Mu="BACKTICK",Ru="CARET",Yo="COLON",Ag="COMMA",Iu="DOLLAR",ro="DOT",Tu="EQUALS",kg="EXCLAMATION",Ir="HYPHEN",Ts="PERCENT",Pu="PIPE",Au="PLUS",ku="POUND",Ps="QUERY",Dg="QUOTE",Z$="FULLWIDTHMIDDLEDOT",_g="SEMI",oo="SLASH",As="TILDE",Du="UNDERSCORE",eO="EMOJI",_u="SYM";var tO=Object.freeze({__proto__:null,ALPHANUMERICAL:Q$,AMPERSAND:Eu,APOSTROPHE:$u,ASCIINUMERICAL:J$,ASTERISK:Ou,AT:qo,BACKSLASH:Nu,BACKTICK:Mu,CARET:Ru,CLOSEANGLEBRACKET:mu,CLOSEBRACE:Is,CLOSEBRACKET:du,CLOSEPAREN:hu,COLON:Yo,COMMA:Ag,DOLLAR:Iu,DOT:ro,EMOJI:eO,EQUALS:Tu,EXCLAMATION:kg,FULLWIDTHGREATERTHAN:wu,FULLWIDTHLEFTPAREN:gu,FULLWIDTHLESSTHAN:xu,FULLWIDTHMIDDLEDOT:Z$,FULLWIDTHRIGHTPAREN:vu,HYPHEN:Ir,LEFTCORNERBRACKET:bu,LEFTWHITECORNERBRACKET:Cu,LOCALHOST:rl,NL:Pg,NUM:Tg,OPENANGLEBRACKET:pu,OPENBRACE:Rs,OPENBRACKET:uu,OPENPAREN:fu,PERCENT:Ts,PIPE:Pu,PLUS:Au,POUND:ku,QUERY:Ps,QUOTE:Dg,RIGHTCORNERBRACKET:yu,RIGHTWHITECORNERBRACKET:Su,SCHEME:Ic,SEMI:_g,SLASH:oo,SLASH_SCHEME:ma,SYM:_u,TILDE:As,TLD:qp,UNDERSCORE:Du,UTLD:Up,UWORD:Wp,WORD:xo,WS:Kp});const bo=/[a-z]/,ds=new RegExp("\\p{L}","u"),Kf=new RegExp("\\p{Emoji}","u"),yo=/\d/,Gf=/\s/,hC="\r",Xf=`
700
+ `,M7="️",R7="‍",Yf="";let ic=null,ac=null;function I7(e=[]){const t={};fr.groups=t;const n=new fr;ic==null&&(ic=pC(x7)),ac==null&&(ac=pC(w7)),ke(n,"'",$u),ke(n,"{",Rs),ke(n,"}",Is),ke(n,"[",uu),ke(n,"]",du),ke(n,"(",fu),ke(n,")",hu),ke(n,"<",pu),ke(n,">",mu),ke(n,"(",gu),ke(n,")",vu),ke(n,"「",bu),ke(n,"」",yu),ke(n,"『",Cu),ke(n,"』",Su),ke(n,"<",xu),ke(n,">",wu),ke(n,"&",Eu),ke(n,"*",Ou),ke(n,"@",qo),ke(n,"`",Mu),ke(n,"^",Ru),ke(n,":",Yo),ke(n,",",Ag),ke(n,"$",Iu),ke(n,".",ro),ke(n,"=",Tu),ke(n,"!",kg),ke(n,"-",Ir),ke(n,"%",Ts),ke(n,"|",Pu),ke(n,"+",Au),ke(n,"#",ku),ke(n,"?",Ps),ke(n,'"',Dg),ke(n,"/",oo),ke(n,";",_g),ke(n,"~",As),ke(n,"_",Du),ke(n,"\\",Nu),ke(n,"・",Z$);const r=On(n,yo,Tg,{[zp]:!0});On(r,yo,r);const o=On(r,bo,J$,{[Ms]:!0}),i=On(r,ds,Q$,{[ys]:!0}),a=On(n,bo,xo,{[Fp]:!0});On(a,yo,o),On(a,bo,a),On(o,yo,o),On(o,bo,o);const s=On(n,ds,Wp,{[Hp]:!0});On(s,bo),On(s,yo,i),On(s,ds,s),On(i,yo,i),On(i,bo),On(i,ds,i);const l=ke(n,Xf,Pg,{[Uf]:!0}),c=ke(n,hC,Kp,{[Uf]:!0}),u=On(n,Gf,Kp,{[Uf]:!0});ke(n,Yf,u),ke(c,Xf,l),ke(c,Yf,u),On(c,Gf,u),ke(u,hC),ke(u,Xf),On(u,Gf,u),ke(u,Yf,u);const d=On(n,Kf,eO,{[Y$]:!0});ke(d,"#"),On(d,Kf,d),ke(d,M7,d);const f=ke(d,R7);ke(f,"#"),On(f,Kf,d);const h=[[bo,a],[yo,o]],m=[[bo,null],[ds,s],[yo,i]];for(let v=0;v<ic.length;v++)zo(n,ic[v],qp,xo,h);for(let v=0;v<ac.length;v++)zo(n,ac[v],Up,Wp,m);Ai(qp,{tld:!0,ascii:!0},t),Ai(Up,{utld:!0,alpha:!0},t),zo(n,"file",Ic,xo,h),zo(n,"mailto",Ic,xo,h),zo(n,"http",ma,xo,h),zo(n,"https",ma,xo,h),zo(n,"ftp",ma,xo,h),zo(n,"ftps",ma,xo,h),Ai(Ic,{scheme:!0,ascii:!0},t),Ai(ma,{slashscheme:!0,ascii:!0},t),e=e.sort((v,g)=>v[0]>g[0]?1:-1);for(let v=0;v<e.length;v++){const g=e[v][0],b=e[v][1]?{[E7]:!0}:{[$7]:!0};g.indexOf("-")>=0?b[Vp]=!0:bo.test(g)?yo.test(g)?b[Ms]=!0:b[Fp]=!0:b[zp]=!0,fC(n,g,g,b)}return fC(n,"localhost",rl,{ascii:!0}),n.jd=new fr(_u),{start:n,tokens:Object.assign({groups:t},tO)}}function nO(e,t){const n=T7(t.replace(/[A-Z]/g,s=>s.toLowerCase())),r=n.length,o=[];let i=0,a=0;for(;a<r;){let s=e,l=null,c=0,u=null,d=-1,f=-1;for(;a<r&&(l=s.go(n[a]));)s=l,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[a].length,f++),c+=n[a].length,i+=n[a].length,a++;i-=d,a-=f,c-=d,o.push({t:u.t,v:t.slice(i-c,i),s:i-c,e:i})}return o}function T7(e){const t=[],n=e.length;let r=0;for(;r<n;){let o=e.charCodeAt(r),i,a=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}function zo(e,t,n,r,o){let i;const a=t.length;for(let s=0;s<a-1;s++){const l=t[s];e.j[l]?i=e.j[l]:(i=new fr(r),i.jr=o.slice(),e.j[l]=i),e=i}return i=new fr(n),i.jr=o.slice(),e.j[t[a-1]]=i,i}function pC(e){const t=[],n=[];let r=0,o="0123456789";for(;r<e.length;){let i=0;for(;o.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let a=parseInt(e.substring(r,r+i),10);a>0;a--)n.pop();r+=i}else n.push(e[r]),r++}return t}const ol={defaultProtocol:"http",events:null,format:mC,formatHref:mC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Lg(e,t=null){let n=Object.assign({},ol);e&&(n=Object.assign(n,e instanceof Lg?e.o:e));const r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}Lg.prototype={o:ol,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let o=this.o[e];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:ol[e],typeof o=="function"&&r&&(o=o(t,n))):typeof o=="function"&&r&&(o=o(t,n.t,n)),o)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function mC(e){return e}function rO(e,t){this.t="token",this.v=e,this.tk=t}rO.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=ol.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),a={},s=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return a.href=r,s&&(a.class=s),l&&(a.target=l),c&&(a.rel=c),u&&Object.assign(a,u),{tagName:o,attributes:a,content:i,eventListeners:d}}};function Rd(e,t){class n extends rO{constructor(o,i){super(o,i),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const gC=Rd("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),vC=Rd("text"),P7=Rd("nl"),sc=Rd("url",{isLink:!0,toHref(e=ol.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==rl&&e[1].t===Yo}}),Rr=e=>new fr(e);function A7({groups:e}){const t=e.domain.concat([Eu,Ou,qo,Nu,Mu,Ru,Iu,Tu,Ir,Tg,Ts,Pu,Au,ku,oo,_u,As,Du]),n=[$u,Yo,Ag,ro,kg,Ts,Ps,Dg,_g,pu,mu,Rs,Is,du,uu,fu,hu,gu,vu,bu,yu,Cu,Su,xu,wu],r=[Eu,$u,Ou,Nu,Mu,Ru,Iu,Tu,Ir,Rs,Is,Ts,Pu,Au,ku,Ps,oo,_u,As,Du],o=Rr(),i=ke(o,As);Pt(i,r,i),Pt(i,e.domain,i);const a=Rr(),s=Rr(),l=Rr();Pt(o,e.domain,a),Pt(o,e.scheme,s),Pt(o,e.slashscheme,l),Pt(a,r,i),Pt(a,e.domain,a);const c=ke(a,qo);ke(i,qo,c),ke(s,qo,c),ke(l,qo,c);const u=ke(i,ro);Pt(u,r,i),Pt(u,e.domain,i);const d=Rr();Pt(c,e.domain,d),Pt(d,e.domain,d);const f=ke(d,ro);Pt(f,e.domain,d);const h=Rr(gC);Pt(f,e.tld,h),Pt(f,e.utld,h),ke(c,rl,h);const m=ke(d,Ir);ke(m,Ir,m),Pt(m,e.domain,d),Pt(h,e.domain,d),ke(h,ro,f),ke(h,Ir,m);const v=ke(h,Yo);Pt(v,e.numeric,gC);const g=ke(a,Ir),y=ke(a,ro);ke(g,Ir,g),Pt(g,e.domain,a),Pt(y,r,i),Pt(y,e.domain,a);const b=Rr(sc);Pt(y,e.tld,b),Pt(y,e.utld,b),Pt(b,e.domain,a),Pt(b,r,i),ke(b,ro,y),ke(b,Ir,g),ke(b,qo,c);const C=ke(b,Yo),x=Rr(sc);Pt(C,e.numeric,x);const S=Rr(sc),w=Rr();Pt(S,t,S),Pt(S,n,w),Pt(w,t,S),Pt(w,n,w),ke(b,oo,S),ke(x,oo,S);const E=ke(s,Yo),N=ke(l,Yo),O=ke(N,oo),M=ke(O,oo);Pt(s,e.domain,a),ke(s,ro,y),ke(s,Ir,g),Pt(l,e.domain,a),ke(l,ro,y),ke(l,Ir,g),Pt(E,e.domain,S),ke(E,oo,S),ke(E,Ps,S),Pt(M,e.domain,S),Pt(M,t,S),ke(M,oo,S);const I=[[Rs,Is],[uu,du],[fu,hu],[pu,mu],[gu,vu],[bu,yu],[Cu,Su],[xu,wu]];for(let k=0;k<I.length;k++){const[D,A]=I[k],L=ke(S,D);ke(w,D,L),ke(L,A,S);const T=Rr(sc);Pt(L,t,T);const R=Rr();Pt(L,n),Pt(T,t,T),Pt(T,n,R),Pt(R,t,T),Pt(R,n,R),ke(T,A,S),ke(R,A,S)}return ke(o,rl,b),ke(o,Pg,P7),{start:o,tokens:tO}}function k7(e,t,n){let r=n.length,o=0,i=[],a=[];for(;o<r;){let s=e,l=null,c=null,u=0,d=null,f=-1;for(;o<r&&!(l=s.go(n[o].t));)a.push(n[o++]);for(;o<r&&(c=l||s.go(n[o].t));)l=null,s=c,s.accepts()?(f=0,d=s):f>=0&&f++,o++,u++;if(f<0)o-=u,o<r&&(a.push(n[o]),o++);else{a.length>0&&(i.push(Jf(vC,t,a)),a=[]),o-=f,u-=f;const h=d.t,m=n.slice(o-u,o);i.push(Jf(h,t,m))}}return a.length>0&&i.push(Jf(vC,t,a)),i}function Jf(e,t,n){const r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}const D7=typeof console<"u"&&console&&console.warn||(()=>{}),_7="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",mn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function L7(){return fr.groups={},mn.scanner=null,mn.parser=null,mn.tokenQueue=[],mn.pluginQueue=[],mn.customSchemes=[],mn.initialized=!1,mn}function bC(e,t=!1){if(mn.initialized&&D7(`linkifyjs: already initialized - will not register custom scheme "${e}" ${_7}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
701
+ 1. Must only contain digits, lowercase ASCII letters or "-"
702
+ 2. Cannot start or end with "-"
703
+ 3. "-" cannot repeat`);mn.customSchemes.push([e,t])}function j7(){mn.scanner=I7(mn.customSchemes);for(let e=0;e<mn.tokenQueue.length;e++)mn.tokenQueue[e][1]({scanner:mn.scanner});mn.parser=A7(mn.scanner.tokens);for(let e=0;e<mn.pluginQueue.length;e++)mn.pluginQueue[e][1]({scanner:mn.scanner,parser:mn.parser});return mn.initialized=!0,mn}function jg(e){return mn.initialized||j7(),k7(mn.parser.start,e,nO(mn.scanner.start,e))}jg.scan=nO;function oO(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new Lg(n),o=jg(e),i=[];for(let a=0;a<o.length;a++){const s=o[a];s.isLink&&(!t||s.t===t)&&r.check(s)&&i.push(s.toFormattedObject(r))}return i}var Bg="[\0-   ᠎ -\u2029  ]",B7=new RegExp(Bg),z7=new RegExp(`${Bg}$`),F7=new RegExp(Bg,"g");function H7(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function V7(e){return new Sn({key:new kn("autolink"),appendTransaction:(t,n,r)=>{const o=t.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=t.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;const{tr:a}=r,s=II(n.doc,[...t]);if(LI(s).forEach(({newRange:c})=>{const u=PI(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1)d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(u.length){const h=r.doc.textBetween(c.from,c.to," "," ");if(!z7.test(h))return;d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")}if(d&&f){const h=f.split(B7).filter(Boolean);if(h.length<=0)return!1;const m=h[h.length-1],v=d.pos+f.lastIndexOf(m);if(!m)return!1;const g=jg(m).map(y=>y.toObject(e.defaultProtocol));if(!H7(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:v+y.start+1,to:v+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>e.validate(y.value)).filter(y=>e.shouldAutoLink(y.value)).forEach(y=>{bm(y.from,y.to,r.doc).some(b=>b.mark.type===e.type)||a.addMark(y.from,y.to,e.type.create({href:y.href}))})}}),!!a.steps.length)return a}})}function W7(e){return new Sn({key:new kn("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||!t.editable)return!1;let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{const l=r.target;if(!l)return!1;const c=e.editor.view.dom;a=l.closest("a"),a&&!c.contains(a)&&(a=null)}if(!a)return!1;let s=!1;if(e.enableClickSelection&&(s=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){const l=ox(t.state,e.type.name),c=(o=a.href)!=null?o:l.href,u=(i=a.target)!=null?i:l.target;c&&(window.open(c,u),s=!0)}return s}}})}function q7(e){return new Sn({key:new kn("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{shouldAutoLink:o}=e,{state:i}=t,{selection:a}=i,{empty:s}=a;if(s)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const c=oO(l,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||o!==void 0&&!o(c.value)?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}function xi(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(F7,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var U7=Jr.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){bC(e);return}bC(e.scheme,e.optionalSlashes)})},onDestroy(){L7()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!xi(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{const t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;const o=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||!/\./.test(o))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!xi(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!xi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Kt(this.options.HTMLAttributes,e),0]:["a",Kt(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;const r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!xi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!xi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ci({find:e=>{const t=[];if(e){const{protocols:n,defaultProtocol:r}=this.options,o=oO(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:a=>!!xi(a,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&t.push({text:i.value,data:{href:i.href},index:i.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(V7({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!xi(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(W7({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(q7({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),K7=U7;const G7=nn.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>{var t;return(t=e.style.fontSize)==null?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),X7=nn.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>{var t;return(t=e.style.fontFamily)==null?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.fontFamily?{style:`font-family: ${e.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:e=>({chain:t})=>t().setMark("textStyle",{fontFamily:e}).run(),unsetFontFamily:()=>({chain:e})=>e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Y7=[p7.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),YW.configure({color:"#3b82f6",width:2}),JW,P8,TW.configure({types:[rC.name,X$.name]}),rC,X7,G7,e8.configure({multicolor:!0}),A8,t8,n8,l8.configure({types:["heading","paragraph","tableCell","tableHeader"]}),s8,a8.configure({nested:!0}),xW.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),o8,r8,EW.configure({HTMLAttributes:{class:"table-cell"}}),y7.configure({inline:!1,allowBase64:!0}),S7.configure({inline:!1}),v7,K7.extend({addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>t.style?{style:t.style}:{}},class:{default:null,parseHTML:t=>t.getAttribute("class"),renderHTML:t=>t.class?{class:t.class}:{}}}}}).configure({openOnClick:!1,autolink:!0,defaultProtocol:"https"})],J7={"cyber-editor":"_cyber-editor_1isyx_1"};function zg({content:e="",slotBefore:t=!1,className:n="",editorClassName:r="",editable:o=!0,onChange:i}){const a=DT({extensions:Y7,content:e,editable:o,onUpdate:({editor:s})=>{i==null||i(s.getHTML())}});return $.useEffect(()=>{a&&e!==a.getHTML()&&a.commands.setContent(e,!1)},[a,e]),a?j.jsxs("div",{className:ee(J7["cyber-editor"],n),children:[t&&j.jsx(RW,{editor:a}),j.jsx($T,{editor:a,className:r})]}):j.jsx(wO,{full:!0})}function Q7(e){return j.jsx(zg,{...e,editable:!0,slotBefore:!0})}function Z7(e){return j.jsx(zg,{...e,editable:!1,slotBefore:!1})}exports.CyberEditor=Q7;exports.CyberViewer=Z7;exports.EditorProvider=zg;